Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12437 Discussions

PIO base address constant, defined on design

Altera_Forum
Honored Contributor II
963 Views

Hi, 

 

 

I have made some experiments on NIOS2 core with the Avalon PIO and it’s working fine. 

 

However, differently from some examples found on the Web, e.g iord(pio_0_base,0) - I had to manually paste the numerical base address of the pio_0 which was generated by Qsys. I had to do this way for the sake of Eclipse underlined this parameter warning that it was not recognized by compiler. Although I made a deep search on the content of all files of the design by Windows search tool, seeking some occurence of the partial word “PIO_0” assigned to something related to it current address “3030” ( actually, 0x0000_3030 ), could not find anything. 

 

Correct me if I’m wrong, but should I manually create my own assignments, or are there a better way ? 

I fear that after performing eventual updating on base addresses on Qsys this could change the value already defined 

 

#define PIO_0_BASE 0x00003030
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
151 Views

Do you have:#include "system.h"in your code? You certainly shouldn't have to hard code the addresses in. 

 

Cheers, 

Alex
Altera_Forum
Honored Contributor II
151 Views

You should be able to look up your PIO_0_BASE in your system.h. I assume that you have generate/re-generate BSP based on the new sopcinfo file.

Altera_Forum
Honored Contributor II
151 Views

 

--- Quote Start ---  

You should be able to look up your PIO_0_BASE in your system.h. I assume that you have generate/re-generate BSP based on the new sopcinfo file. 

--- Quote End ---  

 

 

In addition to regenerate the BSP, you probably need to select the Refresh and/or Rebuild Index commands
Altera_Forum
Honored Contributor II
151 Views

Thank you all for the advices. 

 

I was not aware of the need to re-generate the BSP, and doing that now the PIO_0 base address 0x3030 is visible at the file "system.h". 

The only action that I have to do in order to take effect the changes, it was generating a new BSP project instead of the generate option.
Reply