add default addrMapEntry definition which throws exception
This commit is contained in:
parent
f7c42499bb
commit
18982d7351
@ -263,16 +263,17 @@ class WithTestRAM extends Config(
|
||||
case ExtraDevices => {
|
||||
class TestRAMDevice extends Device {
|
||||
val ramSize = 0x1000
|
||||
def builder(
|
||||
sPort: Option[ClientUncachedTileLinkIO],
|
||||
mPort: Option[ClientUncachedTileLinkIO],
|
||||
extra: Bundle, p: Parameters) {
|
||||
val testram = Module(new TileLinkTestRAM(ramSize)(p))
|
||||
testram.io <> sPort.get
|
||||
}
|
||||
def addrMapEntry = AddrMapEntry("testram", MemSize(ramSize, MemAttr(AddrMapProt.RW)))
|
||||
def hasClientPort = false
|
||||
def hasMMIOPort = true
|
||||
def builder(
|
||||
mmioPort: Option[ClientUncachedTileLinkIO],
|
||||
clientPort: Option[ClientUncachedTileLinkIO],
|
||||
extra: Bundle, p: Parameters) {
|
||||
val testram = Module(new TileLinkTestRAM(ramSize)(p))
|
||||
testram.io <> mmioPort.get
|
||||
}
|
||||
override def addrMapEntry =
|
||||
AddrMapEntry("testram", MemSize(ramSize, MemAttr(AddrMapProt.RW)))
|
||||
}
|
||||
Seq(new TestRAMDevice)
|
||||
}
|
||||
|
@ -15,7 +15,8 @@ abstract class Device {
|
||||
mmioPort: Option[ClientUncachedTileLinkIO],
|
||||
clientPort: Option[ClientUncachedTileLinkIO],
|
||||
extra: Bundle, p: Parameters): Unit
|
||||
def addrMapEntry: AddrMapEntry
|
||||
def addrMapEntry: AddrMapEntry =
|
||||
throw new UnsupportedOperationException("no addrMapEntry defined")
|
||||
def makeConfigString(region: MemRegion): String = {
|
||||
s"${addrMapEntry.name} {\n" +
|
||||
s" addr 0x${region.start.toString(16)};\n" +
|
||||
|
Loading…
Reference in New Issue
Block a user