1
0
Fork 0

cxp upconn: rename bits to tx_bitcount

This commit is contained in:
morgan 2024-06-18 16:42:17 +08:00
parent 6636339701
commit f43c8b8bac
1 changed files with 4 additions and 4 deletions

View File

@ -56,7 +56,7 @@ class CXP_UpConn(Module, AutoCSR):
o = Signal() o = Signal()
bits = Signal(max=tx_width) tx_bitcount = Signal(max=tx_width)
tx_reg = Signal(tx_width) tx_reg = Signal(tx_width)
self.submodules.encoder = SingleEncoder(True) self.submodules.encoder = SingleEncoder(True)
@ -72,10 +72,10 @@ class CXP_UpConn(Module, AutoCSR):
o.eq(tx_reg[0]), o.eq(tx_reg[0]),
tx_reg.eq(Cat(tx_reg[1:], 0)) tx_reg.eq(Cat(tx_reg[1:], 0))
), ),
If(bits != tx_width - 1, If(tx_bitcount != tx_width - 1,
bits.eq(bits + 1), tx_bitcount.eq(tx_bitcount + 1),
).Elif(self.stb.storage, ).Elif(self.stb.storage,
bits.eq(0), tx_bitcount.eq(0),
tx_reg.eq(self.encoder.output), tx_reg.eq(self.encoder.output),
self.tx_reg.status.eq(self.encoder.output), self.tx_reg.status.eq(self.encoder.output),
self.encoder.disp_in.eq(self.encoder.disp_out), self.encoder.disp_in.eq(self.encoder.disp_out),