mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-23 06:13:41 +00:00
Fixed parsing of default cases when not last case
This commit is contained in:
parent
de03184150
commit
2a25e3bca3
2 changed files with 38 additions and 12 deletions
|
@ -48,3 +48,25 @@ always @(state or TxValid_i)
|
|||
end
|
||||
|
||||
endmodule
|
||||
|
||||
|
||||
// test case inspired by softusb_navre code:
|
||||
// default not as last case
|
||||
|
||||
module default_cases(a, y);
|
||||
|
||||
input [2:0] a;
|
||||
output reg [3:0] y;
|
||||
|
||||
always @* begin
|
||||
case (a)
|
||||
3'b000, 3'b111: y <= 0;
|
||||
default: y <= 4;
|
||||
3'b001: y <= 1;
|
||||
3'b010: y <= 2;
|
||||
3'b100: y <= 3;
|
||||
endcase
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue