-
Notifications
You must be signed in to change notification settings - Fork 911
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4691 from hovind/experiments/extract-fa-fix
extract_fa: Fix `xor3`/`xnor3` inversion bug
- Loading branch information
Showing
2 changed files
with
32 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 |