mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-26 10:35:38 +00:00
Added support for DPI function with different names in C and Verilog
This commit is contained in:
parent
085c8e873d
commit
6c5cafcd8b
3 changed files with 20 additions and 9 deletions
|
@ -416,7 +416,7 @@ module_body_stmt:
|
|||
|
||||
task_func_decl:
|
||||
attr TOK_DPI_FUNCTION TOK_ID TOK_ID {
|
||||
current_function_or_task = new AstNode(AST_DPI_FUNCTION, AstNode::mkconst_str(*$3));
|
||||
current_function_or_task = new AstNode(AST_DPI_FUNCTION, AstNode::mkconst_str(*$3), AstNode::mkconst_str(*$4));
|
||||
current_function_or_task->str = *$4;
|
||||
append_attr(current_function_or_task, $1);
|
||||
ast_stack.back()->children.push_back(current_function_or_task);
|
||||
|
@ -425,6 +425,17 @@ task_func_decl:
|
|||
} opt_dpi_function_args ';' {
|
||||
current_function_or_task = NULL;
|
||||
} |
|
||||
attr TOK_DPI_FUNCTION TOK_ID '=' TOK_ID TOK_ID {
|
||||
current_function_or_task = new AstNode(AST_DPI_FUNCTION, AstNode::mkconst_str(*$5), AstNode::mkconst_str(*$3));
|
||||
current_function_or_task->str = *$6;
|
||||
append_attr(current_function_or_task, $1);
|
||||
ast_stack.back()->children.push_back(current_function_or_task);
|
||||
delete $3;
|
||||
delete $5;
|
||||
delete $6;
|
||||
} 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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue