Instruction

The DSP sample package shows how to use dsp on J6 for task processing. The DSP sample package contains softamx, quantize, dequantize, centerpoint, pointpillar, slam, and democaising.

Each sample is mainly divided into two parts: the ARM side and the DSP side. The ARM side is responsible for preparing data and then initiating calls, and the DSP side is responsible for receiving tasks sent by the ARM side, completing task calculations, and sending results to the ARM.

You can experience and develop applications based on this sample to lower the development threshold.

The dsp sample is located in samples/ucp_tutorial/custom_operator/dsp_sample, and the code structure is as follows:

+--dsp_sample
├── arm_code                        # arm side code
│   ├── build.sh
│   ├── centerpoint
│   ├── CMakeLists.txt
│   ├── demosaicing
│   ├── dequantize
│   ├── main.cc
│   ├── pointpillar
│   ├── quantize
│   ├── slam
│   ├── softmax
│   └── util
├── build_aarch64.sh                # aarch64 linux board build script
├── build_qnx.sh                    # aarch64 qnx board build script
├── build_x86.sh                    # x86 simulation build script
├── dsp_code                        # dsp side code
│   ├── build_dsp.sh
│   ├── centerpoint
│   ├── CMakeLists.txt
│   ├── demosaicing
│   ├── dequantize
│   ├── main.cc
│   ├── pointpillar
│   ├── quantize
│   ├── slam
│   ├── softmax
│   └── util
├── README.md
├── script                          # aarch64 board production
│   ├── dsp_deploy.sh
│   └── run_all_tests.sh
└── script_x86                      # x86 simulation production
    └── run_all_tests.sh

Environment Construction

Development Board Preparation

After getting the development board, make sure to use the recommended system image version and that the local development machine and the development board can be remotely connected.

Compile

dsp sample compilation requires compiling the ARM side and DSP side separately.

  1. The ARM side requires that the cross-compilation tools be installed properly in the current environment. For the tool versions, please refer to the environment and tools section in the [Overview] (../../../ucp_overview) chapter. On Linux or QNX platforms, set the corresponding environment variable LINARO_GCC_ROOT or QNX_HOST to the actual installation location of the cross-compilation tool.

  2. The DSP side needs to have the Cadence cross-compilation tool installed in the current environment. For specific installation and configuration methods, refer to the introduction in the DSP Development Documentation section.

  3. After confirming that the tool has been successfully installed, execute the board-side or x86 compilation script in the directory. The compiled products are in script and script_x86 respectively. Take the compilation of J6E board-side products under Linux as an example, the execution script is as follows:

cd dsp_sample/
bash build_aarch64.sh -p J6E

Sample Usage

  1. Run on the board, copy the script directory to the board, and execute the following command:
cd script
sh dsp_deploy.sh         # Launch the DSP image
sh run_all_tests.sh help # View all samples
sh run_all_tests.sh all  # Run all samples, run all examples by default when no parameters are appended
  1. To run the x86 simulation, execute the following command:
cd script_x86
bash run_all_tests.sh help # View all samples
bash run_all_tests.sh -p J6E all  # Run all samples, run all examples by default when no parameters are appended