mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-28 03:15:50 +00:00
Merge pull request #2045 from YosysHQ/eddie/fix2042
verilog: error if no direction given for task arguments, default to input in SV mode
This commit is contained in:
commit
5bcde7ccc3
6 changed files with 107 additions and 1 deletions
|
@ -853,7 +853,19 @@ task_func_port:
|
|||
}
|
||||
if (astbuf2 && astbuf2->children.size() != 2)
|
||||
frontend_verilog_yyerror("task/function argument range must be of the form: [<expr>:<expr>], [<expr>+:<expr>], or [<expr>-:<expr>]");
|
||||
} wire_name | wire_name;
|
||||
} wire_name |
|
||||
{
|
||||
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:
|
||||
task_func_body behavioral_stmt |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue