added HasAddrMapParameters
This commit is contained in:
parent
84576650b5
commit
8173695800
@ -10,7 +10,7 @@ case object BtbKey extends Field[BtbParameters]
|
|||||||
case class BtbParameters(nEntries: Int = 62, nRAS: Int = 2, updatesOutOfOrder: Boolean = false)
|
case class BtbParameters(nEntries: Int = 62, nRAS: Int = 2, updatesOutOfOrder: Boolean = false)
|
||||||
|
|
||||||
abstract trait HasBtbParameters extends HasCoreParameters {
|
abstract trait HasBtbParameters extends HasCoreParameters {
|
||||||
val matchBits = p(PgIdxBits)
|
val matchBits = pgIdxBits
|
||||||
val entries = p(BtbKey).nEntries
|
val entries = p(BtbKey).nEntries
|
||||||
val nRAS = p(BtbKey).nRAS
|
val nRAS = p(BtbKey).nRAS
|
||||||
val updatesOutOfOrder = p(BtbKey).updatesOutOfOrder
|
val updatesOutOfOrder = p(BtbKey).updatesOutOfOrder
|
||||||
|
@ -22,17 +22,9 @@ case object CoreDataBits extends Field[Int]
|
|||||||
case object CoreDCacheReqTagBits extends Field[Int]
|
case object CoreDCacheReqTagBits extends Field[Int]
|
||||||
case object NCustomMRWCSRs extends Field[Int]
|
case object NCustomMRWCSRs extends Field[Int]
|
||||||
|
|
||||||
trait HasCoreParameters {
|
trait HasCoreParameters extends HasAddrMapParameters {
|
||||||
implicit val p: Parameters
|
implicit val p: Parameters
|
||||||
val xLen = p(XLen)
|
val xLen = p(XLen)
|
||||||
val paddrBits = p(PAddrBits)
|
|
||||||
val vaddrBits = p(VAddrBits)
|
|
||||||
val pgIdxBits = p(PgIdxBits)
|
|
||||||
val ppnBits = p(PPNBits)
|
|
||||||
val vpnBits = p(VPNBits)
|
|
||||||
val pgLevels = p(PgLevels)
|
|
||||||
val pgLevelBits = p(PgLevelBits)
|
|
||||||
val asIdBits = p(ASIdBits)
|
|
||||||
|
|
||||||
val retireWidth = p(RetireWidth)
|
val retireWidth = p(RetireWidth)
|
||||||
val fetchWidth = p(FetchWidth)
|
val fetchWidth = p(FetchWidth)
|
||||||
|
@ -9,8 +9,7 @@ import scala.math._
|
|||||||
|
|
||||||
case object NTLBEntries extends Field[Int]
|
case object NTLBEntries extends Field[Int]
|
||||||
|
|
||||||
trait HasTLBParameters extends HasCoreParameters {
|
trait HasTLBParameters extends HasAddrMapParameters {
|
||||||
val addrMap = new AddrHashMap(p(NastiAddrMap))
|
|
||||||
val entries = p(NTLBEntries)
|
val entries = p(NTLBEntries)
|
||||||
val camAddrBits = ceil(log(entries)/log(2)).toInt
|
val camAddrBits = ceil(log(entries)/log(2)).toInt
|
||||||
val camTagBits = asIdBits + vpnBits
|
val camTagBits = asIdBits + vpnBits
|
||||||
|
Loading…
Reference in New Issue
Block a user