Enable memtrace logger in SoC config
This commit is contained in:
@@ -13,8 +13,16 @@ trait CanHaveMemtraceCore { this: BaseSubsystem =>
|
|||||||
// Safe to use get as WithMemtraceCore requires WithNLanes to be defined
|
// Safe to use get as WithMemtraceCore requires WithNLanes to be defined
|
||||||
val simtParam = p(SIMTCoreKey).get
|
val simtParam = p(SIMTCoreKey).get
|
||||||
val config = defaultConfig.copy(numLanes = simtParam.nLanes)
|
val config = defaultConfig.copy(numLanes = simtParam.nLanes)
|
||||||
|
val numLanes = simtParam.nLanes
|
||||||
|
val filename = param.tracefilename
|
||||||
val tracer = LazyModule(
|
val tracer = LazyModule(
|
||||||
new MemTraceDriver(config, param.tracefilename, param.traceHasSource)(p)
|
new MemTraceDriver(config, filename, param.traceHasSource)(p)
|
||||||
|
)
|
||||||
|
val coreSideLogger = LazyModule(
|
||||||
|
new MemTraceLogger(numLanes, filename, loggerName = "coreside")
|
||||||
|
)
|
||||||
|
val memSideLogger = LazyModule(
|
||||||
|
new MemTraceLogger(numLanes + 1, filename, loggerName = "memside")
|
||||||
)
|
)
|
||||||
// Must use :=* to ensure the N edges from Tracer doesn't get merged into 1
|
// Must use :=* to ensure the N edges from Tracer doesn't get merged into 1
|
||||||
// when connecting to SBus
|
// when connecting to SBus
|
||||||
@@ -25,8 +33,9 @@ trait CanHaveMemtraceCore { this: BaseSubsystem =>
|
|||||||
case Some(coalParam) => {
|
case Some(coalParam) => {
|
||||||
val coal = LazyModule(new CoalescingUnit(coalParam))
|
val coal = LazyModule(new CoalescingUnit(coalParam))
|
||||||
println(s"============ CoalescingUnit instantiated [numLanes=${coalParam.numLanes}]")
|
println(s"============ CoalescingUnit instantiated [numLanes=${coalParam.numLanes}]")
|
||||||
coal.cpuNode :=* tracer.node // N lanes
|
coal.cpuNode :=* coreSideLogger.node :=* tracer.node // N lanes
|
||||||
coal.aggregateNode // N+1 lanes
|
memSideLogger.node :=* coal.aggregateNode // N+1 lanes
|
||||||
|
memSideLogger.node
|
||||||
}
|
}
|
||||||
case None => tracer.node
|
case None => tracer.node
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user