Add 1-deep synchronizer register for output of AsyncQueue
This commit is contained in:
parent
85c39b2f97
commit
451334ac73
@ -110,7 +110,8 @@ class AsyncQueueSink[T <: Data](gen: T, depth: Int, sync: Int, safe: Boolean = t
|
|||||||
// be considered unless the asynchronously reset deq valid register is set.
|
// be considered unless the asynchronously reset deq valid register is set.
|
||||||
// It is possible that bits latches when the source domain is reset / has power cut
|
// It is possible that bits latches when the source domain is reset / has power cut
|
||||||
// This is safe, because isolation gates brought mem low before the zeroed widx reached us
|
// This is safe, because isolation gates brought mem low before the zeroed widx reached us
|
||||||
io.deq.bits := RegEnable(io.mem(if(narrowData) UInt(0) else index), valid)
|
val deq_bits_nxt = Mux(valid, io.mem(if(narrowData) UInt(0) else index), io.deq.bits)
|
||||||
|
io.deq.bits := SynchronizerShiftReg(deq_bits_nxt, sync = 1, name = Some("deq_bits_reg"))
|
||||||
|
|
||||||
val valid_reg = AsyncResetReg(valid.asUInt, "valid_reg")(0)
|
val valid_reg = AsyncResetReg(valid.asUInt, "valid_reg")(0)
|
||||||
io.deq.valid := valid_reg && source_ready
|
io.deq.valid := valid_reg && source_ready
|
||||||
|
Loading…
Reference in New Issue
Block a user