NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
Desktop-linux-sdk 01.00.00.06 Demo Guide
Desktop Linux SDK
Version 1.0.0.6 Alpha Release
Demo Guide
Last updated: 07/28/2014
Contents
Introduction[edit]
(Note: This page has the instructions for the latest Desktop linux sdk 01.00.00 (version 01.00.00.06)release. If you are using a release older than 01.00.00.06. Please check specific instructions in the archived section below :Archived Pages )
The Desktop Linux SDK provides a software development environment to help offload highly compute intensive processing from a desktop Linux PC to TI C66x multi-core DSPs. The Desktop Linux SDK is supported on a Desktop Linux PC with Ubuntu Linux 12.04 LTS, installed with the PCIe TI Multicore DSP Cards.
Specifically, this Demo Guide provides information on running the Desktop Linux SDK Demo.
Running the Demonstration Applications[edit]
Running the filtestdemo Application[edit]
This file test demo code provided with the Desktop Linux SDK, reads contents of a input binary test file and sends the data to DSP memory (or through DSP accessible host memory) and sends a message to DSP through mailbox(Mailbox message includes pointer to input and output data location). The DSP build does a simple loop back by sending the buffer back to host through the Mailbox to Host. The host then receives message through mailbox, reads data from output buffer and writes to the output file.
For running the file test demo, you will need a binary file, which is used as the input file. Currently the scripts assume the file is test.file at the directory location "testfiles" on the same base directory the Destop Linux SDK is installed: <install_dir>/desktop-linux-sdk_<version>/../testfiles/test.file
For example, if you are in the destkop-linux-sdk_<version> directory, create a directory and put a test file as follows.
mkdir ../testfiles cp <anyfile.file> ../testfiles/test.file
The size of the data payload per message to DSP is determined by command line paramter at run time. Note: Remember to use an appropriately sized file for this test. The size of the file is recommended to be > 2 * Number of DSP cores * PAYLOAD_SIZE( e.g When using a quad DSP card and using a payload size input during command line as 4 MB( 0x400000), the minimum file size to be used is recommended to be >256 MBytes (2 * 32 cores * 4 MB ), so that all the cores in the card are used in the test at least twice.
Here are the steps to run the Demo
1. Download init DSP image to initialize the DSPs DDR
There are 2 alternate methods to do this step.
Alternative 1: This step can be used to automatically detect the type of card in the system and download the appropriate init code to all dsps
Run the commands:
<syntaxhighlight lang="bash">
cd demos/scripts
./init_dsps.sh <cpu frequency>
</syntaxhighlight>
Alternative 2: This step assumes that the type of card in the system is known.
Run the commands:
<syntaxhighlight lang="bash">
cd demos/scripts
</syntaxhighlight>
Based on the platform and frequency of operation do any one of the following.
For Quad C6678 : DSPC 8681 @1 GHz operation <syntaxhighlight lang="bash">
./init_dspc8681_1000.sh 4
</syntaxhighlight>
For Quad C6678 : DSPC 8681 @1.25 GHz operation <syntaxhighlight lang="bash">
./init_dspc8681_1250.sh 4
</syntaxhighlight>
Note: The parameter 4 --> Is the number of DSPs used for the test. This can be set to any value less than the number of available dsps.
For EVM single C6678 : EVM6678 @1 GHz operation <syntaxhighlight lang="bash">
./init_evm6678_1000.sh
</syntaxhighlight>
For EVM single C6678 @1.25 GHz operation <syntaxhighlight lang="bash">
./init_evm6678_1250.sh
</syntaxhighlight>
For EVM single C6678 : EVM6678 @1 GHz operation <syntaxhighlight lang="bash">
./init_evm6678_1000.sh
</syntaxhighlight>
For EVM single C6678 @1.25 GHz operation <syntaxhighlight lang="bash">
./init_evm6678_1250.sh
</syntaxhighlight>
For Octal C6678 : DSPC8682 @1 GHz operation <syntaxhighlight lang="bash">
./init_dspc8682_1000.sh 8
</syntaxhighlight>
For EVM single C6678 @1.25 GHz operation <syntaxhighlight lang="bash">
./init_dspc8682_1250.sh 8
</syntaxhighlight>
2. Load the Demo DSP image to all the cores
Run the commands:
<syntaxhighlight lang="bash">
cd ../filetestdemo/scripts
</syntaxhighlight>
Use the following command structure.
<syntaxhighlight lang="bash">
./dnld_demo_loopback.sh <number_of_dsps>
</syntaxhighlight>
The number_of_dsps can be set to any value less than the available number of dsps
For Quad C6678 platform use <syntaxhighlight lang="bash">
./dnld_demo_loopback.sh 4
</syntaxhighlight>
For EVM Single C6678 platform use <syntaxhighlight lang="bash">
./dnld_demo_loopback.sh 1
</syntaxhighlight>
3. Run Desktop Demo application This step uses the test.file under desktop-linux-sdk/../testfiles/ directory created as explained above.
The demo can be run in 3 different modes
- a) Data transfer using DMA to and from DSP memory
- b) Data transfer using direct memcpy to or from DSP memory through PCIE
- c) Data transfer using direct mapping of Host buffer to DSP memory range
Run the following commands:
If not already in the directory:
<syntaxhighlight lang="bash">
cd demos/filetestdemo/scripts
</syntaxhighlight>
Run any of the following to run the test, based on the data transfer mode to be used in the test.
The command structure is
./scriptfile.sh <no of dsps> <payloadsize>
For example for EVM Single C6678 platform use
<syntaxhighlight lang="bash">
./run_dmatest.sh 1 0x400000
./run_memcpytest.sh 1 0x400000
./run_dspmaptest.sh 1 0x400000
</syntaxhighlight>
For Quad C6678 platform use
<syntaxhighlight lang="bash">
./run_dmatest.sh 4 0x400000
./run_memcpytest.sh 4 0x400000
./run_dspmaptest.sh 4 0x400000
</syntaxhighlight>
The outputfile "testout.file" is generated by the test. ( See the scripts for details). This can be compared to the input file to check proper operation.
Running the dsp2dspdemo Application[edit]
The DSP2DSP demo, demonstrates the use of APIs to transfer data from one DSP to another through the PCIe Interface. The application sends a message to the source dsp and the source DSP will transfer the data indicated in the message to the destination DSP, sends a message to the destination DSP. The destination DSP in turn transfers data to source DSP, sends a message back to the source DSP. The data uses a incremental pattern stored by the source DSP and the incremental pattern is checked after the transfer to check on errors. 1. Follow step 1 from the filetest demo application to "Download init DSP image to initialize the DSPs DDR"
2. Initialise the Global shared memory with PCIE data from host
Run the following commands:
If not already in the directory:
<syntaxhighlight lang="bash">
cd demos/scripts
</syntaxhighlight>
<syntaxhighlight lang="bash">
./set_global_shared.sh <num_of_dsps>
</syntaxhighlight>
For example with a single Quad C6678 Card.
<syntaxhighlight lang="bash">
./set_global_shared.sh 4
</syntaxhighlight>
3. Load the DSP2DSP Demo DSP image to all the cores
Run the commands:
<syntaxhighlight lang="bash">
cd ../dsp2dspdemo/scripts
</syntaxhighlight>
Use the following command structure.
<syntaxhighlight lang="bash">
./dnld_dsp2dsptest.sh <number_of_dsps>
</syntaxhighlight>
The number_of_dsps can be set to any value less than the available number of dsps
For Quad C6678 platform use
<syntaxhighlight lang="bash">
./dnld_dsp2dsptest.sh 4
</syntaxhighlight>
4. Run Desktop Demo application
Run the following commands:
<syntaxhighlight lang="bash">
cd ../dsp2dspdemo/scripts
</syntaxhighlight>
<syntaxhighlight lang="bash">
./run_dsp2dspdemo.sh<test_mode:0|1> <src_dsp_start_dsp_number > <dst_dsp_start_dsp_number> <num_of_src_dsps> <d2d_num_dsps> <num_of_broadcast><direction><payload_size>
</syntaxhighlight>
For example to run a test from DSP0 to DSP1 (Transfer with Push from DSP0 to DSP1)
<syntaxhighlight lang="bash">
./run_dsp2dspdemo.sh 0 0 1 1 2 1 0 0x400000
</syntaxhighlight>
To run a test from DSP0, DSP1 to DSP2 , DSP3 (Transfer with Pull data from DSP2 to DSP0, & from DSP3 from DSP1)
<syntaxhighlight lang="bash">
./run_dsp2dspdemo.sh 0 0 2 2 4 1 1 0x400000
</syntaxhighlight>
To run a test broadcast from DSP0 to DSP1,DSP2 ,DSP3 (Transfer with Push data from DSP0 to DSP1, DSP2, DSP3)
<syntaxhighlight lang="bash">
./run_dsp2dspdemo.sh 1 0 1 1 4 3 0 0x400000
</syntaxhighlight>
Check errors to be zero to confirm proper operation.
Troubleshooting tips[edit]
Archived Pages[edit]
- Desktop Linux SDK 01.00.00.04 Getting Started Guide : Desktop Linux SDK 01.00.00.04 Getting Started Guide
- Desktop Linux SDK 01.00.00.02 Getting Started Guide : Desktop Linux SDK 01.00.00.02 Getting Started Guide
Related Links[edit]
- Desktop Linux SDK Software Page: Desktop Linux SDK Software
- Desktop Linux SDK: Release Notes: : desktop-linux-sdk_01_00_00_04_releasenotes.pdf [To be updated pending release]
- Desktop Linux SDK: Hardware Setup Guide: Desktop_Linux_SDK_Hardware_setup_guide
- Desktop Linux SDK: Development Guide: Desktop Linux SDK Development Guide
- Desktop Linux SDK : Guide to Rebuild DSP images: Desktop-linux-sdk_01.00.00_DSP_Rebuild_Guide
Technical Support and Product Updates[edit]
For technical discussions and issues, please visit
- C66x Multicore forum: http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639.aspx
- BIOS Embedded Software forum: http://e2e.ti.com/support/embedded/f/355.aspx
- Code Composer Studio forum: http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/3131.aspx
- TI C/C++ Compiler forum: http://e2e.ti.com/support/development_tools/compiler/f/343/t/34317.aspx
- Embedded Processors wiki: http://processors.wiki.ti.com
Note: When asking for help in the forum you should tag your posts in the Subject with “DESKTOP-LINUX-SDK” and the part number (e.g. “C6678”)