1
0

Add various granular and composable configs.

This commit is contained in:
Richard Xia 2016-11-18 10:49:42 -08:00
parent 81d98304dc
commit bab504cc3f
2 changed files with 85 additions and 0 deletions

View File

@ -191,6 +191,43 @@ class WithNTrackersPerBank(n: Int) extends Config(
case _ => throw new CDEMatchError
})
// This is the number of sets **per way**
class WithL1ICacheSets(sets: Int) extends Config (
knobValues = {
case "L1I_SETS" => sets
case _ => throw new CDEMatchError
}
)
// This is the number of sets **per way**
class WithL1DCacheSets(sets: Int) extends Config (
knobValues = {
case "L1D_SETS" => sets
case _ => throw new CDEMatchError
}
)
class WithL1ICacheWays(ways: Int) extends Config (
knobValues = {
case "L1I_WAYS" => ways
case _ => throw new CDEMatchError
}
)
class WithL1DCacheWays(ways: Int) extends Config (
knobValues = {
case "L1D_WAYS" => ways
case _ => throw new CDEMatchError
}
)
class WithCacheBlockBytes(linesize: Int) extends Config (
topDefinitions = { (pname,site,here) => pname match {
case CacheBlockBytes => Dump("CACHE_BLOCK_BYTES", linesize)
case _ => throw new CDEMatchError
}}
)
class WithDataScratchpad(n: Int) extends Config(
(pname,site,here) => pname match {
case DataScratchpadSize => n
@ -332,3 +369,37 @@ class WithRoccExample extends Config(
class WithSplitL2Metadata extends Config(
knobValues = { case "L2_SPLIT_METADATA" => true; case _ => throw new CDEMatchError })
class WithDefaultBtb extends Config (
topDefinitions = { (pname,site,here) => pname match {
case BtbKey => BtbParameters()
case _ => throw new CDEMatchError
}}
)
class WithFastMulDiv extends Config (
topDefinitions = { (pname,site,here) => pname match {
case MulDivKey => Some(MulDivConfig(mulUnroll = 8, mulEarlyOut = (site(XLen) > 32), divEarlyOut = true))
case _ => throw new CDEMatchError
}}
)
class WithoutMulDiv extends Config (
(pname, site, here) => pname match {
case MulDivKey => None
case _ => throw new CDEMatchError
}
)
class WithoutFPU extends Config(
(pname, site, here) => pname match {
case FPUKey => None
case _ => throw new CDEMatchError
})
class WithFPUWithoutDivSqrt extends Config (
(pname, site, here) => pname match {
case FPUKey => Some(FPUConfig(divSqrt = false))
case _ => throw new CDEMatchError
}
)

View File

@ -199,3 +199,17 @@ class WithoutTLMonitors extends Config (
case _ => throw new CDEMatchError
}
)
class WithNExtTopInterrupts(nExtInts: Int) extends Config(
(pname, site, here) => pname match {
case NExtTopInterrupts => nExtInts
case _ => throw new CDEMatchError
}
)
class WithNBreakpoints(hwbp: Int) extends Config (
(pname,site,here) => pname match {
case NBreakpoints => hwbp
case _ => throw new CDEMatchError
}
)