Merge branch 'master' into bump_chisel_3.2.x
This commit is contained in:
@@ -549,11 +549,12 @@ class MacroCompilerPass(mems: Option[Seq[Macro]],
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Connect mem outputs
|
// Connect mem outputs
|
||||||
|
val zeroOutputValue: Expression = UIntLiteral(0, IntWidth(mem.src.width))
|
||||||
mem.src.ports foreach { port =>
|
mem.src.ports foreach { port =>
|
||||||
port.output match {
|
port.output match {
|
||||||
case Some(PolarizedPort(mem, _)) => outputs get mem match {
|
case Some(PolarizedPort(mem, _)) => outputs get mem match {
|
||||||
case Some(select) =>
|
case Some(select) =>
|
||||||
val output = (select foldRight (zero: Expression)) {
|
val output = (select foldRight (zeroOutputValue)) {
|
||||||
case ((cond, tval), fval) => Mux(cond, tval, fval, fval.tpe) }
|
case ((cond, tval), fval) => Mux(cond, tval, fval, fval.tpe) }
|
||||||
stmts += Connect(NoInfo, WRef(mem), output)
|
stmts += Connect(NoInfo, WRef(mem), output)
|
||||||
case None =>
|
case None =>
|
||||||
|
|||||||
Reference in New Issue
Block a user