From c4c844a8a272bb1aeb54604f516add5b158f8d1b Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Wed, 6 Mar 2019 14:14:46 -0800 Subject: [PATCH] Remove duplicate module name checking since we use the factory --- compiler/base/hierarchy_design.py | 27 --------------------------- compiler/globals.py | 4 ---- 2 files changed, 31 deletions(-) diff --git a/compiler/base/hierarchy_design.py b/compiler/base/hierarchy_design.py index 1dc052e3..5b45abe1 100644 --- a/compiler/base/hierarchy_design.py +++ b/compiler/base/hierarchy_design.py @@ -25,33 +25,6 @@ class hierarchy_design(hierarchy_spice.spice, hierarchy_layout.layout): hierarchy_spice.spice.__init__(self, name) - # Check if the name already exists, if so, give an error - # because each reference must be a unique name. - # These modules ensure unique names or have no changes if they - # aren't unique - ok_list = ['contact', - 'ptx', - 'pbitcell', - 'replica_pbitcell', - 'sram', - 'hierarchical_predecode2x4', - 'hierarchical_predecode3x8'] - - # Library cells don't change - if self.is_library_cell: - return - # Name is unique so far - elif name not in hierarchy_design.name_map: - hierarchy_design.name_map.append(name) - else: - # Name is in our list of exceptions (they don't change) - for ok_names in ok_list: - if ok_names == self.__class__.__name__: - break - else: - debug.error("Duplicate layout reference name {0} of class {1}. GDS2 requires names be unique.".format(name,self.__class__),-1) - - def get_layout_pins(self,inst): """ Return a map of pin locations of the instance offset """ # find the instance diff --git a/compiler/globals.py b/compiler/globals.py index cef24cf6..590fc97f 100644 --- a/compiler/globals.py +++ b/compiler/globals.py @@ -137,10 +137,6 @@ def init_openram(config_file, is_unit_test=True): setup_bitcell() - # Reset the static duplicate name checker for unit tests. - import hierarchy_design - hierarchy_design.hierarchy_design.name_map=[] - global OPTS global CHECKPOINT_OPTS