Config Done

This commit is contained in:
Zitao Fang
2020-05-25 13:22:28 -07:00
parent 15c1f5adba
commit c0bafa306c
4 changed files with 82 additions and 86 deletions

View File

@@ -148,20 +148,8 @@ class WithControlCore extends Config((site, here, up) => {
case MaxHartIdBits => log2Up(up(RocketTilesKey, site).size + up(BoomTilesKey, site).size + 1)
})
class WithTraceIOHMap extends ConfigHMap {
override def apply[I](v: I) = (site, here, up) => {
}
}
class WithTraceIO extends Config((site, here, up) => {
val coreMatch: List[CoreRegisterEntryBase] => PartialFunction[Any,Any] =
coreList => coreList match {
case coreEntry :: tail => coreEntry.enableTileTrace(site, here, up) orElse coreMatch(tail)
case Nil => {
case BoomTilesKey => up(BoomTilesKey) map (tile => tile.copy(trace = true))
case TracePortKey => Some(TracePortParams())
}
}
coreMatch(CoreRegistrar.cores)
})
class WithTraceIO extends Config((site, here, up) =>
GenericConfig(Map("trace" -> true)) (site, here, up) orElse {
case BoomTilesKey => up(BoomTilesKey) map (tile => tile.copy(trace = true))
case TracePortKey => Some(TracePortParams())
})