From 42719b8ec289c98368f538183968982f2d7caa9c Mon Sep 17 00:00:00 2001 From: Michael Timothy Grimes Date: Wed, 12 Sep 2018 01:53:41 -0700 Subject: [PATCH] Fixing netlist_only errors. Removing netlist_only option from ptx because it must always generate layout for pbitcell. gds_write, drc check, and lvs check in local_check() are now in a 'if not OPTS.netlist_only' conditional. These functions will generate errors in netlist_only mode since there is no gds layout to write or check. --- compiler/pgates/pbitcell.py | 5 ++++- compiler/pgates/ptx.py | 5 +++-- compiler/tests/testutils.py | 18 ++++++++++-------- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/compiler/pgates/pbitcell.py b/compiler/pgates/pbitcell.py index 24fdfb60..1eac5d3c 100644 --- a/compiler/pgates/pbitcell.py +++ b/compiler/pgates/pbitcell.py @@ -70,7 +70,10 @@ class pbitcell(design.design): self.route_read_access() self.extend_well() - self.offset_all_coordinates() + # in netlist_only mode, calling offset_all_coordinates will not be possible + # this function is not needed to calculate the dimensions of pbitcell in netlist_only mode though + if not OPTS.netlist_only: + self.offset_all_coordinates() self.DRC_LVS() def add_pins(self): diff --git a/compiler/pgates/ptx.py b/compiler/pgates/ptx.py index e7fcd5f4..e5a1a51b 100644 --- a/compiler/pgates/ptx.py +++ b/compiler/pgates/ptx.py @@ -41,8 +41,9 @@ class ptx(design.design): self.num_contacts = num_contacts self.create_netlist() - if not OPTS.netlist_only: - self.create_layout() + # We must always create ptx layout for pbitcell + # some transistor sizes in other netlist depend on pbitcell + self.create_layout() diff --git a/compiler/tests/testutils.py b/compiler/tests/testutils.py index e1c02f45..19d1fe3d 100644 --- a/compiler/tests/testutils.py +++ b/compiler/tests/testutils.py @@ -29,17 +29,19 @@ class openram_test(unittest.TestCase): tempgds = OPTS.openram_temp + "temp.gds" a.sp_write(tempspice) - a.gds_write(tempgds) + # cannot write gds in netlist_only mode + if not OPTS.netlist_only: + a.gds_write(tempgds) - import verify - result=verify.run_drc(a.name, tempgds) - if result != 0: - self.fail("DRC failed: {}".format(a.name)) + import verify + result=verify.run_drc(a.name, tempgds) + if result != 0: + self.fail("DRC failed: {}".format(a.name)) - result=verify.run_lvs(a.name, tempgds, tempspice, final_verification) - if result != 0: - self.fail("LVS mismatch: {}".format(a.name)) + result=verify.run_lvs(a.name, tempgds, tempspice, final_verification) + if result != 0: + self.fail("LVS mismatch: {}".format(a.name)) if OPTS.purge_temp: self.cleanup()