From b96343a4e534d24e02835a28a19952332390a32e Mon Sep 17 00:00:00 2001 From: Christopher Celio Date: Mon, 8 Feb 2016 17:41:38 -0800 Subject: [PATCH] [btb] fix mix type error for fetch-width > 1 closes #24 --- rocket/src/main/scala/btb.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rocket/src/main/scala/btb.scala b/rocket/src/main/scala/btb.scala index 6d835aa4..a86357e6 100644 --- a/rocket/src/main/scala/btb.scala +++ b/rocket/src/main/scala/btb.scala @@ -258,8 +258,8 @@ class BTB(implicit p: Parameters) extends BtbModule { io.resp.bits.mask := UInt(1) } else { // note: btb_resp is clock gated, so the mask is only relevant for the io.resp.valid case - io.resp.bits.mask := Mux(io.resp.bits.taken, Cat((UInt(1) << brIdx(io.resp.bits.entry))-1, UInt(1)), - SInt(-1)) + io.resp.bits.mask := Mux(io.resp.bits.taken, Cat((UInt(1) << brIdx(io.resp.bits.entry))-1, UInt(1)).toSInt, + SInt(-1)).toUInt } if (nBHT > 0) {