simplify TileLinkParameters with Option
This commit is contained in:
parent
49667aa4b0
commit
e1f573918d
@ -32,8 +32,8 @@ class L2BroadcastHub(implicit p: Parameters) extends ManagerCoherenceAgent()(p)
|
||||
val inStoreQueue :: inVolWBQueue :: inClientReleaseQueue :: Nil = Enum(UInt(), nDataQueueLocations)
|
||||
|
||||
val usingStoreDataQueue = p.alterPartial({
|
||||
case TLKey(`innerTLId`) => innerTLParams.copy()(internalDataBits, innerWriteMaskBits)
|
||||
case TLKey(`outerTLId`) => outerTLParams.copy()(internalDataBits, outerWriteMaskBits)
|
||||
case TLKey(`innerTLId`) => innerTLParams.copy(overrideDataBitsPerBeat = Some(internalDataBits))
|
||||
case TLKey(`outerTLId`) => outerTLParams.copy(overrideDataBitsPerBeat = Some(internalDataBits))
|
||||
})
|
||||
|
||||
// Create SHRs for outstanding transactions
|
||||
|
@ -33,10 +33,12 @@ case class TileLinkParameters(
|
||||
maxManagerXacts: Int,
|
||||
addrBits: Int,
|
||||
dataBits: Int,
|
||||
dataBeats: Int = 4)
|
||||
(val dataBitsPerBeat: Int = dataBits / dataBeats,
|
||||
val writeMaskBits: Int = ((dataBits / dataBeats) - 1) / 8 + 1) {
|
||||
dataBeats: Int = 4,
|
||||
overrideDataBitsPerBeat: Option[Int] = None
|
||||
) {
|
||||
val nClients = nCachingClients + nCachelessClients
|
||||
val writeMaskBits: Int = ((dataBits / dataBeats) - 1) / 8 + 1
|
||||
val dataBitsPerBeat: Int = overrideDataBitsPerBeat.getOrElse(dataBits / dataBeats)
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user