mirror of https://github.com/m-labs/artiq.git
serwb/test: replace valid/ready with stb/ack
This commit is contained in:
parent
73dbc0b6b6
commit
6aa8e2c433
|
@ -87,14 +87,14 @@ class TestSERWBCore(unittest.TestCase):
|
||||||
# test loop
|
# test loop
|
||||||
while i != 256:
|
while i != 256:
|
||||||
# stim
|
# stim
|
||||||
yield dut.scrambler.sink.valid.eq(1)
|
yield dut.scrambler.sink.stb.eq(1)
|
||||||
if (yield dut.scrambler.sink.valid) & (yield dut.scrambler.sink.ready):
|
if (yield dut.scrambler.sink.stb) & (yield dut.scrambler.sink.ack):
|
||||||
i += 1
|
i += 1
|
||||||
yield dut.scrambler.sink.data.eq(i)
|
yield dut.scrambler.sink.data.eq(i)
|
||||||
|
|
||||||
# check
|
# check
|
||||||
yield dut.descrambler.source.ready.eq(prng.randrange(2))
|
yield dut.descrambler.source.ack.eq(prng.randrange(2))
|
||||||
if (yield dut.descrambler.source.valid) & (yield dut.descrambler.source.ready):
|
if (yield dut.descrambler.source.stb) & (yield dut.descrambler.source.ack):
|
||||||
current_data = (yield dut.descrambler.source.data)
|
current_data = (yield dut.descrambler.source.data)
|
||||||
if (current_data != (last_data + 1)):
|
if (current_data != (last_data + 1)):
|
||||||
dut.errors += 1
|
dut.errors += 1
|
||||||
|
|
Loading…
Reference in New Issue