Forum Discussion
Altera_Forum
Honored Contributor
11 years agoHow (and where) can I set the base address name of my slave component?!
Maybe it is a beginner question but I can not find any place where I can set the base address name for my slave component which uses a SPI interface.
The SPI command in the main.c of the NIOS system is: "alt_avalon_spi_command (spi_0_base, 0, 2, wdata, 1, rdata, 0);" for example. Where can I set the address name "spi_0_base"? Thanks2 Replies
- Altera_Forum
Honored Contributor
In Qsys, in the main 'System Contents' tab, right-click on your 'spi_0' peripheral and select 'Rename'. This allows you to change the 'SPI_0' part of the name.
The '_BASE' is appended to the name you give. So, you can't change it. However, if you don't like it I'd suggest you can always define a name you prefer that always equals the 'YOUR_NAME_BASE' value Qsys generates. All the define's Qsys creates for your project can be found in the 'system.h' file, created each time you 'Generate HDL' from Qsys. Cheers, Alex - Altera_Forum
Honored Contributor
Thanks for the answer a_x_h_75 - I got it.!!