|
Example: DDR SDRAM |
Top Previous Next |
|
This example shows how a Diamond task can use the DDR2 SDRAM connected to the FPGA of the SignalMaster board.
The example has three tasks. Task task_0 runs on the DSP; it writes data to the SDRAM, reads it back, and checks that no data corruption has occurred. The other two tasks run on the FPGA. Task ddrsdram_2ports provides access to the DDR2 SDRAM controller which is automatically implemented by Diamond when it detects that a task attempts to use the DDR2 SDRAM.
Task chan_router is used by the DSP task to send control information to other tasks in the firmware. It routes the data it receives on its input port to one of its output ports. This is an alternative to using custom registers.
Running the Example Users of the SignalMaster Quad should select the type of board they have as shown here.
There are two versions of the example:
You can build the application by typing Ctrl+B and then execute it by clicking run. Note that building this application takes a few minutes as it involves launching the Xilinx tools.
task_0 Task task_0 runs on the DSP. It writes a counter to an array in the DDR SDRAM, then reads the array and checks that it contains correct values.
This task has one input port and two output ports.
ddrsdram_2ports Task ddrsdram_2ports connects to the DDR SDRAM controller to give access to the memory connected to the FPGA.
This task has five input ports and one output port.
chan_router Task chan_router routes messages sent on its input port to one of its output ports. The messages sent on its output port follow a simple protocol specifying the destination output port and the size of the message. The function WriteToChannel() is provided to construct a message.
This task has one input port and four output ports.
Prerequisites You need the following components to be able to run this example:
|