Results 1 to 5 of 5

Thread: plz help me with this problem(build C2H project)....

  1. #1
    Join Date
    Feb 2012
    Location
    China
    Posts
    4
    Rep Power
    1

    Default plz help me with this problem(build C2H project)....

    Hi all,
    I'm new here.
    recently,i was trying to test the C2H Compiler. But after i build the target project, i met an error as follows:


    <---------------------------------------------------------------->
    Compiling hello_world.c...
    ../hello_world.c:20:3: warning: no newline at end of file
    <---------------------------------------------------------------->
    The Nios II C2H Compiler is generating accelerator_hello_world_0_sum_elements.v...
    /cygdrive/f/Quartus_11.0/nios2eds/components/altera_avalon_c_hardware_accelerator/c2h-generate/.......................
    Progress: Loading system from fileD:/altera-FPGA/nios2_board_example/nios_ch_test/nios2.sopc...
    Progress: (reading unnamed)
    Progress: (reading nios2)
    Progress: (adding clk [clock_source 11.0])
    Progress: (parameterizing module clk)
    Progress: (adding cpu_0 [altera_nios2 11.0])
    Progress: (parameterizing module cpu_0)
    Progress: (adding sdram_0 [altera_avalon_new_sdram_controller 11.0])
    Progress: (parameterizing module sdram_0)
    Progress: (adding epcs_flash_controller_0 [altera_avalon_epcs_flash_controller 11.0])
    Progress: (parameterizing module epcs_flash_controller_0)
    Progress: (adding jtag_uart_0 [altera_avalon_jtag_uart 11.0])
    Progress: (parameterizing module jtag_uart_0)
    .........................
    Info: Reading index F:/Quartus_11.0/quartus/sopc_builder/bin/root_components.ipx
    Info: F:/Quartus_11.0/quartus/sopc_builder/bin/root_components.ipx: Loading now from components.ipx
    Info: Reading index F:/Quartus_11.0/quartus/sopc_builder/bin/ip_component_categories.ipx
    Info: F:/Quartus_11.0/quartus/sopc_builder/bin/ip_component_categories.ipx described 0 plugins, 0 paths, in 0.00 seconds
    Info: F:/Quartus_11.0/quartus/sopc_builder/bin/ip_component_categories.ipx matched 1 files in 0.00 seconds
    Info: Reading index F:/Quartus_11.0/ip/altera/altera_components.ipx
    Info: F:/Quartus_11.0/ip/altera/altera_components.ipx described 441 plugins, 0 paths, in 0.25 seconds
    Progress: Loading component/sls_avalon_usb20hr_hw.tcl
    Info: no sopc package requested, assuming package require -exact sopc 9.0
    Info: F:/Quartus_11.0/ip/**/* matched 358 files in 0.36 seconds
    .............
    <------------------------------------------------------->
    Error: Can't create file D:/altera-FPGA/nios2_board_example/nios_ch_test/nios2.ptf
    Error: System generation failed.
    make: *** [c2h_hdl-t] Error 254

    Build completed in 57.671 seconds
    <------------------------------------------------------------->

    I don't know how to solve this problem, can u help me?

    BTW: some info maybe u need
    <------------------------------------------------------->
    1. PC OS: XP
    2. Quartus II 11.0 + Nios II IDE 11.0
    3. Build software and generate SOPC Builder System
    4. Use hardware accelerator in place of software implementation. Flush data cahe....
    <-------------------------------------------------------->
    Code:
    #include <stdio.h>
    
    int sum_elements(int *list, int len) 
    {
      /*the function which i want to convert from ANSI C to HDL*/
      int i;
      int sum = 0;
      
      for(i = 0; i < len; i++)
        sum += *list++;
        
      return sum;
    }
    
    int main() 
    {
      int ia[] = {1, 2, 3, 4, 5};
      int sum = sum_elements(ia, 5);
      
      printf("%d", sum);
    }
    <----------------------------------------------------------->

    many many thx~~~~~

  2. #2
    Join Date
    Feb 2012
    Location
    China
    Posts
    4
    Rep Power
    1

    Default Re: plz help me with this problem(build C2H project)....

    can anybody help me?

  3. #3
    Join Date
    Aug 2004
    Location
    Texas Y'all
    Posts
    2,199
    Rep Power
    1

    Default Re: plz help me with this problem(build C2H project)....

    I'm suspecting a file/directory permission problem. The error is saying that it cannot write the system .ptf file to your file system (i.e. it dropped the accelerator into your design but can't save your system before generating it).

    It might also be the hyphon (-) in your directory path causing problems. Try turning that into an underscore (_) instead and see if that fixes the problem.

  4. #4
    Join Date
    Feb 2012
    Location
    China
    Posts
    4
    Rep Power
    1

    Default Re: plz help me with this problem(build C2H project)....

    Quote Originally Posted by BadOmen View Post
    I'm suspecting a file/directory permission problem. The error is saying that it cannot write the system .ptf file to your file system (i.e. it dropped the accelerator into your design but can't save your system before generating it).

    It might also be the hyphon (-) in your directory path causing problems. Try turning that into an underscore (_) instead and see if that fixes the problem.
    <-------------------------------------------------------------------->
    thanks for your reply, i have changed my file/directory and there is no hyphon(-)in my directory path..but still failed. It was strange that i met a new error as follows:

    Progress: Loading system from fileD:/c2h/nios.sopc...
    Exception in thread "main" java.lang.NullPointerException
    at com.altera.sopceditor.util.EditorUtils.setQuartusP rojectInfo(EditorUtils.java:2089)
    at com.altera.c2h.C2HGenerate.createEnsemble(C2HGener ate.java:138)
    at com.altera.sopceditor.app.EnsembleApp.start(Ensemb leApp.java:171)
    at com.altera.c2h.C2HGenerate.main(C2HGenerate.java:7 9)
    make: *** [c2h_hdl-t] Error 1
    Build completed in 22.344 seconds
    <----------------------------------------------------------------------->
    Meanwhile, i noticed that there is a similar error in
    "Nios II Embedded Design Suite Release Notes and Errata" like this:
    Exception in thread "main" java.lang.OutOfMemoryError: Java
    heap space
    make: *** [c2h_hdl-t] Error 1
    i faint...it really drives me crazy.....what should i do?

  5. #5
    Join Date
    Aug 2004
    Location
    Texas Y'all
    Posts
    2,199
    Rep Power
    1

    Default Re: plz help me with this problem(build C2H project)....

    Try accelerating a really simple function, sometimes the error codes out of C2H are not very helpful. The simpliest function you can accelerate would be something like:

    int foo()
    {
    return 1;
    }

Similar Threads

  1. Problem with Nios II EDS 9.1 when build a software project
    By xiaoniu in forum General Software Forum
    Replies: 1
    Last Post: February 22nd, 2011, 01:12 AM
  2. Problem with build project in NIOS2
    By jfm9513 in forum General Software Forum
    Replies: 1
    Last Post: January 24th, 2011, 12:56 AM
  3. can't build project - strange memory problem
    By goaran in forum General Discussion Forum
    Replies: 2
    Last Post: May 12th, 2010, 05:31 AM
  4. a problem when i build my project
    By icesword in forum General Discussion Forum
    Replies: 5
    Last Post: October 6th, 2005, 05:56 AM
  5. a problem when i build my project
    By icesword in forum General Software Forum
    Replies: 1
    Last Post: October 3rd, 2005, 01:45 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •