mirror of
https://github.com/VLSIDA/OpenRAM.git
synced 2026-08-22 14:17:35 +02:00
move apporach select to options.py
This commit is contained in:
@@ -408,7 +408,7 @@ class sram_1bank(design, verilog, lef):
|
|||||||
design=self,
|
design=self,
|
||||||
mod=mod)
|
mod=mod)
|
||||||
rtr.route(self.pins_to_route)
|
rtr.route(self.pins_to_route)
|
||||||
elif route_option == "fast":
|
elif route_option == "quality":
|
||||||
# use io_pin_placer
|
# use io_pin_placer
|
||||||
# put the IO pins at the edge
|
# put the IO pins at the edge
|
||||||
from openram.router.io_pin_placer import io_pin_placer as placer
|
from openram.router.io_pin_placer import io_pin_placer as placer
|
||||||
@@ -1135,7 +1135,7 @@ class sram_1bank(design, verilog, lef):
|
|||||||
if OPTS.route_supplies:
|
if OPTS.route_supplies:
|
||||||
if route_option == "classic":
|
if route_option == "classic":
|
||||||
self.route_supplies(init_bbox)
|
self.route_supplies(init_bbox)
|
||||||
else: # fast
|
else: # quality
|
||||||
self.route_supplies_constructive(init_bbox)
|
self.route_supplies_constructive(init_bbox)
|
||||||
|
|
||||||
def route_dffs(self, add_routes=True):
|
def route_dffs(self, add_routes=True):
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ class options(optparse.Values):
|
|||||||
words_per_row = None
|
words_per_row = None
|
||||||
num_spare_rows = 0
|
num_spare_rows = 0
|
||||||
num_spare_cols = 0
|
num_spare_cols = 0
|
||||||
|
# Route approach
|
||||||
|
route_approach = "classic"# "classic" or "quality"
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# ROM configuration options
|
# ROM configuration options
|
||||||
|
|||||||
+4
-5
@@ -20,7 +20,7 @@ class sram():
|
|||||||
results.
|
results.
|
||||||
We can later add visualizer and other high-level functions as needed.
|
We can later add visualizer and other high-level functions as needed.
|
||||||
"""
|
"""
|
||||||
def __init__(self, sram_config=None, name=None, route_option="classic"):
|
def __init__(self, sram_config=None, name=None):
|
||||||
|
|
||||||
# Create default configs if custom config isn't provided
|
# Create default configs if custom config isn't provided
|
||||||
if sram_config is None:
|
if sram_config is None:
|
||||||
@@ -48,7 +48,6 @@ class sram():
|
|||||||
start_time = datetime.datetime.now()
|
start_time = datetime.datetime.now()
|
||||||
|
|
||||||
self.name = name
|
self.name = name
|
||||||
self.route_option = route_option # "classic" or "fast"
|
|
||||||
|
|
||||||
from openram.modules.sram_1bank import sram_1bank as sram
|
from openram.modules.sram_1bank import sram_1bank as sram
|
||||||
|
|
||||||
@@ -57,7 +56,7 @@ class sram():
|
|||||||
self.s.create_netlist()# not placed & routed jet
|
self.s.create_netlist()# not placed & routed jet
|
||||||
|
|
||||||
# choose the routung method, maze router or constructive
|
# choose the routung method, maze router or constructive
|
||||||
if self.route_option == "classic":
|
if OPTS.route_approach == "classic":
|
||||||
cur_state = "IDLE"
|
cur_state = "IDLE"
|
||||||
if not OPTS.netlist_only:
|
if not OPTS.netlist_only:
|
||||||
i = 0
|
i = 0
|
||||||
@@ -112,13 +111,13 @@ class sram():
|
|||||||
else:
|
else:
|
||||||
cur_state = "FINISH"
|
cur_state = "FINISH"
|
||||||
break
|
break
|
||||||
elif self.route_option == "fast":
|
elif OPTS.route_approach == "quality":
|
||||||
if not OPTS.netlist_only:
|
if not OPTS.netlist_only:
|
||||||
i = 0
|
i = 0
|
||||||
while i < 10:
|
while i < 10:
|
||||||
debug.warning("current i: i = {0}".format(i))
|
debug.warning("current i: i = {0}".format(i))
|
||||||
try:
|
try:
|
||||||
self.s.create_layout(position_add=i, route_option=route_option)
|
self.s.create_layout(position_add=i, route_option="quality")
|
||||||
except AssertionError as e:
|
except AssertionError as e:
|
||||||
i = i + 1
|
i = i + 1
|
||||||
if i == 9: #failed in routing
|
if i == 9: #failed in routing
|
||||||
|
|||||||
+1
-1
@@ -70,7 +70,7 @@ for path in output_files:
|
|||||||
|
|
||||||
# Create an SRAM (we can also pass sram_config, see documentation/tutorials for details)
|
# Create an SRAM (we can also pass sram_config, see documentation/tutorials for details)
|
||||||
from openram import sram
|
from openram import sram
|
||||||
s = sram(route_option="classic")# "classic" or "fast"
|
s = sram()
|
||||||
# Output the files for the resulting SRAM
|
# Output the files for the resulting SRAM
|
||||||
s.save()
|
s.save()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user