1
0

Chisel3: Don't mix Mux types

This commit is contained in:
Andrew Waterman 2015-07-11 14:05:39 -07:00
parent 5dc3da008e
commit e76a9d3493

View File

@ -150,7 +150,7 @@ class MetadataArray[T <: Metadata](makeRstVal: () => T) extends CacheModule {
val rst = rst_cnt < UInt(nSets) val rst = rst_cnt < UInt(nSets)
val waddr = Mux(rst, rst_cnt, io.write.bits.idx) val waddr = Mux(rst, rst_cnt, io.write.bits.idx)
val wdata = Mux(rst, rstVal, io.write.bits.data).toBits val wdata = Mux(rst, rstVal, io.write.bits.data).toBits
val wmask = Mux(rst, SInt(-1), io.write.bits.way_en).toUInt val wmask = Mux(rst, SInt(-1), io.write.bits.way_en.toSInt).toUInt
when (rst) { rst_cnt := rst_cnt+UInt(1) } when (rst) { rst_cnt := rst_cnt+UInt(1) }
val metabits = rstVal.getWidth val metabits = rstVal.getWidth
@ -881,9 +881,9 @@ class L2AcquireTracker(trackerId: Int) extends L2XactTracker {
UInt(0)) UInt(0))
pending_reads := Mux( // GetBlocks and custom types read all beats pending_reads := Mux( // GetBlocks and custom types read all beats
io.iacq().isBuiltInType(Acquire.getBlockType) || !io.iacq().isBuiltInType(), io.iacq().isBuiltInType(Acquire.getBlockType) || !io.iacq().isBuiltInType(),
SInt(-1, width = innerDataBeats), SInt(-1),
(addPendingBitWhenBeatIsGetOrAtomic(io.inner.acquire) | (addPendingBitWhenBeatIsGetOrAtomic(io.inner.acquire) |
addPendingBitWhenBeatHasPartialWritemask(io.inner.acquire)).toUInt) addPendingBitWhenBeatHasPartialWritemask(io.inner.acquire)).toSInt).toUInt
pending_writes := addPendingBitWhenBeatHasDataAndAllocs(io.inner.acquire) pending_writes := addPendingBitWhenBeatHasDataAndAllocs(io.inner.acquire)
pending_resps := UInt(0) pending_resps := UInt(0)
pending_ignt_data := UInt(0) pending_ignt_data := UInt(0)