diff --git a/compiler/modules/sram_1bank.py b/compiler/modules/sram_1bank.py index 6cc20605..370f5e52 100644 --- a/compiler/modules/sram_1bank.py +++ b/compiler/modules/sram_1bank.py @@ -408,7 +408,7 @@ class sram_1bank(design, verilog, lef): design=self, mod=mod) rtr.route(self.pins_to_route) - elif route_option == "fast": + elif route_option == "quality": # use io_pin_placer # put the IO pins at the edge 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 route_option == "classic": self.route_supplies(init_bbox) - else: # fast + else: # quality self.route_supplies_constructive(init_bbox) def route_dffs(self, add_routes=True): diff --git a/compiler/options.py b/compiler/options.py index d97ee70e..4d1fb861 100644 --- a/compiler/options.py +++ b/compiler/options.py @@ -52,6 +52,8 @@ class options(optparse.Values): words_per_row = None num_spare_rows = 0 num_spare_cols = 0 + # Route approach + route_approach = "classic"# "classic" or "quality" ################### # ROM configuration options diff --git a/compiler/sram.py b/compiler/sram.py index 98127aa6..9260551b 100644 --- a/compiler/sram.py +++ b/compiler/sram.py @@ -20,7 +20,7 @@ class sram(): results. 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 if sram_config is None: @@ -48,7 +48,6 @@ class sram(): start_time = datetime.datetime.now() self.name = name - self.route_option = route_option # "classic" or "fast" from openram.modules.sram_1bank import sram_1bank as sram @@ -57,7 +56,7 @@ class sram(): self.s.create_netlist()# not placed & routed jet # choose the routung method, maze router or constructive - if self.route_option == "classic": + if OPTS.route_approach == "classic": cur_state = "IDLE" if not OPTS.netlist_only: i = 0 @@ -112,13 +111,13 @@ class sram(): else: cur_state = "FINISH" break - elif self.route_option == "fast": + elif OPTS.route_approach == "quality": if not OPTS.netlist_only: i = 0 while i < 10: debug.warning("current i: i = {0}".format(i)) 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: i = i + 1 if i == 9: #failed in routing diff --git a/sram_compiler.py b/sram_compiler.py index 9d5fc4b3..989a524e 100755 --- a/sram_compiler.py +++ b/sram_compiler.py @@ -70,7 +70,7 @@ for path in output_files: # Create an SRAM (we can also pass sram_config, see documentation/tutorials for details) from openram import sram -s = sram(route_option="classic")# "classic" or "fast" +s = sram() # Output the files for the resulting SRAM s.save()