1
0

tilelink2: be more forgiving in what Legacy TL requires

This commit is contained in:
Wesley W. Terpstra 2016-09-05 21:12:51 -07:00
parent 3167539331
commit 56170c605c

View File

@ -24,14 +24,27 @@ class TLLegacy(implicit val p: Parameters) extends LazyModule with HasTileLinkPa
// TL legacy is dumb. All managers must support it's accesses. // TL legacy is dumb. All managers must support it's accesses.
val edge = node.edgesOut(0) val edge = node.edgesOut(0)
require (edge.manager.beatBytes == tlDataBytes) require (edge.manager.beatBytes == tlDataBytes)
require (edge.manager.allSupportGet .contains(TransferSizes(tlDataBytes))) edge.manager.managers.foreach { m =>
require (edge.manager.allSupportGet .contains(TransferSizes(tlDataBeats * tlDataBytes))) // If a slave supports read at all, it must support all TL Legacy requires
require (edge.manager.allSupportPutPartial.contains(TransferSizes(tlDataBytes))) if (m.supportsGet) {
require (edge.manager.allSupportPutPartial.contains(TransferSizes(tlDataBeats * tlDataBytes))) require (m.supportsGet.contains(TransferSizes(tlDataBytes)))
require (edge.manager.allSupportArithmetic.contains(TransferSizes(4, tlDataBytes))) require (m.supportsGet.contains(TransferSizes(tlDataBeats * tlDataBytes)))
require (edge.manager.allSupportLogical .contains(TransferSizes(4, tlDataBytes))) }
require (edge.manager.allSupportHint) // Likewise, any put support must mean full put support
// TL legacy will not generate PutFull, Acquire if (m.supportsPutPartial) {
require (m.supportsPutPartial.contains(TransferSizes(tlDataBytes)))
require (m.supportsPutPartial.contains(TransferSizes(tlDataBeats * tlDataBytes)))
}
// Any atomic support => must support 32-bit up to beat size of all types
if (m.supportsArithmetic || m.supportsLogical) {
require (m.supportsArithmetic.contains(TransferSizes(4, tlDataBytes)))
require (m.supportsLogical .contains(TransferSizes(4, tlDataBytes)))
}
// We straight-up require hints
require (edge.manager.allSupportHint)
}
// TL legacy will not generate PutFull
// During conversion from TL Legacy, we won't support Acquire
// Must be able to fit TL2 sink_id into TL legacy // Must be able to fit TL2 sink_id into TL legacy
require ((1 << tlManagerXactIdBits) >= edge.manager.endSinkId) require ((1 << tlManagerXactIdBits) >= edge.manager.endSinkId)