tb: Use correct width for Xs

In several cases, not the number of Xs did not match the number of bits.
Correct this.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
This commit is contained in:
Sean Anderson 2023-03-05 00:03:18 -05:00
parent 601cccd3dc
commit 139baaffcf
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ async def wb_xfer(signals, addr, data=None):
assert signals['ack'].value or signals['err'].value
signals['stb'].value = 0
signals['we'].value = LogicArray('X')
signals['addr'].value = LogicArray('X' * 4)
signals['addr'].value = LogicArray('X' * len(signals['addr']))
signals['data_write'].value = LogicArray('X' * 16)
if data is None and signals['ack'].value:
return signals['data_read'].value

View File

@ -21,7 +21,7 @@ async def nrzi_decode(bits):
@timeout(10, 'us')
async def test_rx(decoder, valids):
decoder.nrzi_valid.value = 0
decoder.nrzi.value = LogicArray('X', 'X')
decoder.nrzi.value = LogicArray('XX')
decoder.rst.value = 1
await Timer(1)
await cocotb.start(Clock(decoder.clk, 8, units='ns').start())