MCSDK Image Processing Demonstration Guide

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   


Multicore Software Development Kit

Image Processing Demonstration

User's Guide

Last updated: 4/12/2012


Contents



Overview

The Image Processing Demonstration illustrates the integration of key components in the Multicore Software Development Kit (MCSDK) on Texas Instruments (TI) multicore DSPs and System-on-Chips. The purpose of the demonstration is to provide a multicore software development framework on an evaluation module (EVM).

This document covers various aspects of the demonstration application, including a discussion on the requirements, software design, instructions to build and run the application, and troubleshooting steps. Currently, only SYS/BIOS is supported as the embedded OS.

This application shows implementation of an image processing system using a simple multicore framework. This application will run TI image processing kernels (a.k.a, imagelib) on multiple cores to do image processing (eg: edge detection, etc) on an input image.

NoteNote: The current implementation of this demonstration is not optimized. It should be viewed as the initial implementation of the BIOS MCSDK software eco-system for creating an image processing functionality. Further analysis and optimization of the demonstration are under progress.

NoteNote: There are two versions of the demo provided in the release. The IPC based version runs on multiple cores and shows explicit IPC programming framework. The other one is a serial version of the demo, which runs on the simulator. Unless explicitly specified, the IPC based version is assumed in this document.

Requirements

The following materials are required to run this demonstration:

Software Design

The following block diagram shows the framework used to implement the image processing application: Image Processing Software Framework

The following diagram shows the software pipeline for this application: Image Processing Demonstration Software Pipeline.

More about processing algorithms

The application will use imagelib APIs for its core image processing needs.

Following steps are performed for edge detection

Framework for multicore

The currant framework for multicore will be IPC Message Queue based framework. Following are the overall steps (the master and threads will be run on 1 or more cores)

Profiling of the algorithm

User interface

The user input image will be BMP image. The image will be transferred to external memory using NDK (http). Following are the stapes describing application user interface and their interaction

Inputpage.jpg
Outputpage.jpg

Run Instructions

The pre-compiled libraries are provided as a part of MCSDK release.

Please follow the procedures below to load images using CCS and run the demo.

Please refer the hardware setup guide for further the setup details.

NoteNote: If you want to run the demo in static IP address mode, make sure the host PC is in same subnet or can reach the gateway. A sample setup configuration is shown below.

In Windows environment
Set up TCP/IP configuration of ‘Wired Network Connection’ as shown in Wired Network Connection in Windows.
In Linux environment
Run following command to set the static IP address for the current login session on a typical Linux setup.
sudo ifconfig eth0 192.168.2.101 netmask 255.255.254.0

Build Instructions

Please follow the steps below to re-compile the IPC based demo image (These steps assume you have installed the MCSDK and all the dependent packages).

Software Directory Structure Overview

The IPC based Image Processing Demonstration is present at <MCSDK INSTALL DIR>\demos\image_processing\ipc

Image Processing Demo Serial Code Overview

The serial (single core) version of the image processing demo is provided in the package. Please do the following to import and run the project on the CCS simulator

Multicore System Analyzer integration and usage

The System Analyzer provides correlated realtime analysis and visiblity into application running on single or multicore. Analysis and visibility includes Execution Graph, Duration Analysis, Context Aware Profile, Load Analysis and Statistics Analysis. Basic instrumentation using Unified Instrumentation Architecture (UIA) collects data in realtime and transport via Ethernet or JTAG to host where it it decoded, correlated, analyzed and visualized.

System Analyzer is automatically added to CCS5.0 by the MCSDK istaller. CCS5.1 is shipped with the System Analyzer included.

The Image Processing Demo has been instrumented for duration/benchmark and CPU load analysis. Detailed information on running the demo with System Analyzer is provided in System Analyzer and the MCSDK Demo page.

Image Processing Demo Analysis with Prism

This section we will use Prism software to analyze the serial version of image processing demo. The steps below would assume Prism with C66x support is installed in the system and user completed the Prism Getting Started - Tutorials provided in the help menu.

Bring up the demo with Prism software

What If analysis

The Prism tool allows user to analyze What If scenarios for the code

The Prism supports more functionality then described in this section. Please see Prism documentation for more information.

Multicore booting using MAD utilities

The detailed information on the Multicore Application Deployment a.k.a MAD utility is provided in MAD user guide page.

This section will provide you the detail instructions on how the tool and boot the demo from flash/ethernet.

Linking and creating bootable application image using MAD utilities

The BIOS MCSDK installation provides MAD tool in <MCSDK INSTALL DIR>\tools\boot_loader\mad-utils. This package contains necessary tools to link the application to a single bootable image.

The image processing demo has following updates to create MAD image:

NoteNote: The compilation will split out lots of warning like Incompatible permissions for partition ..., it can be ignored for now. This is due to mis-match in partition permissions wrt. the sections placed in the partition

Pre-link bypass MAD image

Please see MAD user guide for more information on pre-link bypassed MAD image. The build script build_mad_image_prelink_bypass.bat can be used to build images with this mode.

Booting the application image using IBL

This image can be booted using IBL bootloader.

Following things to be noted on booting the image

The following sections will outline the steps to boot the image from Ethernet and NOR using IBL. Please see IBL documentation on the detail information on booting.

Booting from Ethernet (TFTP boot)

menuitem "EVM c66## IBL";
 
hotmenu setConfig_c66##_main()
{
 ibl.iblMagic = ibl_MAGIC_VALUE;
 ibl.iblEvmType = ibl_EVM_C66##L;
 
 ...
 
 ibl.bootModes[2].u.ethBoot.doBootp = FALSE;
 ibl.bootModes[2].u.ethBoot.useBootpServerIp = TRUE;
 ibl.bootModes[2].u.ethBoot.useBootpFileName = TRUE;
 ibl.bootModes[2].u.ethBoot.bootFormat = ibl_BOOT_FORMAT_BBLOB;
 
 
 SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.ipAddr, 192,168,2,100);
 SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.serverIp, 192,168,2,101);
 SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.gatewayIp, 192,168,2,1);
 SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.netmask, 255,255,255,0);
 
 ...
 
 ibl.bootModes[2].u.ethBoot.ethInfo.fileName[0] = 'a';
 ibl.bootModes[2].u.ethBoot.ethInfo.fileName[1] = 'p';
 ibl.bootModes[2].u.ethBoot.ethInfo.fileName[2] = 'p';
 ibl.bootModes[2].u.ethBoot.ethInfo.fileName[3] = '.';
 ibl.bootModes[2].u.ethBoot.ethInfo.fileName[4] = 'o';
 ibl.bootModes[2].u.ethBoot.ethInfo.fileName[5] = 'u';
 ibl.bootModes[2].u.ethBoot.ethInfo.fileName[6] = 't';
 ibl.bootModes[2].u.ethBoot.ethInfo.fileName[7] = '\0';
 ibl.bootModes[2].u.ethBoot.ethInfo.fileName[8] = '\0';
 ibl.bootModes[2].u.ethBoot.ethInfo.fileName[9] = '\0';
 ibl.bootModes[2].u.ethBoot.ethInfo.fileName[10] = '\0';
 ibl.bootModes[2].u.ethBoot.ethInfo.fileName[11] = '\0';
 ibl.bootModes[2].u.ethBoot.ethInfo.fileName[12] = '\0';
 ibl.bootModes[2].u.ethBoot.ethInfo.fileName[13] = '\0';
 ibl.bootModes[2].u.ethBoot.ethInfo.fileName[14] = '\0';
 
 ibl.bootModes[2].u.ethBoot.blob.startAddress = 0x9e000000 /*0x80000000 for BIOS MCSDK v2.0.4 or prior*/; /* Load start address */
 ibl.bootModes[2].u.ethBoot.blob.sizeBytes = 0x20000000;
 ibl.bootModes[2].u.ethBoot.blob.branchAddress = 0x9e001040 /*0x80001040 for BIOS MCSDK v2.0.4 or prior*/; /* Branch address after loading */
 
 ibl.chkSum = 0;
}

Booting from NOR

menuitem "EVM c66## IBL";
 
hotmenu setConfig_c66##_main()
{
 ibl.iblMagic = ibl_MAGIC_VALUE;
 ibl.iblEvmType = ibl_EVM_C66##L;
 
 ...
 
 ibl.bootModes[0].bootMode = ibl_BOOT_MODE_NOR;
 ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
 ibl.bootModes[0].port = 0;
 
 ibl.bootModes[0].u.norBoot.bootFormat = ibl_BOOT_FORMAT_BBLOB;
 ibl.bootModes[0].u.norBoot.bootAddress[0][0] = 0; /* Image 0 NOR offset byte address in LE mode */ 
 ibl.bootModes[0].u.norBoot.bootAddress[0][1] = 0xA00000; /* Image 1 NOR offset byte address in LE mode */
 ibl.bootModes[0].u.norBoot.bootAddress[1][0] = 0; /* Image 0 NOR offset byte address in BE mode */ 
 ibl.bootModes[0].u.norBoot.bootAddress[1][1] = 0xA00000; /* Image 1 NOR offset byte address in BE mode */
 ibl.bootModes[0].u.norBoot.interface = ibl_PMEM_IF_SPI;
 ibl.bootModes[0].u.norBoot.blob[0][0].startAddress = 0x9e000000 /*0x80000000 for BIOS MCSDK v2.0.4 or prior*/; /* Image 0 load start address in LE mode */
 ibl.bootModes[0].u.norBoot.blob[0][0].sizeBytes = 0xA00000; /* Image 0 size (10 MB) in LE mode */
 ibl.bootModes[0].u.norBoot.blob[0][0].branchAddress = 0x9e001040 /*0x80001040 for BIOS MCSDK v2.0.4 or prior*/; /* Image 0 branch address after loading in LE mode */
 
 ...
 
 ibl.chkSum = 0;
}

E2e.jpg
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article MCSDK Image Processing Demonstration Guide here.

Hyperlink blue.png Links
ARM Microcontroller MCU ARM Processor Digital Media Processor Digital Signal Processing Microcontroller MCU Multi Core Processor
Ultra Low Power DSP 8 bit Microcontroller MCU 16 bit Microcontroller MCU 32 bit Microcontroller MCU

Leave a Comment
Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox