TLROM: Use Resource as a parameter rather than assuming SimpleDevice.
This allows more flexibility e.g. considering the ROM as part of other devices.
This commit is contained in:
parent
bf648514e3
commit
11507ac7d6
@ -12,14 +12,13 @@ import uncore.tilelink2._
|
||||
import uncore.util._
|
||||
import config._
|
||||
|
||||
class TLROM(val base: BigInt, val size: Int, contentsDelayed: => Seq[Byte], executable: Boolean = true,
|
||||
beatBytes: Int = 4, name: String = "rom", devcompat: Seq[String] = Nil)(implicit p: Parameters) extends LazyModule
|
||||
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
|
||||
{
|
||||
val device = new SimpleDevice(name, devcompat)
|
||||
|
||||
val node = TLManagerNode(beatBytes, TLManagerParameters(
|
||||
address = List(AddressSet(base, size-1)),
|
||||
resources = device.reg,
|
||||
resources = resources,
|
||||
regionType = RegionType.UNCACHED,
|
||||
executable = executable,
|
||||
supportsGet = TransferSizes(1, beatBytes),
|
||||
|
Loading…
Reference in New Issue
Block a user