tilelink2 RegisterRouter: fix output data glitches
If a device changes a register while it's being read but not yet accepted, this an lead to 'data' changing while 'valid' is high. A violation. The problem is that RegMapper is fundamentally DecoupledIO. So fix it with a Queue.
This commit is contained in:
parent
e0188f8aa4
commit
bff0ffa428
@ -37,8 +37,10 @@ class TLRegisterNode(address: AddressSet, concurrency: Int = 0, beatBytes: Int =
|
||||
in.bits.mask := a.bits.mask
|
||||
in.bits.extra := Cat(edge.addr_lo(a.bits), a.bits.source, a.bits.size)
|
||||
|
||||
// Invoke the register map builder
|
||||
val out = RegMapper(beatBytes, concurrency, undefZero, in, mapping:_*)
|
||||
// Invoke the register map builder and make it Irrevocable
|
||||
val out = Queue.irrevocable(
|
||||
RegMapper(beatBytes, concurrency, undefZero, in, mapping:_*),
|
||||
entries = 1, pipe = true, flow = true)
|
||||
|
||||
// No flow control needed
|
||||
in.valid := a.valid
|
||||
|
Loading…
Reference in New Issue
Block a user