3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-12 20:18:20 +00:00

Fix handling of Verilog ~& and ~| operators

This commit is contained in:
Clifford Wolf 2017-06-01 12:43:21 +02:00
parent 0290b68a44
commit 129984e115

View file

@ -1537,10 +1537,18 @@ basic_expr:
$$ = new AstNode(AST_BIT_AND, $1, $4); $$ = new AstNode(AST_BIT_AND, $1, $4);
append_attr($$, $3); append_attr($$, $3);
} | } |
basic_expr OP_NAND attr basic_expr {
$$ = new AstNode(AST_BIT_NOT, new AstNode(AST_BIT_AND, $1, $4));
append_attr($$, $3);
} |
basic_expr '|' attr basic_expr { basic_expr '|' attr basic_expr {
$$ = new AstNode(AST_BIT_OR, $1, $4); $$ = new AstNode(AST_BIT_OR, $1, $4);
append_attr($$, $3); append_attr($$, $3);
} | } |
basic_expr OP_NOR attr basic_expr {
$$ = new AstNode(AST_BIT_NOT, new AstNode(AST_BIT_OR, $1, $4));
append_attr($$, $3);
} |
basic_expr '^' attr basic_expr { basic_expr '^' attr basic_expr {
$$ = new AstNode(AST_BIT_XOR, $1, $4); $$ = new AstNode(AST_BIT_XOR, $1, $4);
append_attr($$, $3); append_attr($$, $3);