1
0

ShiftQueue: fix bug in !flow case

This commit is contained in:
Wesley W. Terpstra 2017-09-06 18:15:59 -07:00
parent ed70b243bd
commit 3e3024c256

View File

@ -26,7 +26,7 @@ class ShiftQueue[T <: Data](gen: T,
val wdata = if (i == entries-1) io.enq.bits else Mux(valid(i+1), elts(i+1), io.enq.bits) val wdata = if (i == entries-1) io.enq.bits else Mux(valid(i+1), elts(i+1), io.enq.bits)
val wen = val wen =
Mux(io.deq.ready, Mux(io.deq.ready,
paddedValid(i+1) || io.enq.fire() && valid(i), paddedValid(i+1) || io.enq.fire() && (Bool(i == 0 && !flow) || valid(i)),
io.enq.fire() && paddedValid(i-1) && !valid(i)) io.enq.fire() && paddedValid(i-1) && !valid(i))
when (wen) { elts(i) := wdata } when (wen) { elts(i) := wdata }