Skip to content

Commit

Permalink
work around bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sequencer committed Jan 24, 2022
1 parent 6bf257d commit 9d22607
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/scala/rocket/Decode.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ import scala.collection.mutable.ArrayBuffer

object DecodeLogic
{
def apply(addr: UInt, default: BitPat, mapping: Iterable[(BitPat, BitPat)]): UInt =
chisel3.util.experimental.decode.decoder(QMCMinimizer, addr, TruthTable(mapping.toMap, default))
def apply(addr: UInt, default: BitPat, mapping: Iterable[(BitPat, BitPat)]): UInt = {
if (mapping.nonEmpty)
chisel3.util.experimental.decode.decoder(QMCMinimizer, addr, TruthTable(mapping.toMap, default))
else 0.U
}
def apply(addr: UInt, default: Seq[BitPat], mappingIn: Iterable[(BitPat, Seq[BitPat])]): Seq[UInt] = {
val mapping = ArrayBuffer.fill(default.size)(ArrayBuffer[(BitPat, BitPat)]())
for ((key, values) <- mappingIn)
Expand Down

0 comments on commit 9d22607

Please sign in to comment.