devices: add reg-names to most devices
This commit is contained in:
parent
0bf46edb6c
commit
84dc23c215
@ -46,7 +46,7 @@ class ICache(val icacheParams: ICacheParams, val hartid: Int)(implicit p: Parame
|
|||||||
TLManagerNode(Seq(TLManagerPortParameters(
|
TLManagerNode(Seq(TLManagerPortParameters(
|
||||||
Seq(TLManagerParameters(
|
Seq(TLManagerParameters(
|
||||||
address = Seq(AddressSet(itimAddr, size-1)),
|
address = Seq(AddressSet(itimAddr, size-1)),
|
||||||
resources = device.reg,
|
resources = device.reg("mem"),
|
||||||
regionType = RegionType.UNCACHED,
|
regionType = RegionType.UNCACHED,
|
||||||
executable = true,
|
executable = true,
|
||||||
supportsPutFull = TransferSizes(1, wordBytes),
|
supportsPutFull = TransferSizes(1, wordBytes),
|
||||||
|
@ -19,7 +19,7 @@ class ScratchpadSlavePort(address: AddressSet)(implicit p: Parameters) extends L
|
|||||||
val node = TLManagerNode(Seq(TLManagerPortParameters(
|
val node = TLManagerNode(Seq(TLManagerPortParameters(
|
||||||
Seq(TLManagerParameters(
|
Seq(TLManagerParameters(
|
||||||
address = List(address),
|
address = List(address),
|
||||||
resources = device.reg,
|
resources = device.reg("mem"),
|
||||||
regionType = RegionType.UNCACHED,
|
regionType = RegionType.UNCACHED,
|
||||||
executable = true,
|
executable = true,
|
||||||
supportsArithmetic = if (usingAtomics) TransferSizes(4, coreDataBytes) else TransferSizes.none,
|
supportsArithmetic = if (usingAtomics) TransferSizes(4, coreDataBytes) else TransferSizes.none,
|
||||||
|
@ -13,7 +13,7 @@ import uncore.util._
|
|||||||
import config._
|
import config._
|
||||||
|
|
||||||
class TLROM(val base: BigInt, val size: Int, contentsDelayed: => Seq[Byte], executable: Boolean = true, beatBytes: Int = 4,
|
class TLROM(val base: BigInt, val size: Int, contentsDelayed: => Seq[Byte], executable: Boolean = true, beatBytes: Int = 4,
|
||||||
resources: Seq[Resource] = new SimpleDevice("rom", Nil).reg)(implicit p: Parameters) extends LazyModule
|
resources: Seq[Resource] = new SimpleDevice("rom", Nil).reg("mem"))(implicit p: Parameters) extends LazyModule
|
||||||
{
|
{
|
||||||
|
|
||||||
val node = TLManagerNode(beatBytes, TLManagerParameters (
|
val node = TLManagerNode(beatBytes, TLManagerParameters (
|
||||||
|
@ -283,7 +283,6 @@ class TLDebugModuleOuter(device: Device)(implicit p: Parameters) extends LazyMod
|
|||||||
val dmiNode = TLRegisterNode (
|
val dmiNode = TLRegisterNode (
|
||||||
address = AddressSet.misaligned(DMI_DMCONTROL << 2, 4),
|
address = AddressSet.misaligned(DMI_DMCONTROL << 2, 4),
|
||||||
device = device,
|
device = device,
|
||||||
deviceKey = "reg",
|
|
||||||
beatBytes = 4,
|
beatBytes = 4,
|
||||||
executable = false
|
executable = false
|
||||||
)
|
)
|
||||||
@ -430,7 +429,6 @@ class TLDebugModuleInner(device: Device, getNComponents: () => Int)(implicit p:
|
|||||||
address = AddressSet.misaligned(0, DMI_RegAddrs.DMI_DMCONTROL << 2) ++
|
address = AddressSet.misaligned(0, DMI_RegAddrs.DMI_DMCONTROL << 2) ++
|
||||||
AddressSet.misaligned((DMI_RegAddrs.DMI_DMCONTROL + 1) << 2, (0x200 - ((DMI_RegAddrs.DMI_DMCONTROL + 1) << 2))),
|
AddressSet.misaligned((DMI_RegAddrs.DMI_DMCONTROL + 1) << 2, (0x200 - ((DMI_RegAddrs.DMI_DMCONTROL + 1) << 2))),
|
||||||
device = device,
|
device = device,
|
||||||
deviceKey = "reg",
|
|
||||||
beatBytes = 4,
|
beatBytes = 4,
|
||||||
executable = false
|
executable = false
|
||||||
)
|
)
|
||||||
@ -438,7 +436,6 @@ class TLDebugModuleInner(device: Device, getNComponents: () => Int)(implicit p:
|
|||||||
val tlNode = TLRegisterNode(
|
val tlNode = TLRegisterNode(
|
||||||
address=Seq(AddressSet(0, 0xFFF)), // This is required for correct functionality, it's not configurable.
|
address=Seq(AddressSet(0, 0xFFF)), // This is required for correct functionality, it's not configurable.
|
||||||
device=device,
|
device=device,
|
||||||
deviceKey="reg",
|
|
||||||
beatBytes=p(XLen)/8,
|
beatBytes=p(XLen)/8,
|
||||||
executable=true
|
executable=true
|
||||||
)
|
)
|
||||||
|
@ -14,7 +14,7 @@ class TLError(address: Seq[AddressSet], beatBytes: Int = 4)(implicit p: Paramete
|
|||||||
val node = TLManagerNode(Seq(TLManagerPortParameters(
|
val node = TLManagerNode(Seq(TLManagerPortParameters(
|
||||||
Seq(TLManagerParameters(
|
Seq(TLManagerParameters(
|
||||||
address = address,
|
address = address,
|
||||||
resources = device.reg,
|
resources = device.reg("mem"),
|
||||||
supportsGet = TransferSizes(1, beatBytes),
|
supportsGet = TransferSizes(1, beatBytes),
|
||||||
supportsPutPartial = TransferSizes(1, beatBytes),
|
supportsPutPartial = TransferSizes(1, beatBytes),
|
||||||
supportsPutFull = TransferSizes(1, beatBytes),
|
supportsPutFull = TransferSizes(1, beatBytes),
|
||||||
|
@ -11,7 +11,7 @@ import scala.math.{min,max}
|
|||||||
class TLRegisterNode(
|
class TLRegisterNode(
|
||||||
address: Seq[AddressSet],
|
address: Seq[AddressSet],
|
||||||
device: Device,
|
device: Device,
|
||||||
deviceKey: String = "reg",
|
deviceKey: String = "reg/control",
|
||||||
concurrency: Int = 0,
|
concurrency: Int = 0,
|
||||||
beatBytes: Int = 4,
|
beatBytes: Int = 4,
|
||||||
undefZero: Boolean = true,
|
undefZero: Boolean = true,
|
||||||
@ -88,7 +88,7 @@ object TLRegisterNode
|
|||||||
def apply(
|
def apply(
|
||||||
address: Seq[AddressSet],
|
address: Seq[AddressSet],
|
||||||
device: Device,
|
device: Device,
|
||||||
deviceKey: String = "reg",
|
deviceKey: String = "reg/control",
|
||||||
concurrency: Int = 0,
|
concurrency: Int = 0,
|
||||||
beatBytes: Int = 4,
|
beatBytes: Int = 4,
|
||||||
undefZero: Boolean = true,
|
undefZero: Boolean = true,
|
||||||
@ -103,7 +103,7 @@ object TLRegisterNode
|
|||||||
abstract class TLRegisterRouterBase(devname: String, devcompat: Seq[String], val address: AddressSet, interrupts: Int, concurrency: Int, beatBytes: Int, undefZero: Boolean, executable: Boolean)(implicit p: Parameters) extends LazyModule
|
abstract class TLRegisterRouterBase(devname: String, devcompat: Seq[String], val address: AddressSet, interrupts: Int, concurrency: Int, beatBytes: Int, undefZero: Boolean, executable: Boolean)(implicit p: Parameters) extends LazyModule
|
||||||
{
|
{
|
||||||
val device = new SimpleDevice(devname, devcompat)
|
val device = new SimpleDevice(devname, devcompat)
|
||||||
val node = TLRegisterNode(Seq(address), device, "reg", concurrency, beatBytes, undefZero, executable)
|
val node = TLRegisterNode(Seq(address), device, "reg/control", concurrency, beatBytes, undefZero, executable)
|
||||||
val intnode = IntSourceNode(IntSourcePortSimple(num = interrupts, resources = Seq(Resource(device, "int"))))
|
val intnode = IntSourceNode(IntSourcePortSimple(num = interrupts, resources = Seq(Resource(device, "int"))))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ class TLRAM(address: AddressSet, executable: Boolean = true, beatBytes: Int = 4,
|
|||||||
val node = TLManagerNode(Seq(TLManagerPortParameters(
|
val node = TLManagerNode(Seq(TLManagerPortParameters(
|
||||||
Seq(TLManagerParameters(
|
Seq(TLManagerParameters(
|
||||||
address = List(address),
|
address = List(address),
|
||||||
resources = device.reg,
|
resources = device.reg("mem"),
|
||||||
regionType = RegionType.UNCACHED,
|
regionType = RegionType.UNCACHED,
|
||||||
executable = executable,
|
executable = executable,
|
||||||
supportsGet = TransferSizes(1, beatBytes),
|
supportsGet = TransferSizes(1, beatBytes),
|
||||||
|
@ -15,7 +15,7 @@ class TLTestRAM(address: AddressSet, executable: Boolean = true, beatBytes: Int
|
|||||||
val node = TLManagerNode(Seq(TLManagerPortParameters(
|
val node = TLManagerNode(Seq(TLManagerPortParameters(
|
||||||
Seq(TLManagerParameters(
|
Seq(TLManagerParameters(
|
||||||
address = List(address),
|
address = List(address),
|
||||||
resources = device.reg,
|
resources = device.reg("mem"),
|
||||||
regionType = RegionType.UNCACHED,
|
regionType = RegionType.UNCACHED,
|
||||||
executable = executable,
|
executable = executable,
|
||||||
supportsGet = TransferSizes(1, beatBytes),
|
supportsGet = TransferSizes(1, beatBytes),
|
||||||
|
@ -13,7 +13,7 @@ class TLZero(address: AddressSet, executable: Boolean = true, beatBytes: Int = 4
|
|||||||
val node = TLManagerNode(Seq(TLManagerPortParameters(
|
val node = TLManagerNode(Seq(TLManagerPortParameters(
|
||||||
Seq(TLManagerParameters(
|
Seq(TLManagerParameters(
|
||||||
address = List(address),
|
address = List(address),
|
||||||
resources = device.reg,
|
resources = device.reg("mem"),
|
||||||
regionType = RegionType.UNCACHED,
|
regionType = RegionType.UNCACHED,
|
||||||
executable = executable,
|
executable = executable,
|
||||||
supportsGet = TransferSizes(1, beatBytes),
|
supportsGet = TransferSizes(1, beatBytes),
|
||||||
|
Loading…
Reference in New Issue
Block a user