Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12612 Discussions

Best way to configure registers with NIOS?

Honored Contributor II

I'm looking to use NIOS to: 


-take an incoming string from the UART which represents a number 

-use this to number to program 10 different 16bit registers that will feed custom counter-like logic outside the NIOS. 


I have the UART setup and C code written, but what is the best way to interface my NIOS and the custom logic? 


Should I use the PIO to setup a Data Address bus to write to each of these registers?  


Or is there a way to use a bridge to link internal NIOS registers to my custom logic?
0 Kudos
1 Reply
Honored Contributor II

The simplest solution is to wrap your custom logic into an Avalon MM slave, so you can read/write the register with common IORD/IOWR calls. 

If you don't want to control the user component as a MM Slave, you can use any other interface, serial port or whatever. The PIO solution is an option, but IMHO a very inefficient one.
0 Kudos