@@ -233,9 +233,14 @@ def create_layout(self):
233233
234234 ll = vector (- 1 * self .dummy_col_insts [0 ].width , - 1 * self .dummy_row_insts [0 ].height )
235235 self .translate_all (ll )
236- self .capped_rba_width = self .dummy_col_insts [0 ].width + self .dummy_row_insts [0 ].width + self .dummy_col_insts [1 ].width
237- self .capped_rba_height = self .dummy_col_insts [0 ].height
238-
236+
237+ self .capped_rba_width = (self .dummy_col_insts [0 ].width
238+ + self .replica_bitcell_array_inst .width
239+ + self .dummy_col_insts [1 ].width )
240+ self .capped_rba_height = (self .dummy_row_insts [0 ].height
241+ + self .replica_bitcell_array_inst .height
242+ + self .dummy_row_insts [1 ].height )
243+
239244
240245 self .route_power_ring (self .supply_stack [2 ], self .supply_stack [0 ])
241246 self .route_supplies ()
@@ -325,20 +330,22 @@ def add_end_caps(self):
325330 self .dummy_col_insts [1 ].place (offset = offset )
326331
327332 def add_layout_pins (self ):
333+ self .pin_width = self .capped_rba_width + 4 * self .supply_rail_pitch
334+ self .pin_height = self .capped_rba_height + 4 * self .supply_rail_pitch
328335
329336 for pin_name in self .used_wordline_names + self .bitline_pin_list :
330337 pin = self .replica_bitcell_array_inst .get_pin (pin_name )
331338
332339 if "wl" in pin_name :
333340 # wordlines
334341 pin_offset = pin .ll ().scale (0 , 1 )
335- pin_width = self .capped_rba_width
342+ pin_width = self .pin_width
336343 pin_height = pin .height ()
337344 else :
338345 # bitlines
339346 pin_offset = pin .ll ().scale (1 , 0 )
340347 pin_width = pin .width ()
341- pin_height = self .capped_rba_height
348+ pin_height = self .pin_height
342349
343350 self .add_layout_pin (text = pin_name ,
344351 layer = pin .layer ,
0 commit comments