2019-04-26 12:21:50 -07:00
|
|
|
# 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.
|
2019-04-26 12:21:50 -07:00
|
|
|
#
|
2022-11-27 13:01:20 -08:00
|
|
|
from openram import debug
|
|
|
|
|
from openram.base import design
|
|
|
|
|
from openram.tech import spice
|
2020-11-02 16:00:16 -08:00
|
|
|
|
2016-11-08 09:57:35 -08:00
|
|
|
|
2022-07-13 10:57:56 -07:00
|
|
|
class tri_gate(design):
|
2016-11-08 09:57:35 -08:00
|
|
|
"""
|
2019-08-08 01:57:04 -07:00
|
|
|
This module implements the tri gate cell used in the design forS
|
2016-11-08 09:57:35 -08:00
|
|
|
bit-line isolation. It is a hand-made cell, so the layout and
|
2020-11-03 06:29:17 -08:00
|
|
|
netlist should be available in the technology library.
|
2016-11-08 09:57:35 -08:00
|
|
|
"""
|
|
|
|
|
|
2017-08-23 15:02:15 -07:00
|
|
|
unique_id = 1
|
2020-11-03 06:29:17 -08:00
|
|
|
|
2017-08-23 15:02:15 -07:00
|
|
|
def __init__(self, name=""):
|
|
|
|
|
if name=="":
|
|
|
|
|
name = "tri{0}".format(tri_gate.unique_id)
|
|
|
|
|
tri_gate.unique_id += 1
|
2020-11-03 11:58:25 -08:00
|
|
|
super().__init__(self, name)
|
2017-11-14 13:24:14 -08:00
|
|
|
debug.info(2, "Create tri_gate")
|
2016-11-08 09:57:35 -08:00
|
|
|
|
2019-03-04 19:27:53 -08:00
|
|
|
def analytical_power(self, corner, load):
|
2018-03-01 23:34:15 -08:00
|
|
|
"""Returns dynamic and leakage power. Results in nW"""
|
|
|
|
|
#Power in this module currently not defined. Returns 0 nW (leakage and dynamic).
|
2020-11-03 06:29:17 -08:00
|
|
|
total_power = self.return_power()
|
2018-02-22 19:35:54 -08:00
|
|
|
return total_power
|
2017-05-30 12:50:07 -07:00
|
|
|
|
2019-08-08 01:57:04 -07:00
|
|
|
def get_cin(self):
|
2020-11-13 15:55:55 -08:00
|
|
|
return 9 * spice["min_tx_gate_c"]
|
2017-05-30 12:50:07 -07:00
|
|
|
|
2020-11-03 06:29:17 -08:00
|
|
|
def build_graph(self, graph, inst_name, port_nets):
|
2019-05-07 00:52:27 -07:00
|
|
|
"""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)
|