Files
OpenRAM/compiler/modules/write_driver.py
T

47 lines
1.4 KiB
Python
Raw Normal View History

# See LICENSE for licensing information.
#
2024-01-03 14:32:44 -08:00
# Copyright (c) 2016-2024 Regents of the University of California and The Board
2019-06-14 08:43:41 -07:00
# of Regents for the Oklahoma Agricultural and Mechanical College
# (acting for and on behalf of Oklahoma State University)
# All rights reserved.
#
2022-11-27 13:01:20 -08:00
from openram import debug
from openram.base import design
from openram.tech import cell_properties as props
2016-11-08 09:57:35 -08:00
2022-07-13 10:57:56 -07:00
class write_driver(design):
2016-11-08 09:57:35 -08:00
"""
2020-11-03 06:29:17 -08:00
Tristate write driver to be active during write operations only.
2016-11-08 09:57:35 -08:00
This module implements the write driver 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.write_driver)
debug.info(2, "Create write_driver")
2016-11-08 09:57:35 -08:00
def get_bl_names(self):
2020-11-16 11:04:03 -08:00
return "bl"
def get_br_names(self):
2020-11-16 11:04:03 -08:00
return "br"
@property
def din_name(self):
2020-11-16 11:04:03 -08:00
return "din"
@property
def en_name(self):
2020-11-16 11:04:03 -08:00
return "en"
def get_w_en_cin(self):
"""Get the relative capacitance of a single input"""
# This is approximated from SCMOS. It has roughly 5 3x transistor gates.
2020-11-13 15:55:55 -08:00
return 5 * 3
2020-11-03 06:29:17 -08:00
def build_graph(self, graph, inst_name, port_nets):
"""Adds edges based on inputs/outputs. Overrides base class function."""
2020-11-03 06:29:17 -08:00
self.add_graph_edges(graph, port_nets)