Parameterization¶
General Parameters¶
Listing general-boom-params
lists the top-level parameters that you can manipulate for a BOOM core.
This is taken from src/main/scala/common/parameters.scala
.
fetchWidth: Int = 1,
decodeWidth: Int = 1,
numRobEntries: Int = 64,
issueParams: Seq[IssueParams] = Seq(
IssueParams(issueWidth=1, numEntries=16, iqType=IQT_MEM.litValue, dispatchWidth=1),
IssueParams(issueWidth=2, numEntries=16, iqType=IQT_INT.litValue, dispatchWidth=1),
IssueParams(issueWidth=1, numEntries=16, iqType=IQT_FP.litValue , dispatchWidth=1)),
numLdqEntries: Int = 16,
numStqEntries: Int = 16,
numIntPhysRegisters: Int = 96,
numFpPhysRegisters: Int = 64,
maxBrCount: Int = 4,
numFetchBufferEntries: Int = 16,
enableAgePriorityIssue: Boolean = true,
enablePrefetching: Boolean = false,
enableFastLoadUse: Boolean = true,
enableCommitMapTable: Boolean = false,
enableFastPNR: Boolean = false,
enableSFBOpt: Boolean = false,
enableGHistStallRepair: Boolean = true,
enableBTBFastRepair: Boolean = true,
useAtomicsOnlyForIO: Boolean = false,
ftq: FtqParameters = FtqParameters(),
intToFpLatency: Int = 2,
imulLatency: Int = 3,
nPerfCounters: Int = 0,
numRXQEntries: Int = 4,
numRCQEntries: Int = 8,
numDCacheBanks: Int = 1,
nPMPs: Int = 8,
enableICacheDelay: Boolean = false,
/* branch prediction */
enableBranchPrediction: Boolean = true,
branchPredictor: Function2[BranchPredictionBankResponse, Parameters, Tuple2[Seq[BranchPredictorBank], BranchPredictionBankResponse]] = ((resp_in: BranchPredictionBankResponse, p: Parameters) => (Nil, resp_in)),
globalHistoryLength: Int = 64,
localHistoryLength: Int = 32,
localHistoryNSets: Int = 128,
bpdMaxMetaLength: Int = 120,
numRasEntries: Int = 32,
enableRasTopRepair: Boolean = true,
/* more stuff */
useCompressed: Boolean = true,
useFetchMonitor: Boolean = true,
bootFreqHz: BigInt = 0,
fpu: Option[FPUParams] = Some(FPUParams(sfmaLatency=4, dfmaLatency=4)),
usingFPU: Boolean = true,
haveBasicCounters: Boolean = true,
misaWritable: Boolean = false,
mtvecInit: Option[BigInt] = Some(BigInt(0)),
mtvecWritable: Boolean = true,
haveCFlush: Boolean = false,
mulDiv: Option[freechips.rocketchip.rocket.MulDivParams] = Some(MulDivParams(divEarlyOut=true)),
nBreakpoints: Int = 0, // TODO Fix with better frontend breakpoint unit
nL2TLBEntries: Int = 512,
nL2TLBWays: Int = 1,
nLocalInterrupts: Int = 0,
useNMI: Boolean = false,
useAtomics: Boolean = true,
useDebug: Boolean = true,
useUser: Boolean = true,
useSupervisor: Boolean = false,
useVM: Boolean = true,
useSCIE: Boolean = false,
useRVE: Boolean = false,
useBPWatch: Boolean = false,
clockGate: Boolean = false,
mcontextWidth: Int = 0,
scontextWidth: Int = 0,
/* debug stuff */
enableCommitLogPrintf: Boolean = false,
enableBranchPrintf: Boolean = false,
enableMemtracePrintf: Boolean = false
Sample Configurations¶
Sample configurations of the core and the parameters used can be seen in src/main/scala/common/config-mixins.scala
.
The following code shows an example of the “Large BOOM Configuration”.
/**
* 3-wide BOOM. Try to match the Cortex-A15.
*/
class WithNLargeBooms(n: Int = 1, overrideIdOffset: Option[Int] = None) extends Config(
new WithTAGELBPD ++ // Default to TAGE-L BPD
new Config((site, here, up) => {
case TilesLocated(InSubsystem) => {
val prev = up(TilesLocated(InSubsystem), site)
val idOffset = overrideIdOffset.getOrElse(prev.size)
(0 until n).map { i =>
BoomTileAttachParams(
tileParams = BoomTileParams(
core = BoomCoreParams(
fetchWidth = 8,
decodeWidth = 3,
numRobEntries = 96,
issueParams = Seq(
IssueParams(issueWidth=1, numEntries=16, iqType=IQT_MEM.litValue, dispatchWidth=3),
IssueParams(issueWidth=3, numEntries=32, iqType=IQT_INT.litValue, dispatchWidth=3),
IssueParams(issueWidth=1, numEntries=24, iqType=IQT_FP.litValue , dispatchWidth=3)),
numIntPhysRegisters = 100,
numFpPhysRegisters = 96,
numLdqEntries = 24,
numStqEntries = 24,
maxBrCount = 16,
numFetchBufferEntries = 24,
ftq = FtqParameters(nEntries=32),
fpu = Some(freechips.rocketchip.tile.FPUParams(sfmaLatency=4, dfmaLatency=4, divSqrt=true))
),
dcache = Some(
DCacheParams(rowBits = site(SystemBusKey).beatBits, nSets=64, nWays=8, nMSHRs=4, nTLBWays=16)
),
icache = Some(
ICacheParams(rowBits = site(SystemBusKey).beatBits, nSets=64, nWays=8, fetchBytes=4*4)
),
hartId = i + idOffset
),
crossingParams = RocketCrossingParams()
)
} ++ prev
}
case SystemBusKey => up(SystemBusKey, site).copy(beatBytes = 16)
case XLen => 64
})
)
Other Parameters¶
You can also manipulate other parameters such as Rocket Chip SoC parameters, Uncore, BTB, BIM, BPU, and more when configuring the SoC! However, this is done in the top-level project that adds BOOM so this will not be discussed here.