Add stdc bounding box too

This commit is contained in:
mrg 2020-06-11 11:54:16 -07:00
parent 098219d56c
commit 089331ced3
1 changed files with 28 additions and 17 deletions

View File

@ -695,14 +695,19 @@ class layout():
# we should add a boundary just for DRC in some technologies # we should add a boundary just for DRC in some technologies
if not self.is_library_cell and not self.bounding_box: if not self.is_library_cell and not self.bounding_box:
# If there is a boundary layer, and we didn't create one, add one. # If there is a boundary layer, and we didn't create one, add one.
boundary_layers = []
if "boundary" in techlayer.keys(): if "boundary" in techlayer.keys():
boundary_layer = "boundary" boundary_layers.append("boundary")
if "stdc" in techlayer.keys():
boundary_layers.append("stdc")
boundary = [self.find_lowest_coords(), boundary = [self.find_lowest_coords(),
self.find_highest_coords()] self.find_highest_coords()]
debug.check(boundary[0] and boundary[1], "No shapes to make a boundary.") debug.check(boundary[0] and boundary[1], "No shapes to make a boundary.")
height = boundary[1][1] - boundary[0][1] height = boundary[1][1] - boundary[0][1]
width = boundary[1][0] - boundary[0][0] width = boundary[1][0] - boundary[0][0]
for boundary_layer in boundary_layers:
(layer_number, layer_purpose) = techlayer[boundary_layer] (layer_number, layer_purpose) = techlayer[boundary_layer]
gds_layout.addBox(layerNumber=layer_number, gds_layout.addBox(layerNumber=layer_number,
purposeNumber=layer_purpose, purposeNumber=layer_purpose,
@ -1259,7 +1264,13 @@ class layout():
if OPTS.netlist_only: if OPTS.netlist_only:
return return
boundary_layer = "boundary" boundary_layers = []
if "stdc" in techlayer.keys():
boundary_layers.append("stdc")
if "boundary" in techlayer.keys():
boundary_layers.append("boundary")
# Save the last one as self.bounding_box
for boundary_layer in boundary_layers:
if not ur: if not ur:
self.bounding_box = self.add_rect(layer=boundary_layer, self.bounding_box = self.add_rect(layer=boundary_layer,
offset=ll, offset=ll,