diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-08-22 14:30:29 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-08-22 14:30:29 +0200 |
commit | e218f0eacf7cbcfa0736cb2d66bba0010e8e6799 (patch) | |
tree | 1212b52fb7874737f17d2073c18da01a40b1d86d /frontends/verilog | |
parent | 74af3a2b7086acad45d15b590a0d23572e8c8734 (diff) | |
download | yosys-e218f0eacf7cbcfa0736cb2d66bba0010e8e6799.tar.gz yosys-e218f0eacf7cbcfa0736cb2d66bba0010e8e6799.tar.bz2 yosys-e218f0eacf7cbcfa0736cb2d66bba0010e8e6799.zip |
Added support for non-standard <plugin>:<c_name> DPI syntax
Diffstat (limited to 'frontends/verilog')
-rw-r--r-- | frontends/verilog/parser.y | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/frontends/verilog/parser.y b/frontends/verilog/parser.y index 22312c6d1..3512538ca 100644 --- a/frontends/verilog/parser.y +++ b/frontends/verilog/parser.y @@ -436,6 +436,18 @@ task_func_decl: } opt_dpi_function_args ';' { current_function_or_task = NULL; } | + attr TOK_DPI_FUNCTION TOK_ID ':' TOK_ID '=' TOK_ID TOK_ID { + current_function_or_task = new AstNode(AST_DPI_FUNCTION, AstNode::mkconst_str(*$7), AstNode::mkconst_str(*$3 + ":" + RTLIL::unescape_id(*$5))); + current_function_or_task->str = *$8; + append_attr(current_function_or_task, $1); + ast_stack.back()->children.push_back(current_function_or_task); + delete $3; + delete $5; + delete $7; + delete $8; + } opt_dpi_function_args ';' { + current_function_or_task = NULL; + } | attr TOK_TASK TOK_ID ';' { current_function_or_task = new AstNode(AST_TASK); current_function_or_task->str = *$3; |