From: Clifford Wolf Date: Sat, 20 Aug 2016 11:47:46 +0000 (+0200) Subject: Fixed finish_addr handling in $readmemh/$readmemb X-Git-Tag: yosys-0.7~124 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fe9315b7a19bcb6dcde1a1ce49dd23f999bda7eb;p=yosys.git Fixed finish_addr handling in $readmemh/$readmemb --- 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; }