mirror of
https://github.com/VLSIDA/OpenRAM.git
synced 2026-09-08 04:11:47 +02:00
Merge branch 'dev' into custom_mod
This commit is contained in:
@@ -25,8 +25,7 @@ class hierarchical_decoder(design.design):
|
||||
self.pre2x4_inst = []
|
||||
self.pre3x8_inst = []
|
||||
|
||||
b = factory.create(module_type="bitcell")
|
||||
self.cell_height = b.height
|
||||
(self.cell_height, self.cell_multiple) = self.find_decoder_height()
|
||||
self.rows = rows
|
||||
self.num_inputs = math.ceil(math.log(self.rows, 2))
|
||||
(self.no_of_pre2x4, self.no_of_pre3x8)=self.determine_predecodes(self.num_inputs)
|
||||
@@ -35,6 +34,24 @@ class hierarchical_decoder(design.design):
|
||||
if not OPTS.netlist_only:
|
||||
self.create_layout()
|
||||
|
||||
def find_decoder_height(self):
|
||||
b = factory.create(module_type="bitcell")
|
||||
# Old behavior
|
||||
return (b.height, 1)
|
||||
|
||||
# Search for the smallest multiple that works
|
||||
cell_multiple = 1
|
||||
while cell_multiple < 3:
|
||||
cell_height = cell_multiple * b.height
|
||||
and3 = factory.create(module_type="pand3",
|
||||
height=cell_height)
|
||||
(drc_errors, lvs_errors) = and3.DRC_LVS(force_check=True)
|
||||
if drc_errors + lvs_errors == 0:
|
||||
return (cell_height, cell_multiple)
|
||||
cell_multiple += 1
|
||||
else:
|
||||
debug.error("Couldn't find a valid decoder height multiple.", -1)
|
||||
|
||||
def create_netlist(self):
|
||||
self.add_modules()
|
||||
self.setup_netlist_constants()
|
||||
|
||||
@@ -73,11 +73,12 @@ class precharge_array(design.design):
|
||||
|
||||
def add_layout_pins(self):
|
||||
|
||||
en_bar_pin = self.pc_cell.get_pin("en_bar")
|
||||
self.add_layout_pin(text="en_bar",
|
||||
layer="m1",
|
||||
offset=self.pc_cell.get_pin("en_bar").ll(),
|
||||
layer=en_bar_pin.layer,
|
||||
offset=en_bar_pin.ll(),
|
||||
width=self.width,
|
||||
height=drc("minwidth_m1"))
|
||||
height=en_bar_pin.height())
|
||||
|
||||
for inst in self.local_insts:
|
||||
self.copy_layout_pin(inst, "vdd")
|
||||
|
||||
Reference in New Issue
Block a user