mirror of https://github.com/VLSIDA/OpenRAM.git
Use different LVS libs based on tech and sky130
This commit is contained in:
parent
031862c749
commit
e849a9b973
|
|
@ -11,7 +11,7 @@ import verify
|
||||||
import debug
|
import debug
|
||||||
import os
|
import os
|
||||||
from globals import OPTS
|
from globals import OPTS
|
||||||
|
import tech
|
||||||
|
|
||||||
class hierarchy_design(hierarchy_spice.spice, hierarchy_layout.layout):
|
class hierarchy_design(hierarchy_spice.spice, hierarchy_layout.layout):
|
||||||
"""
|
"""
|
||||||
|
|
@ -26,7 +26,11 @@ class hierarchy_design(hierarchy_spice.spice, hierarchy_layout.layout):
|
||||||
|
|
||||||
# If we have a separate lvs directory, then all the lvs files
|
# If we have a separate lvs directory, then all the lvs files
|
||||||
# should be in there (all or nothing!)
|
# should be in there (all or nothing!)
|
||||||
lvs_dir = OPTS.openram_tech + "lvs_lib/"
|
try:
|
||||||
|
lvs_subdir = tech.lvs_lib
|
||||||
|
except AttributeError:
|
||||||
|
lvs_subdir = "lvs_lib"
|
||||||
|
lvs_dir = OPTS.openram_tech + lvs_subdir + "/"
|
||||||
if os.path.exists(lvs_dir):
|
if os.path.exists(lvs_dir):
|
||||||
self.lvs_file = lvs_dir + name + ".sp"
|
self.lvs_file = lvs_dir + name + ".sp"
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -131,8 +131,8 @@ class ptx(design.design):
|
||||||
# be decided in the layout later.
|
# be decided in the layout later.
|
||||||
area_sd = 2.5 * self.poly_width * self.tx_width
|
area_sd = 2.5 * self.poly_width * self.tx_width
|
||||||
perimeter_sd = 2 * self.poly_width + 2 * self.tx_width
|
perimeter_sd = 2 * self.poly_width + 2 * self.tx_width
|
||||||
if OPTS.tech_name == "sky130":
|
if OPTS.tech_name == "sky130" and OPTS.lvs_exe[0] == "calibre":
|
||||||
# sky130 technology is in microns, also needs mult parameter
|
# sky130 simulation cannot use the mult parameter in simulation
|
||||||
(self.tx_width, self.mults) = pgate.bin_width(self.tx_type, self.tx_width)
|
(self.tx_width, self.mults) = pgate.bin_width(self.tx_type, self.tx_width)
|
||||||
main_str = "M{{0}} {{1}} {0} m={1} w={2} l={3} ".format(spice[self.tx_type],
|
main_str = "M{{0}} {{1}} {0} m={1} w={2} l={3} ".format(spice[self.tx_type],
|
||||||
self.mults,
|
self.mults,
|
||||||
|
|
@ -152,9 +152,7 @@ class ptx(design.design):
|
||||||
self.spice_device = main_str + area_str
|
self.spice_device = main_str + area_str
|
||||||
self.spice.append("\n* ptx " + self.spice_device)
|
self.spice.append("\n* ptx " + self.spice_device)
|
||||||
|
|
||||||
# LVS lib is always in SI units
|
if OPTS.tech_name == "sky130" and OPTS.lvs_exe[0] == "calibre":
|
||||||
if os.path.exists(OPTS.openram_tech + "lvs_lib"):
|
|
||||||
if OPTS.tech_name == "sky130":
|
|
||||||
# sky130 requires mult parameter too
|
# sky130 requires mult parameter too
|
||||||
self.lvs_device = "M{{0}} {{1}} {0} m={1} w={2} l={3} mult={1}".format(spice[self.tx_type],
|
self.lvs_device = "M{{0}} {{1}} {0} m={1} w={2} l={3} mult={1}".format(spice[self.tx_type],
|
||||||
self.mults,
|
self.mults,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue