mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Support loop unrolling on width mismatches, bug 333
This commit is contained in:
+2
-1
@@ -187,8 +187,9 @@ private:
|
||||
UINFO(8," In Numbers: for (v="<<valInit<<"; v<"<<valStop<<"; v=v+"<<valInc<<")\n");
|
||||
//
|
||||
if (!m_generate) {
|
||||
UINFO(8, " ~Iters: "<<((valStop - valInit)/valInc)<<" c="<<unrollCount()<<endl);
|
||||
int loops = ((valStop - valInit)/valInc);
|
||||
if (loops < 0) { loops += (1ULL<<constStopp->width()); } // Will roll around
|
||||
UINFO(8, " ~Iters: "<<loops<<" c="<<unrollCount()<<endl);
|
||||
if (loops > unrollCount())
|
||||
return cantUnroll(nodep, "too many iterations");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user