diplomacy: allow access to sram Device info
This commit is contained in:
parent
d9c5ec4f7b
commit
ba6dd160a3
@ -10,9 +10,11 @@ abstract class DiplomaticSRAM(
|
||||
beatBytes: Int,
|
||||
devName: Option[String])(implicit p: Parameters) extends LazyModule
|
||||
{
|
||||
protected val resources = devName
|
||||
.map(new SimpleDevice(_, Seq("sifive,sram0")).reg("mem"))
|
||||
.getOrElse(new MemoryDevice().reg)
|
||||
val device = devName
|
||||
.map(new SimpleDevice(_, Seq("sifive,sram0")))
|
||||
.getOrElse(new MemoryDevice())
|
||||
|
||||
val resources = device.reg("mem")
|
||||
|
||||
def bigBits(x: BigInt, tail: List[Boolean] = Nil): List[Boolean] =
|
||||
if (x == 0) tail.reverse else bigBits(x >> 1, ((x & 1) == 1) :: tail)
|
||||
|
Loading…
Reference in New Issue
Block a user