fix sim scheduler for circuits with POs that are also used internally
This commit is contained in:
1 parent
e19463d249
commit
ed9b5c6cd6
2 files changed
+24
-3
No files matched your search
@@ -20,6 +20,18 @@ def test_dangling():
|
||||
sim.simulate(p)
|
||||
assert p[1,0] == logic.ONE
|
||||
|
||||
def test_used_output():
|
||||
c = bench.parse('input(i0) output(o0) output(o1) o0=BUF1(i0) o1=BUF(o0)')
|
||||
sim = LogicSim2V(c)
|
||||
expect = mvarray('000', '111')
|
||||
actual = sim.simulate(expect.copy())
|
||||
np.testing.assert_array_equal(
|
||||
expect[c.io_locs('o0')],
|
||||
actual[c.io_locs('o0')])
|
||||
np.testing.assert_array_equal(
|
||||
expect[c.io_locs('o1')],
|
||||
actual[c.io_locs('o1')])
|
||||
|
||||
def assert_equal_shape_and_contents(actual, desired):
|
||||
desired = np.array(desired, dtype=np.uint8)
|
||||
assert actual.shape == desired.shape
|
||||
|
||||
Reference in new issue
Block a user