Skip to content

Commit

Permalink
ViewIntrinsicOp: Limit to ground types specifically.
Browse files Browse the repository at this point in the history
  • Loading branch information
dtzSiFive committed Jan 16, 2025
1 parent f806d5c commit 487bf82
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/circt/Dialect/FIRRTL/FIRRTLIntrinsics.td
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ 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<FIRRTLBaseType>:$inputs);
let arguments = (ins StrAttr:$name, AugmentedBundleType:$augmentedType, Variadic<GroundType>:$inputs);
let assemblyFormat = "$name `,` $augmentedType (`,` $inputs^)? attr-dict (`:` type($inputs)^)?";
}

Expand Down
4 changes: 4 additions & 0 deletions include/circt/Dialect/FIRRTL/FIRRTLTypes.td
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ def AggregateType : FIRRTLDialectType<
CPred<"type_isa<FVectorType, BundleType, FEnumType>($_self)">,
"a aggregate type", "::circt::firrtl::FIRRTLBaseType">;

def GroundType : FIRRTLDialectType<
CPred<"llvm::isa<FIRRTLBaseType>($_self) && cast<FIRRTLBaseType>($_self).isGround()">,
"a ground type", "::circt::firrtl::FIRRTLBaseType">;

def PassiveType : FIRRTLDialectType<
CPred<"type_isa<FIRRTLBaseType>($_self) && cast<FIRRTLBaseType>($_self).isPassive()">,
"a passive base type (contain no flips)", "::circt::firrtl::FIRRTLBaseType">;
Expand Down

0 comments on commit 487bf82

Please sign in to comment.