- qsz = Signal(max=iqlen * self.qsz)
- comb += qsz.eq(self.n_sub_o * Const(self.qsz, len(qsz)))
- sync += self.q.eq(self.q >> qsz)
+ for i in range(iqlen-1):
+ cfrom = Signal(max=iqlen*2)
+ cto = Signal(max=iqlen*2)
+ comb += cfrom.eq(Const(i, iqlen+1) + start_copy)
+ comb += cto.eq(Const(i, iqlen+1) + end_copy)
+ with m.If((cfrom < mqlen) & (cto < mqlen)):
+ sync += self.q[cto].eq(self.q[cfrom])
+
+ for i in range(self.n_in):
+ with m.If(self.p_add_i < i):
+ idx = Signal(max=iqlen)
+ comb += idx.eq(start_copy + i)
+ sync += self.q[idx].eq(cat(self.data_i[i]))