diff --git a/calyx-backend/src/verilog.rs b/calyx-backend/src/verilog.rs index 71df8d668..3c88e1cd2 100644 --- a/calyx-backend/src/verilog.rs +++ b/calyx-backend/src/verilog.rs @@ -880,13 +880,20 @@ impl<'a> std::fmt::Display for VerilogPortRef<'a> { fn unflattened_guard(guard: &ir::Guard) -> String { match guard { - Guard::Or(left, right) | Guard::And(left, right) => { + Guard::Or(left, right) => { format!( "({}) | ({})", unflattened_guard(left), unflattened_guard(right) ) } + Guard::And(left, right) => { + format!( + "({}) & ({})", + unflattened_guard(left), + unflattened_guard(right) + ) + } Guard::CompOp(comp, left, right) => { let op = match comp { ir::PortComp::Eq => "==",