Cores now have an extra CoreParam, useSupervisor which was set to the default false. Whether a core has supervisor mode is the union of this and useVM which defaults true so not change was made by this addition. BusTopologies are now set with the Config system rather than a system mixin and so all configs now include the config most similar to the previous mixin Testchipip was updated to be able to replace the systembus, in this new config system, with a ring bus. The L2 cache repo needed a similar update on how to find the buses. It currently points to the ucb-bar fork Treadle is bumped to its release branch
51 lines
1.5 KiB
Scala
51 lines
1.5 KiB
Scala
package tracegen
|
|
|
|
import chisel3._
|
|
import freechips.rocketchip.config.{Field, Parameters}
|
|
import freechips.rocketchip.diplomacy.{LazyModule, LazyModuleImp, BufferParams}
|
|
import freechips.rocketchip.groundtest.{DebugCombiner, TraceGenParams}
|
|
import freechips.rocketchip.subsystem._
|
|
|
|
case object BoomTraceGenKey extends Field[Seq[TraceGenParams]](Nil)
|
|
case object TraceGenKey extends Field[Seq[TraceGenParams]](Nil)
|
|
|
|
trait HasTraceGenTiles { this: BaseSubsystem =>
|
|
val rocket_tiles = p(TraceGenKey).zipWithIndex.map { case (params, i) =>
|
|
LazyModule(new TraceGenTile(i, params, p))
|
|
}
|
|
val boom_tiles = p(BoomTraceGenKey).zipWithIndex.map { case (params, i) =>
|
|
LazyModule(new BoomTraceGenTile(i, params, p))
|
|
}
|
|
|
|
val tiles = rocket_tiles ++ boom_tiles
|
|
|
|
tiles.foreach { t =>
|
|
sbus.fromTile(None, buffer = BufferParams.default) { t.masterNode }
|
|
}
|
|
}
|
|
|
|
trait HasTraceGenTilesModuleImp extends LazyModuleImp {
|
|
val outer: HasTraceGenTiles
|
|
val success = IO(Output(Bool()))
|
|
|
|
outer.tiles.zipWithIndex.map { case(t, i) =>
|
|
t.module.constants.hartid := i.U
|
|
}
|
|
|
|
val status = DebugCombiner(
|
|
outer.rocket_tiles.map(_.module.status) ++
|
|
outer.boom_tiles.map(_.module.status)
|
|
)
|
|
success := status.finished
|
|
}
|
|
|
|
class TraceGenSystem(implicit p: Parameters) extends BaseSubsystem
|
|
with HasTraceGenTiles
|
|
with CanHaveMasterAXI4MemPort {
|
|
override lazy val module = new TraceGenSystemModuleImp(this)
|
|
}
|
|
|
|
class TraceGenSystemModuleImp(outer: TraceGenSystem)
|
|
extends BaseSubsystemModuleImp(outer)
|
|
with HasTraceGenTilesModuleImp
|