aboutsummaryrefslogtreecommitdiffstats
path: root/frontends/ast/genrtlil.cc
diff options
context:
space:
mode:
authorKamil Rakoczy <krakoczy@antmicro.com>2022-02-14 14:34:20 +0100
committerGitHub <noreply@github.com>2022-02-14 14:34:20 +0100
commit68c67c40ec75b192f4f1be9711afe0df8973e797 (patch)
treef67834903e40ae61b39a04555ff1b96763c59cd0 /frontends/ast/genrtlil.cc
parent59738c09beb3ba43a693b77eb4545122a99df7d2 (diff)
downloadyosys-68c67c40ec75b192f4f1be9711afe0df8973e797.tar.gz
yosys-68c67c40ec75b192f4f1be9711afe0df8973e797.tar.bz2
yosys-68c67c40ec75b192f4f1be9711afe0df8973e797.zip
Fix access to whole sub-structs (#3086)
* Add support for accessing whole struct * Update tests Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
Diffstat (limited to 'frontends/ast/genrtlil.cc')
-rw-r--r--frontends/ast/genrtlil.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/frontends/ast/genrtlil.cc b/frontends/ast/genrtlil.cc
index 4c25287ad..020b4e5e8 100644
--- a/frontends/ast/genrtlil.cc
+++ b/frontends/ast/genrtlil.cc
@@ -877,7 +877,7 @@ void AstNode::detectSignWidthWorker(int &width_hint, bool &sign_hint, bool *foun
this_width = id_ast->children[0]->range_left - id_ast->children[0]->range_right + 1;
if (children.size() > 1)
range = children[1];
- } else if (id_ast->type == AST_STRUCT_ITEM) {
+ } else if (id_ast->type == AST_STRUCT_ITEM || id_ast->type == AST_STRUCT) {
AstNode *tmp_range = make_struct_member_range(this, id_ast);
this_width = tmp_range->range_left - tmp_range->range_right + 1;
delete tmp_range;