-
Notifications
You must be signed in to change notification settings - Fork 888
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extract_fa: Fix handling inversion of an FA xor output
Fixes what seems to be a missing inversion of the xor output when the heueristic decides to use an inverted FA. Fixes #3879
- Loading branch information
Showing
2 changed files
with
31 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
read_verilog <<EOF | ||
module gcd(I, D); | ||
|
||
output [2:0] I; | ||
input [3:0] D; | ||
|
||
assign I = D[0]+D[1]+D[2]+D[3]; | ||
endmodule | ||
EOF | ||
design -save input | ||
|
||
prep | ||
|
||
design -stash gold | ||
|
||
design -load input | ||
|
||
synth -top gcd -flatten | ||
|
||
extract_fa -v | ||
|
||
design -stash gate | ||
|
||
design -copy-from gold -as gold gcd | ||
design -copy-from gate -as gate gcd | ||
|
||
miter -equiv -make_assert -flatten gold gate miter | ||
|
||
sat -verify -prove-asserts -show-all miter |