def __init__(self, dw, rst=None, slp=None, cycles=1):
self.i = Signal(dw)
self.o = Signal(dw)
- self.rst = Signal() if rst is None else rst
+ #self.rst = Signal() if rst is None else rst
self.slp = Signal() if slp is None else slp
self.dw = dw
self.cycles = cycles
vcount = self.cycles * self.dw
value = Signal(vcount.bit_length())
- with m.If(self.rst):
- sync += value.eq(0)
- with m.Elif(self.slp):
- sync += value.eq(value+1)
+ #with m.If(self.rst):
+ # sync += value.eq(0)
+ #with m.Elif(self.slp):
+ # sync += value.eq(value+1)
+ comb += value.eq(self.slp)
# Shift Register using input i.
r = Signal((self.cycles+1)*self.dw, reset_less=True)
self.rdly = []
self.rdly += [bank.csr(3, "rw", name="rdly_p0")]
self.rdly += [bank.csr(3, "rw", name="rdly_p1")]
+ self.bitslip = bank.csr(3, "rw") # phase-delay on read
self._bridge = self.bridge(data_width=32, granularity=8, alignment=2)
self.bus = self._bridge.bus
io_B=self.pads.dq.io[j])
]
# shift-register delay on the incoming read data
- dq_i_bs = BitSlip(4, Const(0), Const(0), cycles=1)
+ dq_i_bs = BitSlip(4, Const(0), cycles=1)
m.submodules['dq_i_bitslip_%d' % j] = dq_i_bs
dq_i_bs_o = Signal(4, name="dq_i_bs_o_%d" % j)
dq_i_bs_o_d = Signal(4, name="dq_i_bs_o_d_%d" % j)