s8 gdsless netlist only working up to dff array

This commit is contained in:
jcirimel 2020-02-09 21:37:09 -08:00
parent b107934672
commit b212b3e85a
7 changed files with 43 additions and 34 deletions

View File

@ -96,10 +96,10 @@ def get_libcell_size(name, units, lpp):
Open a GDS file and return the library cell size from either the Open a GDS file and return the library cell size from either the
bounding box or a border layer. bounding box or a border layer.
""" """
if not OPTS.netlist_only:
cell_gds = OPTS.openram_tech + "gds_lib/" + str(name) + ".gds" cell_gds = OPTS.openram_tech + "gds_lib/" + str(name) + ".gds"
return(get_gds_size(name, cell_gds, units, lpp)) return(get_gds_size(name, cell_gds, units, lpp))
return (0,0,)
def get_gds_pins(pin_names, name, gds_filename, units): def get_gds_pins(pin_names, name, gds_filename, units):
@ -130,11 +130,9 @@ def get_libcell_pins(pin_list, name, units):
Open a GDS file and find the pins in pin_list as text on a given layer. Open a GDS file and find the pins in pin_list as text on a given layer.
Return these as a rectangle layer pair for each pin. Return these as a rectangle layer pair for each pin.
""" """
if not OPTS.netlist_only:
cell_gds = OPTS.openram_tech + "gds_lib/" + str(name) + ".gds" cell_gds = OPTS.openram_tech + "gds_lib/" + str(name) + ".gds"
return(get_gds_pins(pin_list, name, cell_gds, units)) return(get_gds_pins(pin_list, name, cell_gds, units))
else:
return

View File

@ -81,6 +81,9 @@ class bitcell(bitcell_base.bitcell_base):
def get_wl_name(self, port=0): def get_wl_name(self, port=0):
"""Get wl name""" """Get wl name"""
if cell_properties.bitcell.split_wl:
return "wl{}".format(port)
else:
debug.check(port == 0, "One port for bitcell only.") debug.check(port == 0, "One port for bitcell only.")
return "wl" return "wl"

View File

@ -8,7 +8,8 @@
import design import design
import debug import debug
import utils import utils
from tech import GDS,layer,drc,parameter from tech import GDS,layer,drc,parameter,cell_properties
from globals import OPTS
class replica_bitcell(design.design): class replica_bitcell(design.design):
""" """
@ -17,10 +18,19 @@ class replica_bitcell(design.design):
is a hand-made cell, so the layout and netlist should be available in is a hand-made cell, so the layout and netlist should be available in
the technology library. """ the technology library. """
if cell_properties.bitcell.split_wl:
pin_names = ["bl", "br", "wl0", "wl1", "vdd", "gnd"]
else:
pin_names = ["bl", "br", "wl", "vdd", "gnd"] pin_names = ["bl", "br", "wl", "vdd", "gnd"]
type_list = ["OUTPUT", "OUTPUT", "INPUT", "POWER", "GROUND"] type_list = ["OUTPUT", "OUTPUT", "INPUT", "POWER", "GROUND"]
if not OPTS.netlist_only:
(width,height) = utils.get_libcell_size("replica_cell_6t", GDS["unit"], layer["boundary"]) (width,height) = utils.get_libcell_size("replica_cell_6t", GDS["unit"], layer["boundary"])
pin_map = utils.get_libcell_pins(pin_names, "replica_cell_6t", GDS["unit"]) pin_map = utils.get_libcell_pins(pin_names, "replica_cell_6t", GDS["unit"])
else:
(width,height) = (0,0)
pin_map = []
def __init__(self, name=""): def __init__(self, name=""):
# Ignore the name argument # Ignore the name argument

View File

@ -158,7 +158,7 @@ class replica_bitcell_array(design.design):
# Left port WLs (one dummy for each port when we allow >1 port) # Left port WLs (one dummy for each port when we allow >1 port)
for port in range(self.left_rbl): for port in range(self.left_rbl):
# Make names for all RBLs # Make names for all RBLs
wl_names=["rbl_{0}_{1}".format(self.cell.get_wl_name(x),port) for x in range(len(self.all_ports))] wl_names=["rbl_{0}_{1}".format(self.cell.get_wl_name(x),port) for x in range(len(self.cell.get_all_wl_names()))]
# Keep track of the pin that is the RBL # Keep track of the pin that is the RBL
self.rbl_wl_names[port]=wl_names[self.bitcell_ports[port]] self.rbl_wl_names[port]=wl_names[self.bitcell_ports[port]]
self.replica_col_wl_names.extend(wl_names) self.replica_col_wl_names.extend(wl_names)
@ -167,7 +167,7 @@ class replica_bitcell_array(design.design):
# Right port WLs (one dummy for each port when we allow >1 port) # Right port WLs (one dummy for each port when we allow >1 port)
for port in range(self.left_rbl,self.left_rbl+self.right_rbl): for port in range(self.left_rbl,self.left_rbl+self.right_rbl):
# Make names for all RBLs # Make names for all RBLs
wl_names=["rbl_{0}_{1}".format(self.cell.get_wl_name(x),port) for x in range(len(self.all_ports))] wl_names=["rbl_{0}_{1}".format(self.cell.get_wl_name(x),port) for x in range(len(self.cell.get_all_wl_names()))]
# Keep track of the pin that is the RBL # Keep track of the pin that is the RBL
self.rbl_wl_names[port]=wl_names[self.bitcell_ports[port]] self.rbl_wl_names[port]=wl_names[self.bitcell_ports[port]]
self.replica_col_wl_names.extend(wl_names) self.replica_col_wl_names.extend(wl_names)

View File

@ -9,6 +9,7 @@ import design
import debug import debug
import utils import utils
from tech import GDS,layer, parameter,drc from tech import GDS,layer, parameter,drc
from globals import OPTS
import logical_effort import logical_effort
class sense_amp(design.design): class sense_amp(design.design):
@ -21,8 +22,12 @@ class sense_amp(design.design):
pin_names = ["bl", "br", "dout", "en", "vdd", "gnd"] pin_names = ["bl", "br", "dout", "en", "vdd", "gnd"]
type_list = ["INPUT", "INPUT", "OUTPUT", "INPUT", "POWER", "GROUND"] type_list = ["INPUT", "INPUT", "OUTPUT", "INPUT", "POWER", "GROUND"]
if not OPTS.netlist_only:
(width,height) = utils.get_libcell_size("sense_amp", GDS["unit"], layer["boundary"]) (width,height) = utils.get_libcell_size("sense_amp", GDS["unit"], layer["boundary"])
pin_map = utils.get_libcell_pins(pin_names, "sense_amp", GDS["unit"]) pin_map = utils.get_libcell_pins(pin_names, "sense_amp", GDS["unit"])
else:
(width, height) = (0,0)
pin_map = []
def __init__(self, name): def __init__(self, name):
design.design.__init__(self, name) design.design.__init__(self, name)

View File

@ -8,6 +8,7 @@
import debug import debug
import design import design
import utils import utils
from globals import OPTS
from tech import GDS,layer from tech import GDS,layer
class write_driver(design.design): class write_driver(design.design):
@ -20,8 +21,12 @@ class write_driver(design.design):
pin_names = ["din", "bl", "br", "en", "vdd", "gnd"] pin_names = ["din", "bl", "br", "en", "vdd", "gnd"]
type_list = ["INPUT", "OUTPUT", "OUTPUT", "INPUT", "POWER", "GROUND"] type_list = ["INPUT", "OUTPUT", "OUTPUT", "INPUT", "POWER", "GROUND"]
if not OPTS.netlist_only:
(width,height) = utils.get_libcell_size("write_driver", GDS["unit"], layer["boundary"]) (width,height) = utils.get_libcell_size("write_driver", GDS["unit"], layer["boundary"])
pin_map = utils.get_libcell_pins(pin_names, "write_driver", GDS["unit"]) pin_map = utils.get_libcell_pins(pin_names, "write_driver", GDS["unit"])
else:
(width,height) = (0,0)
pin_map = []
def __init__(self, name): def __init__(self, name):
design.design.__init__(self, name) design.design.__init__(self, name)

View File

@ -23,10 +23,7 @@ class sram_config:
# This will get over-written when we determine the organization # This will get over-written when we determine the organization
self.words_per_row = words_per_row self.words_per_row = words_per_row
if not OPTS.netlist_only:
self.compute_sizes() self.compute_sizes()
else:
self.compute_simple_sram_sizes()
@ -39,15 +36,6 @@ class sram_config:
for member in members: for member in members:
setattr(module,member,getattr(self,member)) setattr(module,member,getattr(self,member))
def compute_simple_sram_sizes(self):
self.row_addr_size = int(log(OPTS.num_words, 2))
self.col_addr_size = int(log(OPTS.word_size, 2))
self.words_per_row = 1
self.num_rows = OPTS.num_words
self.num_cols = OPTS.word_size
self.bank_addr_size = self.col_addr_size + self.row_addr_size
self.addr_size = self.bank_addr_size + int(log(self.num_banks, 2))
def compute_sizes(self): def compute_sizes(self):
""" Computes the organization of the memory using bitcell size by trying to make it square.""" """ Computes the organization of the memory using bitcell size by trying to make it square."""