rocketchip: remove GlobalAddrMap completely
This commit is contained in:
@ -13,18 +13,11 @@ import util._
|
||||
import rocket._
|
||||
import coreplex._
|
||||
|
||||
// the following parameters will be refactored properly with TL2
|
||||
case object GlobalAddrMap extends Field[AddrMap]
|
||||
/** Enable or disable monitoring of Diplomatic buses */
|
||||
case object TLEmitMonitors extends Field[Boolean]
|
||||
|
||||
abstract class BareTop[+C <: BaseCoreplex](_coreplex: Parameters => C)(implicit val p: Parameters) extends LazyModule {
|
||||
// Fill in the TL1 legacy parameters; remove these once rocket/groundtest/unittest are TL2
|
||||
lazy val legacyAddrMap = GenerateGlobalAddrMap(p, coreplex.l1tol2.node.edgesIn(0).manager.managers)
|
||||
val coreplex : C = LazyModule(_coreplex(p.alterPartial {
|
||||
case GlobalAddrMap => legacyAddrMap
|
||||
}))
|
||||
|
||||
val coreplex = LazyModule(_coreplex(p))
|
||||
TopModule.contents = Some(this)
|
||||
}
|
||||
|
||||
|
@ -52,36 +52,6 @@ class GlobalVariable[T] {
|
||||
def get: T = { require(assigned); variable }
|
||||
}
|
||||
|
||||
object GenerateGlobalAddrMap {
|
||||
def apply(p: Parameters, peripheryManagers: Seq[TLManagerParameters]) = {
|
||||
val tl2Devices = peripheryManagers.map { manager =>
|
||||
val cacheable = manager.regionType match {
|
||||
case RegionType.CACHED => true
|
||||
case RegionType.TRACKED => true
|
||||
case _ => false
|
||||
}
|
||||
val attr = MemAttr(
|
||||
(if (manager.supportsGet) AddrMapProt.R else 0) |
|
||||
(if (manager.supportsPutFull) AddrMapProt.W else 0) |
|
||||
(if (manager.executable) AddrMapProt.X else 0), cacheable)
|
||||
val multi = manager.address.size > 1
|
||||
manager.address.zipWithIndex.map { case (address, i) =>
|
||||
require (address.contiguous) // TL1 needs this
|
||||
val name = manager.name + (if (multi) ".%d".format(i) else "")
|
||||
AddrMapEntry(name, MemRange(address.base, address.mask+1, attr))
|
||||
}
|
||||
}.flatten
|
||||
|
||||
val uniquelyNamedTL2Devices =
|
||||
tl2Devices.groupBy(_.name).values.map(_.zipWithIndex.map {
|
||||
case (e, i) => if (i == 0) e else e.copy(name = e.name + "_" + i)
|
||||
}).flatten.toList
|
||||
|
||||
val tl2 = AddrMapEntry("TL2", new AddrMap(uniquelyNamedTL2Devices, collapse = true))
|
||||
AddrMap(tl2)
|
||||
}
|
||||
}
|
||||
|
||||
object GenerateConfigString {
|
||||
def apply(p: Parameters, clint: CoreplexLocalInterrupter, plic: TLPLIC, peripheryManagers: Seq[TLManagerParameters]) = {
|
||||
val c = CoreplexParameters()(p)
|
||||
|
Reference in New Issue
Block a user