Post on 26-Mar-2015
transcript
04/10/23 TI Information - Selective Disclosure 1
Complementing ARM with easy DSP development for TI's community platforms
Daniel Allred
Senior Applications Engineer
04/10/23 TI Information - Selective Disclosure 2
Find the right ARM® Solution for you
32-bit ARMCortex™-M3
MCUs
DSPARM+DSP
ARM Cortex-A8 &
ARM9™ MPUs
Stellaris®
ARM Cortex-M3
Sitara™
ARM Cortex-A8& ARM9
C6000™
DaVinci™
Digital Media processors
Integra™
Up to 80 MHz
Flash8 KB to 256 KB
USB, ENET MAC+PHY CAN, ADC, PWM, SPI
Connectivity,Security,Motion Control, HMI,Industrial Automation
$1.00 to $8.00
32-bit ARM MCU for
Safety-Critical Applications
TMS570ARM
Cortex-R4™
Up to 250 DMIPS/ 160 MHz
2 MB Flash, 160 KB RAM
FPU, ECC, Timer/PWM Co-Proc, 12bit ADCs, CAN,
EMIF, LIN, SPI, Flexray
Transportation, Motor Control, Certified for use in safety critical (SIL3) systems
$7.00 to $18.00
375MHz to >1GHz
Cache, RAM, ROM
USB, CAN, SATA,SPI, PCIe, EMAC
Industrial automation, POS & portable
data terminals
$5.00 to $25.00
300MHz to >1Ghz +Accelerator
Cache RAM, ROM
USB, ENET, PCIe, SATA, SPI
Floating/Fixed PointVideo, Audio, Voice,
Security, Conferencing $5.00 to $200.00
Comprehensive developer ecosystemS
oftw
are
supp
ort
Developm
ent tools
Responsive design support
Peripheral I/O DVI-D video out SD/MMC S-Video out USB 2.0 HS OTG I2C, I2S, SPI,
MMC/SD JTAG Stereo in/out Alternate power RS-232 serial
Fast, low power, flexible expansion Rev C
3.1”
OMAP3530 Processor 720MHz Cortex-A8
NEON+VFPv3 16KB/16KB L1$ 256KB L2$
430MHz C64x+ DSP 32K/32K L1$ 48K L1D 32K L2
PowerVR SGX GPU 64K on-chip RAMPOP Memory 256MB LPDDR RAM 256MB NAND flash
USB Powered 2W maximum consumption
OMAP is small % of that Many adapter options
Car, wall, battery, solar, …
$149
Laptop-like performanceDesktop-style USB
peripherals and embedded style
expansion
DM3730 processor(AM37x-compatibile)
1GHz superscaler ARM® Cortex ™-A8
More than 2,000 Dhrystone MIPS
Up to 20 Million polygons per sec graphics
512KB L2$ 512MB LPDDR
RAM HD video capable
C64x+™ DSP core
3.35”**
DM3730
LCD Expansion I2C, I2S, SPI,
MMC/SD Expansion
DVI-D Camera Header S-Video JTAG 4-port USB 2.0
Hub Stereo Out Stereo In 10/100 Ethernet USB 2.0 HS OTG Alternate Power RS-232 Serial microSD Slot
BeagleBoard-xM details
Agenda
• Motivation for ARM+DSP heterogeneous processors
• Importance of Software Development
• C6000 DSP Ease of Use Initiatives– C6Accel
– C6Run
• Conclusion
• Demo
• Q&A
04/10/23 TI Information - Selective Disclosure 5
Why ARM+DSP?
• Lets start with an example system
04/10/23 TI Information - Selective Disclosure 6
Networked Audio System (before)
04/10/23 TI Information - Selective Disclosure 7
C674x
Audio DSP
ARM9USB HostController
HDMI SPDIF ADC
SDRAM
SDRAM
FLASH
FLASH
EthernetMAC
InternetRadio
InternetRadio
LCDController
SD/MMCController
I2S/I2C
Problem - Adding connectivity to an audio system adds:• Cost• Components/Size• Development complexity
DACDACDAC
Audio SystemConnectivity System
Networked Audio System (after)
04/10/23 TI Information - Selective Disclosure 8
HDMI SPDIF ADC
SDRAM FLASH
InternetRadio
InternetRadio
DACDACDACUSB HostController
3 Mbit RAM
8 MbitROM
EthernetMAC
LCDController
SD/MMCController
Software LinkARM9450MHz
C674x DSP450MHz
OMAP-L137Audio System on a Chip
SerialPorts
I2C/SPI/UART
EQEP/ECAP
Buttons/Knobs
PWM
What can an ARM developer do with the DSP?
• Run math intensive algorithms
• Leverage some DSP features, like floating-point computations
• Free up ARM MIPS for additional system features
• Save money by not moving to a more powerful & expensive ARM!
• Get true real-time response via DSP without sacrificing features of a high-level OS like Linux
04/10/23 TI Information - Selective Disclosure 10
Agenda
• Motivation for ARM+DSP heterogeneous processors
• Importance of Software Development
• C6000 DSP Ease of Use Initiatives– C6Accel
– C6Run
• Conclusion
• Demo
• Q&A
04/10/23 TI Information - Selective Disclosure 11
Importance of software in embedded development
0
2
4
6
8
10
12
14
2009 2010
HW Engrs
SW Engrs
Most important embedded processor
selection criteria
Most important embedded processor
selection criteria
Average embedded team size
Average embedded team size
1414
99
4455
Companies are dedicating more resources to softwareCompanies are dedicating
more resources to software
Purchase decisions are driven by software
Purchase decisions are driven by software
Source: US EE Times/ESD annual embedded developer survey (Jan/Feb ‘10)Source: US EE Times/ESD annual embedded developer survey (Jan/Feb ‘10)
Changing face of TI DSP developers
• ARM+DSP devices provide an opportunity for TI and our customers
• Example: Beagleboard– Greater than 10000 sold, each one containing a C64x+ DSP– How do we connect with those developers?
Agenda
• Motivation for ARM+DSP heterogeneous processors
• Importance of Software Development
• C6000 DSP Ease of Use Initiatives– C6Accel
– C6Run
• Conclusion
• Demo
• Q&A
04/10/23 TI Information - Selective Disclosure 14
Embedded Developers Customer Needs
System developer More ready-to-use DSP functionality with audio, video and voice codecs
ARM® developer Leverage the DSP without specialized knowledge
Advanced User/Developer Optimized libraries, real-time OS and development tools
Tool
C6Accel\
C6Run
Libraries, DSP RTOS, IPC
Universe of embedded developers – leveraging the DSP
Experience with C6Accel!
ARM® processor DSP
Audio, Video Codecs
C6AccelDSPLIB IMGLIB
MATHLIB
Co
dec E
ng
ine
hC6accel = C6accel_create( engName, NULL, algName, NULL);………………..Status = C6accel_DSPfunction(hC6accel, parameters);……………………C6accel_delete(hC6accel);
• Above converts C code creates a C6Accel handle with the codec server
• Passes function ID for DSP kernel, manages cache and contiguous memory required to pass input parameters, makes iUniversal process call to the codec engine and returns error status.
• Closes the C6Accel instance
C6Run overview
• Open Source Project, hosted on gforge.ti.com
• Intends to provide an abstracted mechanism for getting code running on the DSP
• Project Goals– Introduce DSP Development to ARM/Linux developer– Simplify simple application/function offloading to the DSP– Start getting Linux and open-source community using the DSP
• C6RunLib: Partition an application between the ARM and DSP
• C6RunApp: Run an entire application on the DSP
04/10/23 TI Information - Selective Disclosure 17
C6RunLib
• Goal is to automate building an ARM-side library from user’s C code of critical functions
• User can call into that library in their app, and calls will be executed on the DSP
• Consists of automating creation of RPC framework, hiding DSPLink and other TI specific bits as possible
ARM DSP
ARM Application
C6RunLib Framework
Stub LibraryCriticalFxns
Extract Critical Fxns as a library using C6RunLib
04/10/23 TI Information - Selective Disclosure 18
module1.c
module2.c
main.c
critical.c GCC Toolchain
ARM Executable
GCC Toolchain
module1.c
module2.c
main.c
critical.c
c6runlib tools
critcal.lib
ARM-only Development
ARM+DSP Development with c6runlib
ARM Executable
Embedded DSP
Executable
Example C6RunLib usage
$ c6runlib-ar rcs dummy_dsp.lib dummy.o
$ c6runlib-cc -c -O2 –o dummy.o dummy.c
• Add object file to library dummy_dsp.lib
• Underneath, the dummy.o object file is linked to a DSP executable and compiled into the framework
• Framework object file and stubs object file is archived into the lib
• ARM-side stubs resolve symbols for ARM application when built against the library
• Above converts C code containing critical functions to C6000 object file
• Also analyzes global C functions and generates ARM-side remote procedure call stubs
04/10/23 TI Information - Selective Disclosure 20
C6RunApp
• Consists of two parts– Backend library builds– Front end user interface
• Backend libraries collate DSPLink, CMEM, DSP/BIOS, and custom code
• Front end interface is a command-line cross compiler script (acts like GCC)
• Entire application retargets to DSP, but with C I/O access to ARM/Linux
• Ready now (support for OMAPL1, OMAP3, including hawkboard, beagleboard)
ARM DSP
Recompile using C6RunApp
C6RunApp Framework
DSP Loader and CIO Server
C Application
04/10/23 TI Information - Selective Disclosure 21
module1.c
module2.c
main.c
GCC Toolchain
ARM Executable
ARM-only Development
module1.c
module2.c
main.c
c6runapp tool
ARM Executable
DSP Development using c6runapp
Embedded DSP
Executable
04/10/23 TI Information - Selective Disclosure 22
Example C6RunApp usage
$ c6runapp-cc -o hello_world hello_world.c
• Compiles hello_world.c to C6000 object file, which is then linked into a DSP executable
• Executable is compiled into the ARM side framework, which is used to build an ARM-side executable called hello_world
• Notes on the c6runapp-cc cross-compiler tool:
• Front end script wraps the TI C6000 Codegen tools (specifically cl6x)
• Supports many GCC options and translates them to appropriate cl6x options
• Many GCC optimization/warning options are silently ignored
• Unknown options passed directly to cl6x command-line04/10/23 TI Information - Selective Disclosure 23
Complex FFT performance
SoC: ARM9 + Floating-Point DSP
CPU Frequency: 300MHz
Code & Data Location: External DDR2 Memory
Instruction and Data Cache: Enabled
Single-precision floating-point data buffers.
FFT Size
To
tal
Ex
ec
uti
on
Tim
e
(s)
Fo
r 1
00
FF
T
Ite
rati
on
s
FFT runs ~10x faster on DSP than on ARM.
Small FFT size, overhead dominates, running on DSP does not provide advantage.
Larger FFT size, overhead absorbed, running on DSP provides advantage.
04/10/23 TI Information - Selective Disclosure 24
Agenda
• Motivation for ARM+DSP heterogeneous processors
• Importance of Software Development
• C6000 DSP Ease of Use Initiatives– C6Accel
– C6Run
• Conclusion
• Demo
• Q&A
04/10/23 TI Information - Selective Disclosure 25
Status and availability
• Documentation available on TI’s Embedded Processor Wiki– http://processors.wiki.ti.com/index.php/C6Run
– http://processors.wiki.ti.com/index.php/C6Accel
• Latest package is available at TI’s website– http://focus.ti.com/docs/toolsw/folders/print/c6run-dsparmtool.html
– http://focus.ti.com/docs/toolsw/folders/print/c6accel-dsplibs.html
04/10/23 TI Information - Selective Disclosure 26
Conclusion
• TI believes ARM+DSP devices can offer our customers an advantage in system integration and design
• TI is committed to helping our customers leverage the power of the DSP by offering easy to use software development solutions
• C6Accel and C6Run are quick ways for the ARM developer to gain access the capabilities of the DSP using the ARM/Linux operating system
04/10/23 TI Information - Selective Disclosure 27
Demo
• Building Code with C6Run
• Running C6Run/C6Accel Applications
• Questions
04/10/23 TI Information - Selective Disclosure 28