diff --git a/compiler/base/hierarchy_layout.py b/compiler/base/hierarchy_layout.py index 7c998176..26fc6de9 100644 --- a/compiler/base/hierarchy_layout.py +++ b/compiler/base/hierarchy_layout.py @@ -190,7 +190,8 @@ class layout(): debug.error("Should use a pin iterator since more than one pin {}".format(text),-1) # If we have one pin, return it and not the list. # Otherwise, should use get_pins() - return self.pin_map[text][0] + any_pin = next(iter(self.pin_map[text])) + return any_pin except Exception as e: #print e self.gds_write("missing_pin.gds") @@ -205,7 +206,7 @@ class layout(): if text in self.pin_map.keys(): return self.pin_map[text] else: - return [] + return set() def copy_layout_pin(self, instance, pin_name, new_name=""): """ @@ -260,7 +261,7 @@ class layout(): """ Delete a labeled pin (or all pins of the same name) """ - self.pin_map[text]=[] + self.pin_map[text]=set() def add_layout_pin(self, text, layer, offset, width=None, height=None): """ @@ -277,13 +278,11 @@ class layout(): # Check if there's a duplicate! # and if so, silently ignore it. # Rounding errors may result in some duplicates. - pin_list = self.pin_map[text] - for pin in pin_list: - if pin == new_pin: - return pin - self.pin_map[text].append(new_pin) + if new_pin not in self.pin_map[text]: + self.pin_map[text].add(new_pin) except KeyError: - self.pin_map[text] = [new_pin] + self.pin_map[text] = set() + self.pin_map[text].add(new_pin) return new_pin diff --git a/compiler/example_configs/giant_config_scn4m_subm.py b/compiler/example_configs/giant_config_scn4m_subm.py new file mode 100644 index 00000000..74d52fe6 --- /dev/null +++ b/compiler/example_configs/giant_config_scn4m_subm.py @@ -0,0 +1,14 @@ +word_size = 64 +num_words = 1024 + +tech_name = "scn4m_subm" +process_corners = ["TT"] +supply_voltages = [ 5.0 ] +temperatures = [ 25 ] + +output_path = "temp" +output_name = "sram_{0}_{1}_{2}".format(word_size,num_words,tech_name) + +drc_name = "magic" +lvs_name = "netgen" +pex_name = "magic" diff --git a/compiler/run_profile.sh b/compiler/run_profile.sh index 37a130a4..1234427d 100755 --- a/compiler/run_profile.sh +++ b/compiler/run_profile.sh @@ -1,3 +1,3 @@ #!/bin/bash -python3 -m cProfile -o profile.dat ./openram.py example_configs/medium_config_scn4m_subm.py -v | tee -i medium.log +python3 -m cProfile -o profile.dat ./openram.py example_configs/giant_config_scn4m_subm.py -v | tee -i big.log echo "Run view_profile.py to view results"