diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-05-01 09:57:26 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2019-05-01 09:57:26 +0200 |
commit | 3b6a02d3a74dc0113d595c6d26a4436160e28a6f (patch) | |
tree | 762a9b5300094284bd0de4a4579cb1f0aa880378 | |
parent | 32ff37bb5a8cec79e8cbcfac4075cc553fa9a394 (diff) | |
download | yosys-3b6a02d3a74dc0113d595c6d26a4436160e28a6f.tar.gz yosys-3b6a02d3a74dc0113d595c6d26a4436160e28a6f.tar.bz2 yosys-3b6a02d3a74dc0113d595c6d26a4436160e28a6f.zip |
Fix width detection of memory access with bit slice, fixes #974
Signed-off-by: Clifford Wolf <clifford@clifford.at>
-rw-r--r-- | frontends/ast/genrtlil.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/frontends/ast/genrtlil.cc b/frontends/ast/genrtlil.cc index b3a2a84be..d4515babf 100644 --- a/frontends/ast/genrtlil.cc +++ b/frontends/ast/genrtlil.cc @@ -645,6 +645,8 @@ void AstNode::detectSignWidthWorker(int &width_hint, bool &sign_hint, bool *foun if (!id_ast->children[0]->range_valid) log_file_error(filename, linenum, "Failed to detect width of memory access `%s'!\n", str.c_str()); this_width = id_ast->children[0]->range_left - id_ast->children[0]->range_right + 1; + if (children.size() > 1) + range = children[1]; } else log_file_error(filename, linenum, "Failed to detect width for identifier %s!\n", str.c_str()); if (range) { |