Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

system.h type of file without NIOSII in the FPGA

Team,

I normally move the .sopcinfo file to the NIOSII Eclipse environment and the project build generates a system.h as an include file defining the FPGA resources.

The question is which file in the QUARTUS II environment has similar information and format ... or if it is only similar information, I can run a script to parse the file and generate a .h file to deliver to customers writing C code that runs on the host ( RC ) but wants to know moer about the FPGA design that is behind the BAR's .

Thanks, Bob.

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I wouldn't classify this as "in the QUARTUS II environment", but you probably want to use the command line executable "sopc-create-header-files".

    Give it the "--help" flag to see how to run it. You might need to run it from a NIOS Command Prompt (cygwin shell).
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Ted,

    What a great answer ... I tried this and got 5 .h header files that I am reviewing ... looks very similar to the system.h file from NIOSII Eclipse environment. I still think I need to expose some internals to the programming environment.

    1) the TXS port has a size based on the Number of CRA translaltion entries x the Size of each CRA translation page. I couldn't exactly see that but it may be hidden some where.

    2) I need to apply an offset , CB_P2A_AVALON_ADDR_B0, to make the BAR registers, when read , after writing 0xFFFFFFFF , to determine the size, to return the actual size of the target slave and not the whole Avalon MM fabric space that the salve starts with down to zero. I have seen a write up on the offset and see it as a parameter in the RTL but can't get back to teh actual description ... not can I see it in the Hard PCIe component I am using for Cyclone V.

    I need to resolve both of these for a customer.

    Thanks, Bob.