Example: Fastbus

Top  Previous  Next

This example shows how to use the FastBus link to exchange data between DSPs attached to the same FPGA.

 

The example uses two tasks: master and slave connected by two channels going in opposite directions. The tasks are placed on DSP1 and DSP3. Channel connections are configured to be physical to maximize performance by preventing Diamond from using virtual channels on the link.

 

There is no need to create any wire in this case; since both DSPs are attached to the same FPGA, Diamond can automatically create the FastBus connection to support our channels.

Note that Diamond has a built-in default firmware already providing connections between DSPs. When it builds the application it uses this firmware instead of recreating a new bitstream, thus speeding-up compilation.

 

 

The example runs three tests with varying buffer sizes.

 


Test 1

Sends a buffer of data from DSP1 to DSP2 and then back from DSP2 to DSP1. Data is checked on DSP1.


Test 2

Starts two threads of each DSP: one thread writes a buffer to the link while the other reads a buffer from the link. Data are checked on both DSPs.


Test 3

Measures the speed of the link when data are sent from DSP1 to DSP2 and from DSP2 to DSP1.

 

Running the Example

You can build the application by typing Ctrl+B and then execute it by clicking run.

 

Prerequisites

You  need the following components to be able to run this example:

 


Hardware

Quantity


SignalMaster Dual or Quad

1


3L Diamond DSP licence

2


3L Diamond FPGA licence

0