diff options
author | Eddie Hung <eddie@fpgeh.com> | 2020-05-13 13:33:37 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2020-05-13 13:33:37 -0700 |
commit | 237962debd9fcb7e9fb45f53bc8a53f0c34d9888 (patch) | |
tree | bac83bb1902f53e924d3f5d441f5de8e225a3f0c | |
parent | 0d2c33f9f4f8ca1bb507e3e688e0c7d372f0247b (diff) | |
download | yosys-237962debd9fcb7e9fb45f53bc8a53f0c34d9888.tar.gz yosys-237962debd9fcb7e9fb45f53bc8a53f0c34d9888.tar.bz2 yosys-237962debd9fcb7e9fb45f53bc8a53f0c34d9888.zip |
verilog: default to input in sv mode if task/func has no dir ...
otherwise error
-rw-r--r-- | frontends/verilog/verilog_parser.y | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/frontends/verilog/verilog_parser.y b/frontends/verilog/verilog_parser.y index b7c6af91e..f250d7685 100644 --- a/frontends/verilog/verilog_parser.y +++ b/frontends/verilog/verilog_parser.y @@ -855,8 +855,16 @@ task_func_port: frontend_verilog_yyerror("task/function argument range must be of the form: [<expr>:<expr>], [<expr>+:<expr>], or [<expr>-:<expr>]"); } wire_name | { - if (!astbuf1) - frontend_verilog_yyerror("Non-ANSI style task/function arguments not currently supported"); + if (!astbuf1) { + if (!sv_mode) + frontend_verilog_yyerror("task/function argument direction missing"); + albuf = new dict<IdString, AstNode*>; + astbuf1 = new AstNode(AST_WIRE); + current_wire_rand = false; + current_wire_const = false; + astbuf1->is_input = true; + astbuf2 = NULL; + } } wire_name; task_func_body: |