1
0

tilelink2: help tools save some registers in the WidthWidget (#691)

This commit is contained in:
Wesley W. Terpstra 2017-04-24 15:13:58 -07:00 committed by GitHub
parent 65928dc6a0
commit d0f3004097

View File

@ -132,7 +132,13 @@ class TLWidthWidget(innerBeatBytes: Int)(implicit p: Parameters) extends LazyMod
} else if (edgeIn.manager.beatBytes > edgeOut.manager.beatBytes) { } else if (edgeIn.manager.beatBytes > edgeOut.manager.beatBytes) {
// split input to output // split input to output
val repeat = Wire(Bool()) val repeat = Wire(Bool())
repeat := split(edgeIn, Repeater(in, repeat), edgeOut, out) val repeated = Repeater(in, repeat)
val cated = Wire(repeated)
cated <> repeated
edgeIn.data(cated.bits) := Cat(
edgeIn.data(repeated.bits)(edgeIn.manager.beatBytes*8-1, edgeOut.manager.beatBytes*8),
edgeIn.data(in.bits)(edgeOut.manager.beatBytes*8-1, 0))
repeat := split(edgeIn, cated, edgeOut, out)
} else { } else {
// merge input to output // merge input to output
merge(edgeIn, in, edgeOut, out) merge(edgeIn, in, edgeOut, out)