Skip to content

Commit

Permalink
[LLHD] Relax sig parent constraint (#7515)
Browse files Browse the repository at this point in the history
This is necessary because the moore dialect does not enforce such constraints for its variables and thus they can occur in functions
  • Loading branch information
maerhart authored Aug 13, 2024
1 parent 4cfcbda commit bf32a88
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion include/circt/Dialect/LLHD/IR/LLHDSignalOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
include "mlir/IR/EnumAttr.td"

def SigOp : LLHDOp<"sig", [
ParentOneOf<["hw::HWModuleOp", "llhd::ProcessOp"]>,
TypesMatchWith<
"type of 'init' and underlying type of 'signal' have to match.",
"init", "result", "hw::InOutType::get($_self)">
Expand Down
9 changes: 0 additions & 9 deletions test/Dialect/LLHD/IR/errors.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,3 @@ hw.module @check_illegal_drv(inout %sig : i1) {
%time = llhd.constant_time #llhd.time<1ns, 0d, 0e>
"llhd.drv"(%sig, %c, %time) {} : (!hw.inout<i1>, i32, !llhd.time) -> ()
}

// -----

func.func @illegal_sig_parent(%arg0 : i1) {
// expected-error @+1 {{expects parent op to be one of 'hw.module, llhd.process'}}
%0 = llhd.sig "sig" %arg0 : i1

return
}

0 comments on commit bf32a88

Please sign in to comment.