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

Nios Fifo - Avalon Streaming Problem

Honored Contributor II

I have been trying to use a Nios 2 connected through a Fifo to an Avalon Streaming interface. 

This will get sent via an LVDS interface between two devices and used so that the Nios can transmit control information, set registers etc etc on the remote device. 

The Nios II is running in an Arria II Gx part and the remote device is an Arria V .... no nios in there just hardware stuff. 

All the Arria II stuff built in Qsys and all running at quite low speeds so far 

[100MHz CPU -- 27MHz on the Avalon Stream and across the LVDS...... faster later !!] 


I have been having problems all day trying to decode the transmitted information so I eventually hooked up a SigTap to look at he Avalon-ST [packet mode] signals coming out and going into the LVDS Transmitter. 


I am using very simple HAL based commands so ...... 


altera_avalon_fifo_write_other .... to set the SOP & Channel 

altera_avalon_fifo_write .... to send the first data word and set the SOP flag 


for loop .. 

altera_avalon_fifo_write ..... in a loop to send data [apart form the last word] 


altera_avalon_fifo_write_other ...... to set EOP 

altera_avalon_fifo_write ..... to send the final data word with EOP flag  


Thats pretty much it and for now I am sending only 8 data words and the address 

On the Remote end I want to use the SOP flag to latch an address register .... this will increment as I send the rest of the data. 


What I am finding ... [and I have tried lots of things !!!!] 

SOP flag is actually being set on the Second data word transmitted [not the first ??]. 


EOP is not set at all on the last word ........ but it is set on the first word of the next packet that I send some considerable time later. 


I have tried SigTAp in the Arria V too .... exactly the same so good to know that the LVDS part is all working fine !!! 


Does anyone have any idea's or suggestions what might be happening with the flags or what I might be doing wrong !!!
0 Kudos
0 Replies