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

Control signals between Nios and peripherals

Altera_Forum
Honored Contributor II
771 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
74 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.
Reply