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++
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.
12455 Discussions

Get data continuously from sensors

Honored Contributor II

The output of my sensor is digital data (1-bit stream). Now, I want to get this 1-bit stream to NIOS system continuously. What components should I add to create the hardware in Qsys? 

I selected the following components: 

- Nios II (cpu) 

- On-chip memory 

- System ID 


- PIO (input of the 1-bit stream) 

Should I use On-chip FIFO? I have not imagined how my system is yet. Please help me figure it out.
0 Kudos
1 Reply
Honored Contributor II

I would *not* use a PIO if you need a constant sampling frequency. Pipe the data from the pin into a FIFO and then have the CPU pull the contents out of the FIFO or use a DMA to push it into memory. I would probably convert the data to be wider before the CPU/DMA access the data since moving 1-bit data around in a system is very inefficient. One way would be to put a shadow register between the pin and the FIFO that takes 'x' number of samples and shoves them all into the FIFO in one clock cycle. There are many other alternatives so I'll leave that to you to explore.