Skip to content

Commit 42b173c

Browse files
committed
Parameterize register file size to toplevel configs
scale architectural regs by physregs / 2, but cap to maximum 128 to be congruent with compiler codegen.
1 parent 98bfcad commit 42b173c

2 files changed

Lines changed: 35 additions & 2 deletions

File tree

chipyard/RadianceConfigs.scala

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@ class RadianceSingleClusterConfig extends Config(
240240
)
241241

242242
class RadianceSingleClusterIssueDepthConfig(issueQueueEntries: Int) extends Config(
243-
new WithRadianceMxGemmini(location = InCluster(0), dim = 16, accSizeInKB = 32, tileSize = (8, 8, 8)) ++
244243
new WithMuonCores(
245244
2,
246245
location = InCluster(0),
@@ -310,7 +309,10 @@ class RadianceSingleClusterWarpDepthConfig(warpDepth: Int) extends Config(
310309
noILP = false,
311310
l0i = Some(L0iCacheConfig),
312311
l0d = Some(L0dCacheConfig),
312+
trace = false,
313313
profiler = false,
314+
cyclotron = false,
315+
difftest = false,
314316
numWarps = Some(warpDepth)
315317
) ++
316318
new WithSIMTConfig(numWarps = warpDepth, numLanes = 16, numLsuLanes = 16, numSMEMInFlights = 8) ++
@@ -327,6 +329,32 @@ class RadianceSingleClusterWarpDepth8Config extends RadianceSingleClusterWarpDep
327329
class RadianceSingleClusterWarpDepth16Config extends RadianceSingleClusterWarpDepthConfig(16)
328330
class RadianceSingleClusterWarpDepth32Config extends RadianceSingleClusterWarpDepthConfig(32)
329331

332+
class RadianceSingleClusterPhysRegConfig(numPhysRegs: Int) extends Config(
333+
new WithMuonCores(
334+
2,
335+
location = InCluster(0),
336+
noILP = false,
337+
l0i = Some(L0iCacheConfig),
338+
l0d = Some(L0dCacheConfig),
339+
trace = false,
340+
profiler = false,
341+
cyclotron = false,
342+
difftest = false,
343+
numPhysRegs = Some(numPhysRegs)
344+
) ++
345+
new WithRadianceCluster(0, smemConfig = TapeoutSmemConfig, l1Config = L1CacheConfig) ++
346+
new WithExtGPUMem() ++
347+
new WithRadianceRocket ++
348+
new WithGPUResetAggregator(defaultReset = false) ++
349+
new RadianceBaseConfig
350+
)
351+
352+
class RadianceSingleClusterPhysReg64Config extends RadianceSingleClusterPhysRegConfig(64)
353+
class RadianceSingleClusterPhysReg128Config extends RadianceSingleClusterPhysRegConfig(128)
354+
class RadianceSingleClusterPhysReg256Config extends RadianceSingleClusterPhysRegConfig(256)
355+
class RadianceSingleClusterPhysReg512Config extends RadianceSingleClusterPhysRegConfig(512)
356+
class RadianceSingleClusterPhysReg1024Config extends RadianceSingleClusterPhysRegConfig(1024)
357+
330358
class RadianceSingleClusterLargeICacheConfig extends Config(
331359
new WithRadianceMxGemmini(location = InCluster(0), dim = 16, accSizeInKB = 32, tileSize = (8, 8, 8)) ++
332360
new WithMuonCores(2, location = InCluster(0), noILP = false, l0i = Some(L0iCacheHugeConfig), l0d = Some(L0dCacheConfig), trace = true) ++

src/main/scala/radiance/subsystem/Configs.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ class WithMuonCores(
7676
disabled: Boolean,
7777
numWarps: Option[Int],
7878
numLanes: Option[Int],
79+
numPhysRegs: Option[Int],
7980
numIssueQueueEntries: Int,
8081
l0i: Option[DCacheParams],
8182
l0d: Option[DCacheParams],
@@ -89,6 +90,7 @@ class WithMuonCores(
8990
val simt = up(SIMTCoreKey).get
9091
val resolvedNumWarps = numWarps.getOrElse(simt.numWarps)
9192
val resolvedNumLanes = numLanes.getOrElse(simt.numLanes)
93+
val resolvedNumPhysRegs = numPhysRegs.getOrElse(MuonCoreParams().numPhysRegs)
9294
val intPipe = numLanes.map { lanes =>
9395
IntPipeParams(numALULanes = lanes, numMulDivLanes = lanes)
9496
}
@@ -102,6 +104,8 @@ class WithMuonCores(
102104
MuonCoreParams(
103105
numWarps = resolvedNumWarps,
104106
numLanes = resolvedNumLanes,
107+
numPhysRegs = resolvedNumPhysRegs,
108+
numArchRegs = (resolvedNumPhysRegs / 2).min(128),
105109
numCores = n,
106110
numClusters = 2, // TODO: magic number
107111
noILP = noILP,
@@ -165,6 +169,7 @@ class WithMuonCores(
165169
difftest: Boolean = false, disabled: Boolean = false,
166170
numWarps: Option[Int] = None,
167171
numLanes: Option[Int] = None,
172+
numPhysRegs: Option[Int] = None,
168173
numIssueQueueEntries: Int = 8,
169174
l0i: Option[DCacheParams] = None, l0d: Option[DCacheParams] = None)
170175
= this(n, location, RocketCrossingParams(
@@ -174,7 +179,7 @@ class WithMuonCores(
174179
case InSubsystem => CBUS
175180
case InCluster(clusterId) => CCBUS(clusterId)
176181
},
177-
), standalone, noILP, trace, profiler, cyclotron, difftest, disabled, numWarps, numLanes, numIssueQueueEntries, l0i, l0d)
182+
), standalone, noILP, trace, profiler, cyclotron, difftest, disabled, numWarps, numLanes, numPhysRegs, numIssueQueueEntries, l0i, l0d)
178183
}
179184

180185
class WithCyclotronCores(

0 commit comments

Comments
 (0)