Forum Discussion
Altera_Forum
Honored Contributor
14 years agohmmm.... the multiply SHOULD be done (in C) as if the two variables are 'int'.
So using an extra variable shouldn't matter. Something very strange must be going on with the generated code. I'd also verify what happens if you pass a length of zero - it is possible that causes a single flash sector be erased! I am presuming that the 'noofblockstoeras e*erasesize' is a typo! (no space). I also don't quite understand your comment about 'explicitly declaring variables'.