From 831b489fd3a545a4a2a3eb57b058b54249eda5cf Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 23 Nov 2017 17:41:35 +0100 Subject: [PATCH] soc/interconnect/stream: fix specific cases for last/first signal in UpConverter --- litex/soc/interconnect/stream.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/litex/soc/interconnect/stream.py b/litex/soc/interconnect/stream.py index bc6793cac..fea05b43e 100644 --- a/litex/soc/interconnect/stream.py +++ b/litex/soc/interconnect/stream.py @@ -176,8 +176,13 @@ class _UpConverter(Module): ) ), If(source.valid & source.ready, - source.first.eq(sink.first), - source.last.eq(sink.last), + If(sink.valid & sink.ready, + source.first.eq(sink.first), + source.last.eq(sink.last) + ).Else( + source.first.eq(0), + source.last.eq(0) + ) ).Elif(sink.valid & sink.ready, source.first.eq(sink.first | source.first), source.last.eq(sink.last | source.last)