Optional save supply pin centers for summer project

This commit is contained in:
mrg 2021-06-23 10:03:38 -07:00
parent 28c99dae4a
commit ef733bb7aa
1 changed files with 14 additions and 4 deletions

View File

@ -102,6 +102,16 @@ class supply_tree_router(router):
debug.info(1, "Routing {0} with {1} pins.".format(pin_name,
remaining_components))
# Save pin center locations
if False:
debug.info(2, "Creating location file {0}_{1}.csv".format(self.cell.name, pin_name))
f = open("{0}_{1}.csv".format(self.cell.name, pin_name), "w")
pin_size = len(self.pin_groups[pin_name])
for index1, pg1 in enumerate(self.pin_groups[pin_name]):
location = list(pg1.grids)[0]
f.write("{0},{1},{2}\n".format(location.x, location.y, location.z))
f.close()
# Create full graph
debug.info(2, "Creating adjacency matrix")
pin_size = len(self.pin_groups[pin_name])