1
0

Utils: support managers with multiple addresses

This commit is contained in:
Wesley W. Terpstra 2016-09-16 18:03:49 -07:00
parent a9382b3116
commit 5c858685aa

View File

@ -70,10 +70,11 @@ object GenerateGlobalAddrMap {
(if (manager.supportsGet) AddrMapProt.R else 0) | (if (manager.supportsGet) AddrMapProt.R else 0) |
(if (manager.supportsPutFull) AddrMapProt.W else 0) | (if (manager.supportsPutFull) AddrMapProt.W else 0) |
(if (manager.executable) AddrMapProt.X else 0)) (if (manager.executable) AddrMapProt.X else 0))
val name = manager.nodePath.last.lazyModule.name // !!! val multi = manager.address.size > 1
manager.address.zipWithIndex.map { case (address, i) => manager.address.zipWithIndex.map { case (address, i) =>
require (!address.strided) // TL1 can't do this require (!address.strided) // TL1 can't do this
AddrMapEntry(s"${name}", MemRange(address.base, address.mask+1, attr)) val name = manager.name + (if (multi) ".%d".format(i) else "")
AddrMapEntry(name, MemRange(address.base, address.mask+1, attr))
} }
}.flatten }.flatten