mirror of https://github.com/VLSIDA/OpenRAM.git
Require either device models or device library. Remove sky130 flag.
This commit is contained in:
parent
dcd29214bc
commit
b4ebbdd5df
|
|
@ -33,10 +33,21 @@ class stimuli():
|
||||||
self.sf = stim_file
|
self.sf = stim_file
|
||||||
|
|
||||||
(self.process, self.voltage, self.temperature) = corner
|
(self.process, self.voltage, self.temperature) = corner
|
||||||
|
found = False
|
||||||
|
self.device_libraries = []
|
||||||
|
self.device_models = []
|
||||||
try:
|
try:
|
||||||
self.device_libraries = tech.spice["fet_libraries"][self.process]
|
self.device_libraries += tech.spice["fet_libraries"][self.process]
|
||||||
except:
|
found = True
|
||||||
self.device_models = tech.spice["fet_models"][self.process]
|
except KeyError:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
self.device_models += tech.spice["fet_models"][self.process]
|
||||||
|
found = True
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
|
if not found:
|
||||||
|
debug.error("Must define either fet_libraries or fet_models.", -1)
|
||||||
|
|
||||||
def inst_model(self, pins, model_name):
|
def inst_model(self, pins, model_name):
|
||||||
""" Function to instantiate a generic model with a set of pins """
|
""" Function to instantiate a generic model with a set of pins """
|
||||||
|
|
@ -265,15 +276,13 @@ class stimuli():
|
||||||
"""Writes include statements, inputs are lists of model files"""
|
"""Writes include statements, inputs are lists of model files"""
|
||||||
|
|
||||||
self.sf.write("* {} process corner\n".format(self.process))
|
self.sf.write("* {} process corner\n".format(self.process))
|
||||||
if OPTS.tech_name == "sky130":
|
for item in self.device_libraries:
|
||||||
for item in self.device_libraries:
|
if os.path.isfile(item[0]):
|
||||||
if os.path.isfile(item[0]):
|
self.sf.write(".lib \"{0}\" {1}\n".format(item[0], item[1]))
|
||||||
self.sf.write(".lib \"{0}\" {1}\n".format(item[0], item[1]))
|
else:
|
||||||
else:
|
debug.error("Could not find spice library: {0}\nSet SPICE_MODEL_DIR to over-ride path.\n".format(item[0]))
|
||||||
debug.error("Could not find spice library: {0}\nSet SPICE_MODEL_DIR to over-ride path.\n".format(item[0]))
|
|
||||||
includes = [circuit]
|
includes = self.device_models + [circuit]
|
||||||
else:
|
|
||||||
includes = self.device_models + [circuit]
|
|
||||||
|
|
||||||
for item in list(includes):
|
for item in list(includes):
|
||||||
if os.path.isfile(item):
|
if os.path.isfile(item):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue