Closed GoogleCodeExporter closed 9 years ago
Good catch. I can't test this in simulation until this evening but the missing
popdef(_slbl) is the cause. m4 maintains a stack of variable definitions which
is how the nesting works for if() and all the other control flow macros like
for(). The missing pop causes a jump back into the inner loop because _slbl
hasn't been restored to its previous value. You shouldn't need an additional
macro like for_inner() since that would not work for more than two levels of
nesting.
If you want to apply the fix now just change the last line of the macro to this:
_elbl:' `popdef(`_slbl')'`popdef(`_clbl')'`popdef(`_elbl')')
You'll either have to reinstall Opbasm with the modified picoblaze.m4 or
manually run it with "python path/to/opbasm.py <your command line options>".
Original comment by kevin.thibedeau
on 24 Apr 2015 at 2:23
Yes, I can confirm that this fix works. I managed to not reference the correct
picoblaze.m4 file the first time I tested it here, but it works now. Thanks!
Original comment by robbinss...@gmail.com
on 24 Apr 2015 at 3:39
Bug in macro has been fixed
Original comment by kevin.thibedeau
on 7 May 2015 at 5:59
Original issue reported on code.google.com by
robbinss...@gmail.com
on 24 Apr 2015 at 12:09