mirror of
https://github.com/VLSIDA/OpenRAM.git
synced 2026-09-08 20:06:23 +02:00
By default uniquify instances based on macro name.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
import hierarchy_layout
|
||||
import hierarchy_spice
|
||||
import debug
|
||||
import os
|
||||
from globals import OPTS
|
||||
|
||||
|
||||
@@ -22,6 +23,15 @@ class hierarchy_design(hierarchy_spice.spice, hierarchy_layout.layout):
|
||||
self.drc_errors = "skipped"
|
||||
self.lvs_errors = "skipped"
|
||||
|
||||
# Flag for library cells which is recomputed in hierachy_layout
|
||||
gds_file = OPTS.openram_tech + "gds_lib/" + cell_name + ".gds"
|
||||
is_library_cell = os.path.isfile(gds_file)
|
||||
# Uniquify names to address the flat GDS namespace
|
||||
# except for the top/output name
|
||||
if not is_library_cell and name != OPTS.output_name:
|
||||
name = OPTS.output_name + "_" + name
|
||||
cell_name = name
|
||||
|
||||
hierarchy_spice.spice.__init__(self, name, cell_name)
|
||||
hierarchy_layout.layout.__init__(self, name, cell_name)
|
||||
self.init_graph_params()
|
||||
|
||||
@@ -42,6 +42,7 @@ class layout():
|
||||
self.cell_name = cell_name
|
||||
|
||||
self.gds_file = OPTS.openram_tech + "gds_lib/" + cell_name + ".gds"
|
||||
self.is_library_cell = os.path.isfile(self.gds_file)
|
||||
|
||||
self.width = None
|
||||
self.height = None
|
||||
@@ -60,8 +61,6 @@ class layout():
|
||||
self.pin_map = {}
|
||||
# List of modules we have already visited
|
||||
self.visited = []
|
||||
# Flag for library cells
|
||||
self.is_library_cell = False
|
||||
|
||||
self.gds_read()
|
||||
|
||||
@@ -903,10 +902,6 @@ class layout():
|
||||
"""Reads a GDSII file in the library and checks if it exists
|
||||
Otherwise, start a new layout for dynamic generation."""
|
||||
|
||||
# This must be done for netlist only mode too
|
||||
if os.path.isfile(self.gds_file):
|
||||
self.is_library_cell = True
|
||||
|
||||
if OPTS.netlist_only:
|
||||
self.gds = None
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user