1
0
Fork 0

pipeline GW: add busy csr

This commit is contained in:
morgan 2024-09-11 16:05:13 +08:00
parent 5c253fefb6
commit 6943a2b17e
1 changed files with 8 additions and 1 deletions

View File

@ -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)
)