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++
12599 Discussions

Control signals between Nios and peripherals

Altera_Forum
Honored Contributor II
944 Views

Hi, 

 

I'm new to Nios and is learning to set up connection between Nios and other peripherals. 

Suppose a component is connected with Nios through avalon mm interface, the component works as a slave and performs certain task. I'm wondering how to let Nios know that the task is accomplished? My guess is that a single bit register on the component is toggled when the task is done, while Nios keeps reading from this register to check the status. Is this the correct / common way to do the job? If not, how to do that? Thanks
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
247 Views

Yes it is a common way to do it. You have a status bit, either a "busy" or "running" bit that is 1 as long as the component is performing the tast, or a "done" bit that is 0 when processing and 1 when the task is finished. The CPU regularly reads that bit and waits until it changes to the regular value. This is called "polling". 

If the task is long and you would like the CPU to do something else in the mean time and be warned as soon as the task is finished, you can also use an interrupt.
0 Kudos
Reply