clint: don't ask for what you know (nTiles)
This commit is contained in:
parent
1c97a2a94c
commit
2f2fe0a973
@ -25,7 +25,7 @@ trait CoreplexRISCVPlatform extends CoreplexNetwork {
|
|||||||
plic.node := TLFragmenter(pbusBeatBytes, pbusBlockBytes)(pbus.node)
|
plic.node := TLFragmenter(pbusBeatBytes, pbusBlockBytes)(pbus.node)
|
||||||
plic.intnode := int_xbar.intnode
|
plic.intnode := int_xbar.intnode
|
||||||
|
|
||||||
val clint = LazyModule(new CoreplexLocalInterrupter(nTiles, p(ClintKey)))
|
val clint = LazyModule(new CoreplexLocalInterrupter(p(ClintKey)))
|
||||||
clint.node := TLFragmenter(pbusBeatBytes, pbusBlockBytes)(pbus.node)
|
clint.node := TLFragmenter(pbusBeatBytes, pbusBlockBytes)(pbus.node)
|
||||||
|
|
||||||
lazy val dts = DTS(bindingTree)
|
lazy val dts = DTS(bindingTree)
|
||||||
|
@ -32,7 +32,7 @@ case class ClintParams(baseAddress: BigInt = 0x02000000)
|
|||||||
def address = AddressSet(baseAddress, ClintConsts.size-1)
|
def address = AddressSet(baseAddress, ClintConsts.size-1)
|
||||||
}
|
}
|
||||||
|
|
||||||
class CoreplexLocalInterrupter(nTiles: Int, params: ClintParams)(implicit p: Parameters) extends LazyModule
|
class CoreplexLocalInterrupter(params: ClintParams)(implicit p: Parameters) extends LazyModule
|
||||||
{
|
{
|
||||||
import ClintConsts._
|
import ClintConsts._
|
||||||
|
|
||||||
@ -66,6 +66,7 @@ class CoreplexLocalInterrupter(nTiles: Int, params: ClintParams)(implicit p: Par
|
|||||||
reg := newTime >> i
|
reg := newTime >> i
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val nTiles = intnode.edgesOut.size
|
||||||
val timecmp = Seq.fill(nTiles) { Seq.fill(timeWidth/regWidth)(Reg(UInt(width = regWidth))) }
|
val timecmp = Seq.fill(nTiles) { Seq.fill(timeWidth/regWidth)(Reg(UInt(width = regWidth))) }
|
||||||
val ipi = Seq.fill(nTiles) { RegInit(UInt(0, width = 1)) }
|
val ipi = Seq.fill(nTiles) { RegInit(UInt(0, width = 1)) }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user