Forum Discussion
Altera_Forum
Honored Contributor
16 years agoC2H doesnt seem to function
Hi all, I have been battling now for several weeks on a getting a simple Algorithm to work using C2H. The function is below:
void HWIntFunc(unsignedint* InData, unsignedint* OutData)
...
Altera_Forum
Honored Contributor
16 years agoFor 'divide by constant' you should be able to use a 'multiply by reciprocal' algorithm (C2H probably ought to be able to generate one of these iteself - but may not).
The 'magic' number isn't hard to determine, but gcc for nios2 probably uses the multiply by reciprocal and yoy could steal the values from some generated code.