1
0

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:
Megan Wachs 2017-03-26 18:43:24 -07:00
parent bf648514e3
commit 11507ac7d6

View File

@ -12,14 +12,13 @@ import uncore.tilelink2._
import uncore.util._ import uncore.util._
import config._ import config._
class TLROM(val base: BigInt, val size: Int, contentsDelayed: => Seq[Byte], executable: Boolean = true, class TLROM(val base: BigInt, val size: Int, contentsDelayed: => Seq[Byte], executable: Boolean = true, beatBytes: Int = 4,
beatBytes: Int = 4, name: String = "rom", devcompat: Seq[String] = Nil)(implicit p: Parameters) extends LazyModule resources: Seq[Resource] = new SimpleDevice("rom", Nil).reg)(implicit p: Parameters) extends LazyModule
{ {
val device = new SimpleDevice(name, devcompat)
val node = TLManagerNode(beatBytes, TLManagerParameters( val node = TLManagerNode(beatBytes, TLManagerParameters(
address = List(AddressSet(base, size-1)), address = List(AddressSet(base, size-1)),
resources = device.reg, resources = resources,
regionType = RegionType.UNCACHED, regionType = RegionType.UNCACHED,
executable = executable, executable = executable,
supportsGet = TransferSizes(1, beatBytes), supportsGet = TransferSizes(1, beatBytes),