1
0

axi4: prototype Fragmenter

This commit is contained in:
Wesley W. Terpstra
2016-10-11 22:36:40 -07:00
parent c918aa6d89
commit a6c6d99848
2 changed files with 272 additions and 0 deletions

View File

@ -42,6 +42,10 @@ case class AXI4SlavePortParameters(
// Check that the link can be implemented in AXI4
require (maxTransfer <= beatBytes * (1 << AXI4Parameters.lenBits))
lazy val routingMask = AddressDecoder(slaves.map(_.address))
def findSafe(address: UInt) = Vec(slaves.map(_.address.map(_.contains(address)).reduce(_ || _)))
def findFast(address: UInt) = Vec(slaves.map(_.address.map(_.widen(~routingMask)).distinct.map(_.contains(address)).reduce(_ || _)))
// Require disjoint ranges for addresses
slaves.combinations(2).foreach { case Seq(x,y) =>
x.address.foreach { a => y.address.foreach { b =>