-
Notifications
You must be signed in to change notification settings - Fork 895
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 #4614 from georgerennie/george/opt_reduce_cell_width
opt_reduce: keep at least one input to $reduce_or/and cells
- Loading branch information
Showing
2 changed files
with
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Check that opt_reduce doesn't produce zero width $reduce_or/$reduce_and, | ||
|
||
read_verilog <<EOT | ||
module reduce_const(output wire o, output wire a); | ||
wire [3:0] zero = 4'b0000; | ||
wire [3:0] ones = 4'b1111; | ||
assign o = |zero; | ||
assign a = &ones; | ||
endmodule | ||
EOT | ||
|
||
equiv_opt -assert opt_reduce | ||
design -load postopt | ||
select -assert-none r:A_WIDTH=0 |