Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc. fixes to make Rocket tolerant to X-propagation #2659

Merged
merged 9 commits into from
Oct 12, 2020
Prev Previous commit
Next Next commit
Work aroud Verilog idiocy that (0 << 'x) is 'x
  • Loading branch information
aswaterman committed Oct 10, 2020
commit 1b5e88b16bc1f2e615ed7381f6662b7bc999399d
4 changes: 2 additions & 2 deletions src/main/scala/util/IDPool.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class IDPool(numIds: Int) extends Module {
io.alloc.valid := valid
io.alloc.bits := select

val taken = (io.alloc.ready << io.alloc.bits)(numIds-1, 0)
val given = (io.free .valid << io.free .bits)(numIds-1, 0)
val taken = Mux(io.alloc.ready, (1.U << io.alloc.bits)(numIds-1, 0), 0.U)
val given = Mux(io.free .valid, (1.U << io.free .bits)(numIds-1, 0), 0.U)
val bitmap1 = (bitmap & ~taken) | given
val select1 = OHToUInt(~(leftOR(bitmap1, numIds) << 1) & bitmap1, numIds)
val valid1 = bitmap1.orR
Expand Down