From add0e3ad68d7d64c9e9135d800278dca60cf8b08 Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Tue, 11 Sep 2018 10:17:24 -0700 Subject: [PATCH 1/4] Add none option for verify wrapper with warning messages. --- compiler/verify/__init__.py | 6 +++--- compiler/verify/none.py | 41 +++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 compiler/verify/none.py diff --git a/compiler/verify/__init__.py b/compiler/verify/__init__.py index 91c52a90..1f0ffaab 100644 --- a/compiler/verify/__init__.py +++ b/compiler/verify/__init__.py @@ -30,7 +30,7 @@ if OPTS.check_lvsdrc and OPTS.tech_name == "freepdk45": debug.check(OPTS.drc_exe[0]!="magic","Magic does not support FreePDK45 for DRC.") if OPTS.drc_exe == None: - pass + from .none import run_drc,print_drc_stats elif "calibre"==OPTS.drc_exe[0]: from .calibre import run_drc,print_drc_stats elif "assura"==OPTS.drc_exe[0]: @@ -41,7 +41,7 @@ else: debug.warning("Did not find a supported DRC tool.") if OPTS.lvs_exe == None: - pass + from .none import run_lvs,print_lvs_stats elif "calibre"==OPTS.lvs_exe[0]: from .calibre import run_lvs,print_lvs_stats elif "assura"==OPTS.lvs_exe[0]: @@ -53,7 +53,7 @@ else: if OPTS.pex_exe == None: - pass + from .none import run_pex,print_pex_stats elif "calibre"==OPTS.pex_exe[0]: from .calibre import run_pex,print_pex_stats elif "magic"==OPTS.pex_exe[0]: diff --git a/compiler/verify/none.py b/compiler/verify/none.py new file mode 100644 index 00000000..531a394d --- /dev/null +++ b/compiler/verify/none.py @@ -0,0 +1,41 @@ +""" +This is a DRC/LVS/PEX interface file the case with no DRC/LVS tools. + +""" +import debug + +# Only print the warning once. +drc_warned = False +lvs_warned = False +pex_warned = False + +def run_drc(cell_name, gds_name, extract=False): + global drc_warned + if not drc_warned: + debug.warning("DRC unable to run.") + drc_warned=True + # Since we warned, return a failing test. + return 1 + +def run_lvs(cell_name, gds_name, sp_name, final_verification=False): + global lvs_warned + if not lvs_warned: + debug.warning("LVS unable to run.") + lvs_warned=True + # Since we warned, return a failing test. + return 1 + +def run_pex(name, gds_name, sp_name, output=None): + global pex_warned + if not pex_warned: + debug.warning("PEX unable to run.") + pex_warned=True + # Since we warned, return a failing test. + return 1 + +def print_drc_stats(): + pass +def print_lvs_stats(): + pass +def print_pex_stats(): + pass From fcc4a75295f77ceb5468cb2a6f5574e479e48a55 Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Tue, 11 Sep 2018 13:28:28 -0700 Subject: [PATCH 2/4] Create VCG using nets as nodes rather than pins. --- compiler/base/hierarchy_layout.py | 98 ++++++++++++++++++++-------- compiler/tests/20_sram_1bank_test.py | 4 +- 2 files changed, 72 insertions(+), 30 deletions(-) diff --git a/compiler/base/hierarchy_layout.py b/compiler/base/hierarchy_layout.py index 3ac5ea63..331e1195 100644 --- a/compiler/base/hierarchy_layout.py +++ b/compiler/base/hierarchy_layout.py @@ -602,6 +602,7 @@ class layout(lef.lef): """ Connect a mapping of pin -> name for a bus. This could be replaced with a channel router in the future. + NOTE: This has only really been tested with point-to-point connections (not multiple pins on a net). """ (horizontal_layer, via_layer, vertical_layer)=layer_stack if horizontal: @@ -720,6 +721,7 @@ class layout(lef.lef): try to minimize the number of tracks -- instead, it picks an order to avoid the vertical conflicts between pins. """ + local_debug = True def remove_net_from_graph(pin, g): # Remove the pin from the keys @@ -732,6 +734,29 @@ class layout(lef.lef): g[other_pin]=conflicts return g + def vcg_pins_overlap(pins1, pins2, vertical): + # Check all the pin pairs on two nets and return a pin + # overlap if any pin overlaps vertically + for pin1 in pins1: + for pin2 in pins2: + if vcg_pin_overlap(pin1, pin2, vertical): + return True + + return False + + def vcg_pin_overlap(pin1, pin2, vertical): + # Check for vertical overlap of the two pins + + # Pin 1 must be in the "LEFT" set and overlap the right + x_overlap = pin1.lx() < pin2.lx() and abs(pin1.center().x-pin2.center().x) pin2.by() and abs(pin1.center().y-pin2.center().y) Date: Tue, 11 Sep 2018 13:43:47 -0700 Subject: [PATCH 3/4] Finish new VCG testing. Reversed VCG graph edge directions. Channel tracks get added left to right or top down like normal left edge algorithm examples. --- compiler/base/hierarchy_layout.py | 52 +++++++++++----------------- compiler/tests/20_sram_1bank_test.py | 4 +-- 2 files changed, 23 insertions(+), 33 deletions(-) diff --git a/compiler/base/hierarchy_layout.py b/compiler/base/hierarchy_layout.py index 331e1195..191fa492 100644 --- a/compiler/base/hierarchy_layout.py +++ b/compiler/base/hierarchy_layout.py @@ -721,8 +721,6 @@ class layout(lef.lef): try to minimize the number of tracks -- instead, it picks an order to avoid the vertical conflicts between pins. """ - local_debug = True - def remove_net_from_graph(pin, g): # Remove the pin from the keys g.pop(pin,None) @@ -747,11 +745,11 @@ class layout(lef.lef): def vcg_pin_overlap(pin1, pin2, vertical): # Check for vertical overlap of the two pins - # Pin 1 must be in the "LEFT" set and overlap the right - x_overlap = pin1.lx() < pin2.lx() and abs(pin1.center().x-pin2.center().x) pin2.by() and abs(pin1.center().x-pin2.center().x) pin2.by() and abs(pin1.center().y-pin2.center().y) Date: Tue, 11 Sep 2018 14:47:55 -0700 Subject: [PATCH 4/4] Fix copy pasta error in create vertical channel route --- compiler/base/hierarchy_layout.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/base/hierarchy_layout.py b/compiler/base/hierarchy_layout.py index 191fa492..5cd67eea 100644 --- a/compiler/base/hierarchy_layout.py +++ b/compiler/base/hierarchy_layout.py @@ -835,13 +835,13 @@ class layout(lef.lef): offset -= vector(0,pitch) - def create_vertical_channel_route(self, route_map, left_inst, right_inst, offset, + def create_vertical_channel_route(self, route_map, left_pins, right_pins, offset, layer_stack=("metal1", "via1", "metal2"), pitch=None): """ Wrapper to create a vertical channel route """ - self.create_channel_route(route_map, left_inst, right_inst, offset, + self.create_channel_route(route_map, left_pins, right_pins, offset, layer_stack, pitch, vertical=True) def create_horizontal_channel_route(self, route_map, top_pins, bottom_pins, offset,