MARTE Tutorial An OMG UML profile to develop Real-Time and Embedded systems - 13th SDL Forum, Sep 2007, Paris
←
→
Page content transcription
If your browser does not render page correctly, please read the page content below
13th SDL Forum, Sep 2007, Paris www.omgmarte.org MARTE Tutorial An OMG UML profile to develop Real-Time and Embedded systems Sébastien Demathieu (sebastien.demathieu@thalesgroup.com) Thales Research & Technology
Acknowledgment www.omgmarte.org This presentation reuses and extends material prepared by the ProMARTE partners for the OMG RTESS PTF meeting in San Diego, on March 28th 2007 The initial presentation (realtime/07-03-14) is available to OMG members MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris 2
Modeling Real-Time and www.omgmarte.org Embedded systems in UML UML is emerging as a possible solution to address the Real-Time and Embedded domain A large audience in the Software Engineering community Steady semantic foundations Extension capabilities through UML profiles (e.g. SysML) But lacks key notions to fully address RTE specifics (time, resource, scheduling) Previous attempts to adapt UML to the RTE domain Academic initiatives (e.g. ACCORD, GASPARD) MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris Commerical Tools: ARTiSAN, ROSE RT (ROOM), Rhapsody (Real-Time UML) UML profile for Scheduling, Performance and Time (SPT) The first OMG adopted specification in this domain Defines annotation mechanisms to perform quantitative analysis Required major improvements over time In 2005, OMG called for a new UML profile for Modeling and Analysis of Real-Time and Embedded systems (MARTE) 3
Introducing MARTE www.omgmarte.org “The UML profile for MARTE addresses modeling and analysis of real-time and embedded systems, including their software and hardware aspects” Key features Provides support for non-functional property modeling Adds rich time and resource models to UML Defines concepts for software and hardware platform modeling Defines concepts for allocation of applications on platforms MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris Provides support for quantitative analysis (e.g. scheduling, performance) Complies with UML 2.1 and other existing OMG standards Replaces the UML SPT profile 1.1 MARTE specification adopted in June 2007 Alpha document available: http://www.omg.org/cgi-bin/doc?ptc/2007-08-04 Finalization Task Force comment deadline: December 22nd 2007 4
The ProMARTE partners www.omgmarte.org Tool vendors ARTiSAN Software Tools* International Business Machines* Mentor Graphics Corporation* Softeam* Telelogic AB (I-Logix*) Academics Tri-Pacific Software Carleton University No Magic Commissariat à l’Energie Atomique The Mathworks ESEO MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris ENSIETA INRIA Industrial companies INSA from Lyon Alcatel* Software Engineering Institute France Telecom (Carnegie Mellon University) Lockheed Martin* Universidad de Cantabria Thales* * Submitters to the OMG UML for MARTE RFP 5
Relationships with other OMG www.omgmarte.org standards Relationships with generic OMG standards « profile » Marte « replace » « profile » SPT Profiles the UML 2 superstructure meta-model « uses » Uses OCL 2 for description of domain constraints « metamodel » OCL 2 UML 2 Superstructure (L3) Relationships with RTE specific OMG standards The UML profile for Modeling QoS and FT Characteristics and Mechanisms Addressed through MARTE NFP package MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris The UML profile for SoC More specific than MARTE purpose The Real-Time CORBA profile Real-Time CORBA based architecture can be annotated for analysis with MARTE The UML profile for Systems Engineering (SysML) Specialization of SysML allocation concepts and reuse of flow-related concepts Ongoing discussion to include VSL in next SysML version Overlap of team members 6
Architecture of the MARTE www.omgmarte.org specification Foundations for RT/E systems modeling and analysis: 6 pkgs MARTE domain model CoreElements, NFP, Time, GRM, GCM and Alloc MarteFoundations MarteDesignModel MarteAnalysisModel MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris Specialization of Foundations for Specialization of Foundations modeling purpose (specification, for annotating model for design…): 3 pkgs analysis purpose: 3 pkgs RTEMoCC, SRM and HRM GQAM, SAM and PAM 7
Non-Functional Properties (NFP) www.omgmarte.org Formalize a number of ideas existing in SPT and QoS&FT From the SPT profile e.g. Tag Value Language (variables, math. expressions) and time- related values From the QoS&FT profile e.g. Property Qualifiers Add new modeling constructs required for MARTE MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris e.g. tuple and choice values, time expressions and unit measurements conversion NFP modeling required general extensions to UML tools e.g. value expressions editing and data type checking This is a key feature in DRES modeling that UML lacks 8
Organization of NFP constructs www.omgmarte.org 1) Value Spec. Lang. (VSL) 2) Declaration of NFPs 3) Annotation Mechanism « modelLibrary » NFP_Types VSL Definition « modelLibrary » BasicMeasurementUnits « execHost » « execHost » MasterRTU SlaveRTU { procRate=(1.0, @pRm), { procRate=@pRs, « modelLibrary » clock= (2.0, us) } clock= (2.0, us) } Basic_NFPTypes Tagged Values « NFP_Constraint » MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris « import » « import » « import » {kind=required } {pRm > 10*pRs} Abstract Syntax Concrete Syntax Constraints « profile » « profile » « profile » Hardware SAM PAM ... Exact notation for values: To define, qualify measures 1. Tagged values extended Literals, Intervals, (measurement units, source, 2. Constraints Tuples, Choices, Variables, statistical nature…) and 3. Direct specification in Complex and Time organize NFPs UML models by using Expressions NFP types library 9
Examples of textual expressions www.omgmarte.org Value Spec. Examples Real Number 1.2E-3 //scientific notation DateTime #12/01/06 12:00:00# //calendar date time Collection {1, 2, 88, 5, 2} //sequence, bag, ordered set.. {{1,2,3}, {3,2}} //collection of collections Tuple and choice (value=2.0, unit= ms) //duration tuple value periodic(period=2.0, jitter=3.3) //arrival pattern Interval [1..251[ //upper closed interval between integers [@A1..@A2] //interval between variables MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris Variable declaration & io@var1 //input/output variable declaration Call var1 //variable call expression. Arithmetic Operation +(5.0,var1) //”add” operation on Real datatypes Call 5.0+var1 //infix operator notation Conditional (($var1
Examples of NFP annotations www.omgmarte.org Use of NFPs with stereotypes: « modelLibrary» « profile » Basic_NFP_Types SchedulabilityAnalysisModeling « import » « metaclass » UserModelForSchedulabilityAnalysis UML::InstanceSpecification « executionHost » « stereotype» uC: Controller ExecutionHost « apply » « executionHost » speedFactor: NFP_Real= ( statisticalQ= percent, direction= increas) speedFactor= (expr = $MasterRate*0.25 ) contextSwitch: NFP_Duration= (statisticalQ= max) contextSwitch= (value= 8 , unit= us, source= meas) MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris Use of NFPs as M1 level properties: NFP_ExampleWithProperties Controller uC2: Controller «nfp» speedFactor: NFP_Real (percent, increas) speedFactor= ($MasterRate*0.25) «nfp» contextSwitch: NFP_ Duration (max) contextSwitch= ( 8, us, meas) 11
Time modeling www.omgmarte.org The Time model introduced in MARTE completes the features provided by the SimpleTime package of UML 2 Basic ideas Any thing related to time may explicitly refer to a clock Time is multiform (not limited to “physical” time) Support distribution, clock uncertainties Design vs. Runtime clocks MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris What are the domain concepts? Events → TimedEvent Behaviors and Actions → TimedProcessing Constraints → TimedConstraint Observations → TimedObservation 12
Time modeling (cont’d) www.omgmarte.org Time Structure Made of several clocks Clock A totally ordered set of instants Access to instant value and duration with units Relations on Clocks Expression → ClockConstraint Reflect causality (from algorithm and allocations) MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris nature discrete dense Stereotype properties : Special semantics isLogical Logical + optional true Not used clock • set of properties • set of operations Chronometric clock false discrete dense 13
Example of a time constraint www.omgmarte.org :Pilot :HMI :Supervision :Trajectory : EngineControl receiveCommand updateRoute @start {on = idealClock} compute A that references time observations control to specify a duration @stop MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris constraint {on = idealClock} A UML::TimeObservation (stop – start) < (100, ms) stereotyped as {interpretation = duration} {kind = required} {on = idealClock} that has a reference to a clock 14
General Resource Modeling www.omgmarte.org Resource offers Services and may have NFPs for its definition and usage GRM ResourceCore ResourceTypes ResourceUsages MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris ResourceManagement Scheduling A rich categorization is provided: Shared resources, scheduling strategies Storage, Synchronization, Concurrency, and specific usages of resources (like Communication, Timing, Computing, memory consumption, computing time and Device Resources may be defined. and energy) may be annotated. 15
Example of resource modeling www.omgmarte.org {processingRate=1 .0} {processingRate=1.0 } CAN_Bus {processingRate=0 .6} NT_Station Controller MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris VME_Bus {processingRate=8.5} {elementSize=1024 x1024 x8, maxRI=256} {processingRate=1 .0} Robot Arm 16
General Component Model www.omgmarte.org Introduced to cope with various component-based models UML2, SysML, Spirit, AADL, Lightweight-CCM, EAST-ADL2, Autosar… Relies mainly on UML structured classes, on top of which a support for SysML blocks has been added Atomic and non-atomic flow ports MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris Flow properties and flow specifications But also providing a support for Lightweight-CCM, AADL and EAST-ADL2, Spirit and Autosar 17
Example of component definition www.omgmarte.org Atomic flow port typed by a Classifier MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris Complex flow port typed by Standard UML port typed by a class a flow specification that uses the LocationAccess interface 18
Allocation modeling www.omgmarte.org Basic ideas Allocate an application element to an execution platform element Refine a general element into specific elements Inspired by the SysML allocation P1 P2 Unique Alloc Can only allocate application to execution platform inpC 4 6 true Can attach NFP constraints to the allocation outpW 4 true outpZ 6 true Example of allocation oper1 10 true «timedProcessing» oper2 10 8 MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris true Act M1 «allocate» oper1 outW P1 inpC «allocate» oper2 outZ P2 19
Architecture of the MARTE www.omgmarte.org specification Foundations for RT/E systems modeling and analysis: 6 pkgs MARTE domain model CoreElements, NFP, Time, GRM, GCM and Alloc MarteFoundations MarteDesignModel MarteAnalysisModel MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris Specialization of Foundations for Specialization of Foundations modeling purpose (specification, for annotating model for design…): 3 pkgs analysis purpose: 3 pkgs RTEMoCC, SRM and HRM GQAM, SAM and PAM 20
RTE Model of Computation and www.omgmarte.org Communication Provides high-level concepts for modeling qualitative real-time features Real-Time Unit (RTUnit) Generalization of the Active Objects of the UML 2 Owns at last one schedulable resource Resources are managed either statically (pool) or dynamically May have operational mode description (similar to AADL concept) MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris Protected Passive Unit (PPUnit) Generalization of the Passive Objects of the UML2 Requires schedulable resources to be executed Supports different concurrency policies (e.g. sequential, guarded) Policies are specified either locally or globally Execution is either immediateRemote or deferred 21
RTE Model of Computation and www.omgmarte.org Communication (cont’d) Provides high-level concepts for modeling quantitative real-time features Real-Time Behavior (RtBehavior) Message Queue size and policy bound to a provided behavior Real-Time Feature (RTF) Extends UML Action, Message, Signal, BehavioralFeature MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris Relative/absolute/bound deadlines, ready time and miss ratio Real-Time Connector (RteConnector) Extends UML Connector Throughput, transmission mode and max blocking/packet Tx time 22
Usage examples of the RTEMoCC www.omgmarte.org extensions CruiseControlSystem isDynamic = false « rtUnit » « rtUnit » isMain = false isMain = true CruiseControler ObstacleDetector poolSize = 10 main = start poolPolicy = create tgSpeed: Speed startDetection() stopDetection() «rtService» {exeKind=deferred} start() «rtService» {exeKind=deferred} stop() spm « ppUnit » spm 1 {concPolicy=guarded} 1 Speedometer « dataType» getSpeed(): Speed Speed MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris act start @t0 {kind=startAction} « rtf » tgSpeed = spm->getSpeed() occKind = aperiodic () value = (tRef=t0, relDl=(10, ms), miss=(1, %, max)) 23
Outline of the Software Resource www.omgmarte.org Model Concurrent execution contexts: • Schedulable Resource (Task) • Memory Partition (Process) Interactions between concurrent contexts: • Interrupt Resource • Communication (Data exchange) • Alarm Shared data Message (Message queue) • Synchronization Mutual Exclusion (Semaphore) GRM Notification (Event mechanism) MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris SRM « import » « import » SW_ResourceCore « import » Hardware and software « import » resources brokering: SW_Concurrency SW_Interaction SW_Brokering • Drivers • Memory management 24
OSEK/VDX modeled with SRM www.omgmarte.org A task provides the framework for the execution of functions. TaskService priorityElements = priority Task +terminateTask() : statusType terminateServices = +activation : UINT32{readOnly} +getTaskID( TaskID : taskRefType ) : statusType terminateTask +autostart : boolean{readOnly} +declareTask( TaskID : taskType ) +priority : UINT32{readOnly} +getTaskState( TaskID : taskType, State : taskStateRefType ) : statusType chainTask +chainTask( TaskID : taskType ) : statusType +schedule : SCHEDULE{readOnly} activateServices = +activateTask( TaskID : taskType ) : statusType activateTask +schedule() : statusType chainTask +resource yieldServices = schedule 0..* Ressource (OSEK/VDX_Platform.Osek/VDXLibrary.Interaction.InteractionCore) MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris Basic tasks do not have a waiting state. +event 0..* Event BasicTask ExtendedTask (OSEK/VDX_Platform.Osek/VDXLibrary.Interaction.InteractionCore) Details for the implementation steps The functions for processing an interrupt (Interrupt Service (to match an application model to Routine: ISR) are subdivided into two ISR categories: Extended tasks are distinguished from basic tasks by being allowed to use the ISR category 1 : The ISR does not use an operating system service software execution resources and ISR category 2 : API calls are allowed is those ISR. operating system call WaitEvent, which may result in a waiting state. The waiting state allows the processor to be released and to be reassigned to a lower-priority task resumeServices = code generation …) without the need to terminate the running extended task. ResumeAllInterrupts ResumeOSInterrupts 25
SRM Usage example www.omgmarte.org Application Model Robot Robot Execution Resources Model +main() +motionCtrl Osek/VDXLibrary 1 +odometry 1 (OSEK/VDX_Platform) MotionControler Odometry {period = 10} +UpdatePosition() +robotPosition 1 +ControlLoop() Position -x : Integer -Y : Integer OsekTask OsekInterruptsCategory2 OsekInterruptsCategory1 -position -position 1 +getX() : Integer 1 +getY() : Integer +setX( X : Integer ) +setY( Y : Integer ) OsekRessource OsekEvent OsekAlarm « entryPoint » « entryPoint » OsekOsControl OsekHook RobotInstance OsekDataType (OSEK/VDX_Platform.Osek/VDXLibrary) speedy : Robot odometry = odo robotPosition = Pos motionCtrl = mCtrl MyOsek/VDXImplementation odo : Odometry mCtrl : MotionControler (OSEK/VDX_Platform) MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris position = Pos position = Pos Pos : Position MyOsekPeriodicTask MyOsek/VDXImplementationInstance (Robot) main : OsekOsControl t1Periodic : MyOsekPeriodicTask t2Periodic : MyOsekPeriodicTask event = evt1 task = task1 alarm = al2 alarm = al1 event = evt2 r1 : OsekRessource task = task2 al1 : OsekAlarm al2 : OsekAlarm evt1 : OsekEvent task1 : OsekTask evt2 : OsekEvent task2 : OsekTask 26
Hardware Resource Model www.omgmarte.org Logical view (functional modeling) Provides a description of functional properties Based on a functional classification of hardware resources: HwComputing resources HwStorage resources HwCommunication resources HwTiming resources HwDevice resources MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris Physical view Provides a description of physical properties Based on both following packages: HwLayout HwPower 27
HRM usage example: Logical View www.omgmarte.org « hwLogical::hwResource» smp : SMP « hwProcessor » « hwProcessor » « hwProcessor » « hwProcessor » cpu1 : CPU cpu2 : CPU cpu3 : CPU cpu4 : CPU {frequency = 800Mhz} {frequency = 800Mhz} {frequency = 800Mhz} {frequency = 800Mhz} « hwCache » « hwCache » « hwCache» « hwCache » l2 : UL2 l2 : UL2 l2 : UL2 l2 : UL2 {memorySize = 512kB} {memorySize = 512kB} {memorySize = 512kB} {memorySize = 512kB} MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris « hwBus » fsb : FSB {frequency = 133Mhz, wordWidth = 128bit} « hwSupport » « hwDMA» « hwRAM » battery : Battery dma : DMA sdram : SDRAM {managedMemories = sdram} {frequency = 266Mhz, memorySize = 256MB} 28
HRM usage example: Physical View www.omgmarte.org « hwCard » smp : SMP grid = 4,3 area = 5000mm² r_conditions = (Temperature; Operating; ‘’’’ ; [10°C ,60°C]) « hwChip » « hwChip » « hwCard » cpu1 : CPU cpu3 : CPU sdram : SDRAM position = [1,1], [1,1] position = [2,2], [1,1] position = [3,4], [1,1] staticConsumption = 5W staticConsumption = 5W nbPins = 144 « hwChannel» MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris fsb : FSB position = [1,4], [2,2] « hwChip » « hwChip » « hwChip » « hwPowerSupply» cpu2 : CPU cpu4 : CPU dma : DMA battery : Battery position = [1,1], [3,3] position = [2,2], [3,3] position = [3,3], [3,3] position = [4,4], [3,3] staticConsumption = 5W staticConsumption = 5W capacity = 10Wh weight = 150g 29
Architecture of the profile www.omgmarte.org Foundations for RT/E systems modeling and analysis: 6 pkgs MARTE domain model CoreElements, NFP, Time, GRM, GCM and Alloc MarteFoundations MarteDesignModel MarteAnalysisModel MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris Specialization of Foundations for Specialization of Foundations modeling purpose (specification, for annotating model for design…): 3 pkgs analysis purpose: 3 pkgs RTEMoCC, SRM and HRM GQAM, SAM and PAM 30
General Quantitative Analysis www.omgmarte.org Model GQAM updates SPT Alignment on UML2 Harmonization between two SPT subprofiles: sched. and perf. Extension of timing annotations expressiveness Overheads (e.g. messages passing) Response times (e.g. BCET & ACET) Timing requirements (e.g. miss ratios and max. jitters) MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris Main concepts common for quantitative analysis Resources Behavior Workload All embedded in an analysis context (may have analysis parameters) 31
Dependencies and architecture of www.omgmarte.org GQAM Time GenericResourceModel (GRM) GenericQuantitativeAnalysisModeling (GQAM) MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris SchedulabilityAnalysisModeling (SAM) PerformanceAnalysisModeling (PAM) GQAM Common concepts to be used by analysis sub-profiles SAM Modeling support for schedulability analysis techniques. PAM Modeling support for performance analysis techniques. 32
Processing schema for model- www.omgmarte.org based analysis UML2 + Marte Analysis specific « profile » framework MARTE UML2 editor Analysis model Model converter MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris Annotated model Analysis tool Result/Diagnostic model Results Analysis results converter 33
Schedulability Analysis Model www.omgmarte.org Modeling for analysis techniques taking into account scheduling aspects Provides high-level analysis constructs Sensitivity analysis, parametric analysis Observers for time constraints and time predictions at analysis context level Supports most common sched. analysis techniques RMA-based, holistic techniques and modular techniques MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris MARTE::SAM GQAM:: AnalysisContext SAM_Workload « import » SAM_Resources 1 workloadBehavior 1 resourcesPlatform GQAM_Workload:: SaAnalysisContext GQAM_Resources:: « import » SAM_Observers WorkloadBehavior ResourcesPlatform isSchedulable : NFP_Boolean 34
Workload Modeling Example www.omgmarte.org « workloadBehavior» Act NormalMode Workload Behavior maps to Behavior { end2 endD= (5, ms) } « requestEventStream » { type=Pattern, « end2endFlow » ControlServos periodic (period = ( 5, ms)) } ControlTrigg «behaviorScenario» { respTime= (@r1, ms), EndToEndFlow utilization= @u 1, (end2end execTime= (@ e1, ms) } Control deadlines and predicted times) « requestEventStream » { end2 endD= (100 , ms) } { type=Pattern, « end2endFlow » ReportProcess periodic (period = (100, @pR, ms)) } ReportTrigg «behaviorScenario» { respTime= (@r2, ms), utilization= @u 2, MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris execTime= (@wcet1, max, ms) } Event Streams Report (arrival patterns) BehaviorScenario { en d2end D= (1 , s) } « requestEventStream » (response times, ExecuteCommand { type=Pattern, « end2endFlow » periodic (period = (1, s)) } hosts utilization…) ReportTrigg «behaviorScenario» { respTime= ( @r3, ms), utilization= @u3, execTime= (@ e3, ms) } Command 35
Resources Platform Modeling Example www.omgmarte.org « resourcesPlatform» TeleoperatedRobot_Platform Sched. Resources « schedulableResource » « saExecHost » «allocate» { fp (priority= 22) } (sched. : Station : DisplayRefresherTask parameters) Processing Hosts « schedulableResource » (exec. and comm. { fp (priority= 24) } overheads, « saCommHost » «allocate» : MsjStatus { transMode = Half-Duplex throughput, processingRate = (@prCAN) « schedulableResource » blockingTime= (111, us, max, meas ) «allocate» { fp (priority= 24) } scheduling packetTime = (64, us, calc) } : MsjCommand features) : CAN_Bus « schedulableResource » { fp (priority= 30) } : ServosControllerTask «allocate» MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris « schedulableResource » « saExecHost » { fp (priority= 24) } { processingRate = (1.0) clockOverhead = (7, us , meas ) «allocate» : Reporter contextSwitchTime = (5, us , meas ) ISRswitchT= (2.5, us , meas ) « schedulableResource » schedPriorityRange = ([0..30], determ ) { fp (priority= 16) } ISRPrioRange = ([31..31], determ ) } «allocate» : CommandManager : Controller Schedulers « schedulableResource » «allocate» { fp (priority= 31) } (sched. : ControllerComm parameters) : VME_Bus « scheduler » « saExecHost » { schedPolicy = FixedPriority } : RobotArm : RTOS_Scheduler 36
Sched. Analysis Context Example www.omgmarte.org Context under Analysis «saAnalysisContext» { isSched = (@isSchSys) } TeleoperatedRobotSAM «variable» {direction= inout} isSched_System: NFP_ Boolean = isSchSys Instance of a «variable» {direction= inout} wcet_Report: NFP_Duration = wcet1 WorkloadBehavior «variable» {direction= inout} procRate_CAN: NFP_Real= prCAN Context-specific model «variable» {direction= inout} period _Report: NFP_Duration = pR variables « workloadBehavior » « resourcesPlatform » : NormalMode : TeleoperatedRobot_Platform Simple Sensitivity MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris Schedulability Analysis context Analysis context «saAnalysisContext» «saAnalysisContext» Schedulability: TeleoperatedRobotSAM SensitivityAnalysis : TeleoperatedRobotSAM isSched_System= (true, @v0, calc) isSched_System= (true, req) wcet_Report= ( 5, ms, determ) wcet_Report= ( 50, @v1, ms, max, calc) procRate_CAN= (1, determ) procRate_CAN= (0.2, @v2, min, calc) period _Report= (30 , ms, determ ) period _Report= (10 , @v3, ms, min, calc) 37
Performance Analysis Model www.omgmarte.org Specializes some GQAM stereotypes and reuses others Workload specialized: PaRequestEventStream, PaWorkloadGenerator, PaEventTrace Behaviour reused: BehaviorScenario, AcqStep, RelStep specialized: PaStep, PaExecStep, PaCommStep, ResPassStep, RequestedService Resources MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris Reused: ExecHost, CommHost, CommChannel Specialized: PaProcess Supports most common performance analysis techniques Queueing Networks and extensions, Petri Nets, simulation UML + MARTE models should contain Structural view: software architecture and deployment Behavioral view: key performance scenarios 38
Example: deployment www.omgmarte.org «commHost» «commHost» internet: lan: {blockingTime = (100,us)} {blockingTime = (10,us), capacity = (100,Mb/s)} «execHost» «execHost» «execHost» ebHost: webServerHost: dbHost: {commRcvOverhead = (0.15,ms/KB), {commRcvOverhead = (0.1,ms/KB), {commRcvOverhead = (0.14,ms/KB), commTxOverhead = (0.1,ms/KB), commTxOverhead = (0.2,ms/KB)} commTxOverhead = (0.07,ms/KB), maxRI = 5} maxRI = 3} MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris «deploy» «deploy» «deploy» «artifact» «artifact» «artifact» ebA webServerA databaseA «manifest» «manifest» «manifest» : EBrowser : WebServer : Database 39
Example: simple scenario www.omgmarte.org «paProcess» «paProcess» eb: EBrowser webServer: WebServer database: Database {maxRI = (webthreads=80), {maxRI = (dbthreads=5), component = webserver} component = database} 1: «paExecStep» 2: «paCommStep» «paExecStep» «paRequestEventStream» «paCommStep» {PWorkloadKind = open, {hostDemand = (12.4,ms), openIntArrTime = exp(17,ms), repetitions = (1.3,-,mean), MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris hostDemand = 4.5,ms, msgSize = (2,KB)} msgSize = (1,KB)} 3: 4: «paCommStep» {msgSize = (50,KB)} «paCommStep» {msgSize = (75,KB)} 40
MARTE Annexes www.omgmarte.org Repetitive Structure Modeling Guidance for use of MARTE e.g. AADL-like models with MARTE Value Specification Language (VSL) MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris Clock Handling Facilities Clock Value Specification Language (CVSL) Clock Constraint Specification Language (CCSL) MARTE Library 41
AADL-like models with MARTE www.omgmarte.org UML + MARTE AADL « modelLibrary » NFP_Types Length_Unit : type units ( mm, cm => mm * 10, m => cm * 100, km => m * 1000 ); « enumeration » DurationUnitKind OnOff : type aadlboolean ; «unit» s «unit» ms {baseUnit=s, convFactor=0.001} Speed_Range : type range of aadlreal 0 «unit» us {baseUnit=ms, convFactor=0.001 }... .. 250 units ( kph ); « dataType» « dataType» NFP_DataSize NFP_Duration mass_t: type aadlreal units mass_u; unit: DataSizeUnitKind unit: DurationUnitKind mass_u: type units (g, kg => g*1000, t => kg*1000); « import » MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris « profile » SchedulabilityAnalysisModeling « metaclass » « metaclass » Wheel_speed : aadlinteger 0 rpm .. 5000 UML::InstanceSpecification UML::Node rpm units ( rpm ) applies to (system); allowed _mass: mass_range_t applies to « stereotype» memory, processor , bus, device, system); ExecutionEngine speedFactor: NFP_Real= (percent, increas) actual_mass: mass_t applies to (memory, tickerPeriod: NFP_Duration= ( max, ms) processor , bus, device , system); priorityRange: NFP_Interval= (determ, decreas ) 42
Conclusion www.omgmarte.org MARTE is the new OMG specification for Modeling and Analysis Real-Time and Embedded systems Specification adopted in June 2007 MARTE provides extensions to UML for modeling non-functional properties, time and resource, software and hardware execution platforms and allocations MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris MARTE enables model-based quantitative analysis, including schedulability and performance A first Eclipse-based open-source implementation is available Papyrus for MARTE (http://www.papyrusuml.org) Ongoing discussions to align parts of MARTE and SysML 43
References www.omgmarte.org OMG MARTE web site http://www.omgmarte.org UML profile for MARTE (alpha) http://www.omg.org/cgi-bin/doc?ptc/2007-08-04 UML profile for MARTE RFP http://www.omg.org/cgi-bin/doc?realtime/2005-2-6 MARTE Tutorial - 13th SDL Forum, Sep 2007, Paris UML 2 Superstructure http://www.omg.org/cgi-bin/doc?formal/07-02-05 44
You can also read