Fix compile error and eliminate wasteful wires
This commit is contained in:
parent
834bcf6b7e
commit
e43b7accf9
@ -176,11 +176,11 @@ class TLPLIC(params: PLICParams)(implicit p: Parameters) extends LazyModule
|
|||||||
PLICConsts.enableBase(i) -> e.map(b => RegField(1, b))
|
PLICConsts.enableBase(i) -> e.map(b => RegField(1, b))
|
||||||
}
|
}
|
||||||
|
|
||||||
val claimer = Wire(init = Vec.fill(nHarts){Bool(false)})
|
val claimer = Wire(Vec(nHarts, Bool()))
|
||||||
val claiming = Wire(init = Vec.tabulate(nHarts){i => Mux(claimer(i), UIntToOH(maxDevs(i)), UInt(0))})
|
val claiming = Vec.tabulate(nHarts){i => Mux(claimer(i), UIntToOH(maxDevs(i), nDevices+1), UInt(0))}
|
||||||
val claimedDevs = Wire(init = Vec(claiming.reduceLeft( _ | _ ).toBools))
|
val claimedDevs = Vec(claiming.reduceLeft( _ | _ ).toBools)
|
||||||
|
|
||||||
for ((p, g), c) <- (pending zip gateways) zip claimedDevs) {
|
(pending zip gateways) zip claimedDevs) foreach { case ((p, g), c) =>
|
||||||
g.ready := !p
|
g.ready := !p
|
||||||
g.complete := false
|
g.complete := false
|
||||||
when(c) {
|
when(c) {
|
||||||
|
Loading…
Reference in New Issue
Block a user