From e1f807780505976978c6b79f8ad4584ec3f0c81a Mon Sep 17 00:00:00 2001 From: morgan Date: Mon, 2 Sep 2024 16:06:57 +0800 Subject: [PATCH] cxp pipeline: fix code inserter at the end --- src/gateware/cxp_pipeline.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gateware/cxp_pipeline.py b/src/gateware/cxp_pipeline.py index 1b2fa6c..5553cf7 100644 --- a/src/gateware/cxp_pipeline.py +++ b/src/gateware/cxp_pipeline.py @@ -22,7 +22,7 @@ class Code_Inserter(Module): self.sync += [ If(clr_cnt, - cnt.eq(0), + cnt.eq(cnt.reset), ).Elif(inc_cnt, cnt.eq(cnt + 1), ) @@ -55,7 +55,6 @@ class Code_Inserter(Module): fsm.act("COPY", sink.connect(source), - # eop = end of packet? If(sink.stb & sink.eop & source.ack, NextState("IDLE"), ) @@ -66,6 +65,7 @@ class Code_Inserter(Module): fsm.act("IDLE", sink.ack.eq(1), + clr_cnt.eq(1), If(sink.stb, sink.ack.eq(0), NextState("COPY"),