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”
Overview
A real experience in TLC systems
SDL: Specification and Description Language
SDL Framework: goals and architecture
Some consequences
Conclusion
ISSPIT 2004 - 1/19
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
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
SDL: language elements
ISSPIT 2004 - 5/19
SDL: signals
ISSPIT 2004 - 6/19
SDL: Finite State Machines
ISSPIT 2004 - 7/19
states
incoming signals
outgoing signals
actions
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
Goals of the work
Maintenance
Portability
Optimization
Reuse
ISSPIT 2004 - 9/19
«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
Process as Active Object
SDL_Process responsibilitiescontext of execution for FSMqueue for incoming signalssending outgoing signalssignal dispatching (and saving)
ISSPIT 2004 - 11/19
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
State Machine: Visitor Pattern
visitedhierarchy
visitorhierarchy
SIGNAL::dispatch
STATE::handle
STATE::handle_i
ISSPIT 2004 - 13/19
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
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
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
SDL-F layers
SDL Framework “glue”
SDL language classes
SDL-F derived classes
USER
SDL-F
ACEACE classes
ISSPIT 2004 - 17/19
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
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
Thank you, and...
…any questions?
??