C2H problems

Hi!

i've tried to implement an very simple example to evaluate C2H. i've accelerated a function named testalg. c2h compiles it, in the sopc builder everything is fine, the quartus flow doesn't report any errors, nor the C2H Register build log at Nios II IDE says anything. it looks everything fine, but the result is always -1

here's the whole code

#include

int testalg(int a, int b ) { return a*a + b*b; }

int main() { int sum = 0; printf("sum before = %d\n",sum); sum = testalg(5,5); printf("sum after = %d\n",sum); printf("should be 50\n"); return 0; }

P.S. can i avoid the c2h compiler to restart the whole quartus flow, when i just change something in the software project, and not in the accelerated function?

Thanks 4 reading and it would be good, if someone can help me out

greetz Andreas

Reply to
Andreas F.
Loading thread data ...

Hi Andreas,

While I will forward this to the relevant engineer, your chances of obtaining help for Nios related problems will be better if you post at

formatting link
The niosforum board is monitored by a power users and Altera engineers who work with Nios/C2H and SOPC Builder. Please post which version of the Nios II IDE is being used.

Hope this helps, Subroto Datta Altera Corp.

Reply to
Subroto Datta

Hi Andreas,

In the C2H window you can select "Analyse all accelerators" to just get the report on the C2H acceleration, without generating all the HDL, SOPC Builder output and sof file.

With the "Use existing accelerators" you keep the current HW build and just compile the SW.

Greats, Karl.

Reply to
Karl

thanks to all!

1) i've already posted it in the niosforum, before i posted here. (cause i needed to solve the problem before xmas :-)

2) thanks, the "using existing acc.." works fine :-)

by the way i solved the problem:

i thought that the whole flow which has been started by the c2h compiler includes downloading the sof file .... and i didn't recognise the difference, because i always downloaded the standard.sof file and not the time limited sof file (i just have an evaluation license at the moment)

so this topic can be closed

merry xmas and thanks again

Andreas

Reply to
Andreas F.

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.