Forum Discussion

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

How (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"?

Thanks

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored 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