frontend/stream/LiteEthStream2UDPTX: Condition source.last_be to source.last.

This commit is contained in:
Florent Kermarrec 2024-04-11 10:47:02 +02:00
parent 79ccffcfa7
commit a0d59dd264
1 changed files with 6 additions and 5 deletions

View File

@ -63,11 +63,12 @@ class LiteEthStream2UDPTX(LiteXModule):
source.ip_address.eq(_ip_address), source.ip_address.eq(_ip_address),
source.length.eq(level * (data_width//8)), source.length.eq(level * (data_width//8)),
source.data.eq(fifo.source.data), source.data.eq(fifo.source.data),
source.last_be.eq({ If(source.last,
32 : 0b1000, source.last_be.eq({
16 : 0b10, 32 : 0b1000,
8 : 0b1}[data_width] 16 : 0b10,
), 8 : 0b1
}[data_width])),
If(source.ready, If(source.ready,
fifo.source.ready.eq(1), fifo.source.ready.eq(1),
NextValue(counter, counter + 1), NextValue(counter, counter + 1),