Top Banner
An Object Oriented Framework for the Implementation of SDL Designs U.Mascia, PXL M.Mosciatti, NCS G.Razzano, InfoCom Dpt., “La Sapienza” R.Cusani, InfoCom Dpt., “La Sapienza” G.Scarano, InfoCom Dpt., “La Sapienza”
21

An Object Oriented Framework for the Implementation of SDL Designs U.Mascia, PXL M.Mosciatti, NCS G.Razzano, InfoCom Dpt., “La Sapienza” R.Cusani,

Jan 14, 2016

Download

Documents

Bruce Lester
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: An Object Oriented Framework for the Implementation of SDL Designs  U.Mascia, PXL  M.Mosciatti, NCS  G.Razzano, InfoCom Dpt., “La Sapienza”  R.Cusani,

An Object Oriented Framework for the Implementation of SDL Designs

U.Mascia, PXL M.Mosciatti, NCS G.Razzano, InfoCom Dpt., “La Sapienza” R.Cusani, InfoCom Dpt., “La Sapienza” G.Scarano, InfoCom Dpt., “La Sapienza”

Page 2: An Object Oriented Framework for the Implementation of SDL Designs  U.Mascia, PXL  M.Mosciatti, NCS  G.Razzano, InfoCom Dpt., “La Sapienza”  R.Cusani,

Overview

A real experience in TLC systems

SDL: Specification and Description Language

SDL Framework: goals and architecture

Some consequences

Conclusion

ISSPIT 2004 - 1/19

Page 3: An Object Oriented Framework for the Implementation of SDL Designs  U.Mascia, PXL  M.Mosciatti, NCS  G.Razzano, InfoCom Dpt., “La Sapienza”  R.Cusani,

Embedded systems

TelecommunicationsRadio device in UHF band (225-400 MHz)Channel band: 25 KHzMSK numeric modulation

Frequency hoppingdefense against jammersmodulation carrier changed according to a

pseudorandom sequence2000 hops/s

ISSPIT 2004 - 2/19

Page 4: An Object Oriented Framework for the Implementation of SDL Designs  U.Mascia, PXL  M.Mosciatti, NCS  G.Razzano, InfoCom Dpt., “La Sapienza”  R.Cusani,

Architecture of the embedded system

DSPAUDIOCODEC

LOCALMEMORY

FPGADISCRETE

I/O

DATAINTERFACE

CPULAN

INTERFACE

DEBUG PORT

SYSTEMMEMORY

HOSTINTERFACE

Motorola PPC860OS: VxWorks

Texas InstrumentsTMS320C5402 (100 Mips)

Xilinx XC2V1000Virtex II (1 MGate)

ISSPIT 2004 - 3/19

Page 5: An Object Oriented Framework for the Implementation of SDL Designs  U.Mascia, PXL  M.Mosciatti, NCS  G.Razzano, InfoCom Dpt., “La Sapienza”  R.Cusani,
Page 6: An Object Oriented Framework for the Implementation of SDL Designs  U.Mascia, PXL  M.Mosciatti, NCS  G.Razzano, InfoCom Dpt., “La Sapienza”  R.Cusani,

SDL: language elements

ISSPIT 2004 - 5/19

Page 7: An Object Oriented Framework for the Implementation of SDL Designs  U.Mascia, PXL  M.Mosciatti, NCS  G.Razzano, InfoCom Dpt., “La Sapienza”  R.Cusani,

SDL: signals

ISSPIT 2004 - 6/19

Page 8: An Object Oriented Framework for the Implementation of SDL Designs  U.Mascia, PXL  M.Mosciatti, NCS  G.Razzano, InfoCom Dpt., “La Sapienza”  R.Cusani,

SDL: Finite State Machines

ISSPIT 2004 - 7/19

states

incoming signals

outgoing signals

actions

Page 9: An Object Oriented Framework for the Implementation of SDL Designs  U.Mascia, PXL  M.Mosciatti, NCS  G.Razzano, InfoCom Dpt., “La Sapienza”  R.Cusani,

SDL: CASE tools

Several commercial (= expensive) tools availablestatic structuredynamic structureverification of correctnesstest and simulationautomatic code generation

C language code not suited to direct use

ISSPIT 2004 - 8/19

Page 10: An Object Oriented Framework for the Implementation of SDL Designs  U.Mascia, PXL  M.Mosciatti, NCS  G.Razzano, InfoCom Dpt., “La Sapienza”  R.Cusani,

Goals of the work

Maintenance

Portability

Optimization

Reuse

ISSPIT 2004 - 9/19

Page 11: An Object Oriented Framework for the Implementation of SDL Designs  U.Mascia, PXL  M.Mosciatti, NCS  G.Razzano, InfoCom Dpt., “La Sapienza”  R.Cusani,

«interface»SDL_Object

SDL_ObjectRegister

SDL_Component SDL_Gate

SDL_GateTermination

SDL_Process

SDL_Signal

SDL_Service

SDL_SignalPath

SDL_SignalRoute

SDL_TimeOutManager SDL_Timer

SDL_Block SDL_Channel

«use»

StateMachine

StateMachine::Factory

IState

«nested»

SDL_StateProcedure

«template»State

ISignalISignal::Handler«nested»

«template»ConcreteHandler

«template»IConcreteSignal

«template»ConcreteSignal

BaseHandler

SDL-F: class diagram

SDL-F artifacts SDL elements

ISSPIT 2004 - 10/19

Page 12: An Object Oriented Framework for the Implementation of SDL Designs  U.Mascia, PXL  M.Mosciatti, NCS  G.Razzano, InfoCom Dpt., “La Sapienza”  R.Cusani,

Process as Active Object

SDL_Process responsibilitiescontext of execution for FSMqueue for incoming signalssending outgoing signalssignal dispatching (and saving)

ISSPIT 2004 - 11/19

Page 13: An Object Oriented Framework for the Implementation of SDL Designs  U.Mascia, PXL  M.Mosciatti, NCS  G.Razzano, InfoCom Dpt., “La Sapienza”  R.Cusani,

Blocks and Processes: Composite Pattern

«interface» SDL_Object

SDL_GateTermination

+Run() +Halt()

SDL_Component

+Run() +Halt() +ExtendedInfo() +ShortInfo() +Check()

SDL_Block

+Run() +Halt() +ExtendedInfo() +ShortInfo() +Check() +Attach() +Self() +Offspring() +Sender() +Parent() +NextSignal() +GetGate() +Save()

SDL_Process

#m_ComponentList

void SDL_Block::Run(){ for (ComponentSet::size_type i=0 ; i<m_ComponentList.size() ; ++i) { m_ComponentList[i]->Run(); }}

void SDL_Process::Run(){ activate();}

ISSPIT 2004 - 12/19

Page 14: An Object Oriented Framework for the Implementation of SDL Designs  U.Mascia, PXL  M.Mosciatti, NCS  G.Razzano, InfoCom Dpt., “La Sapienza”  R.Cusani,

State Machine: Visitor Pattern

visitedhierarchy

visitorhierarchy

SIGNAL::dispatch

STATE::handle

STATE::handle_i

ISSPIT 2004 - 13/19

Page 15: An Object Oriented Framework for the Implementation of SDL Designs  U.Mascia, PXL  M.Mosciatti, NCS  G.Razzano, InfoCom Dpt., “La Sapienza”  R.Cusani,

Sending signals: Strategy Pattern

SenderProcess Gate1 SignalRoute1 Gate2

Send

Receive

Send()

ReceiverProcess

Receive()

SDL_GateTermination SDL_GateTermination SDL_GateTerminationSDL_Gate SDL_Gate

ISSPIT 2004 - 14/19

Page 16: An Object Oriented Framework for the Implementation of SDL Designs  U.Mascia, PXL  M.Mosciatti, NCS  G.Razzano, InfoCom Dpt., “La Sapienza”  R.Cusani,

Memory Management

Context long-lived objects: blocks, processes, FSMs ...

short-lived objects: signals

Problem standard memory allocator not suited to real-time

Solution: MemoryAllocator long-lived strategy: pool continuously allocated;

no free

short-lived strategy: pools with constant access time

ISSPIT 2004 - 15/19

Page 17: An Object Oriented Framework for the Implementation of SDL Designs  U.Mascia, PXL  M.Mosciatti, NCS  G.Razzano, InfoCom Dpt., “La Sapienza”  R.Cusani,

Portability through ACE

A key element: ACE Adaptive Concurrent Environment

freely available, open source

OO framework with a lot of good implementations of useful patterns

Some examples SDL_Process derives from ACE_Task

SDL_MemoryManager contains ACE_StaticAllocator and ACE_CachedAllocator

SDL_TimeOutManager relies on ACE_Reactor

ISSPIT 2004 - 16/19

Page 18: An Object Oriented Framework for the Implementation of SDL Designs  U.Mascia, PXL  M.Mosciatti, NCS  G.Razzano, InfoCom Dpt., “La Sapienza”  R.Cusani,

SDL-F layers

SDL Framework “glue”

SDL language classes

SDL-F derived classes

USER

SDL-F

ACEACE classes

ISSPIT 2004 - 17/19

Page 19: An Object Oriented Framework for the Implementation of SDL Designs  U.Mascia, PXL  M.Mosciatti, NCS  G.Razzano, InfoCom Dpt., “La Sapienza”  R.Cusani,

Target

BSP

VxWorks

A portability consequence: Simulator

Advantages increased availability

of development resources

increased capability of debugging/logging

“Separation of concerns” strategy simulator: formal

correctness

target: functional correctness

Target Stubs

Windows

ISSPIT 2004 - 18/19

Page 20: An Object Oriented Framework for the Implementation of SDL Designs  U.Mascia, PXL  M.Mosciatti, NCS  G.Razzano, InfoCom Dpt., “La Sapienza”  R.Cusani,

Conclusions

SDL-F reached the desired goals:maintenanceportabilityoptimization

Reusereadable code is possible going from SDL

to C++open issue: automatic code-skeleton

generator

ISSPIT 2004 - 19/19

Page 21: An Object Oriented Framework for the Implementation of SDL Designs  U.Mascia, PXL  M.Mosciatti, NCS  G.Razzano, InfoCom Dpt., “La Sapienza”  R.Cusani,

Thank you, and...

…any questions?

??