Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

C2H questions, need help

Altera_Forum
Honored Contributor II
1,181 Views

Hi! 

 

i've tried to implement an 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 <stdio.h> 

 

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 acceleration function? 

 

 

Thanks 4 reading  

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

 

greetz Andreas
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
449 Views

hi! 

 

i&#39;ve solved the problem. 

 

just in case someone else has the same problem in the future. 

 

 

the problem was, that i was not sure if the c2h compiler, which starts the flow, also downloads the sof file. 

and i also didn&#39;t recognise that i have to download the time limited sof file and not the standard sof file (i just have an evaluation license at the moment) 

 

so far 

 

merry xmas 

 

Andreas
0 Kudos
Reply