Fix FireChip MultiCycleRegfileImp mixin
This commit is contained in:
@@ -8,6 +8,7 @@ import freechips.rocketchip.tilelink._
|
|||||||
import freechips.rocketchip.subsystem._
|
import freechips.rocketchip.subsystem._
|
||||||
import freechips.rocketchip.amba.axi4._
|
import freechips.rocketchip.amba.axi4._
|
||||||
import freechips.rocketchip.util._
|
import freechips.rocketchip.util._
|
||||||
|
import freechips.rocketchip.tile._
|
||||||
import freechips.rocketchip.subsystem._
|
import freechips.rocketchip.subsystem._
|
||||||
import freechips.rocketchip.rocket.TracedInstruction
|
import freechips.rocketchip.rocket.TracedInstruction
|
||||||
import firesim.endpoints.{TraceOutputTop, DeclockedTracedInstruction}
|
import firesim.endpoints.{TraceOutputTop, DeclockedTracedInstruction}
|
||||||
@@ -15,6 +16,8 @@ import firesim.endpoints.{TraceOutputTop, DeclockedTracedInstruction}
|
|||||||
import midas.models.AXI4BundleWithEdge
|
import midas.models.AXI4BundleWithEdge
|
||||||
import midas.targetutils.{ExcludeInstanceAsserts, MemModelAnnotation}
|
import midas.targetutils.{ExcludeInstanceAsserts, MemModelAnnotation}
|
||||||
|
|
||||||
|
import boom.common.BoomTile
|
||||||
|
|
||||||
/** Copied from RC and modified to change the IO type of the Imp to include the Diplomatic edges
|
/** Copied from RC and modified to change the IO type of the Imp to include the Diplomatic edges
|
||||||
* associated with each port. This drives FASED functional model sizing
|
* associated with each port. This drives FASED functional model sizing
|
||||||
*/
|
*/
|
||||||
@@ -107,21 +110,23 @@ trait ExcludeInvalidBoomAssertions extends LazyModuleImp {
|
|||||||
|
|
||||||
trait CanHaveMultiCycleRegfileImp {
|
trait CanHaveMultiCycleRegfileImp {
|
||||||
val outer: utilities.HasBoomAndRocketTiles
|
val outer: utilities.HasBoomAndRocketTiles
|
||||||
val boomCores = outer.boomTiles.map(tile => tile.module.core)
|
|
||||||
boomCores.foreach({ core =>
|
|
||||||
core.iregfile match {
|
|
||||||
case irf: boom.exu.RegisterFileSynthesizable => annotate(MemModelAnnotation(irf.regfile))
|
|
||||||
case _ => Nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if (core.fp_pipeline != null) core.fp_pipeline.fregfile match {
|
outer.tiles.map {
|
||||||
case irf: boom.exu.RegisterFileSynthesizable => annotate(MemModelAnnotation(irf.regfile))
|
case r: RocketTile => {
|
||||||
case _ => Nil
|
annotate(MemModelAnnotation(r.module.core.rocketImpl.rf.rf))
|
||||||
|
r.module.fpuOpt.foreach(fpu => annotate(MemModelAnnotation(fpu.fpuImpl.regfile)))
|
||||||
}
|
}
|
||||||
})
|
case b: BoomTile => {
|
||||||
|
val core = b.module.core
|
||||||
outer.rocketTiles.foreach({ tile =>
|
core.iregfile match {
|
||||||
annotate(MemModelAnnotation(tile.module.core.rocketImpl.rf.rf))
|
case irf: boom.exu.RegisterFileSynthesizable => annotate(MemModelAnnotation(irf.regfile))
|
||||||
tile.module.fpuOpt.foreach(fpu => annotate(MemModelAnnotation(fpu.fpuImpl.regfile)))
|
case _ => Nil
|
||||||
})
|
}
|
||||||
|
if (core.fp_pipeline != null) core.fp_pipeline.fregfile match {
|
||||||
|
case frf: boom.exu.RegisterFileSynthesizable => annotate(MemModelAnnotation(frf.regfile))
|
||||||
|
case _ => Nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user