Top Banner
1 Introducing Real-Time Software Component (RTSC) | © 2008 by Texas Instruments; made available under the EPL v1.0 Real-Time Software Components A Scalable Component Model for Embedded C Development Dave Russo, Texas Instruments Eclipse DSDP/RTSC Project Lead © 2008 by Texas Instruments; made available under the EPL v1.0 | Feb 12, 2008
12

Ese 2008 RTSC Draft1

Jul 06, 2015

Download

Technology

drusso

Introduction to the RTSC component model for embedded systems
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Ese 2008 RTSC Draft1

1Introducing Real-Time Software Component (RTSC) | © 2008 by Texas Instruments; made available under the EPL v1.0

Real-Time Software ComponentsA Scalable Component Model for Embedded C Development

Dave Russo, Texas Instruments

Eclipse DSDP/RTSC Project Lead

© 2008 by Texas Instruments; made available under the EPL v1.0 | Feb 12, 2008

Page 2: Ese 2008 RTSC Draft1

2Introducing Real-Time Software Component (RTSC) | © 2008 by Texas Instruments; made available under the EPL v1.0

In 25 Words Or Less ....

RTSC provides a C-based software component

model for developing, delivering, and deploying

re-usable real-time software targeted

for diverse embedded platforms

without compromising system performance !

QUALITY

Page 3: Ese 2008 RTSC Draft1

3Introducing Real-Time Software Component (RTSC) | © 2008 by Texas Instruments; made available under the EPL v1.0

A

target-code

RTSC Components

Key Characteristics

dual-existence• target-code: runs on resource limited HW• meta-code: runs on rich client platforms

meta-code manages component lifecycle• build of component (including target-side)• integration during application assembly• monitoring during test and after deployment

Benefits

significant design-time optimizations• transparently bind alternate implementations• objects can be created at design-time• no embedded runtime requirements

enables new tooling opportunities• meta-code can proxy for target-code• components differentiate in meta-domain

Application Application

C

target-code(C)

RTSC Component C

target-code(C)

meta-code(JavaScript)

B

target-code(C)

RTSC Component B

target-code(C)

meta-code(JavaScript)

A

target-code

RTSC Component A

target-code(C)

meta-code(JavaScript)

Rich Client Platform Embedded Platform

Page 4: Ese 2008 RTSC Draft1

4Introducing Real-Time Software Component (RTSC) | © 2008 by Texas Instruments; made available under the EPL v1.0

Component-Based Systems

R S R S′

INTERCHANGEABILITY

R T C

S

REUSABILTY

Essential Characteristics

Basic Requirements

UNIFORM PACKAGING

CONFIGURABLE ASSEMBLYFORMAL SPECIFICATIONS

Page 5: Ese 2008 RTSC Draft1

5Introducing Real-Time Software Component (RTSC) | © 2008 by Texas Instruments; made available under the EPL v1.0

standard Cfunctions & structs

MODULE INTERFACE

standard Cfunctions & structs

Programming-In-The-Large

1000s100s10s

MODULE INTERFACE

PACKAGE

standard Cfunctions & structs

logical & physical software container headers, libraries, progs, scripts, docs, ... managed, versioned, delivered as a whole multiple targets, platforms, configurations explicit dependencies on other packages

encapsulates cohesive { types, fxns } external client contract — “spec” internal implementation — “body”

abstract module — spec but no body extended & implemented by others enables generic client applications

concrete & closed abstract & open

Page 6: Ese 2008 RTSC Draft1

6Introducing Real-Time Software Component (RTSC) | © 2008 by Texas Instruments; made available under the EPL v1.0

RTSC .h

RTSC .h

generated headers

RTSC Specification

MODULE SPECIFICATION

INTERFACE SPECIFICATION

#include

#include

MODULE IMPLEMENTATION

// implement specified fxns

// natural map to ANSI C

// call existing C or ASM fxns

// access specified configs

// formalize best practices

// fun-to-write, easy-to-read

eliminates tedious maintenance of headers

separates specification from implementation

standardizes advanced programming patterns

C-like declarations, assertions, commentary

bridges SW design • development phases

readily integrates with other SW tooling

package a_std;

interface IA{ enum E {E1, E2}; int fxn1(char *b);}

package my_pkg;

module ModA inherits a_std.IA{ config int max; Bool fxn2(E e);}

.c

.xdc

.xdc

Page 7: Ese 2008 RTSC Draft1

7Introducing Real-Time Software Component (RTSC) | © 2008 by Texas Instruments; made available under the EPL v1.0

RTSC Packaging

PACKAGE SPECIFICATION version dependencies to ensure integrity

physical organization reflects logical design

contents remain intact during deployment

universal OS-independent + CM-agnostic

PACKAGE DEPLOYMENT

my_pkg/ your_pkg/

a_std/

c:/work; h:/share; …package-repository path

PACKAGE MANIFESTATION

source files

generated files

my_pkg/

special files

requires your_pkg [1,3];

package my_pkg [2,4,5] { interface IA,ICodec, … ; module ModA, … ;}

.xdc

Page 8: Ese 2008 RTSC Draft1

8Introducing Real-Time Software Component (RTSC) | © 2008 by Texas Instruments; made available under the EPL v1.0

HWA BHWA BHWA B

MEG4 Packageti.omap.mpeg4

platformindependent

timer Ctimer BHWA1

timer Ctimer BDMA1

Application Configuration

RTSC Assembly

RTSC enables rapid tuned (re)assembly of binary components

appconfigscript

platform: 'ti.platforms.omap3430'target: 'ti.targets.C64'

platformbinding

HWA BHWA BHWA B

MEG4 Packageti.omap.mpeg4

platformindependent

timer Ctimer BHWA1

timer Ctimer BDMA1

Task = xdc.useModule('ti.bios.Task');MP4 = xdc.useModule('ti.omapsw.mpeg4.ENC');G723 = xdc.useModule('3p.codecs.g723.ENC');MP4.profile = "base";

:

G726 Package3p.codecs.g726

platformindependent

G723 Package3p.codecs.g723

platformindependent

DSP/BIOS Packageti.bios

platformindependent

DMA3DMA2DMA1

timer3timer2timer1

timer3timer2timer1

platform: 'ti.platforms.evm6446'target: 'ti.targets.C64'

timer Ctimer BHWA1

Platform Packageti.platforms.omap3430

C64rev 2

HWA1 timer1

Targets Packageti.targets

C64 C28 C55…

Platform Packageti.platforms.evm6446

C64rev 3

HWA2 timer2

extensible to any platform and target

app-specific implementation selection

package-specific platform adaptation

config, package, and platform validation

one configuration tool for all content

DSP/BIOS Packageti.bios

platformindependent

DMA3DMA2DMA1

timer3timer2timer1

MEG4 Packageti.omap.mpeg4

platformindependent

timer Ctimer BHWA1

timer Ctimer BDMA1

G726 Packageti.codecs.g726

platformindependent

G723 Packageti.codecs.g723

platformindependent

Assembly Process

app.cfg app.c

appcfg.o app.o

compile compile

app.exe

link

appcfg.xdl

appcfg.cconfig

Page 9: Ese 2008 RTSC Draft1

9Introducing Real-Time Software Component (RTSC) | © 2008 by Texas Instruments; made available under the EPL v1.0

RTSC

. c

. cfg

Extended Object Lifecycle

// include modulesMp3 = xdc.useModule("your_pkg.Mp3");

// create static instancesProgram.global.dec = Mp3.create({x:10, y:20});

#include <your_pkg/Mp3.h>#include <xdc/cfg/global.h>

main() {

for (;;) { Mp3_decode(dec, …); … }}

#include <your_pkg/Mp3.h>

Mp3_Handle dec;

main() {

/* initialize system */

Mp3_Params params;

Mp3_Params_init(&params);

params.x = 10; params.y = 20;

dec = Mp3_create(&params);

if (dec == NULL) { … }

/* start real-time processing */ for (;;) { Mp3_decode(dec, …); … }}

needs runtime memory manager

“run-once” instance creation code

dead error handling code

no memory allocation required

no runtime initialization errors

only “core” module methods used

A single RTSC module supports both static and runtime use

RTSC

1 implementation, 2 usage models

uniform instance lifecycle APIs

built-in lifecycle monitoring

#include <your_pkg/Mp3.h>

Mp3_Handle dec;

main(int argc, char *argv[]) {

/* initialize system */

Mp3_Params params;

Mp3_Params_init(&params);

params.x = atoi(argv[1]);

dec = Mp3_create(&params);

if (dec == NULL) { … }

/* start real-time processing */ for (;;) { Mp3_decode(dec, …); … }}

#include <your_pkg/Mp3.h>

Mp3_Handle dec;

main(int argc, char *argv[]) {

/* initialize system */

Mp3_Params params;

Mp3_Params_init(&params);

params.x = atoi(argv[1]);

dec = Mp3_create(&params);

if (dec == NULL) { … }

/* start real-time processing */ for (;;) { Mp3_decode(dec, …); … }}

Page 10: Ese 2008 RTSC Draft1

10Introducing Real-Time Software Component (RTSC) | © 2008 by Texas Instruments; made available under the EPL v1.0

XDCtools

specification language — XDCspec

meta-language — XDCscript ANSI C

packagelife-cycle support

programlife-cycle support

programrun-time support

basic tools & utilities

managed content

specified content

% target software

DSP/BIOS 5.x CodecEngine SYS/BIOS 6.xxDAIS

1999 2004 2006 2007 2009

1.x 2.x 3.x

XDCtools

Accelerate Adoption➼ focus on “ease-of-use”

➼ eclipse integration (CDT, …)

➼ online docs — RTSC-Pedia

➼ emphasize compatibility

➼ open-source XDCtools (EPL)

Page 11: Ese 2008 RTSC Draft1

11Introducing Real-Time Software Component (RTSC) | © 2008 by Texas Instruments; made available under the EPL v1.0

Summary

XDCtools is successfully being used by thousands of TI customers

Dual-domain breaks the “generality vs. application-optimized” standoff

RTSC enables “write once, deploy widely” for deeply embedded SW

http://www.eclipse.org/dsdp/rtsc

RTSC-Pedia: all RTSC documentation: primers, FAQs, examples …

RTSC White Paper: high-level introduction to RTSC

XDCtools User’s Guide: using XDCtools to create & use components

XDCtools: the starting point for the RTSC project’s code base

To be successful, we need adoption in the broader embedded community

Page 12: Ese 2008 RTSC Draft1

12Introducing Real-Time Software Component (RTSC) | © 2008 by Texas Instruments; made available under the EPL v1.0

Questions?