mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-26 18:45:34 +00:00
verilog: fix sizing of ports with int types in module headers
Declaring the ports as standard module items already worked as expected. This adds a missing usage of `checkRange()` so that headers such as `module m(output integer x);` now work correctly.
This commit is contained in:
parent
1ec5994100
commit
10a6bc9b81
3 changed files with 64 additions and 2 deletions
|
@ -546,8 +546,9 @@ module_arg:
|
|||
node->str = *$4;
|
||||
SET_AST_NODE_LOC(node, @4, @4);
|
||||
node->port_id = ++port_counter;
|
||||
if ($3 != NULL)
|
||||
node->children.push_back($3);
|
||||
AstNode *range = checkRange(node, $3);
|
||||
if (range != NULL)
|
||||
node->children.push_back(range);
|
||||
if (!node->is_input && !node->is_output)
|
||||
frontend_verilog_yyerror("Module port `%s' is neither input nor output.", $4->c_str());
|
||||
if (node->is_reg && node->is_input && !node->is_output && !sv_mode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue