mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 00:55:32 +00:00
Merge pull request #2050 from YosysHQ/eddie/opt_clean_fixes
opt_clean: remove (* init *) regardless of -purge, remove (* init *) when consistent with sigmap, clean to behave identically
This commit is contained in:
commit
140e9a8e06
2 changed files with 32 additions and 12 deletions
13
tests/opt/opt_clean_init.ys
Normal file
13
tests/opt/opt_clean_init.ys
Normal file
|
@ -0,0 +1,13 @@
|
|||
logger -expect warning "Initial value conflict for \\y resolving to 1'0 but with init 1'1" 1
|
||||
logger -expect-no-warnings
|
||||
read_verilog <<EOT
|
||||
module top;
|
||||
(* init=1'b0 *) wire w = 1'b0;
|
||||
(* init=1'bx *) wire x = 1'b0;
|
||||
(* init=1'b1 *) wire y = 1'b0;
|
||||
(* init=1'b0 *) wire z = 1'bx;
|
||||
endmodule
|
||||
EOT
|
||||
clean
|
||||
select -assert-count 1 a:init
|
||||
select -assert-count 1 w:y a:init %i
|
Loading…
Add table
Add a link
Reference in a new issue