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"),