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

Best way to configure registers with NIOS?

Altera_Forum
Honored Contributor II
817 Views

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
Altera_Forum
Honored Contributor II
73 Views

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.
Reply