frontend/stream: Add 16-bit data-width support.

This commit is contained in:
Florent Kermarrec 2023-06-28 11:02:37 +02:00
parent 65ef1930f5
commit 18cd5f234a
1 changed files with 5 additions and 1 deletions

View File

@ -58,7 +58,11 @@ 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({32:0b1000, 8:0b1}[data_width]), source.last_be.eq({
32 : 0b1000,
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),