Skip to content

Commit 9fcd186

Browse files
authored
Merge pull request #3723 from tymcauley/remove-most-chisel-annos
Remove most Chisel Annotations
2 parents ac5192c + 2b9901e commit 9fcd186

12 files changed

+14
-445
lines changed

Diff for: src/main/scala/devices/debug/Debug.scala

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import freechips.rocketchip.regmapper.{RegField, RegFieldAccessType, RegFieldDes
1919
import freechips.rocketchip.rocket.{CSRs, Instructions}
2020
import freechips.rocketchip.tile.MaxHartIdBits
2121
import freechips.rocketchip.tilelink.{TLAsyncCrossingSink, TLAsyncCrossingSource, TLBuffer, TLRegisterNode, TLXbar}
22-
import freechips.rocketchip.util.{Annotated, AsyncBundle, AsyncQueueParams, AsyncResetSynchronizerShiftReg, FromAsyncBundle, ParameterizedBundle, ResetSynchronizerShiftReg, ToAsyncBundle}
22+
import freechips.rocketchip.util.{AsyncBundle, AsyncQueueParams, AsyncResetSynchronizerShiftReg, FromAsyncBundle, ParameterizedBundle, ResetSynchronizerShiftReg, ToAsyncBundle}
2323

2424
import freechips.rocketchip.util.SeqBoolBitwiseOps
2525
import freechips.rocketchip.util.SeqToAugmentedSeq
@@ -789,7 +789,6 @@ class TLDebugModuleInner(device: Device, getNComponents: () => Int, beatBytes: I
789789
lazy val module = new Impl
790790
class Impl extends LazyModuleImp(this){
791791
val nComponents = getNComponents()
792-
Annotated.params(this, cfg)
793792
val supportHartArray = cfg.supportHartArray & (nComponents > 1)
794793
val nExtTriggers = cfg.nExtTriggers
795794
val nHaltGroups = if ((nComponents > 1) | (nExtTriggers > 0)) cfg.nHaltGroups

Diff for: src/main/scala/devices/tilelink/CLINT.scala

-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import freechips.rocketchip.interrupts.{IntNexusNode, IntSinkParameters, IntSink
1414
import freechips.rocketchip.regmapper.{RegField, RegFieldDesc, RegFieldGroup}
1515
import freechips.rocketchip.subsystem.{BaseSubsystem, CBUS, TLBusWrapperLocation}
1616
import freechips.rocketchip.tilelink.{TLFragmenter, TLRegisterNode}
17-
import freechips.rocketchip.util.Annotated
1817

1918
object CLINTConsts
2019
{
@@ -63,7 +62,6 @@ class CLINT(params: CLINTParams, beatBytes: Int)(implicit p: Parameters) extends
6362

6463
lazy val module = new Impl
6564
class Impl extends LazyModuleImp(this) {
66-
Annotated.params(this, params)
6765
require (intnode.edges.in.size == 0, "CLINT only produces interrupts; it does not accept them")
6866

6967
val io = IO(new Bundle {

Diff for: src/main/scala/devices/tilelink/Plic.scala

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import freechips.rocketchip.interrupts.{IntNexusNode, IntSinkParameters, IntSink
1515
import freechips.rocketchip.regmapper.{RegField, RegFieldDesc, RegFieldRdAction, RegFieldWrType, RegReadFn, RegWriteFn}
1616
import freechips.rocketchip.subsystem.{BaseSubsystem, CBUS, TLBusWrapperLocation}
1717
import freechips.rocketchip.tilelink.{TLFragmenter, TLRegisterNode}
18-
import freechips.rocketchip.util.{Annotated, MuxT, property}
18+
import freechips.rocketchip.util.{MuxT, property}
1919

2020
import scala.math.min
2121

@@ -130,8 +130,6 @@ class TLPLIC(params: PLICParams, beatBytes: Int)(implicit p: Parameters) extends
130130

131131
lazy val module = new Impl
132132
class Impl extends LazyModuleImp(this) {
133-
Annotated.params(this, params)
134-
135133
val (io_devices, edgesIn) = intnode.in.unzip
136134
val (io_harts, _) = intnode.out.unzip
137135

Diff for: src/main/scala/rocket/BTB.scala

+2-4
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ trait HasBtbParameters extends HasCoreParameters { this: InstanceId =>
3232
val nPages = (btbParams.nPages + 1) / 2 * 2 // control logic assumes 2 divides pages
3333
}
3434

35-
abstract class BtbModule(implicit val p: Parameters) extends Module with HasBtbParameters {
36-
Annotated.params(this, btbParams)
37-
}
35+
abstract class BtbModule(implicit val p: Parameters) extends Module with HasBtbParameters
3836

3937
abstract class BtbBundle(implicit val p: Parameters) extends Bundle with HasBtbParameters
4038

@@ -301,7 +299,7 @@ class BTB(implicit p: Parameters) extends BtbModule {
301299
}
302300

303301
if (btbParams.bhtParams.nonEmpty) {
304-
val bht = new BHT(Annotated.params(this, btbParams.bhtParams.get))
302+
val bht = new BHT(btbParams.bhtParams.get)
305303
val isBranch = (idxHit & cfiType.map(_ === CFIType.branch).asUInt).orR
306304
val res = bht.get(io.req.bits.addr)
307305
when (io.bht_advance.valid) {

Diff for: src/main/scala/rocket/Multiplier.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ class MulDiv(cfg: MulDivParams, width: Int, nXpr: Int = 32) extends Module {
183183
io.req.ready := state === s_ready
184184
}
185185

186-
class PipelinedMultiplier(width: Int, latency: Int, nXpr: Int = 32) extends Module with ShouldBeRetimed {
186+
class PipelinedMultiplier(width: Int, latency: Int, nXpr: Int = 32) extends Module {
187187
val io = IO(new Bundle {
188188
val req = Flipped(Valid(new MultiplierReq(width, log2Ceil(nXpr))))
189189
val resp = Valid(new MultiplierResp(width, log2Ceil(nXpr)))

Diff for: src/main/scala/subsystem/BaseSubsystem.scala

+3-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import freechips.rocketchip.resources.{
1515
ResourceAnchors, AddressMapEntry}
1616
import freechips.rocketchip.prci.{ClockGroupIdentityNode, ClockGroupAggregator, ClockGroupSourceNode, ClockGroupSourceParameters}
1717
import freechips.rocketchip.tilelink.TLBusWrapper
18-
import freechips.rocketchip.util.{Location, ElaborationArtefacts, PlusArgArtefacts, RecordMap, Annotated}
18+
import freechips.rocketchip.util.{Location, ElaborationArtefacts, PlusArgArtefacts, RecordMap}
1919

2020
case object SubsystemDriveClockGroupsFromIO extends Field[Boolean](true)
2121
case class TLNetworkTopologyLocated(where: HierarchicalLocation) extends Field[Seq[CanInstantiateWithinContextThatHasTileLinkLocations with CanConnectWithinContextThatHasTileLinkLocations]]
@@ -142,13 +142,11 @@ abstract class BaseSubsystem(val location: HierarchicalLocation = InSubsystem)
142142

143143
abstract class BaseSubsystemModuleImp[+L <: BaseSubsystem](_outer: L) extends BareSubsystemModuleImp(_outer) with HasDTSImp[L] {
144144
def dtsLM: L = _outer
145-
private val mapping: Seq[AddressMapEntry] = Annotated.addressMapping(this, {
145+
private val mapping: Seq[AddressMapEntry] = {
146146
dtsLM.collectResourceAddresses.groupBy(_._2).toList.flatMap { case (key, seq) =>
147147
AddressRange.fromSets(key.address).map { r => AddressMapEntry(r, key.permissions, seq.map(_._1)) }
148148
}.sortBy(_.range)
149-
})
150-
151-
Annotated.addressMapping(this, mapping)
149+
}
152150

153151
println("Generated Address Map")
154152
mapping.foreach(entry => println(entry.toString((dtsLM.tlBusWrapperLocationMap(p(TLManagerViewpointLocated(dtsLM.location))).busView.bundle.addressBits-1)/4 + 1)))

Diff for: src/main/scala/tile/FPU.scala

+4-4
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ trait HasFPUParameters {
450450

451451
abstract class FPUModule(implicit val p: Parameters) extends Module with HasCoreParameters with HasFPUParameters
452452

453-
class FPToInt(implicit p: Parameters) extends FPUModule()(p) with ShouldBeRetimed {
453+
class FPToInt(implicit p: Parameters) extends FPUModule()(p) {
454454
class Output extends Bundle {
455455
val in = new FPInput
456456
val lt = Bool()
@@ -525,7 +525,7 @@ class FPToInt(implicit p: Parameters) extends FPUModule()(p) with ShouldBeRetime
525525
io.out.bits.in := in
526526
}
527527

528-
class IntToFP(val latency: Int)(implicit p: Parameters) extends FPUModule()(p) with ShouldBeRetimed {
528+
class IntToFP(val latency: Int)(implicit p: Parameters) extends FPUModule()(p) {
529529
val io = IO(new Bundle {
530530
val in = Flipped(Valid(new IntToFPInput))
531531
val out = Valid(new FPResult)
@@ -570,7 +570,7 @@ class IntToFP(val latency: Int)(implicit p: Parameters) extends FPUModule()(p) w
570570
io.out <> Pipe(in.valid, mux, latency-1)
571571
}
572572

573-
class FPToFP(val latency: Int)(implicit p: Parameters) extends FPUModule()(p) with ShouldBeRetimed {
573+
class FPToFP(val latency: Int)(implicit p: Parameters) extends FPUModule()(p) {
574574
val io = IO(new Bundle {
575575
val in = Flipped(Valid(new FPInput))
576576
val out = Valid(new FPResult)
@@ -695,7 +695,7 @@ class MulAddRecFNPipe(latency: Int, expWidth: Int, sigWidth: Int) extends Module
695695
}
696696

697697
class FPUFMAPipe(val latency: Int, val t: FType)
698-
(implicit p: Parameters) extends FPUModule()(p) with ShouldBeRetimed {
698+
(implicit p: Parameters) extends FPUModule()(p) {
699699
override def desiredName = s"FPUFMAPipe_l${latency}_f${t.ieeeWidth}"
700700
require(latency>0)
701701

Diff for: src/main/scala/tile/RocketTile.scala

+1-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import freechips.rocketchip.rocket.{
2424
}
2525
import freechips.rocketchip.subsystem.HierarchicalElementCrossingParamsLike
2626
import freechips.rocketchip.prci.{ClockSinkParameters, RationalCrossing, ClockCrossingType}
27-
import freechips.rocketchip.util.{Annotated, InOrderArbiter}
27+
import freechips.rocketchip.util.InOrderArbiter
2828
import freechips.rocketchip.trace.{TraceEncoderParams,TraceEncoderController, TraceSinkArbiter}
2929
import freechips.rocketchip.subsystem._
3030

@@ -166,8 +166,6 @@ class RocketTileModuleImp(outer: RocketTile) extends BaseTileModuleImp(outer)
166166
with HasFpuOpt
167167
with HasLazyRoCCModule
168168
with HasICacheFrontendModule {
169-
Annotated.params(this, outer.rocketParams)
170-
171169
val core = Module(new Rocket(outer)(outer.p))
172170
outer.vector_unit.foreach { v =>
173171
core.io.vector.get <> v.module.io.core

Diff for: src/main/scala/tilelink/RegisterRouter.scala

-7
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,6 @@ case class TLRegisterNode(
123123
suffix = suffix + 1
124124
}
125125
ElaborationArtefacts.add(s"${baseHex}.${suffix}.regmap.json", json)
126-
127-
val module = Module.currentModule.get.asInstanceOf[RawModule]
128-
GenRegDescsAnno.anno(
129-
module,
130-
base,
131-
mapping:_*)
132-
133126
}
134127
}
135128

0 commit comments

Comments
 (0)