From cda2e93cd7ca887229a9c6e89e688418bf2901d1 Mon Sep 17 00:00:00 2001 From: Michael Timothy Grimes Date: Mon, 22 Oct 2018 09:17:03 -0700 Subject: [PATCH] Adding fix to netlist_only mode in geometry.py. Uncommenting functional tests and running both tests in netlist_only mode. --- compiler/base/geometry.py | 8 ++++++-- compiler/tests/22_psram_func_test.py | 5 ++--- compiler/tests/22_sram_func_test.py | 4 ++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/compiler/base/geometry.py b/compiler/base/geometry.py index 8f0edb29..b766b1af 100644 --- a/compiler/base/geometry.py +++ b/compiler/base/geometry.py @@ -143,8 +143,12 @@ class instance(geometry): self.rotate = rotate self.offset = vector(offset).snap_to_grid() self.mirror = mirror - self.width = round_to_grid(mod.width) - self.height = round_to_grid(mod.height) + if OPTS.netlist_only: + self.width = 0 + self.height = 0 + else: + self.width = round_to_grid(mod.width) + self.height = round_to_grid(mod.height) self.compute_boundary(offset,mirror,rotate) debug.info(4, "creating instance: " + self.name) diff --git a/compiler/tests/22_psram_func_test.py b/compiler/tests/22_psram_func_test.py index ab59b8b8..6a527754 100755 --- a/compiler/tests/22_psram_func_test.py +++ b/compiler/tests/22_psram_func_test.py @@ -11,12 +11,11 @@ import globals from globals import OPTS import debug -@unittest.skip("SKIPPING 22_psram_func_test") +#@unittest.skip("SKIPPING 22_psram_func_test") class psram_func_test(openram_test): def runTest(self): globals.init_openram("config_20_{0}".format(OPTS.tech_name)) - #OPTS.spice_name="hspice" OPTS.analytical_delay = False OPTS.netlist_only = True OPTS.bitcell = "pbitcell" @@ -49,7 +48,7 @@ class psram_func_test(openram_test): corner = (OPTS.process_corners[0], OPTS.supply_voltages[0], OPTS.temperatures[0]) f = functional(s.s, tempspice, corner) - f.num_cycles = 5 + f.num_cycles = 10 (fail,error) = f.run() self.assertTrue(fail,error) diff --git a/compiler/tests/22_sram_func_test.py b/compiler/tests/22_sram_func_test.py index 15382b1f..de55c2ce 100755 --- a/compiler/tests/22_sram_func_test.py +++ b/compiler/tests/22_sram_func_test.py @@ -11,13 +11,13 @@ import globals from globals import OPTS import debug -@unittest.skip("SKIPPING 22_sram_func_test") +#@unittest.skip("SKIPPING 22_sram_func_test") class sram_func_test(openram_test): def runTest(self): globals.init_openram("config_20_{0}".format(OPTS.tech_name)) - #OPTS.spice_name="hspice" OPTS.analytical_delay = False + OPTS.netlist_only = True # This is a hack to reload the characterizer __init__ with the spice version from importlib import reload