add sale davinci

20
TI DaVinci : Embedded Software Development and Image Processing

Upload: akash-sahoo

Post on 24-May-2015

78 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Add sale davinci

TI DaVinci : Embedded Software Development and Image Processing

Page 2: Add sale davinci

Introducing DaVinci

Page 3: Add sale davinci

Unboxed

Page 4: Add sale davinci

Contents

• Introduction to OMAP and DaVinci – Heterogeneous Multicore GPP + DSP

• Linux OS and Kernel DSP/BIOS• Standards• Frameworks• Practical

Page 5: Add sale davinci

A GPP or General Purpose Processor is capable of doing and handling I/O running os but is lot slower on video and imaging task where GPU wins because of MAC units but GPU fails in general computing tasks. So a mixture of both is norm of todays computing world

A problem comes up when powering such a hybrid Davinci SOC (System on Chip) which includes both a GPP(General Purpose Processor) and a DSP (Digital Signal Processor). The OS that must run this must schedule tasks properly and have proper IPC (inter processor communication). For the DSP, the task scheduler is a light weight scheduler called the DSP/BIOS. For GPP we consider the world of Linux.

Heterogenous Multicore – Power of GPP + GPU

Page 6: Add sale davinci

CPU: ARM926EJ 270Mhz & TMS320C64x+™DSP Core at 600 MHzMemory APU : 16K I-Cache, 8K D-Cache, 32K TCM RAM, 8K Boot ROMMemory GPU : 32K L1 I-Cache, 32K L1 D-Cache, 128K L2 Cache, 64K Boot ROMJPEG Video Coprocessors – Video and Imaging Coprocessor

ARCHITECTURE

Page 7: Add sale davinci

Video Processing Sub System (VPSS) is comprised of two blocks: Front End (VPFE) & Back End (VPBE).

VPFE Consists of CCD Controller (CCDC), Statistics Engine (H3A), Previewer, Resizer whereas VPBE consists of On-screen Display (OSD) and Video Encoding (VENC).

When previewing the image the image goes from camera to VPFE, then to DDR, SCR(Switched Central Resource) and then back to output. In case of image processing the image from DDR ram goes to EDMA then to cache and then to processor where it is processing and then it goes back to the VPFE for display.

VPSS : VPFE & VPBE

Page 8: Add sale davinci

Software Layer

Page 9: Add sale davinci

APIs

It has xDAIS (eXpress DSP Algo Interoperability Std): An eXpressDSP-compliant algorithm is a module that implements the abstract interface IALG. The IALG API takes the memory management function away from the algorithm and places it in the hosting framework. Thus, an interaction occurs between the algorithm and the framework. This interaction allows the client application to allocate memory for the algorithm and share memory between algorithms. It also allows the memory to be moved around while an algorithm is operating

xDM (eXpress DSP Digital Media): Set of APIs for multimedia compressing algo, Resource allocation, initialization and start APIs. Runtime process & control APIs. Stop algorithm and resource de-allocation APIs.

Page 10: Add sale davinci

Embedded Linux Device

Page 11: Add sale davinci

• 4 Elements - Tool chain; boot loader; kernel; user space• Tool Chain: • In software, a toolchain is the set of programming tools that

are used to create a product (typically another computer program or system of programs).

● A tool chain consists of at least binutils: GNU assembler, linker, etc.

• gcc: GNU C compiler● C library (libc): the interface to the operating

system● gdb: debugger

• Types: Native (runs for the target, target really fast) and Cross Compiler tool chain (can run anywhere on PC)

• Compiler mostly gcc , different for vendor like arm-gcc or arm-angstom-linux-gcc etc .

• select toolchain if it supports your needs ARM A8 or ARMv4 or higher, FP support, community support eg- Codesourcery g++, angstom, buildroot, Montavista & most imp it must have lib support which in form of .so or src

• Goodies like IDE, Memory analyse tool, debugger etc

Elements of a Linux System : Toolchain

Page 12: Add sale davinci

• Bootloader is a piece of code that runs before any operating system is running.• Bootloader are used to boot other operating systems, usually each operating

system has a set of bootloaders specific for it.• It initializes the hardware, Sets up SDRAM controller Map memory, Set processor mode and features• Load a kernel• Load images via Ethernet, serial, SD card• Erase and program flash memory

• Nowadays a pre-bootloader is boots the system from flash and transfers control to secondary bootlloader in NAND as this is edited much more often.

• Most popular is the U-Boot. PC used bootmbr, linux uses grub/lilo• Uboot has lot of options which can be set like booting from SD, NFS, NAND. It

erases NAND, set ipaddress for NFS, can give address to load kernel

Elements of Linux System : Bootloader

Page 13: Add sale davinci

• Why MontaVista? http://www.mvista.com/ • Steps: • Make SW7 both up to boot from nand (left up right

down to boot from SD Card)• Connect LAN, Audio, Composite Video, Power, UART

and set it up• From minicom using settings bps : 115200, dbits – 8

connect to serial port• You would see EVM# promt and davinci interface on

screen

Starting the Device

Page 14: Add sale davinci

• Install all the softwares given with the OEMCD 1: MontaVista Linux Pro System ToolsCD 2: MontaVista Linux Pro Target File SystemCD 3: TI DVSDK Software

• INSTALLING THE TARGET LINUX SOFTWARE: • SETTING UP THE NFS SERVER FILE SYSTEM: • BUILDING THE LINUX RTOS• REBUILDING THE DVEVM SOFTWARE FOR THE TARGET:• BOOTING THE NEW LINUX KERNEL: set env var

Setting of Project

Page 15: Add sale davinci

• We have to install these softwares on host Linux pc in this order• ❏ mvl_4_0_1_demo_sys_setuplinux.bin• ❏ mvl_4_0_1_demo_target_setuplinux.bin• ❏ mvl_4_0_1_demo_lsp_setuplinux_#_#_#_#.bin• ❏ dvsdk_setuplinux_#_#_#_#.bin • ❏ xdc_setuplinux_#_#_#_#.bin

Installing all the Softwares

Page 16: Add sale davinci

• Create a shared folder ~workdir/filesys • Copy this folder into it

/opt/mv_pro_4.0.1/montavista/pro/devkit/arm/v5t_le/target/

• In /etc/exports file add the filesys folder/home/<useracct>/workdir/filesys *(rw,no_root_squash,no_all_squash,sync)

• Restart nfs service and add the folder to sys path

SETTING UP THE NFS SERVER FILE SYSTEM

Page 17: Add sale davinci

• You need mvl toolchain present in lsp/ti-davinci• Go to ti-davinci/linux-2.6.10_mvl401• make ARCH=arm CROSS_COMPILE=arm_v5t_le- davinci_dm355_evm_defconfig• To modify any args use make menuconfig and then again

build it

• BUILDING THE LINUX RTOS

Page 18: Add sale davinci

• Now write your own program• Cross compile arm_v5t_le-gcc *.c –o <obj name>• ./<obj name>

Make your own program

Page 19: Add sale davinci

• A simple img zooming app• Steps:• arm_v5t_le-gcc img2zoom.c -o ../binaries/img2zoom• ./img2zoom <args>

Practical – Simple Image Processing

Page 20: Add sale davinci

Thanks