diff options
author | TimRudy <3942818+TimRudy@users.noreply.github.com> | 2021-02-24 15:48:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-24 15:48:15 -0500 |
commit | dcd9f0af23f9b580b044890452ecf1aef59bbb85 (patch) | |
tree | 2a8febda7acdbb727addc8e02afafa53e345bd60 /frontends | |
parent | fffbf651df4e598752a0a3f52b72e5987ec8df88 (diff) | |
download | yosys-dcd9f0af23f9b580b044890452ecf1aef59bbb85.tar.gz yosys-dcd9f0af23f9b580b044890452ecf1aef59bbb85.tar.bz2 yosys-dcd9f0af23f9b580b044890452ecf1aef59bbb85.zip |
Extend "delay" expressions to handle pair and triplet, i.e. rise, fall and turn-off (#2566)
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/verilog/verilog_parser.y | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/frontends/verilog/verilog_parser.y b/frontends/verilog/verilog_parser.y index 7fbd2aa27..89e686818 100644 --- a/frontends/verilog/verilog_parser.y +++ b/frontends/verilog/verilog_parser.y @@ -609,12 +609,17 @@ interface_body_stmt: param_decl | localparam_decl | typedef_decl | defparam_decl | wire_decl | always_stmt | assign_stmt | modport_stmt; +mintypmax_expr: + expr { delete $1; } | + expr ':' expr ':' expr { delete $1; delete $3; delete $5; }; + non_opt_delay: '#' TOK_ID { delete $2; } | '#' TOK_CONSTVAL { delete $2; } | '#' TOK_REALVAL { delete $2; } | - '#' '(' expr ')' { delete $3; } | - '#' '(' expr ':' expr ':' expr ')' { delete $3; delete $5; delete $7; }; + '#' '(' mintypmax_expr ')' | + '#' '(' mintypmax_expr ',' mintypmax_expr ')' | + '#' '(' mintypmax_expr ',' mintypmax_expr ',' mintypmax_expr ')'; delay: non_opt_delay | %empty; |