tb: axis_replay_buffer: Allow delaying the last byte

Allow delaying the last byte to make it easier to exactly time when the
MAC sees the byte. This way, we can test to ensure that everything works
even when valid is only high for one cycle. We can't change signals
once valid goes high, so this is the only way to ensure this kind of
timing.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
This commit is contained in:
Sean Anderson 2023-01-11 17:20:12 -05:00
parent 69ddcc388c
commit 34d6a1fd6a
1 changed files with 3 additions and 1 deletions

View File

@ -10,8 +10,10 @@ from .util import ClockEnable, lookahead, timeout
BUF_SIZE = 54
async def send_packet(signals, packet, ratio=1):
async def send_packet(signals, packet, ratio=1, last_extra=0):
for val, last in lookahead(packet):
if last and last_extra:
await ClockCycles(signals['clk'], last_extra, rising=False)
if 'err' in signals:
if val is None:
signals['data'].value = 0