Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
755 Views

Get data continuously from sensors

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 

- JTAG_UART 

- 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
Altera_Forum
Honored Contributor I
38 Views

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.

Reply