1
0

Make some requirement failures more verbose (#608)

* tilelink: verbose requires in xbar

* diplomacy: verbose requires
This commit is contained in:
Henry Cook
2017-03-23 21:55:11 -07:00
committed by GitHub
parent bd08f10816
commit 797c18b8db
2 changed files with 15 additions and 15 deletions

View File

@ -40,8 +40,8 @@ class TLXbar(policy: TLArbiter.Policy = TLArbiter.lowestIndexFirst)(implicit p:
numClientPorts = 1 to 32,
numManagerPorts = 1 to 32,
clientFn = { seq =>
// An unsafe atomic port can not be combined with any other!
require (!seq.exists(_.unsafeAtomics) || seq.size == 1)
require (!seq.exists(_.unsafeAtomics) || seq.size == 1,
"An unsafe atomic port can not be combined with any other!")
seq(0).copy(
minLatency = seq.map(_.minLatency).min,
clients = (mapInputIds(seq) zip seq) flatMap { case (range, port) =>
@ -58,8 +58,8 @@ class TLXbar(policy: TLArbiter.Policy = TLArbiter.lowestIndexFirst)(implicit p:
minLatency = seq.map(_.minLatency).min,
endSinkId = outputIdRanges.map(_.map(_.end).getOrElse(0)).max,
managers = ManagerUnification(seq.flatMap { port =>
// println(s"${port.managers.map(_.name)} ${port.beatBytes} vs ${seq(0).managers.map(_.name)} ${seq(0).beatBytes}")
require (port.beatBytes == seq(0).beatBytes)
require (port.beatBytes == seq(0).beatBytes,
s"Xbar data widths don't match: ${port.managers.map(_.name)} has ${port.beatBytes}B vs ${seq(0).managers.map(_.name)} has ${seq(0).beatBytes}B")
val fifoIdMapper = fifoIdFactory()
port.managers map { manager => manager.copy(
fifoId = manager.fifoId.map(fifoIdMapper(_))