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
|
|
@ -29,6 +29,7 @@ class functional(simulation):
|
|||
self.set_spice_constants()
|
||||
self.set_stimulus_variables()
|
||||
self.create_signal_names()
|
||||
|
||||
|
||||
# Number of checks can be changed
|
||||
self.num_cycles = 2
|
||||
|
|
@ -141,17 +142,17 @@ class functional(simulation):
|
|||
sp_read_value = ""
|
||||
for bit in range(self.word_size):
|
||||
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
|
||||
elif value < 0.12 * self.vdd_voltage:
|
||||
elif value < self.v_low:
|
||||
sp_read_value = "0" + sp_read_value
|
||||
else:
|
||||
error ="FAILED: {0}_{1} value {2} at time {3}n does not fall within noise margins <{4} or >{5}.".format(dout_port,
|
||||
bit,
|
||||
value,
|
||||
eo_period,
|
||||
0.12*self.vdd_voltage,
|
||||
0.88*self.vdd_voltage)
|
||||
self.v_low,
|
||||
self.v_high)
|
||||
return (0, error)
|
||||
|
||||
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.slew = tech.spice["rise_time"]*2
|
||||
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
|
||||
|
||||
def set_stimulus_variables(self):
|
||||
|
|
|
|||
Loading…
Reference in New Issue