Skip to content

Commit fa73f42

Browse files
occheungsbourdeauducq
authored andcommitted
Converter: impl last handling
1 parent fa141c6 commit fa73f42

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

misoc/interconnect/stream.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,9 @@ def __init__(self, nbits_from, nbits_to, ratio, reverse,
257257
self.comb += [
258258
sink.ack.eq(~strobe_all | source.ack),
259259
source.stb.eq(strobe_all),
260-
load_part.eq(sink.stb & sink.ack)
260+
load_part.eq(sink.stb & sink.ack),
261+
# cannot burst
262+
source.last.eq(1)
261263
]
262264

263265
demux_last = ((demux == (ratio - 1)) | sink.eop)
@@ -309,6 +311,7 @@ def __init__(self, nbits_from, nbits_to, ratio, reverse,
309311
last.eq(mux == (ratio-1)),
310312
source.stb.eq(sink.stb),
311313
source.eop.eq(sink.eop & last),
314+
source.last.eq(sink.last & last),
312315
sink.ack.eq(last & source.ack)
313316
]
314317
self.sync += \
@@ -393,6 +396,7 @@ def __init__(self, layout_from, layout_to, *args, **kwargs):
393396
# cast sink to converter.sink (user fields --> raw bits)
394397
self.comb += [
395398
converter.sink.stb.eq(sink.stb),
399+
converter.sink.last.eq(sink.last),
396400
converter.sink.eop.eq(sink.eop),
397401
sink.ack.eq(converter.sink.ack)
398402
]
@@ -412,6 +416,7 @@ def __init__(self, layout_from, layout_to, *args, **kwargs):
412416
# cast converter.source to source (raw bits --> user fields)
413417
self.comb += [
414418
source.stb.eq(converter.source.stb),
419+
source.last.eq(converter.source.last),
415420
source.eop.eq(converter.source.eop),
416421
converter.source.ack.eq(source.ack)
417422
]

0 commit comments

Comments
 (0)