Skip to content

Commit

Permalink
[dis] Redescribe rename ready signal generation to prevent false comb…
Browse files Browse the repository at this point in the history
…inational loops.
  • Loading branch information
bkorpan authored and abejgonzalez committed Jul 19, 2019
1 parent a52e61d commit 11c3366
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main/scala/exu/dispatch.scala
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class CompactingDispatcher(implicit p: Parameters) extends Dispatcher
{
issueParams.map(ip => require(ip.dispatchWidth >= ip.issueWidth))

val ren_readys = Wire(Vec(issueParams.size, UInt(coreWidth.W)))
val ren_readys = Wire(Vec(issueParams.size, Vec(coreWidth, Bool())))

for (((ip, dis), rdy) <- issueParams zip io.dis_uops zip ren_readys) {
val ren = Wire(Vec(coreWidth, Decoupled(new MicroOp)))
Expand All @@ -90,8 +90,11 @@ class CompactingDispatcher(implicit p: Parameters) extends Dispatcher
dis <> compactor.io.out

// The queue is considered ready if the uop doesn't use it.
rdy := VecInit(ren zip uses_iq map {case (u,q) => u.ready || !q}).asUInt
rdy := ren zip uses_iq map {case (u,q) => u.ready || !q}
}

(ren_readys.reduce(_&_).asBools zip io.ren_uops) foreach {case (r,u) => u.ready := r}
(ren_readys.reduce((r,i) =>
VecInit(r zip i map {case (r,i) =>
r && i})) zip io.ren_uops) foreach {case (r,u) =>
u.ready := r}
}

0 comments on commit 11c3366

Please sign in to comment.