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++
12612 Discussions

Error generating SOPC Builder system after C2H acceleration

Altera_Forum
Honored Contributor II
2,065 Views

Hello all, 

 

I have a problem using the NIOS II C2H Compiler. 

 

I tryed to accelerate a function by right-click its name and selecting "Accelerate ...." 

Then I selected the items "Build software, generate SOPC Builder system, and run Quartus II compilation" and "Use hardware accelerator in place of software implementation. Flush data cache before each call" 

However, when I click "Build project" I get the following error: 

 

 

--- Quote Start ---  

Error: Can't create file C:/Workspace/BB_DVBC/FEC_NIOS.ptf 

Error: System generation failed. 

--- Quote End ---  

 

 

If I click "Build project" again, I get the following message .... 

 

 

--- Quote Start ---  

**** Build of configuration Debug for project BB_DVBC_sw **** 

 

make -s all includes  

Creating generated_app.mk... 

12.11.2009 12:46:22 - (SCHWERWIEGEND) generate: java.lang.IllegalStateException: java.lang.IllegalStateException: java.io.FileNotFoundException: c:\Workspace\BB_DVBC\software\BB_DVBC_sw_syslib\..\..\FEC_NIOS.ptf (Zugriff verweigert) 

make: *** [/cygdrive/c/Workspace/BB_DVBC/software/BB_DVBC_sw_syslib/Debug/system_description/../obj/generated_app.mk-t] Error 1 

Build completed in 2.75 seconds 

--- Quote End ---  

If I try to regenerate the SOPC Builder system using the SOPC Builder I get the same error as the first one ("Cant create file .... .ptf") and I have to use a backup to restore my files. 

so apparently the ptf file is corrupted after the generation in the NIOS IDE... 

 

does anyone have a solution or an idea what could be the problem ?? 

 

thanks in advance !
0 Kudos
13 Replies
Altera_Forum
Honored Contributor II
500 Views

You might be seeing the issue documented at the bottom of page 7 here: http://www.altera.com/literature/rn/rn_nios2eds.pdf

0 Kudos
Altera_Forum
Honored Contributor II
500 Views

Sorry, I can't find a documentation on this issue ... 

Neither in the document you provided (p.7 - 13) nor using google ... 

 

 

It seems that NIOS IDE (or SOPC Builder) sets the "write protection" attribute for the PTF file while generating the accelerator .. 

 

Even if I remove the attribute afterwards (the first error occurs in any case), I get the second error as well if I try it a second time ...
0 Kudos
Altera_Forum
Honored Contributor II
500 Views

might it be a problem that I have a quartus II license, but no C2H compiler license ? So that quartus is set to generate non time-limited files, but c2h only can generate time-limited .. ? 

 

BTW: I'm using Quartus II and NIOS IDE Version 9.0 SP2
0 Kudos
Altera_Forum
Honored Contributor II
500 Views

As soon as you use any IP in evaluation mode you will end up with a time limited sof file. So if you have a valid subscription to Quartus II but no C2H license you should be using the time limited sof file. 

 

Also make sure that the SOPC Builder system has been generated at least once before attempting to use C2H on it.
0 Kudos
Altera_Forum
Honored Contributor II
500 Views

Ok, my mistake ... the error occurs before the sof file would be generated ... 

 

I have a valid project in quartus and the system has also been generated in SOPC Builder. 

Everything works fine if I dont use the C2H Compiler ... 

 

So I had my working project and clicked the function I wanted to accelerate, then I got the mentioned errors as described ... I really dont get it why it corrupts the ptf file ..
0 Kudos
Altera_Forum
Honored Contributor II
500 Views

Hi, I have the same problem. can you please tell me that what you did to solve this problem? 

 

Thanks in advance
0 Kudos
Altera_Forum
Honored Contributor II
500 Views

Hello all, 

 

I have a problem using the NIOS II C2H Compiler. 

 

I tryed to accelerate a function by right-click its name and selecting "Accelerate ...." 

Then I selected the items "Build software, generate SOPC Builder system, and run Quartus II compilation" and "Use hardware accelerator in place of software implementation. Flush data cache before each call" 

However, when I click "Build project" I get the following error: 

 

Quote: 

Error: Can't create file C:/Workspace/BB_DVBC/FEC_NIOS.ptf 

Error: System generation failed. 

If I click "Build project" again, I get the following message .... 

 

Quote: 

**** Build of configuration Debug for project BB_DVBC_sw **** 

 

make -s all includes  

Creating generated_app.mk... 

12.11.2009 12:46:22 - (SCHWERWIEGEND) generate: java.lang.IllegalStateException: java.lang.IllegalStateException: java.io.FileNotFoundException: c:\Workspace\BB_DVBC\software\BB_DVBC_sw_syslib\.. \..\FEC_NIOS.ptf (Zugriff verweigert) 

make: *** [/cygdrive/c/Workspace/BB_DVBC/software/BB_DVBC_sw_syslib/Debug/system_description/../obj/generated_app.mk-t] Error 1 

Build completed in 2.75 seconds 

If I try to regenerate the SOPC Builder system using the SOPC Builder I get the same error as the first one ("Cant create file .... .ptf") and I have to use a backup to restore my files. 

so apparently the ptf file is corrupted after the generation in the NIOS IDE... 

 

does anyone have a solution or an idea what could be the problem ?? 

 

thanks in advance !
0 Kudos
Altera_Forum
Honored Contributor II
500 Views

Hello, 

 

I have this issue on Q9.1 on a Vista platform. If you look at your ptf after your first build, it is blank, that's why you can't build it the second time. 

 

=> I just found out that for me it was Vista creating an issue. I just had to disable UAC and it worked.
0 Kudos
Altera_Forum
Honored Contributor II
500 Views

I'm working on a XP system so in my case it wont be an issue created by vista. Currently I have a lot of other work to do but I still want to figure out what the actual problem is ..

0 Kudos
Altera_Forum
Honored Contributor II
500 Views

Hi 

 

I have the same problem too, using Win7 and Nios IDE 10.1 buid 153.  

 

Has anyone found a solution for this problem?
0 Kudos
Altera_Forum
Honored Contributor II
500 Views

This thread is over 2 years old but still no solution? I'm getting the exact same problem.

0 Kudos
Altera_Forum
Honored Contributor II
500 Views

Yeah, me too. is there any recipe to get c2h working?

0 Kudos
Altera_Forum
Honored Contributor II
500 Views

just got it compiling... 

i deleted *.ptf* files, started SOPC builder, added my accelerator component from project subfolder and succesfully generated full project.next build in IDE was sucessfull; 

still, this accelerator has no effect on my system: data are unchanged... 

what am i doing wrong? 

 

--edit-- 

i got it working. the problem was in wrong file system permissions. 

some c2h-generated files need them changed before sucessfull build.
0 Kudos
Reply