-
Notifications
You must be signed in to change notification settings - Fork 902
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
write_verilog: don't
assign
to a reg
.
Fixes #2035.
- Loading branch information
1 parent
040605b
commit cd85343
Showing
4 changed files
with
42 additions
and
8 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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
*.log | ||
*.out | ||
*.err |
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 |
---|---|---|
@@ -1,6 +1,10 @@ | ||
/*.log | ||
/*.out | ||
/*.err | ||
/run-test.mk | ||
/const_arst.v | ||
/const_sr.v | ||
/doubleslash.v | ||
/roundtrip_proc_1.v | ||
/roundtrip_proc_2.v | ||
/assign_to_reg.v |
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,22 @@ | ||
# https://github.com/yosyshq/yosys/issues/2035 | ||
|
||
read_ilang <<END | ||
module \top | ||
wire width 1 input 0 \halfbrite | ||
wire width 2 output 1 \r_on | ||
process $1 | ||
assign \r_on [1:0] 2'00 | ||
assign \r_on [1:0] 2'11 | ||
switch \halfbrite [0] | ||
case 1'1 | ||
assign \r_on [1] 1'0 | ||
end | ||
end | ||
end | ||
END | ||
proc_prune | ||
write_verilog assign_to_reg.v | ||
design -reset | ||
|
||
logger -expect-no-warnings | ||
read_verilog assign_to_reg.v |