mirror of
https://github.com/VLSIDA/OpenRAM.git
synced 2026-08-29 09:30:38 +02:00
Added graph creation and functions in base class and lower level modules.
This commit is contained in:
@@ -1279,3 +1279,9 @@ class bank(design.design):
|
||||
"""Get the relative capacitance of all the sense amp enable connections in the bank"""
|
||||
#Current bank only uses sen as an enable for the sense amps.
|
||||
return self.sense_amp_array.get_en_cin()
|
||||
|
||||
def graph_exclude_precharge(self):
|
||||
"""Precharge adds a loop between bitlines, can be excluded to reduce complexity"""
|
||||
for inst in self.precharge_array_inst:
|
||||
if inst != None:
|
||||
self.graph_inst_exclude.add(inst)
|
||||
@@ -193,3 +193,13 @@ class bitcell_array(design.design):
|
||||
bitcell_wl_cin = self.cell.get_wl_cin()
|
||||
total_cin = bitcell_wl_cin * self.column_size
|
||||
return total_cin
|
||||
|
||||
def graph_exclude_bits(self, targ_row, targ_col):
|
||||
"""Excludes bits in column from being added to graph except target"""
|
||||
#Function is not robust with column mux configurations
|
||||
for row in range(self.row_size):
|
||||
if row == targ_row:
|
||||
continue
|
||||
self.graph_inst_exclude.add(self.cell_inst[row,targ_col])
|
||||
|
||||
|
||||
@@ -50,3 +50,11 @@ class dff(design.design):
|
||||
#Calculated in the tech file by summing the widths of all the gates and dividing by the minimum width.
|
||||
return parameter["dff_clk_cin"]
|
||||
|
||||
def build_graph(self, graph, inst_name, port_nets):
|
||||
"""Adds edges to graph. Handmade cells must implement this manually."""
|
||||
#The cell has 5 net ports hard-coded in self.pin_names. The edges
|
||||
#are based on the hard-coded name positions.
|
||||
# The edges added are: clk->Q.
|
||||
# Internal nodes of the handmade cell not considered, only ports. vdd/gnd ignored for graph.
|
||||
graph.add_edge(port_nets[2],port_nets[1])
|
||||
|
||||
@@ -621,3 +621,4 @@ class hierarchical_decoder(design.design):
|
||||
else:
|
||||
pre = self.pre3_8
|
||||
return pre.input_load()
|
||||
|
||||
|
||||
@@ -107,3 +107,4 @@ class precharge_array(design.design):
|
||||
#Assume single port
|
||||
precharge_en_cin = self.pc_cell.get_en_cin()
|
||||
return precharge_en_cin*self.columns
|
||||
|
||||
@@ -51,4 +51,15 @@ class sense_amp(design.design):
|
||||
pmos_cin = parameter["sa_en_pmos_size"]/drc("minwidth_tx")
|
||||
nmos_cin = parameter["sa_en_nmos_size"]/drc("minwidth_tx")
|
||||
#sen is connected to 2 pmos isolation TX and 1 nmos per sense amp.
|
||||
return 2*pmos_cin + nmos_cin
|
||||
return 2*pmos_cin + nmos_cin
|
||||
|
||||
def build_graph(self, graph, inst_name, port_nets):
|
||||
"""Adds edges to graph. Handmade cells must implement this manually."""
|
||||
#The cell has 6 net ports hard-coded in self.pin_names. The edges
|
||||
#are based on the hard-coded name positions.
|
||||
# The edges added are: en->dout, bl->dout
|
||||
# br->dout not included to reduce complexity
|
||||
# Internal nodes of the handmade cell not considered, only ports. vdd/gnd ignored for graph.
|
||||
graph.add_edge(port_nets[0],port_nets[2])
|
||||
graph.add_edge(port_nets[3],port_nets[2])
|
||||
|
||||
@@ -10,7 +10,7 @@ class tri_gate(design.design):
|
||||
netlist should be available in the technology library.
|
||||
"""
|
||||
|
||||
pin_names = ["in", "en", "en_bar", "out", "gnd", "vdd"]
|
||||
pin_names = ["in", "out", "en", "en_bar", "gnd", "vdd"]
|
||||
(width,height) = utils.get_libcell_size("tri_gate", GDS["unit"], layer["boundary"])
|
||||
pin_map = utils.get_libcell_pins(pin_names, "tri_gate", GDS["unit"])
|
||||
|
||||
@@ -42,3 +42,13 @@ class tri_gate(design.design):
|
||||
def input_load(self):
|
||||
return 9*spice["min_tx_gate_c"]
|
||||
|
||||
def build_graph(self, graph, inst_name, port_nets):
|
||||
"""Adds edges to graph. Handmade cells must implement this manually."""
|
||||
#The cell has 6 net ports hard-coded in self.pin_names. The edges
|
||||
#are based on the hard-coded name positions.
|
||||
# The edges added are: en->out, en_bar->out, in->out.
|
||||
# A liberal amount of edges were added, may be reduced later for complexity.
|
||||
# Internal nodes of the handmade cell not considered, only ports. vdd/gnd ignored for graph.
|
||||
graph.add_edge(port_nets[0],port_nets[1])
|
||||
graph.add_edge(port_nets[2],port_nets[1])
|
||||
graph.add_edge(port_nets[3],port_nets[1])
|
||||
@@ -28,3 +28,15 @@ class write_driver(design.design):
|
||||
"""Get the relative capacitance of a single input"""
|
||||
# This is approximated from SCMOS. It has roughly 5 3x transistor gates.
|
||||
return 5*3
|
||||
|
||||
def build_graph(self, graph, inst_name, port_nets):
|
||||
"""Adds edges to graph. Handmade cells must implement this manually."""
|
||||
#The cell has 6 net ports hard-coded in self.pin_names. The edges
|
||||
#are based on the hard-coded name positions.
|
||||
# The edges added are: din->bl, din->br, en->bl, en->br
|
||||
# A liberal amount of edges were added, may be reduced later for complexity.
|
||||
# Internal nodes of the handmade cell not considered, only ports. vdd/gnd ignored for graph.
|
||||
graph.add_edge(port_nets[0],port_nets[1])
|
||||
graph.add_edge(port_nets[0],port_nets[2])
|
||||
graph.add_edge(port_nets[3],port_nets[1])
|
||||
graph.add_edge(port_nets[3],port_nets[2])
|
||||
Reference in New Issue
Block a user