13.07.2015 Views

AADLv2 Cheat Sheet: Basics

AADLv2 Cheat Sheet: Basics

AADLv2 Cheat Sheet: Basics

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>AADLv2</strong> <strong>Cheat</strong> <strong>Sheet</strong>: <strong>Basics</strong>1 AADL Components1.1 Taxonomy of model elementscomponent category class: e.g. thread, data, . . .component typefeatures, flows, properties.component implementation subcomponents, connectionscall sequence, flow impl.and properties.packagesNamespace for components.property setsNon-functional properties.1.2 Component categoriesdatathreadthread groupsubprogramprocessmemorybusprocessordevicevirtual processorvirtual bussystemabstractdata typeexecution flowgroup of threadssequential flowaddress spacestorage areaphysical interconnectexecution resourceI/Opartitionlogical interconnectencapsulation blockcomponent template1.3 Component type declaration extends features-- some featuresproperties-- some propertiesend ;extendsfeaturespropertiesinherit from another component type.list ports, access to other elements.NFP properties for this type.1.4 Component implementation declaration implementationextends subcomponents--calls-- some call sequencesconnections--properties-- some propertiesflowsmodesend ;subcomponentsextendscallsconnectionspropertiesflowsmodes1.5 Packagessubcomponents (internals)inherit from another component type.call sequence (only thread and subprograms)link subcomponentsNFP properties for this type.flow implementationmode automatapackage publicwith ;renames ::all;-- imports all entitiesrenames ::Id;-- partial importId2 renames ::Id2;-- partial renamingend ;withpublicprivaterenamesimport entitiesall entities are visible, need qualificationhide implementationfull import, no qualification1.6 Component Featuresdata portevent (data) portport directionrequires accessprovides access1.7 Features connectionsConnections are directional:unqueued informationpure or type signal, queuedin (reception), out (emission), in outneed to access a data or spgconnectionsparameter -> port -> access -> 2 AADL Properties2.1 Property setsproperty set -- ...end ;2.2 Pre-defined property sets:deployment_properties binding constraintsthread_properties dispatching, concurrency, . . .timing_propertiessupport of timecommunication_properties communication mechanismsmemory_propertiesuse of storage areasprogramming_properties link to implementationmodeling_properties name resolution rulesaadl_projectproject-specific constants2.3 deployment_propertiesproperty set Deployment_Properties isActual_Processor_Binding:inherit list of reference(processor, virtual processor)applies to (thread, thread group, process,system, virtual processor, device);-- Binding components to a processorActual_Memory_Binding:inherit list of reference (memory)applies to (thread, thread group,process, system, processor, device, data,data port, event data port, feature group,subprogram);-- Binding components to a memoryActual_Connection_Binding:inherit list of reference (processor,virtual processor, bus,virtual bus, device, memory)applies to (port, connection, thread group,process, system, virtual bus);-- Binding components to a connectionScheduling_Protocol: inherit list ofSupported_Scheduling_Protocolsapplies to (virtual processor, processor);-- See aadl_project for a full listend Deployment_Properties;2.4 thread_propertiesproperty set Thread_Properties isDispatch_Protocol: Supported_Dispatch_Protocolsapplies to (thread);-- Periodic, Sporadic, Aperiodic, Timed,-- Hybrid, BackgroundPriority: inherit aadlintegerapplies to (thread, thread group,process, system, device, data);Concurrency_Control_Protocol:Supported_Concurrency_Control_Protocolsapplies to (data);end Thread_Properties;2.5 timing_propertiesproperty set Timing_Properties isTime: type aadlinteger 0 ps .. Max_Timeunits Time_Units;Time_Range: type range of Time;Compute_Deadline: Timeapplies to (thread, device, subprogram,event port, event data port);-- Deadline of an activityCompute_Execution_Time: Time_Rangeapplies to (thread, device, subprogram,event port, event data port);-- Worst Case Execution Time


Period: inherit Timeapplies to (thread, thread group,process, system, device);Timing: enumeration(sampled, immediate, delayed)=> sampled applies to (port);-- Timing of communicationsend Timing_Properties;2.6 communication_propertiesproperty set Communication_Properties isOverflow_Handling_Protocol: enumeration(DropOldest, DropNewest, Error)=> DropOldestapplies to (event port,event data port, subprogram);Queue_Processing_Protocol:Supported_Queue_Processing_Protocol => FIFOapplies to (event port,event data port, subprogram);Queue_Size: aadlinteger 0 .. Max_Queue_Size => 1applies to (event port,event data port, subprogram);end Communication_Properties;2.7 programming_propertiesproperty set Programming_Properties isCompute_Entrypoint:classifier (subprogram classifier)applies to (thread,subprogram, event port, event data port);-- Also Initialize_, Recovery_, ..Source_Language: inheritSupported_Source_Languagesapplies to (subprogram, data,thread, thread group, process, system,bus, virtual bus, device, processor);Source_Text: inherit list of aadlstringapplies to (data, port,virtual bus, subprogram, thread,thread group, process, system,memory, bus, device, processor,parameter, feature group, package);end Programming_Properties;3 Graphical AADL notationsvirtualprocesseurthreadprocesseur mémoire périphériquebusgroupede threaddata port event port event data port providesdata accessvirtualbusprocessus sous-programme donnéeprovidessubprogram access4 Example: Producer/ConsumerThis models proposes a simple producer/consumer pattern,covering most <strong>AADLv2</strong> constructs from this sheet.processAprocessorpackage Softwarepublicwith Data_Model;thSendProdbusprocessBthRecvConsprocessordata Simple_TypepropertiesData_Model::Data_Representation => integer;end Simple_Type;subprogram Do_Ping_SpgfeaturesData_Source : out parameter Simple_Type;end Do_Ping_Spg;subprogram Ping_SpgfeaturesData_Sink : in parameter Simple_Type;end Ping_Spg;systemthread thSendfeaturesData_Source : out event data port Simple_Type;end thSend;thread implementation thSend.ImplcallsMycall : { P_Spg : subprogram Do_Ping_Spg; };connectionsparameter P_Spg.Data_Source -> Data_Source;propertiesDispatch_Protocol => Periodic;Period=> 1000 ms;Priority => 2;end thSend.Impl;thread thRecvfeaturesData_Sink : in event data port Simple_Type;end thRecv;thread implementation thRecv.Implconnectionsparameter Data_Sink -> Q_Spg.Data_Sink;propertiesDispatch_Protocol => Sporadic;Period=> 10 ms; -- MIATPriority => 1;Compute_Entrypoint => classifier (Ping_Spg);end thRecv.Impl;end Software;package PING_Packagepublicwith software;with deployment;processor the_processorfeaturesETH : requires bus access Ethernet_Bus;propertiesScheduling_Protocol =>POSIX_1003_HIGHEST_PRIORITY_FIRST_PROTOCOL;end the_processor;bus Ethernet_Bus end Ethernet_Bus;process AfeaturesOut_Port : out event data port Software::Simple_Type;end A;process implementation A.ImplsubcomponentsPinger : thread Software::thSend.Impl;connectionsport Pinger.Data_Source -> Out_Port;end A.Impl;process BfeaturesIn_Portend B;: in event data port Software::Simple_Type;process implementation B.ImplsubcomponentsPing_Me : thread Software::thRecv.Impl;connectionsport In_Port -> Ping_Me.Data_Sink;end B.Impl;system PING end PING;system implementation PING.NativesubcomponentsNode_A : process A.Impl;Node_B : process B.Impl;CPU : processor the_processor;the_bus : bus Ethernet_Bus;connectionsbus access the_bus -> CPU.ETH;port Node_A.Out_Port -> Node_B.In_Port{Actual_Connection_Binding => (reference (the_bus));};propertiesActual_Processor_Binding =>(reference (CPU)) applies to Node_A;Actual_Processor_Binding =>(reference (CPU)) applies to Node_B;end PING.Native;end PING_Package;Jérôme Hugues, jerome.hugues@isae.fr; c○ 2010Creative Commons v2.0, ○ BY: =○ license

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!