tilelink2 Buffer: support an unlimited number of channels
This commit is contained in:
parent
395bc16da6
commit
5604049927
@ -14,25 +14,23 @@ class TLBuffer(entries: Int = 2, pipe: Boolean = false) extends LazyModule
|
|||||||
val in = node.bundleIn
|
val in = node.bundleIn
|
||||||
val out = node.bundleOut
|
val out = node.bundleOut
|
||||||
}
|
}
|
||||||
|
|
||||||
val in = io.in(0)
|
|
||||||
val out = io.out(0)
|
|
||||||
|
|
||||||
out.a <> Queue(in .a, entries, pipe)
|
|
||||||
in .d <> Queue(out.d, entries, pipe)
|
|
||||||
|
|
||||||
val edge = node.edgesOut(0) // same as edgeIn(0)
|
((io.in zip io.out) zip (node.edgesIn zip node.edgesOut)) foreach { case ((in, out), (edgeIn, edgeOut)) =>
|
||||||
if (edge.manager.anySupportAcquire && edge.client.anySupportProbe) {
|
out.a <> Queue(in .a, entries, pipe)
|
||||||
in .b <> Queue(out.b, entries, pipe)
|
in .d <> Queue(out.d, entries, pipe)
|
||||||
out.c <> Queue(in .c, entries, pipe)
|
|
||||||
out.e <> Queue(out.e, entries, pipe)
|
if (edgeOut.manager.anySupportAcquire && edgeOut.client.anySupportProbe) {
|
||||||
} else {
|
in .b <> Queue(out.b, entries, pipe)
|
||||||
in.b.valid := Bool(false)
|
out.c <> Queue(in .c, entries, pipe)
|
||||||
in.c.ready := Bool(true)
|
out.e <> Queue(out.e, entries, pipe)
|
||||||
in.e.ready := Bool(true)
|
} else {
|
||||||
out.b.ready := Bool(true)
|
in.b.valid := Bool(false)
|
||||||
out.c.valid := Bool(false)
|
in.c.ready := Bool(true)
|
||||||
out.e.valid := Bool(false)
|
in.e.ready := Bool(true)
|
||||||
|
out.b.ready := Bool(true)
|
||||||
|
out.c.valid := Bool(false)
|
||||||
|
out.e.valid := Bool(false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user