diff --git a/src/gateware/cxp_upconn.py b/src/gateware/cxp_upconn.py index 88b7171..2359415 100644 --- a/src/gateware/cxp_upconn.py +++ b/src/gateware/cxp_upconn.py @@ -56,7 +56,7 @@ class CXP_UpConn(Module, AutoCSR): o = Signal() - bits = Signal(max=tx_width) + tx_bitcount = Signal(max=tx_width) tx_reg = Signal(tx_width) self.submodules.encoder = SingleEncoder(True) @@ -72,10 +72,10 @@ class CXP_UpConn(Module, AutoCSR): o.eq(tx_reg[0]), tx_reg.eq(Cat(tx_reg[1:], 0)) ), - If(bits != tx_width - 1, - bits.eq(bits + 1), + If(tx_bitcount != tx_width - 1, + tx_bitcount.eq(tx_bitcount + 1), ).Elif(self.stb.storage, - bits.eq(0), + tx_bitcount.eq(0), tx_reg.eq(self.encoder.output), self.tx_reg.status.eq(self.encoder.output), self.encoder.disp_in.eq(self.encoder.disp_out),