diff options
author | Clifford Wolf <clifford@clifford.at> | 2016-08-20 13:47:46 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2016-08-20 13:47:46 +0200 |
commit | fe9315b7a19bcb6dcde1a1ce49dd23f999bda7eb (patch) | |
tree | 94d27dcfcd5f51f483182c2ff066da642cd5b557 /frontends | |
parent | 75bf7416f0dcf7b5bf3e095779f78039c75c316c (diff) | |
download | yosys-fe9315b7a19bcb6dcde1a1ce49dd23f999bda7eb.tar.gz yosys-fe9315b7a19bcb6dcde1a1ce49dd23f999bda7eb.tar.bz2 yosys-fe9315b7a19bcb6dcde1a1ce49dd23f999bda7eb.zip |
Fixed finish_addr handling in $readmemh/$readmemb
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/ast/simplify.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index 6ff117a44..d071a54fa 100644 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@ -2468,12 +2468,12 @@ AstNode *AstNode::readmem(bool is_readmemh, std::string mem_filename, AstNode *m block->children.back()->children[0]->id2ast = memory; } - if ((cursor == finish_addr) || (increment > 0 && cursor > range_max) || (increment < 0 && cursor < range_min)) - break; cursor += increment; + if ((cursor == finish_addr+increment) || (increment > 0 && cursor > range_max) || (increment < 0 && cursor < range_min)) + break; } - if ((cursor == finish_addr) || (increment > 0 && cursor > range_max) || (increment < 0 && cursor < range_min)) + if ((cursor == finish_addr+increment) || (increment > 0 && cursor > range_max) || (increment < 0 && cursor < range_min)) break; } |