|
|
|
@ -140,7 +140,7 @@ class LogicSim(sim.SimOps):
@@ -140,7 +140,7 @@ class LogicSim(sim.SimOps):
|
|
|
|
|
self.s[0, self.ppio_s_locs, 0] = self.s[1, self.ppio_s_locs, 0] # final value is newly captured final value |
|
|
|
|
self.s[0, self.ppio_s_locs, 2] = self.s[0, self.ppio_s_locs, 0] ^ self.s[0, self.ppio_s_locs, 1] # TODO: not correct for X, - |
|
|
|
|
|
|
|
|
|
def cycle(self, inject_cb=None): |
|
|
|
|
def cycle(self, cycles=1, inject_cb=None): |
|
|
|
|
"""Assigns the given state, propagates it and captures the new state. |
|
|
|
|
|
|
|
|
|
:param state: A bit-parallel array in a compatible shape holding the current circuit state. |
|
|
|
@ -150,10 +150,11 @@ class LogicSim(sim.SimOps):
@@ -150,10 +150,11 @@ class LogicSim(sim.SimOps):
|
|
|
|
|
:param inject_cb: A callback function for manipulating intermediate signal values. See :py:func:`propagate`. |
|
|
|
|
:returns: The given state object. |
|
|
|
|
""" |
|
|
|
|
self.s_to_c() |
|
|
|
|
self.c_prop(inject_cb) |
|
|
|
|
self.c_to_s() |
|
|
|
|
self.s_ppo_to_ppi() |
|
|
|
|
for _ in range(cycles): |
|
|
|
|
self.s_to_c() |
|
|
|
|
self.c_prop(inject_cb) |
|
|
|
|
self.c_to_s() |
|
|
|
|
self.s_ppo_to_ppi() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@numba.njit |
|
|
|
|