mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-29 23:43:16 +00:00
ilang, ast: Store parameter order and default value information.
Fixes #1819, #1820.
This commit is contained in:
parent
79efaa65ad
commit
06a344efcb
6 changed files with 27 additions and 9 deletions
|
@ -143,11 +143,18 @@ module_body:
|
|||
/* empty */;
|
||||
|
||||
module_stmt:
|
||||
param_stmt | attr_stmt | wire_stmt | memory_stmt | cell_stmt | proc_stmt | conn_stmt;
|
||||
param_stmt | param_defval_stmt | attr_stmt | wire_stmt | memory_stmt | cell_stmt | proc_stmt | conn_stmt;
|
||||
|
||||
param_stmt:
|
||||
TOK_PARAMETER TOK_ID EOL {
|
||||
current_module->avail_parameters.insert($2);
|
||||
current_module->avail_parameters($2);
|
||||
free($2);
|
||||
};
|
||||
|
||||
param_defval_stmt:
|
||||
TOK_PARAMETER TOK_ID constant EOL {
|
||||
current_module->avail_parameters($2);
|
||||
current_module->parameter_default_values[$2] = *$3;
|
||||
free($2);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue