3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-06 14:13:23 +00:00

Added support for hierarchical defparams

This commit is contained in:
Clifford Wolf 2016-11-15 13:35:19 +01:00
parent a926a6afc2
commit 70d7a02cae
5 changed files with 65 additions and 17 deletions

View file

@ -666,14 +666,13 @@ defparam_decl_list:
single_defparam_decl | defparam_decl_list ',' single_defparam_decl;
single_defparam_decl:
range hierarchical_id '=' expr {
range rvalue '=' expr {
AstNode *node = new AstNode(AST_DEFPARAM);
node->str = *$2;
node->children.push_back($2);
node->children.push_back($4);
if ($1 != NULL)
node->children.push_back($1);
ast_stack.back()->children.push_back(node);
delete $2;
};
wire_decl: