tilelink2: simpler sizes requirement for users to understand
This commit is contained in:
parent
ab998c08f1
commit
c411a3e77f
@ -47,7 +47,7 @@ case class TransferSizes(min: Int, max: Int)
|
|||||||
def this(x: Int) = this(x, x)
|
def this(x: Int) = this(x, x)
|
||||||
|
|
||||||
require (min <= max)
|
require (min <= max)
|
||||||
require (min != 0 || max == 0)
|
require (min >= 0 && max >= 0)
|
||||||
require (max == 0 || isPow2(max))
|
require (max == 0 || isPow2(max))
|
||||||
require (min == 0 || isPow2(min))
|
require (min == 0 || isPow2(min))
|
||||||
require (max <= TransferSizes.maxAllowed)
|
require (max <= TransferSizes.maxAllowed)
|
||||||
@ -176,6 +176,8 @@ case class TLManagerPortParameters(managers: Seq[TLManagerParameters], beatBytes
|
|||||||
def find(address: UInt) = Vec(managers.map(_.address.map(_.contains(address)).reduce(_ || _)))
|
def find(address: UInt) = Vec(managers.map(_.address.map(_.contains(address)).reduce(_ || _)))
|
||||||
def findById(id: UInt) = Vec(managers.map(_.sinkId.contains(id)))
|
def findById(id: UInt) = Vec(managers.map(_.sinkId.contains(id)))
|
||||||
|
|
||||||
|
// !!! need a cheaper version of find, where we assume a valid address match exists
|
||||||
|
|
||||||
// Does this Port manage this ID/address?
|
// Does this Port manage this ID/address?
|
||||||
def contains(address: UInt) = find(address).reduce(_ || _)
|
def contains(address: UInt) = find(address).reduce(_ || _)
|
||||||
def containsById(id: UInt) = findById(id).reduce(_ || _)
|
def containsById(id: UInt) = findById(id).reduce(_ || _)
|
||||||
|
Loading…
Reference in New Issue
Block a user