mirror of https://github.com/VLSIDA/OpenRAM.git
65 lines
2.0 KiB
Python
65 lines
2.0 KiB
Python
# See LICENSE for licensing information.
|
|
#
|
|
# Copyright (c) 2016-2019 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.
|
|
#
|
|
import debug
|
|
from tech import cell_properties as props
|
|
import bitcell_base
|
|
|
|
|
|
class bitcell_1port(bitcell_base.bitcell_base):
|
|
"""
|
|
A single bit cell (6T, 8T, etc.) This module implements the
|
|
single memory cell used in the design. It is a hand-made cell, so
|
|
the layout and netlist should be available in the technology
|
|
library.
|
|
"""
|
|
|
|
def __init__(self, name):
|
|
super().__init__(name, prop=props.bitcell_1port)
|
|
debug.info(2, "Create bitcell")
|
|
|
|
def get_all_wl_names(self):
|
|
""" Creates a list of all wordline pin names """
|
|
row_pins = [props.bitcell_1port.pin.wl]
|
|
return row_pins
|
|
|
|
def get_all_bitline_names(self):
|
|
""" Creates a list of all bitline pin names (both bl and br) """
|
|
pin = props.bitcell_1port.pin
|
|
column_pins = [pin.bl, pin.br]
|
|
return column_pins
|
|
|
|
def get_all_bl_names(self):
|
|
""" Creates a list of all bl pins names """
|
|
return [props.bitcell_1port.pin.bl]
|
|
|
|
def get_all_br_names(self):
|
|
""" Creates a list of all br pins names """
|
|
return [props.bitcell_1port.pin.br]
|
|
|
|
def get_bl_name(self, port=0):
|
|
"""Get bl name"""
|
|
debug.check(port == 0, "One port for bitcell only.")
|
|
return props.bitcell_1port.pin.bl
|
|
|
|
def get_br_name(self, port=0):
|
|
"""Get bl name"""
|
|
debug.check(port == 0, "One port for bitcell only.")
|
|
return props.bitcell_1port.pin.br
|
|
|
|
def get_wl_name(self, port=0):
|
|
"""Get wl name"""
|
|
debug.check(port == 0, "One port for bitcell only.")
|
|
return props.bitcell_1port.pin.wl
|
|
|
|
def build_graph(self, graph, inst_name, port_nets):
|
|
"""
|
|
Adds edges based on inputs/outputs.
|
|
Overrides base class function.
|
|
"""
|
|
self.add_graph_edges(graph, port_nets)
|