Skip to content

Commit a9ff4bc

Browse files
committed
Parameterize bypass; rename to noILP
1 parent 327f326 commit a9ff4bc

6 files changed

Lines changed: 25 additions & 17 deletions

File tree

chipyard/RadianceConfigs.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@ class RadianceMuonConfig extends Config(
152152

153153
class RadianceTapeoutSimConfig extends Config(
154154
// new WithRadianceMxGemmini(location = InCluster(1), dim = 16, accSizeInKB = 32, tileSize = (8, 8, 8)) ++
155-
new WithMuonCores(2, location = InCluster(1), l0i = Some(L0iCacheConfig), l0d = Some(L0dCacheConfig)) ++
155+
new WithMuonCores(2, location = InCluster(1), noILP = true, l0i = Some(L0iCacheConfig), l0d = Some(L0dCacheConfig)) ++
156156
new WithRadianceCluster(1, smemConfig = TapeoutSmemConfig, l1Config = L1CacheConfig) ++
157157
// new WithRadianceMxGemmini(location = InCluster(0), dim = 16, accSizeInKB = 32, tileSize = (8, 8, 8)) ++
158-
new WithMuonCores(2, location = InCluster(0), l0i = Some(L0iCacheConfig), l0d = Some(L0dCacheConfig)) ++
158+
new WithMuonCores(2, location = InCluster(0), noILP = true, l0i = Some(L0iCacheConfig), l0d = Some(L0dCacheConfig)) ++
159159
new WithRadianceCluster(0, smemConfig = TapeoutSmemConfig, l1Config = L1CacheConfig) ++
160160
new WithExtGPUMem() ++
161161
new freechips.rocketchip.rocket.WithCFlushEnabled ++ // thanks kevin

src/main/scala/radiance/muon/Backend.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ class Backend(
4141
scoreboard.io.updateColl <> reservStation.io.scb.updateColl
4242
scoreboard.io.updateWB <> reservStation.io.scb.updateWB
4343

44-
val bypass = true
45-
val issued = if (bypass) {
44+
val noILP = muonParams.noILP
45+
val issued = if (noILP) {
4646
hazard.reset := true.B
4747
scoreboard.reset := true.B
4848
reservStation.reset := true.B
@@ -77,8 +77,8 @@ class Backend(
7777
val regs = Seq(Rs1, Rs2, Rs3)
7878
val collector = Module(new DuplicatedCollector)
7979
collector.io.readReq.valid := collector.io.readReq.bits.anyEnabled()
80-
if (bypass) {
81-
// on bypass, manage collector entirely after issue
80+
if (noILP) {
81+
// on noILP, manage collector entirely after issue
8282
(haves lazyZip regs lazyZip collector.io.readData.regs lazyZip collector.io.readReq.bits.regs)
8383
.foreach { case (has, reg, readData, collReq) =>
8484
val pReg = issued.bits.uop.inst(reg)
@@ -126,7 +126,7 @@ class Backend(
126126
execute.io.mem.smem <> io.smem
127127
execute.io.lsuReserve <> io.lsuReserve
128128

129-
if (bypass) {
129+
if (noILP) {
130130
// fallback issue: stall every instruction until writeback
131131
// or execute req fire, for instructions that don't need writeback (i.e. stores, fences)
132132
val inFlight = RegInit(false.B)
@@ -155,7 +155,7 @@ class Backend(
155155
execute.io.req.valid := inFlight && !hasIssued
156156

157157
// assumes 1-cycle latency collector
158-
// FIXME: this changes issue-vs-execute timing on bypass=true/false, which
158+
// FIXME: this changes issue-vs-execute timing on noILP=true/false, which
159159
// is confusing
160160
val uop = RegEnable(issued.bits.uop, 0.U.asTypeOf(issued.bits.uop.cloneType), issued.fire)
161161
val token = RegEnable(issued.bits.token, 0.U.asTypeOf(issued.bits.token.cloneType), issued.fire)

src/main/scala/radiance/muon/MuonCore.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@ case class MuonCoreParams(
3232
// issue
3333
numIssueQueueEntries: Int = 8, // RS
3434
maxPendingReads: Int = 3, // scoreboard
35+
noILP: Boolean = false, // fallback to single-in-flight instruction issue
36+
// logic ("bypass")
3537
// collector
36-
// if true, use a bank-conflict-avoiding operand collector
37-
// if false, use a simple rs1/2/3-duplicated register file
38-
useCollector: Boolean = false,
38+
useCollector: Boolean = false, // if true, use a bank-conflict-avoiding
39+
// operand collector; if false, use a simple
40+
// rs1/2/3-duplicated register file
3941
numRegBanks: Int = 1, // when useCollector true
4042
numCollectorEntries: Int = 1, // when useCollector true
4143
// execute

src/main/scala/radiance/muon/Scoreboard.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ class ScoreboardHazardIO(implicit p: Parameters) extends CoreBundle()(p) {
3636
val readRs2 = new ScoreboardRead(scoreboardReadCountBits, scoreboardWriteCountBits)
3737
val readRs3 = new ScoreboardRead(scoreboardReadCountBits, scoreboardWriteCountBits)
3838
val readRd = new ScoreboardRead(scoreboardReadCountBits, scoreboardWriteCountBits)
39-
// TODO: per-warp ports
4039
}
4140

4241
/** Scoreboard module keeps track of pending reads and writes to every register
@@ -193,8 +192,6 @@ class Scoreboard(implicit p: Parameters) extends CoreModule()(p) {
193192
val newCount = WireDefault(currCount)
194193

195194
// skip x0 updates
196-
//
197-
// TODO: refactor; handling both incr / decr seems overkill
198195
when (u.pReg =/= 0.U) {
199196
// if currCount + u.incr overflows but u.decr cancels it out, treat
200197
// it as a success.

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ class WithMuonCores(
6464
location: HierarchicalLocation,
6565
crossing: RocketCrossingParams,
6666
standalone: Boolean,
67+
noILP: Boolean,
6768
difftest: Boolean,
6869
disabled: Boolean,
6970
l0i: Option[DCacheParams],
@@ -80,6 +81,7 @@ class WithMuonCores(
8081
numLanes = up(SIMTCoreKey).get.numLanes,
8182
numCores = n,
8283
numClusters = 2, // TODO: magic number
84+
noILP = noILP,
8385
logSMEMInFlights = log2Ceil(up(SIMTCoreKey).get.numSMEMInFlights),
8486
lsu = LoadStoreUnitParams(
8587
numLsuLanes = up(SIMTCoreKey).get.numLsuLanes
@@ -124,16 +126,17 @@ class WithMuonCores(
124126
}) {
125127
// constructor override that omits `crossing`
126128
def this(n: Int, location: HierarchicalLocation = InSubsystem,
127-
standalone: Boolean = false, difftest: Boolean = false, disabled: Boolean = false,
128-
l0i: Option[DCacheParams] = None, l0d: Option[DCacheParams] = None)
129+
standalone: Boolean = false, noILP: Boolean = false,
130+
difftest: Boolean = false, disabled: Boolean = false,
131+
l0i: Option[DCacheParams] = None, l0d: Option[DCacheParams] = None)
129132
= this(n, location, RocketCrossingParams(
130133
master = HierarchicalElementMasterPortParams.locationDefault(location),
131134
slave = HierarchicalElementSlavePortParams.locationDefault(location),
132135
mmioBaseAddressPrefixWhere = location match {
133136
case InSubsystem => CBUS
134137
case InCluster(clusterId) => CCBUS(clusterId)
135138
},
136-
), standalone, difftest, disabled, l0i, l0d)
139+
), standalone, noILP, difftest, disabled, l0i, l0d)
137140
}
138141

139142
class WithCyclotronCores(

src/main/scala/radiance/unittest/Configs.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ class MuonCoreTestConfig extends Config(
3333
new WithSIMTConfig(numWarps = 8, numLanes = 16, numLsuLanes = 16, numSMEMInFlights = 4) ++
3434
new BaseSubsystemConfig)
3535

36+
class MuonCoreNoILPTestConfig extends Config(
37+
new WithMuonUnitTestHarness(new MuonCoreTest()(_)) ++
38+
new WithMuonCores(1, standalone = true, noILP = true, difftest = true) ++
39+
new WithSIMTConfig(numWarps = 8, numLanes = 16, numLsuLanes = 16, numSMEMInFlights = 4) ++
40+
new BaseSubsystemConfig)
41+
3642
class MuonCoreTestNoDiffConfig extends Config(
3743
new WithMuonUnitTestHarness(new MuonCoreTest()(_)) ++
3844
new WithMuonCores(1, standalone = true, difftest = false) ++

0 commit comments

Comments
 (0)