Fix for pr1833776.

This patch fixes a bug which caused a generate loop with a non-zero
initial value to generate the wrong number of block instances.
This commit is contained in:
Martin Whitaker 2007-11-17 20:53:45 +00:00 committed by Stephen Williams
parent d240d33558
commit fbebcccaed
1 changed files with 1 additions and 1 deletions

View File

@ -369,7 +369,7 @@ bool PGenerate::generate_scope_loop_(Design*des, NetScope*container)
cerr << get_line() << ": debug: genvar init = " << genvar << endl;
container->genvar_tmp = loop_index;
container->genvar_tmp_val = 0;
container->genvar_tmp_val = genvar;
NetExpr*test_ex = elab_and_eval(des, container, loop_test, -1);
NetEConst*test = dynamic_cast<NetEConst*>(test_ex);
assert(test);