mirror of https://github.com/VLSIDA/OpenRAM.git
Functional simulation uses threshold for high and low noise margins
This commit is contained in:
parent
25ae3a5eae
commit
3cfe74cefb
|
|
@ -30,6 +30,7 @@ class functional(simulation):
|
||||||
self.set_stimulus_variables()
|
self.set_stimulus_variables()
|
||||||
self.create_signal_names()
|
self.create_signal_names()
|
||||||
|
|
||||||
|
|
||||||
# Number of checks can be changed
|
# Number of checks can be changed
|
||||||
self.num_cycles = 2
|
self.num_cycles = 2
|
||||||
self.stored_words = {}
|
self.stored_words = {}
|
||||||
|
|
@ -141,17 +142,17 @@ class functional(simulation):
|
||||||
sp_read_value = ""
|
sp_read_value = ""
|
||||||
for bit in range(self.word_size):
|
for bit in range(self.word_size):
|
||||||
value = parse_spice_list("timing", "v{0}.{1}ck{2}".format(dout_port.lower(),bit,check))
|
value = parse_spice_list("timing", "v{0}.{1}ck{2}".format(dout_port.lower(),bit,check))
|
||||||
if value > 0.88 * self.vdd_voltage:
|
if value > self.v_high:
|
||||||
sp_read_value = "1" + sp_read_value
|
sp_read_value = "1" + sp_read_value
|
||||||
elif value < 0.12 * self.vdd_voltage:
|
elif value < self.v_low:
|
||||||
sp_read_value = "0" + sp_read_value
|
sp_read_value = "0" + sp_read_value
|
||||||
else:
|
else:
|
||||||
error ="FAILED: {0}_{1} value {2} at time {3}n does not fall within noise margins <{4} or >{5}.".format(dout_port,
|
error ="FAILED: {0}_{1} value {2} at time {3}n does not fall within noise margins <{4} or >{5}.".format(dout_port,
|
||||||
bit,
|
bit,
|
||||||
value,
|
value,
|
||||||
eo_period,
|
eo_period,
|
||||||
0.12*self.vdd_voltage,
|
self.v_low,
|
||||||
0.88*self.vdd_voltage)
|
self.v_high)
|
||||||
return (0, error)
|
return (0, error)
|
||||||
|
|
||||||
self.read_check.append([sp_read_value, dout_port, eo_period, check])
|
self.read_check.append([sp_read_value, dout_port, eo_period, check])
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,9 @@ class simulation():
|
||||||
self.period = tech.spice["feasible_period"]
|
self.period = tech.spice["feasible_period"]
|
||||||
self.slew = tech.spice["rise_time"]*2
|
self.slew = tech.spice["rise_time"]*2
|
||||||
self.load = tech.spice["msflop_in_cap"]*4
|
self.load = tech.spice["msflop_in_cap"]*4
|
||||||
|
|
||||||
|
self.v_high = self.vdd_voltage - tech.spice["v_threshold_typical"]
|
||||||
|
self.v_low = tech.spice["v_threshold_typical"]
|
||||||
self.gnd_voltage = 0
|
self.gnd_voltage = 0
|
||||||
|
|
||||||
def set_stimulus_variables(self):
|
def set_stimulus_variables(self):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue