FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6355 Discussions

How to operate with 2 vectors Avalon-MM?

Altera_Forum
Honored Contributor II
1,368 Views

At this moment I'm using a pair of Avalon-MM FIFO write/read to send/receive data to my DSPBuilder block 

 

The next step is to add another source of data and then operate byte to byte with the two vectors from two differents DMA controllers. 

 

What would be the best way to operate with the same index for each vector?
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
620 Views

I'm not sure I understand your question, but it could be an idea to move data through Avalon streams instead. You can split and merge several streams together if required.

0 Kudos
Altera_Forum
Honored Contributor II
620 Views

Hi Daixiwen, 

 

I have two stream of bytes, the first one is coming from external device, the other come from SDRAM. 

 

 

the DSP block must be feeded with both streams by using DMA controller, my main challenge is how can I syncronize the operations byte to byte between different streams. 

 

Thanks in advance
0 Kudos
Altera_Forum
Honored Contributor II
620 Views

I assume that the DSP block is taking an Avalon Stream as an input? In that case you could read your memory with a SGDMA and convert the data from your external device as a second stream. Maybe add two FIFOs to handle a correct synchronization, and combine the two streams together with a custom component.

0 Kudos
Altera_Forum
Honored Contributor II
620 Views

I'm using 2 'Avalon-MM FIFO read' stream inputs in DSP Builder and DMA controllers in SOPC builder and it is working. 

 

but I don't have pretty clear how to proceed to implement fifo in order to syncronize, any suggestion?
0 Kudos
Altera_Forum
Honored Contributor II
620 Views

I'm not familiar with DSP builder, but if you want to combine two streams, I think it will be a lot easier by using an Avalon ST input rather than the Avalon MM FIFO. There are some Avalon Stream FIFOs that you can implement in SOPC builder, directly between a source and a sink.

0 Kudos
Altera_Forum
Honored Contributor II
620 Views

Do you mean that I can use two Avalon ST FIFO from which I can read byte to byte?

0 Kudos
Altera_Forum
Honored Contributor II
620 Views

Yes, I was thinking about something like shown in the attachment. The dashed boxes are custom blocks. If you have two stream inputs on your DSP block then you can remove the 'combiner' block. 

The stream FIFOs can be configured for any size. If the stream output from the SGDMA or your component in bigger than a byte (4 bytes, as an example) you can insert a stream format adapter in SOPC builder between them and the FIFO to modify the stream size. The format adapters are described in this document (http://www.altera.com/literature/hb/qts/qts_qii54021.pdf).
0 Kudos
Reply