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

How to operate with 2 vectors Avalon-MM?

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 I
50 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.

Altera_Forum
Honored Contributor I
50 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
Altera_Forum
Honored Contributor I
50 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.

Altera_Forum
Honored Contributor I
50 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?
Altera_Forum
Honored Contributor I
50 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.

Altera_Forum
Honored Contributor I
50 Views

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

Altera_Forum
Honored Contributor I
50 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).
Reply