Skip to content

Commit

Permalink
firrtl.view: Take operands directly, not probes.
Browse files Browse the repository at this point in the history
  • Loading branch information
dtzSiFive committed Jan 14, 2025
1 parent 458a1c6 commit c5ebbb3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions include/circt/Dialect/FIRRTL/FIRRTLIntrinsics.td
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ def ViewIntrinsicOp : FIRRTLOp<"view", []> {
debugging in a waveform. This is _not_ a true SystemVerilog Interface, it
is only lowered to one.
}];
let arguments = (ins StrAttr:$name, AugmentedBundleType:$augmentedType, Variadic<RefType>:$probes);
let assemblyFormat = "$name `,` $augmentedType (`,` $probes^)? attr-dict `:` type($probes)";
let arguments = (ins StrAttr:$name, AugmentedBundleType:$augmentedType, Variadic<FIRRTLBaseType>:$inputs);
let assemblyFormat = "$name `,` $augmentedType (`,` $inputs^)? attr-dict `:` type($inputs)";
}

#endif // CIRCT_DIALECT_FIRRTL_FIRRTLINTRINSICS_TD
6 changes: 3 additions & 3 deletions test/Dialect/FIRRTL/round-trip.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ firrtl.module @Intrinsics(in %ui : !firrtl.uint, in %clock: !firrtl.clock, in %u
%po = firrtl.int.generic "params_and_operand" <X: i64 = 123> %ui1 : (!firrtl.uint<1>) -> !firrtl.clock
firrtl.int.generic "inputs" %clock, %ui1, %clock : (!firrtl.clock, !firrtl.uint<1>, !firrtl.clock) -> ()

%probe = firrtl.wire : !firrtl.probe<uint<1>>
%val = firrtl.wire : !firrtl.uint<1>
// CHECK: firrtl.view "View"
// CHECK-SAME: <{
// CHECK-SAME: elements = [
Expand All @@ -56,7 +56,7 @@ firrtl.module @Intrinsics(in %ui : !firrtl.uint, in %clock: !firrtl.clock, in %u
// CHECK-SAME: name = "qux"
// CHECK-SAME: }
// CHECK-SAME: ]
// CHECK-SAME: }>, %probe, %probe : !firrtl.probe<uint<1>>, !firrtl.probe<uint<1>>
// CHECK-SAME: }>, %val, %val : !firrtl.uint<1>, !firrtl.uint<1>
firrtl.view "View", <{
class = "sifive.enterprise.grandcentral.AugmentedBundleType",
defName = "Bar",
Expand All @@ -72,7 +72,7 @@ firrtl.module @Intrinsics(in %ui : !firrtl.uint, in %clock: !firrtl.clock, in %u
name = "qux"
}
]
}>, %probe, %probe : !firrtl.probe<uint<1>>, !firrtl.probe<uint<1>>
}>, %val, %val : !firrtl.uint<1>, !firrtl.uint<1>
}

// CHECK-LABEL: firrtl.module @FPGAProbe
Expand Down

0 comments on commit c5ebbb3

Please sign in to comment.