mirror of https://github.com/VLSIDA/OpenRAM.git
Fixed bugs to allow characterization of multiple read ports. Improved some debug messages.
This commit is contained in:
parent
6e0a1b8823
commit
371a57339f
|
|
@ -227,7 +227,7 @@ class delay():
|
||||||
self.sf.write("\n* Generation of control signals\n")
|
self.sf.write("\n* Generation of control signals\n")
|
||||||
for port in range(self.total_port_num):
|
for port in range(self.total_port_num):
|
||||||
self.stim.gen_constant(sig_name="CSB{0}".format(port), v_val=self.vdd_voltage)
|
self.stim.gen_constant(sig_name="CSB{0}".format(port), v_val=self.vdd_voltage)
|
||||||
for port in self.read_ports:
|
for port in self.write_ports:
|
||||||
self.stim.gen_constant(sig_name="WEB{0}".format(port), v_val=self.vdd_voltage)
|
self.stim.gen_constant(sig_name="WEB{0}".format(port), v_val=self.vdd_voltage)
|
||||||
|
|
||||||
self.sf.write("\n* Generation of global clock signal\n")
|
self.sf.write("\n* Generation of global clock signal\n")
|
||||||
|
|
@ -396,19 +396,21 @@ class delay():
|
||||||
port))
|
port))
|
||||||
|
|
||||||
if success:
|
if success:
|
||||||
debug.info(1, "Found feasible_period: {0}ns".format(feasible_period))
|
debug.info(2, "Found feasible_period for port {0}: {1}ns".format(port, feasible_period))
|
||||||
self.period = feasible_period
|
self.period = feasible_period
|
||||||
return results
|
#Only return results related to input port.
|
||||||
|
return results[port]
|
||||||
|
|
||||||
def find_feasible_period(self):
|
def find_feasible_period(self):
|
||||||
"""
|
"""
|
||||||
Loops through all read ports determining the feasible period and collecting
|
Loops through all read ports determining the feasible period and collecting
|
||||||
delay information from each port.
|
delay information from each port.
|
||||||
"""
|
"""
|
||||||
|
feasible_delays = [{} for i in range(self.total_port_num)]
|
||||||
self.period = float(tech.spice["feasible_period"])
|
self.period = float(tech.spice["feasible_period"])
|
||||||
|
|
||||||
#Get initial feasible delays from first port
|
#Get initial feasible delays from first port
|
||||||
feasible_delays = self.find_feasible_period_one_port(self.read_ports[0])
|
feasible_delays[self.read_ports[0]] = self.find_feasible_period_one_port(self.read_ports[0])
|
||||||
previous_period = self.period
|
previous_period = self.period
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -417,6 +419,7 @@ class delay():
|
||||||
i = 1
|
i = 1
|
||||||
while i < len(self.read_ports):
|
while i < len(self.read_ports):
|
||||||
port = self.read_ports[i]
|
port = self.read_ports[i]
|
||||||
|
#Only extract port values from the specified port, not the entire results.
|
||||||
feasible_delays[port].update(self.find_feasible_period_one_port(port))
|
feasible_delays[port].update(self.find_feasible_period_one_port(port))
|
||||||
#Function sets the period. Restart the entire process if period changes to collect accurate delays
|
#Function sets the period. Restart the entire process if period changes to collect accurate delays
|
||||||
if self.period > previous_period:
|
if self.period > previous_period:
|
||||||
|
|
@ -424,6 +427,7 @@ class delay():
|
||||||
else:
|
else:
|
||||||
i+=1
|
i+=1
|
||||||
previous_period = self.period
|
previous_period = self.period
|
||||||
|
debug.info(1, "Found feasible_period: {0}ns".format(self.period))
|
||||||
return feasible_delays
|
return feasible_delays
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -466,6 +470,7 @@ class delay():
|
||||||
#Loop through all targeted ports and collect delays and powers.
|
#Loop through all targeted ports and collect delays and powers.
|
||||||
#Too much duplicate code here. Try reducing
|
#Too much duplicate code here. Try reducing
|
||||||
for port in self.targ_read_ports:
|
for port in self.targ_read_ports:
|
||||||
|
debug.info(2, "Check delay values for port {}".format(port))
|
||||||
delay_names = ["{0}{1}".format(mname,port) for mname in self.delay_meas_names]
|
delay_names = ["{0}{1}".format(mname,port) for mname in self.delay_meas_names]
|
||||||
delay_names = [mname for mname in self.delay_meas_names]
|
delay_names = [mname for mname in self.delay_meas_names]
|
||||||
delays = self.parse_values(delay_names, port, 1e9) # scale delays to ns
|
delays = self.parse_values(delay_names, port, 1e9) # scale delays to ns
|
||||||
|
|
@ -549,7 +554,7 @@ class delay():
|
||||||
|
|
||||||
def find_min_period(self, feasible_delays):
|
def find_min_period(self, feasible_delays):
|
||||||
"""
|
"""
|
||||||
Determine the minimum period for all ports.
|
Determine a single minimum period for all ports.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
feasible_period = ub_period = self.period
|
feasible_period = ub_period = self.period
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,6 @@ class lib:
|
||||||
""" lib file generation."""
|
""" lib file generation."""
|
||||||
|
|
||||||
def __init__(self, out_dir, sram, sp_file, use_model=OPTS.analytical_delay):
|
def __init__(self, out_dir, sram, sp_file, use_model=OPTS.analytical_delay):
|
||||||
#Temporary Workaround to here to set num of ports. Crashes if set in config file.
|
|
||||||
#OPTS.num_rw_ports = 2
|
|
||||||
#OPTS.num_r_ports = 1
|
|
||||||
#OPTS.num_w_ports = 1
|
|
||||||
|
|
||||||
self.out_dir = out_dir
|
self.out_dir = out_dir
|
||||||
self.sram = sram
|
self.sram = sram
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,5 @@ output_name = "sram_{0}_{1}_{2}_{3}".format(word_size,num_words,num_banks,tech_n
|
||||||
#bitcell = "pbitcell"
|
#bitcell = "pbitcell"
|
||||||
#replica_bitcell="replica_pbitcell"
|
#replica_bitcell="replica_pbitcell"
|
||||||
#num_rw_ports = 1
|
#num_rw_ports = 1
|
||||||
# num_r_ports = 0
|
#num_r_ports = 1
|
||||||
#num_w_ports = 0
|
#num_w_ports = 0
|
||||||
|
|
@ -11,7 +11,7 @@ import globals
|
||||||
from globals import OPTS
|
from globals import OPTS
|
||||||
import debug
|
import debug
|
||||||
|
|
||||||
#@unittest.skip("SKIPPING 22_psram_func_test")
|
@unittest.skip("SKIPPING 22_psram_func_test")
|
||||||
class psram_func_test(openram_test):
|
class psram_func_test(openram_test):
|
||||||
|
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import globals
|
||||||
from globals import OPTS
|
from globals import OPTS
|
||||||
import debug
|
import debug
|
||||||
|
|
||||||
#@unittest.skip("SKIPPING 22_sram_func_test")
|
@unittest.skip("SKIPPING 22_sram_func_test")
|
||||||
class sram_func_test(openram_test):
|
class sram_func_test(openram_test):
|
||||||
|
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue