3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-07 18:21:24 +00:00

Merge pull request #5330 from higuoxing/fix-sva-in-case-expr

Fix handling of cases that look like sva labels again.
This commit is contained in:
Emil J 2025-09-05 20:10:56 +02:00 committed by GitHub
commit db7aa538f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 1 deletions

View file

@ -3023,7 +3023,8 @@ case_expr_list:
SET_AST_NODE_LOC(node, @1, @1);
} |
TOK_SVA_LABEL {
AstNode* node = extra->pushChild(std::make_unique<AstNode>(@$, AST_IDENTIFIER));
AstNode* node = extra->saveChild(std::make_unique<AstNode>(@$, AST_IDENTIFIER));
node->str = *$1;
SET_AST_NODE_LOC(node, @1, @1);
} |
expr {

View file

@ -0,0 +1,10 @@
read_verilog -sv <<EOT
module test(input wire A);
localparam TEST = 1;
always_comb begin
case (A)
TEST: assert(1);
endcase
end
endmodule
EOT