proper tiling

This commit is contained in:
Jesse Cirimelli-Low
2023-07-26 18:05:36 -07:00
parent 4baec81f82
commit 8a4b34dee1
3 changed files with 20 additions and 6 deletions
+12 -2
View File
@@ -97,7 +97,7 @@ class pattern():
for dy in range(len(block)):
for dx in range(len(block[0])):
inst = block[dy][dx]
self.parent_design.cell_inst[x + dx, y + dy] = self.parent_design.add_existing_inst(inst)
self.parent_design.cell_inst[x + dx, y + dy] = self.parent_design.add_existing_inst(inst,"bit_r{}_c{}".format(y +dy, x+dx))
self.parent_design.connect_inst(self.parent_design.get_bitcell_pins(x+dx, y+dy))
def place_block(self, block: block, x: int, y: int, place_x: float, place_y: float) -> None:
@@ -106,11 +106,21 @@ class pattern():
for dy in range(len(block)):
for dx in range(len(block[0])):
inst = self.parent_design.cell_inst[x + dx, y +dy]
inst.place((place_x + x_offset, place_y + y_offset), inst.mirror, inst.rotate)
self.place_inst(inst, (place_x + x_offset, place_y + y_offset))
#inst.place((place_x + x_offset, place_y + y_offset), inst.mirror, inst.rotate)
x_offset += inst.width
x_offset = 0
y_offset += inst.height
def place_inst(self, inst, offset) -> None:
x = offset[0]
y = offset[1]
if "X" in inst.mirror:
y += inst.height
if "Y" in inst.mirror:
x += inst.width
inst.place((x, y), inst.mirror, inst.rotate)
def connect_array(self) -> None:
x = 0
y = 0