Fix netlist_only in sky130

This commit is contained in:
mrg 2020-07-13 14:59:31 -07:00
parent e49236f8fc
commit 2b7d89d2c1
4 changed files with 23 additions and 17 deletions

View File

@ -13,10 +13,6 @@ from vector import vector
from globals import OPTS
from sram_factory import factory
if(OPTS.tech_name == "sky130"):
from tech import nmos_bins, pmos_bins
class pinv_dec(pinv.pinv):
"""
This is another version of pinv but with layout for the decoder.

View File

@ -129,7 +129,7 @@ class ptx(design.design):
# be decided in the layout later.
area_sd = 2.5 * self.poly_width * self.tx_width
perimeter_sd = 2 * self.poly_width + 2 * self.tx_width
if OPTS.tech_name == "sky130" and OPTS.lvs_exe[0] == "calibre":
if OPTS.tech_name == "sky130" and OPTS.lvs_exe and OPTS.lvs_exe[0] == "calibre":
# sky130 simulation cannot use the mult parameter in simulation
(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],
@ -150,7 +150,7 @@ class ptx(design.design):
self.spice_device = main_str + area_str
self.spice.append("\n* ptx " + self.spice_device)
if OPTS.tech_name == "sky130" and OPTS.lvs_exe[0] == "calibre":
if OPTS.tech_name == "sky130" and OPTS.lvs_exe and OPTS.lvs_exe[0] == "calibre":
# 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.mults,

View File

@ -57,6 +57,7 @@ class single_level_column_mux(pgate.pgate):
self.width = self.bitcell.width
self.height = self.nmos_upper.uy() + self.pin_height
self.place_ptx()
self.connect_poly()
self.add_bitline_pins()
self.connect_bitlines()
@ -104,21 +105,28 @@ class single_level_column_mux(pgate.pgate):
""" Create the two pass gate NMOS transistors to switch the bitlines"""
# Space it in the center
nmos_lower_position = self.nmos.active_offset.scale(0, 1) \
+ vector(0.5 * self.bitcell.width- 0.5 * self.nmos.active_width, 0)
self.nmos_lower = self.add_inst(name="mux_tx1",
mod=self.nmos,
offset=nmos_lower_position)
mod=self.nmos)
self.connect_inst(["bl", "sel", "bl_out", "gnd"])
# This aligns it directly above the other tx with gates abutting
nmos_upper_position = nmos_lower_position \
+ vector(0, self.nmos.active_height + max(self.active_space, self.poly_space))
self.nmos_upper = self.add_inst(name="mux_tx2",
mod=self.nmos,
offset=nmos_upper_position)
mod=self.nmos)
self.connect_inst(["br", "sel", "br_out", "gnd"])
def place_ptx(self):
""" Create the two pass gate NMOS transistors to switch the bitlines"""
# Space it in the center
nmos_lower_position = self.nmos.active_offset.scale(0, 1) \
+ vector(0.5 * self.bitcell.width- 0.5 * self.nmos.active_width, 0)
self.nmos_lower.place(nmos_lower_position)
# This aligns it directly above the other tx with gates abutting
nmos_upper_position = nmos_lower_position \
+ vector(0, self.nmos.active_height + max(self.active_space, self.poly_space))
self.nmos_upper.place(nmos_upper_position)
if OPTS.tech_name == "sky130":
self.add_implants()

View File

@ -30,13 +30,15 @@ if not OPTS.check_lvsdrc:
OPTS.drc_exe = None
OPTS.lvs_exe = None
OPTS.pex_exe = None
if OPTS.tech_name == "sky130":
OPTS.magic_exe = None
else:
debug.info(1, "Finding DRC/LVS/PEX tools.")
OPTS.drc_exe = get_tool("DRC", ["calibre", "assura", "magic"], drc_name)
OPTS.lvs_exe = get_tool("LVS", ["calibre", "assura", "netgen"], lvs_name)
OPTS.pex_exe = get_tool("PEX", ["calibre", "magic"], pex_name)
if OPTS.tech_name == "sky130":
OPTS.magic_exe = get_tool("GDS", ["magic"], None)
OPTS.magic_exe = get_tool("GDS", ["magic"])
if not OPTS.drc_exe:
from .none import run_drc, print_drc_stats
@ -71,7 +73,7 @@ else:
debug.warning("Did not find a supported PEX tool.")
if OPTS.tech_name == "sky130":
if "magic"==OPTS.magic_exe[0]:
if OPTS.magic_exe and "magic"==OPTS.magic_exe[0]:
from .magic import filter_gds
else:
debug.warning("Did not find Magic.")