Browse Source

deactivate delta sim

devel
Stefan Holst 1 month ago
parent
commit
5769aa3716
  1. 12
      src/kyupy/wave_sim.py

12
src/kyupy/wave_sim.py

@ -179,7 +179,7 @@ def _wave_eval(op, cbuf, c_locs, c_caps, ebuf, sim, delays, simctl_int, seed, de
if (delta): if (delta):
if input_epoch == 0 and output_epoch == 0: return 0, 0 if input_epoch == 0 and output_epoch == 0: return 0, 0
out_changed = output_epoch #out_changed = output_epoch
if len(delays) > 1: if len(delays) > 1:
if simctl_int[1] == 0: if simctl_int[1] == 0:
@ -254,8 +254,8 @@ def _wave_eval(op, cbuf, c_locs, c_caps, ebuf, sim, delays, simctl_int, seed, de
or (current_t - previous_t) > thresh # -OR- the generated hazard is wider than pulse threshold. or (current_t - previous_t) > thresh # -OR- the generated hazard is wider than pulse threshold.
): ):
if z_cur < (z_cap - 1): # enough space in z_mem? if z_cur < (z_cap - 1): # enough space in z_mem?
if delta and (cbuf[z_mem + z_cur, sim] != current_t): #if delta and (cbuf[z_mem + z_cur, sim] != current_t):
out_changed = 1 # out_changed = 1
cbuf[z_mem + z_cur, sim] = current_t cbuf[z_mem + z_cur, sim] = current_t
previous_t = current_t previous_t = current_t
z_cur += 1 z_cur += 1
@ -276,8 +276,8 @@ def _wave_eval(op, cbuf, c_locs, c_caps, ebuf, sim, delays, simctl_int, seed, de
current_t = min(a, b, c, d) current_t = min(a, b, c, d)
if delta and (cbuf[z_mem + z_cur, sim] != TMAX): #if delta and (cbuf[z_mem + z_cur, sim] != TMAX):
out_changed = 1 # out_changed = 1
# generate or propagate overflow flag # generate or propagate overflow flag
cbuf[z_mem + z_cur, sim] = TMAX_OVL if overflows > 0 else max(a, b, c, d) cbuf[z_mem + z_cur, sim] = TMAX_OVL if overflows > 0 else max(a, b, c, d)
@ -291,7 +291,7 @@ def _wave_eval(op, cbuf, c_locs, c_caps, ebuf, sim, delays, simctl_int, seed, de
ebuf[z_idx, sim, 0] = e ebuf[z_idx, sim, 0] = e
ebuf[z_idx, sim, 1] = input_epoch & out_changed ebuf[z_idx, sim, 1] = input_epoch #& out_changed
return nrise, nfall return nrise, nfall

Loading…
Cancel
Save