diff --git a/src/gateware/cxp_pipeline.py b/src/gateware/cxp_pipeline.py index f440642..61a7787 100644 --- a/src/gateware/cxp_pipeline.py +++ b/src/gateware/cxp_pipeline.py @@ -283,6 +283,7 @@ class TX_Test_Packet(Module, AutoCSR): def __init__(self, layout): self.stb = CSR() + self.busy = CSRStatus() # # # @@ -292,7 +293,6 @@ class TX_Test_Packet(Module, AutoCSR): # Section 9.9.2 (CXP-001-2021) # 0x00, 0x01 ... 0xFF need to be send 16 times # cnt[8:12] is used to count up 16 times while cnt[:8] is the data - cnt = Signal(max=0x1000) clr_cnt = Signal() inc_cnt = Signal() @@ -337,3 +337,10 @@ class TX_Test_Packet(Module, AutoCSR): ] self.source = pak_wrp.source + + self.sync += \ + If(self.stb.re, + self.busy.status.eq(1), + ).Elif(self.source.eop & self.source.ack, + self.busy.status.eq(0) + )