-
Notifications
You must be signed in to change notification settings - Fork 910
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
925c617
commit 5bd1861
Showing
1 changed file
with
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
design -reset | ||
read_verilog <<EOT | ||
module foo (CLK, Q, QQQ); | ||
input CLK; | ||
output reg QQQ; | ||
output reg Q = 1'b1; | ||
assign QQQ = Q; | ||
always @(posedge CLK) | ||
Q <= ~Q; | ||
endmodule | ||
EOT | ||
|
||
proc | ||
opt_expr | ||
opt_dff | ||
select -assert-count 1 w:Q a:init %i | ||
abstract -init w:QQQ | ||
check -assert | ||
select -assert-count 0 w:Q a:init %i | ||
|
||
design -reset | ||
read_verilog <<EOT | ||
module foo (CLK, Q, QQQ); | ||
input CLK; | ||
output reg QQQ; | ||
output reg [1:0] Q = 1'b1; | ||
assign QQQ = Q; | ||
always @(posedge CLK) | ||
Q <= ~Q; | ||
endmodule | ||
EOT | ||
|
||
proc | ||
opt_expr | ||
opt_dff | ||
select -assert-count 1 w:Q a:init=2'b01 %i | ||
abstract -init w:QQQ | ||
check -assert | ||
select -assert-count 1 w:Q a:init=2'b0x %i |