-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The `aig.cut` operation represents a cut in the And-Inverter-Graph. This operation is variadic and can take multiple inputs and outputs, which corresponds to the input and output edges in AIG conceptually.
- Loading branch information
Showing
4 changed files
with
146 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// RUN: circt-opt %s -split-input-file -verify-diagnostics | ||
|
||
hw.module @InputNum(in %a: i1, in %b: i1) { | ||
// expected-error @+1 {{the number of inputs and the number of block arguments do not match. Expected 2 but got 1}} | ||
%0 = aig.cut %a, %b : (i1, i1) -> (i1) { | ||
^bb0(%arg0: i1): | ||
aig.output %arg0 : i1 | ||
} | ||
} | ||
|
||
// ----- | ||
|
||
hw.module @InputType(in %a: i1, in %b: i1) { | ||
// expected-error @+1 {{'aig.cut' op input type 'i1' does not match block argument type 'i2'}} | ||
%0 = aig.cut %a, %b : (i1, i1) -> (i1) { | ||
^bb0(%arg0: i2, %arg1: i1): | ||
aig.output %arg1 : i1 | ||
} | ||
} | ||
|
||
// ----- | ||
|
||
hw.module @OutputNum(in %a: i1, in %b: i1) { | ||
// expected-error @+1 {{the number of results and the number of terminator operands do not match. Expected 1 but got 2}} | ||
%0 = aig.cut %a, %b : (i1, i1) -> (i1) { | ||
^bb0(%arg0: i1, %arg1: i1): | ||
aig.output %arg0, %arg1 : i1, i1 | ||
} | ||
} | ||
|
||
// ----- | ||
|
||
hw.module @OutputType(in %a: i1, in %b: i1) { | ||
// expected-error @+1 {{'aig.cut' op result type 'i1' does not match terminator operand type 'i2'}} | ||
%0 = aig.cut %a, %b : (i1, i1) -> (i1) { | ||
^bb0(%arg0: i1, %arg1: i1): | ||
%c = builtin.unrealized_conversion_cast %arg0 : i1 to i2 | ||
aig.output %c : i2 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters