add technology based module customization

This commit is contained in:
Jesse Cirimelli-Low 2020-01-30 19:44:24 +00:00
parent 0880c393fd
commit 6cf20a0353
2 changed files with 34 additions and 2 deletions

View File

@ -0,0 +1,27 @@
# See LICENSE for licensing information.
#
# Copyright (c) 2016-2020 Regents of the University of California and The Board
# of Regents for the Oklahoma Agricultural and Mechanical College
# (acting for and on behalf of Oklahoma State University)
# All rights reserved.
#
class _dff:
def __init__(self, use_custom_ports, custom_port_list, custom_type_list):
self.use_custom_ports = use_custom_ports
self.custom_port_list = custom_port_list
self.custom_type_list = custom_type_list
class module_properties():
"""
TODO
"""
def __init__(self):
self.names = {}
self._dff = _dff(use_custom_ports = False,
custom_port_list = [],
custom_type_list = [])
@property
def dff(self):
return self._dff

View File

@ -7,6 +7,7 @@
# #
import design import design
from tech import GDS, layer, spice, parameter from tech import GDS, layer, spice, parameter
from tech import module_properties
import utils import utils
@ -14,9 +15,13 @@ class dff(design.design):
""" """
Memory address flip-flop Memory address flip-flop
""" """
if not module_properties.dff.use_custom_ports:
pin_names = ["D", "Q", "clk", "vdd", "gnd"]
type_list = ["INPUT", "OUTPUT", "INPUT", "POWER", "GROUND"]
else:
pin_names = module_properties.dff.custom_port_list
type_list = module_properties.dff.custom_type_list
pin_names = ["D", "Q", "clk", "vdd", "gnd"]
type_list = ["INPUT", "OUTPUT", "INPUT", "POWER", "GROUND"]
(width, height) = utils.get_libcell_size("dff", (width, height) = utils.get_libcell_size("dff",
GDS["unit"], GDS["unit"],
layer["boundary"]) layer["boundary"])