diff options
author | Clifford Wolf <clifford@clifford.at> | 2013-11-20 12:18:46 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2013-11-20 12:18:46 +0100 |
commit | c4c299eb5a3d9c2b7c9932efb35669c09c1aacb4 (patch) | |
tree | d4864eb00981273af5655859d8b11f556f262030 /frontends | |
parent | 0f04738f40aa0fa6400ab55f4a1f5f0c3b384fa8 (diff) | |
download | yosys-c4c299eb5a3d9c2b7c9932efb35669c09c1aacb4.tar.gz yosys-c4c299eb5a3d9c2b7c9932efb35669c09c1aacb4.tar.bz2 yosys-c4c299eb5a3d9c2b7c9932efb35669c09c1aacb4.zip |
Do not allow memory bit select on the left side of an assignment
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/ast/simplify.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index 57178c814..6d662c8f7 100644 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@ -473,7 +473,7 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage, // split memory access with bit select to individual statements if (type == AST_IDENTIFIER && children.size() == 2 && children[0]->type == AST_RANGE && children[1]->type == AST_RANGE) { - if (id2ast == NULL || id2ast->type != AST_MEMORY || children[0]->children.size() != 1) + if (id2ast == NULL || id2ast->type != AST_MEMORY || children[0]->children.size() != 1 || in_lvalue) log_error("Invalid bit-select on memory access at %s:%d!\n", filename.c_str(), linenum); int mem_width, mem_size, addr_bits; |