OpenRAM/compiler/custom/tri_gate.py

41 lines
1.3 KiB
Python
Raw Normal View History

# See LICENSE for licensing information.
#
2021-01-22 20:23:28 +01:00
# Copyright (c) 2016-2021 Regents of the University of California and The Board
2019-06-14 17:43:41 +02:00
# of Regents for the Oklahoma Agricultural and Mechanical College
# (acting for and on behalf of Oklahoma State University)
# All rights reserved.
#
2016-11-08 18:57:35 +01:00
import debug
import design
2020-11-14 00:55:55 +01:00
from tech import spice
2016-11-08 18:57:35 +01:00
class tri_gate(design.design):
"""
This module implements the tri gate cell used in the design forS
2016-11-08 18:57:35 +01:00
bit-line isolation. It is a hand-made cell, so the layout and
2020-11-03 15:29:17 +01:00
netlist should be available in the technology library.
2016-11-08 18:57:35 +01:00
"""
unique_id = 1
2020-11-03 15:29:17 +01:00
def __init__(self, name=""):
if name=="":
name = "tri{0}".format(tri_gate.unique_id)
tri_gate.unique_id += 1
2020-11-03 20:58:25 +01:00
super().__init__(self, name)
debug.info(2, "Create tri_gate")
2016-11-08 18:57:35 +01:00
def analytical_power(self, corner, load):
"""Returns dynamic and leakage power. Results in nW"""
#Power in this module currently not defined. Returns 0 nW (leakage and dynamic).
2020-11-03 15:29:17 +01:00
total_power = self.return_power()
return total_power
def get_cin(self):
2020-11-14 00:55:55 +01:00
return 9 * spice["min_tx_gate_c"]
2020-11-03 15:29:17 +01:00
def build_graph(self, graph, inst_name, port_nets):
"""Adds edges based on inputs/outputs. Overrides base class function."""
2020-11-03 15:29:17 +01:00
self.add_graph_edges(graph, port_nets)