Home
TASTE Documentation v1.1 - Université de Bretagne Occidentale
Contents
1. DEVICE netdev1 FEATURES ethernet requires bus access ethernet Taste Coordinates gt 112 218 118 224 END netdev1 Buses BUS ethernet PROPERTIES Taste Interface Coordinates gt Interface gt netdevi ethernet Coordinates gt 129 119 135 125 Target gt Taste Interface_Coordinates gt Interface gt netdev2 ethernet Coordinates gt 190 113 196 119 Target gt Taste Interface_Coordinates gt Interface gt boardi Coordinates gt 147 119 153 125 Target gt Taste Interface_Coordinates gt Interface gt board2 Coordinates gt 175 119 181 125 Target gt END ethernet Root System SYSTEM default END default SYSTEM IMPLEMENTATION default others SUBCOMPONENTS The processor boards board1 SYSTEM board1 others Taste Coordinates gt 1 1 114 206 board2 SYSTEM board2 others Taste Coordinates gt 210 7 307 176 The devices netdev2 DEVICE netdev2 Taste APLC_Binding gt Taste Coordinates gt 208 191 306 218 y netdevi DEVICE netdev1 Taste APLC_Binding gt Taste Coordinates gt 2 212 112 241 y The buses ethernet BUS ethernet Taste Coordinates gt 128 99 190 119 y CONNECTIONS The bus connections obj2378 BUS ACCESS ethernet gt netdev1 ethernet Taste Coordinates gt 132 119 132 221 112 221 obj2520 BU
2. void DecodeMyTestPDU bytex data int dataLen int errorCode 1 Declare a bit stream BitStream bitStrm 2 Declare the stuct where the decoded data will be written MyTestPDU decodePDU 3 Initialize bit stream BitStream_AttachBuffer amp bitStrm data dataLen 4 Decode data if MyTestPDU_Decode amp decodePDU amp bitStrm amp errorCode printf Decoded failed Error code is d n errorCode 91 return errorCode 92 Chapter 11 buildsupport advanced features 11 0 3 Overview The buildsupport component is one of TASTE s most important low level commands Its invo cation is handled by various other components of the toolchain such as tastegui and the main orchestrator Buildsupport has the following main capabilities 1 Generate application skeletons in C Ada RTDS ObjectGEODE Simulink and SCADE VHDL code skeletons are generated by a different tool 2 Generate glue code to make the link betweek user code based on the generated skeletons and the underlying middleware runtime layer that is currently either PolyORB HI C or PolyORB HI Ada 3 Generate the so called concurrency view of the system based on the information from the interface and deployment views buildsupport determines the number of threads and locks for shared resources necessary to fulfill the system constraints The concurrency view is generated in two different formats one in pure AADL in ord
3. 1 drwx 2 bash Is I total 24 rw r r 1 rw r r 1 rw r r 1 rw r r 1 4 4 assert assert assert assert assert assert assert assert assert assert assert assert 4096 1038 2241 4096 371 3901 2363 873 379 291 Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep u 20 20 20 20 20 20 20 20 20 20 Select 11 11 11 11 11 11 11 11 11 11 Find Selected signals Up 133 215 32 33 18 18 18 18 18 18 longitude latitude Down Remove subT ppeArray label int rray v Figure 7 19 Double click on the my_in bus selector the fields are available cyclic_function deploymentview aadl interfaceview aadl passive_function mini_cv aadl passive_function_script m passive_function_wrappers adb passive_function_wrappers ads setInputsBusCreator m setOutputsBusSelector m A set of m files is generated containing the skeleton for the Simulink passive_function Placing these m files under Simulink and executing passive_function_script m creates the func tion skeleton 7 16 that is the FUNCTIONNAME mdl file By double clicking on the mdl file the skeleton is shown see 7 17 7 18 Finally by double clicking on the bus selector of the input variable all the message fields are shown to be available 7 19 7 4 RTDS specific 7 4 1 Step 1 specify RTDS as implementation language You can use RTD
4. 3 SAE Data Modeling Annex for the Architecture Analysis amp Design Language v2 AS5506A SAE nov 2009 available at http www sae org 4 SAE Programming Language Annex for the Architecture Analysis amp Design Language v2 AS5506A SAE nov 2009 available at http www sae org 5 ISO SC22 WG9 Ada Reference Manual Language and Standard Libraries Consolidated Standard ISO IEC 8652 1995 E with Technical Corrigendum 1 and Amendment 1 Draft 15 2005 Available onhttp www adaic com standards rm amend html RM TTL html 6 ISO IEC TR 24718 2005 Guide for the use of the Ada Ravenscar Profile in high integrity systems 2005 Based on the University of York Technical Report YCS 2003 348 2003 7 Ramon Serna Oliver Ivan Shcherbakov and Gerhard Fohler An operating system abstraction layer for portable applications in wireless sensor networks In Proceedings of the 2010 ACM Symposium on Applied Computing SAC 10 pages 742 748 New York NY USA 2010 ACM 8 T Vergnaud B Zalila and J Hugues Ocarina a Compiler for the AADL Technical report T l com Paris 2006 9 Jerome Hugues and Bechir Zalila PolyORB High Integrity User s Guide jan 2007 10 Thomas Vergnaud Bechir Zalila and Jerome Hugues Ocarina a Compiler for the AADL jun 2006 131
5. Deployment View Code generators As a result this approach creates systems that are correct by construction By generating the system from a high level description we can make several validation and or verification and ensure designers requirements 2 5 Definitions The Concurrency View is automatically generated through the vertical transformation pro cess It creates resources tasks mutexes etc of the system and associates functions to them The Data View contains the definition of all data types used in the functions interfaces using the ASN 1 notation The Interface View defines the functions of your system with their respective interfaces and data ports A periodic interface is executed according to a predefined period It also has other proper ties such as the deadline A protected interface is executed exclusively by one entity meaning that only one thread can be executing this function at the same time e A sporadic interface is triggered by a reception of an event The time between two events is bounded and is specified with a value known as the Minimul Inter Arrival Time MIAT e An unprotected interface may be executed concurrently by different entities 2 6 Modeling rules You have four operation kinds that correspond to the AADL property 1 Periodic 2 Sporadic 18 3 Protected unprotected So when deciding what to use for a function s provided interfaces PIs we must take
6. define MyBit REQUIRED BYTES FOR ENCODING 3 define ERR_MyBit 1001 SIZE 20 void MyBit_Initialize MyBit pVal flag MyBit_IsConstraintValid MyBit val int pErrCode flag MyBit_Encode MyBit val BitStreamx pBitStrm int pErrCode flag bCheckConstraints flag MyBit_Decode MyBit val BitStream pBitStrm int pErrCode Notice that in this example the size of the buffer is 3 bytes which is enough to hold 20 bits 10 2 7 Octet String ASN 1 OCTET STRINGs are handled like BIT STRINGs So for the following ASN 1 code MyOct OCTET STRING SIZE 4 The following code is produced typedef struct long nCount byte arr 4 MyOct define MyOct REQUIRED BYTES FOR ENCODING 4 define ERR_MyOct 1000 x SIZE 4 x void MyOct_Initialize MyOctx pVal flag MyOct_IsConstraintValid MyOctx val int pErrCode flag MyOct_Encode MyOctx val BitStreamx pBitStrm int pErrCode flag bCheckConstraints flag MyOct_Decode MyOctx val BitStreamx pBitStrm int pErrCode 10 2 8 IA5String and NumericString ASN 1 IA5String s and NumericString s are mapped to C strings i e an array of charac ters terminated with a NULL character The size of the array is equal to MAX value in the string s 87 size constraint plus one character for the NULL character at the end For the following ASN 1 code MyString IA5String SIZE 1 10 FROM A Z abcde The fo
7. xr x rw r r rw r r rw r r rw r r assert assert 4096 Jul 28 12 58 assert assert 4096 Jul 28 12 56 assert assert 2571 Jul 28 12 56 DataView aadl assert assert 776 Jul 28 12 56 DataView asn assert assert 1018 Jul 28 12 56 deploymentview aadl assert assert 2246 Jul 28 12 56 interfaceview aadl a taik oa a YP bash buildsupport gw i interfaceview aadl c deploymentview aad d DataView aadl bash Is total 24 rw r r 1 assert assert 2751 Jul 28 12 59 DataView aadl rw r r 1 assert assert 776 Jul 28 12 56 DataView asn drwx 2 assert assert 4096 Jul 28 13 00 passive_function bash Is passive_function total 8 rw r r 1 assert assert 382 Jul 28 13 00 passive_function c rw r r 1 assert assert 372 Jul 28 13 00 passive_function h As you can see in the above example buildsupport generated the Function s skeleton which includes all the necessary type and interface information x This file was generated automatically DO NOT MODIFY IT x x Declaration of the functions that have to be provided by the user ifndef USER_CODE_H_passive_function 60 define USER_CODE_H_passive_function include C_ASN1_Types h void passive_function_startup void passive_function_Pl_compute const asniSccT SEQUENCE x asniSccT_INTEGER x endif x Functions to be filled by the user never overwri
8. ARTOS no yes partially ERCOS no yes partially Embedded linux yes unknown 119 B 1 3 Configuration and set up OSAL provides a graphical interface to configure the system choose the operating system which it is interfaced and set up the maximum resources This kind of graphical interface let the user to configure the OSAL layer in a convenient way PolyORB HI C is configured using C macros Thus it does not provide any graphical inter face or user friendly manner to be configured On the other hand the configuration can be done through code generation from AADL models which was the first purpose of PolyORB HI C in terface AADL generated code with operating systems On the other hand writing a graphical interface that generates PolyORB HI C would be easy as it only requires to map user inputs into C macros Finally the configuration items between OSAL and PolyORB HI C are very similar and the user can configure the same items maximum resources for example bound the number of tasks mutexes semaphores included services etc The main difference consists in the interface with the user OSAL provides an independent graphical interface while PolyORB HI C use C macros and potentially AADL models and its generated code 120 Appendix C More information e ASSERT project http www assert project net e ASN 1 tutorial http www obj sys com asnltutorial asnlonly htnl e SEMANTIX website http www semantix gr a
9. as seen in 9 2 82 Chapter 10 ASNI1SCC manual advanced features for standalone use of the TASTE ASN 1 compiler In Windows platforms the user must type the following command asnlscc exe filel asnl where filel asnl is an ASN 1 grammar file If no input file is provided asn1scc displays the possible command line options and exits as shown bellow C tmp gt asniscc No input files ASN 1 Space Certified Compiler Current Version is 1 00 Usage asniscc debug typePrefix prefix useSpecialComments o outdir file1 f ile2 fileN debug re prints the AST using ASN 1 Useful only for debug purposes typePrefix adds prefix to all generated C data types useSpecialComments Only comments starting with will be copied to the generated files o outdir directory where all files are produced Default is current directory Example asnicc MyFile asn1 Running asnlscc under Linux requires mono in front For example mono asniscc exe file1 asn1 83 10 1 Restrictions Asnlscc will not generate code for ASN 1 grammars that e contain SEQUENCE OFs and or SET OFs with no SIZE constraint e contain OCTET STRINGs and or BIT STRINGs with no SIZE constraint e A5String NumericString and in general string types with no SIZE constraint e Contain extendable CHOICEs extendable SEQUENCES or extendable enumerations The common reason for the above restrictions is that
10. device subprogram access Types and enumerations Max_Priority_Value constant aadlinteger gt 28 125 Parametric example of maximum priority Priority and Interrupt Priority are contiguous intervals Min_Interrupt_Priority_Value constant aadlinteger gt 29 Max_Interrupt_Priority_Value constant aadlinteger gt 31 Maximum and minimum interrupt priority Removed these types have been defined in AADLv2 standard property set Thread_Properties Priority_Type type aadlinteger 0 value Max_Priority_Value We must define a property type to be able to reference it Priority Priority_Type applies to thread thread group process Interrupt_Priority aadlinteger value Min_Interrupt_Priority_ Value value Max_Interrupt_Priority_Value applies to thread thread group process Criticality_Level_Type type enumeration A B C D E Criticality levels Transmission_Type type enumeration simplex half_duplex full_duplex Message transmission kind Frequency type aadlinteger 0 Hz Max_Aadlinteger units Hz KHz gt Hz x 1000 MHz gt KHz x 1000 GHz gt MHz 1000 Frequency of a processor Partition Criticality Criticality_Level_Type applies to process system Local_Scheduling Policy Supported Scheduling Protocols applies to process system
11. Demo_2Cfunctions part of the TASTE examples in the VM check the work testSuites directory bash cat DataView asn DataView DEFINITIONS AUTOMATIC TAGS BEGIN T INTEGER INTEGER 0 255 END bash cat interfaceview aadl SYSTEM passive_function FEATURES compute IN EVENT PORT Compute_Entrypoint gt compute Assert_Properties RCMoperation gt SUBPROGRAM myLib compute 59 Assert_Properties RCMoperationKind gt unprotected END passive_function SYSTEM IMPLEMENTATION passive_function others PROPERTIES Source_Language gt C END passive_function others SUBPROGRAM compute FEATURES my_in in PARAMETER DataView T_SEQUENCE Assert_Properties encoding gt UPER result out PARAMETER DataView T_INTEGER Assert_Properties encoding gt NATIVE PROPERTIES Compute_Execution_Time gt 1ms 1ms END compute By using the TASTE views in ESA s buildsupport automatic skeleton projects are written for our passive_function bash Is I total 20 drwxr xr x 2 assert assert 4096 Jul 28 12 58 drwxr xr 17 assert assert 4096 Jul 28 12 56 rw r r 1 assert assert 776 Jul 28 12 56 DataView asn rw r r 1 assert assert 1018 Jul 28 12 56 deploymentview aadl rw r r 1 assert assert 2246 Jul 28 12 56 interfaceview aadl bash asn2aadlPlus py DataView asn DataView aadl bash Is I total 24 drwxr xr x drwxr
12. For example you can start your de velopment with a single monolithic deployment under Linux and by changing one line in your Deployment view switch to an RTEMS Leon deployment Or allocate a Function to a separate processor or join two Functions in the same processor etc Semantix s ASN 1 Compiler asn1Scc http www semantix gr asnlscc 3Data Modelling Toolchain http www semantix gr assert http www maemo org http ww dslinux org N i TeleCommands File Invoke RIs tcommand hitc pfs_hitc_update_config_is_on pfs_ec_update_config configuration_table O pdel_pde4_config_is_selected O pdel_is_available pde2_is_available O pde3_is_available O pde4_is_available dpu_reset_is_requested cam_duration O cam_boost_only_is_requested halt_mode_is_requested Figure 1 1 Automatically generated GUls for TM TCs 1 4 Automatic GUIs for telemetry and telecommands Since many parts of TASTE were build under the close supervision of the European Space Agency ESA the handling of telemetries and telecommands is completely automated By simply mark ing a subsystem with the appropriate tag TASTE automatically generates a complete GUI that allows interactive real time monitoring and control of the system By piping telemetry data to GnuPlot it also allows easy graphical monitoring see figures 1 1 1 3 1 5 Automatic run time monitoring of TM TCs via MSCs Using the tracer py and tracerd py utilities t
13. Time_Budget aadlinteger applies to process system Budget_Replenishment_Period Time applies to process system Storage Budget Size applies to process system XXX replace this with Source_Code_Size RCM M Min_Priority Priority_Type applies to processor Max_ Priority Priority_Type applies to processor Min_Interrupt_ Priority Priority_Type applies to processor 126 Max_Interrupt_Priority Priority_Type applies to processor To express the Global scheduling policy we use the standard property Global_Scheduler_Policy of type Supported_Scheduling_ Protocols Longest_Critical_Section Time applies to processor To describe the clock period we use the standard property Clock_Period of standard type Time Periodic_Clock_Interrupt_Period Time applies to processor Periodic_Clock_Handler Time applies to processor Demanded_Clock_Handler Time applies to processor Interrupt_Handler Time applies to processor External_Interrupt Time applies to processor Wakeup_Jitter Time applies to processor Ready Time applies to processor Select Time applies to processor Context_Switch Time applies to processor Signal Time applies to processor Suspension_Call Time applies to processor Wait_Call Time applies to processor Priority_Raising Time applies to processor Priority_Lowering Time applies to pr
14. VM as well as an independent package An example of the interface is shown in the following picture Eile Options Advanced Help System Design Code Generation Scheduling Analysis Requirements Analysis Data view describes types used in your application It uses the ASN 1 format Edit dataview Data View The Interface View Iv describes system functions and interfaces Interface View Editview Import code Editcode Export code as e Deployment view DV specifies the execution platform and which components it Deployment View executes Edit deployment view The program let you define the view of your system but also let you edit their definition using a text editor Finally it provides some functionnalities to deploy generated applications and choose the runtime used PolyORB HI C PolyORB HI A da etc 3 9 TASTE daemon tasted The TASTE daemon is a program designed to ease the execution of generated applications It was especially designed to interact with TASTE GUI as detailed in section 14 6 once system de signers have successfully built their systems they can automatically execute them on boards As the TASTE toolset can produced applications for systems with different architectures and require ments it is sometimes difficult to deploy them altogether The TASTE daemon aims at facilitate this deployment and execution step The TASTE daemon runs on a machine potentially the same machine as
15. after a max waiting of Z seconds with the value K in the incoming param L can be expressed in less than 10 lines of Python code with an order of magnitude less work than the corresponding C code 80 70 60 50 40 mv AC 30 7 0 e ma e 10 15 20 25 30 35 Time seconds ul Figure 1 3 Graphical monitoring of telemetry data in real time 1 7 Acknowledgements who did TASTE TASTE is a complex tool chain made of a number of components that were developed by various people and various companies This section contains a list of TASTE authors and contributors It may not be exhaustive as many partners are regularly contributing to the toolchain development 11 ESA European Space Agency is responsible for TASTE technical lead and management and for the buildsupport polyorb hi c rtems port tastegui tools etc SEMANTIX is responsible for the TASTE disribution the design and implementation of the data modelling tools based on ASN 1 the integration validation and release of the TASTE virtual machine the vhdl msc gnuplot support etc ELLIDISS is responsible for the development of the interface and deployment view GUI editors ISAE is responsible for the polyorb hi ada and ocarina tools TELECOM PARISTECH is the original developer of the ocarina and polyorb tools UPM is developing the gnatforleon runtime Ada runtime for LEON processors the original AADL to MAST convertor and some d
16. are now available 46 My5thSCADEproject vsw SCADE Suite File Edit View Operator Insert Layout Project Tools Navigate Window Help OBE SBE XK o BS SN A ysnscadepoiectep E Bes BA mre FPI y gt wovr eseon m BU wel Dr an i ewe eo EEE Pee ee El My5thSCADE project etp 2 3 MySthSCADE project E Types 2 3 Operators S40 passive_function EY Interface gt A gt result General Loading file DataType Full xscade Declaration Successfully loaded file DataTypesFull x cade Clock Loading file passive_function xscade Comment Note For Help press F1 SRL Figure 7 6 Interface skeleton generated by TASTE E Suite jut Project Tools Navigate Window Help 5 Set Active Project d a S EA Checker el 1 X Settings Design Verifier Generate Figure 7 7 SCADE settings 47 Settings jf Code Generator KCG General Optimizations Debug Expansion Configuration Code Integration Cl wrap C operators O Generate macro on assertions 7 Keep probes in generated code C Generate system memory state management C No bitwise C operators Global prefix Name length 200 Significance length 31 User contig TargetDir user_macros h em Header file ka Figure 7 8 SCADE settings Set Global context My5thSCADEproject vsw SCADE Suite
17. following screen would appear If some error was raised a dialog error will appear In that case you can see the installation log in the file tmp taste installer log Installation success Installation succeeded To use the toolchain you need to source the environment file tmp testinstall taste env sh in your profile IT will set all required variables to use the TASTE toolchain Finally TASTE tools requires that you defined some environment variables The installer au tomates this process by creating a shell script that contains all new environment variables It is lo cated in the installation directory with the name taste env sh So if you installed the tools un der the directory home user local you are required to use the file home user local taste env sh This can be done automatically by adding the following line in your shell configuration file source path to installation taste env sh 29 Assuming you installed the tools in home your shell configuration file for example HOMI source home user local taste env s user local you will add the following line in E bashrc h 4 3 Upgrade within the virtual machine To upgrade the tools to the latest version within the virtual machine invoke the script UPDATE TASTE sh Open a terminal and invoke the command Once called it downloads the latest version of each tool and install them in their appropriate directory 4 4 Upgrade on your own Li
18. gt 135 33 155 70 END functions SYSTEM IMPLEMENTATION function others END function3 others TASTE Function default IV container2 function4 SYSTEM function4 PROPERTIES Source_Language gt C Taste Coordinates gt 135 73 185 94 END function4 SYSTEM IMPLEMENTATION function4 others END function4 others PROPERTIES Taste Coordinates gt 129 16 189 98 END default IV container2 PACKAGE default FV PUBLIC WITH DataView with Taste SUBPROGRAM provided1 FEATURES paramini in PARAMETER DataView TM_T Taste encoding gt NATIVE END provided SUBPROGRAM bla END bla END default FV 69 8 2 Writing your Deployment View manually 8 2 1 8 2 2 8 2 3 8 2 4 8 2 5 8 2 6 Model a processor board Model a processor Model a partition Model a memory Model a device Example of a manually written deployment view The following example details the modeling of a deployment view with AADL We provide the graphical representation as well to help the reader to understand the mapping between the graphic representation and the textual one File Edit View BER Sem mmo di No Selection PACKAGE default DV PUBLIC WITH Deployment WITH Taste TASTE Deployement View 70 ProcessorBoards SYSTEM board FEATURES obj5575_ethernet requires bus access et
19. gt Set the size of the stack in kbytes default 100 v version Display buildsupport version number p polyorb hi c Interface glue code with PolyORB HI C a aadlv2 Use AADLv2 standard recommended otherfiles any other aadl file needed to parse For example this command will generate your application skeletons buildsupport i InterfaceView aadl d DataView aadl o code gw keep case aadlv2 11 0 5 Generation of application skeletons The generation of application skeletons can be done by invoking buildsupport manually It re quires to have proper interface and data views in the textual AADL format However it is important to note that an interface view may contain references to several data views In effect when a component is imported to an interface view a reference to its data view is stored in the AADL file of the interface view In turn each data view may contain reference to 94 several ASN 1 data models The buildsupport component however only takes one dataview as input expecting it to be complete In order to generate application skeletons in complex systems it is recommended not to invoke buildsupport directly but to use the higher level taste generate skeleton script that first gather all dataviews together and automatically invokes the low level buildsupport command with appropriate parameters This script only needs the interface view in AADL to execute F
20. into consideration that the Functions can have PIs that can currently belong to only one of two care gories 1 Sporadic and Cyclic e Sporadic can t have OUT params since they are async caller doesn t wait for them to return so no results can be returned from their invocation e Each Sporadic Cyclic PI gets one thread They DONT run in the calling thread context e There is automatic mutual exclusion between all PIs that are Sporadic and or Cyclic inside the same Function via a protected object To be more exact Sporadic and Cyclic PIs get their own threads but when they are called and need to execute their actual implementations user code the actual user code call is done from inside a protected object and thus mutual exclusion takes place only one Sporadic Cyclic can be active at any time e Cyclic don t have IN or OUT params they are called periodically e Sporadic can only have ONE IN param carrying all the data they need e Sporadic can in fact be considered a special kind of Cyclic since they have MIAT Min imum Inter Arrival Time 2 Protected and Unprotected e run in the calling thread context e can have multiple IN and OUT params e are synchronous that is the calling thread waits for them to return since they have OUT values that it wants to read e Protected PIs use an Ada protected object to guarantee mutual exclusion between a Function s protected PIs so you use them whenever the Function s
21. is followed by the orchestrator and the way it calls other tools is illustrated in the following figure Data View Interface view Deployment view Functional code A F i Implementation of functions Describe system functions Specify deployment of system with traditional code C Ada Data type definitio A thei t d i Pen METNE O e n sc asn1scc Buildsupport Data types code Concurrency view Glue code Contain data types definitio in the implementation language C Ada system description that contains Contain necessary code constructs tasks data and inter process to distribute application data over connections the nodes of the distributed system Architecture code Code that creates tasks protected data enable data distribution runtime services that supports system functions and configure the underlying operating syste Implementation binary Executable binary that runs on the target architecture x86 with Linux LEON with RTEMS or ORK etc 23 3 3 TASTE GUI The Taste GUI is a program which purpose is to assist the system designer in the use of the differ ent tools of Taste It provides a convenient interface to design the different views of your system data interface and deployment The TASTE GUI is available in the Taste virtual machine
22. manually written in C or Ada Modeling tools generate code in different ways even though thanks to step 2 the data structures of the generated code across different modeling tools are carrying semantically equivalent information the actual code generated cannot interoperate as is error prone manual labour is required to glue the pieces together This is the source of many problems which is why ASN 1 is used in TASTE by placing it as the center of a star formation amongst all modeling tools the glue ing can be done automatically 5 TASTE automatically invokes the ASN 1 compiler to create encoders and decoders for the messages 6 TASTE automatically creates glue code that maps at runtime the data from the data struc tures generated by the modeling tools to from the data structures generated by the ASN 1 compiler 7 Code from the ASN 1 compiler code from the modeling tools and glue code are compiled together inside PolyORB Hi containers generated by Ocarina 8 The generated binaries OpenRavenscar RTEMS Linux are executed Lost satellites being one of them 14 2 2 Taste guidelines Taste aims at providing a Component Based Software Engineering approach by defining a method ology that builds systems correct by construction users define the functional aspects of the system using containers functions interfaces and describe their allocation on the hardware using a so called Deployment vie
23. of Shared_Resources_List data with subprogram ac cesses Bus AADL devices that access List_Of_Drivers the bus Transmission_Time lower Min_Packet_Transmission_Time bound Transmission_Time upper Max_Packet_Transmission_Time bound Allowed_Message_Size up Max_Packet_Size per bound Allowed_Message_Size lower bound Min_Packet_Size Processing_Resource 114 AADL component AADL property MAST requirement MAST entity Type Packet_Driver Driver Type Simple Operation for sending Device A aa Type Simple Operation for receiving Processor bound to the de Server_Processing_Resource Scheduling Server vice Type Msg_ Transmission Operation Data Source_Data_Size Max_Message_Size Source_Data_Size Min_Message_Size Source_Data_Size Avg_Message_Size Data protseted Type Imm_Ceiling Shared_Resource Priority Ceiling 15 5 1 About protected data In our context an AADL protected data is a data with subprogram access or with the property Concurrency_Control_Protocol setto Protected_Access Priority_Ceiling_Protocol or Priority_Ceiling 115 116 Appendix A Abbreviations e ASN1SCC ASN 1 Space Certifiable Compiler e ACG Automatic Code Generation e API Application Programming Interface e ASN 1 Abstract Syntax Notation one e BER Basic Encoding Rules e CER Canonical Encoding Rules e DER Distinguished Enco
24. the host development and listen for incoming request Then the TASTE GUI tool sends generated applications and receives execution output from the daemon Generated applications binaries TASTEGUIL TASTE daemon Application execution output 24 3 10 Additional tools The Taste process relies on third party tools to either model functions or RTOS to execute the final systems It is the user responsibility to get a valid license and install them Chapter 7 illustrates how to import your models and the code generated from this tools in the Taste toolchain The Taste toolchain supports the following tools e Simulink Real Time Workshop v7 0 e Scade KCG v6 1 2 e SDL tools ObjectGeode v4 2 1 and PragmaDev RTDS v4 12 In addition the Taste toolchain can generate binaries for the following platforms e RTEMS from OAR Technologies version 4 8 0 e ORK from the Universidad Polit cnica de Madrid version 2 1 1 e Linux and most POSIX compatible variants including embedded ones 25 26 Chapter 4 Installation and upgrade of the TASTE toolchain There are two ways to use the TASTE toolchain a regular installation on a Linux system and use of a virtual machine The virtual machine system provides a complete environment with a predefined Linux installation that contains everything The installation on your Linux system gives you the ability to use the toolchain with your day to day environment It is more conveni
25. to verify system schedulability This section describes the mapping rules that are used by Ocarina to transform AADL models into MAST models Users should also refer to the AADL standard and the MAST documentation to get information about these two model formalisms to understand the mapping rules and their impact on model semantics The name of each MAST entity is derived from the name of the AADL they are generated from Then we used AADL properties to fill MAST entities requirements period execution time etc 113 AADL component AADL property MAST requirement MAST entity Process_Swap_Execution_Time lower bound Worst_ISR_Switch Erocesgor Process_Swap_Execution_Time Best_ISR_Switch processing Resource upper bound Priority_Range lower Min_Interrupt_Priority bound Priority_Range upper Max_Interrupt_Priority bound Associated Processor via Server_Processing_Resource Sch dulme Server process Priority The_Priority on sched pa Thread rameters Called subprograms Composite_Operation_List A upper Worst_Case_Execution_Time Operation enclosing bound Input Ports Output events Output Ports Output Events Transaction Period for Periodic Thread Activation input event pe riod Deadline for Periodic Deadline for output event Thread Compute_Execution_Time Worst_Case_Execution_Time R li Subprogram Operation simple upper bound Accessed data in case
26. we use special AADL constructs for the Interface View and the Deployment View so we detail below the modeling patterns for each view 8 1 Writing your Interface View manually 8 1 1 Main system of an interface view The main system implementation of a Taste functional view is contained in a default package called default IV This system is called by default SYSTEM IMPLEMENTATION default others and contains system subcomponents each one representing a function This syst em component also connects each function according to their required provided interfaces The default package that contains the main system defines the location of the data view It is specified using the properties TASTE dataView and TASTE dataViewPath The value of the TASTE dataView property should be the string DataView and the property TASTE dataViewPath should specify the location file that contains the AADL data view file 8 1 2 Model a container A container is specified using an AADL package By default the interface view editor creates package named like this PACKAGE default IV CONTAINERNAME where CONTAINERNAME is the name of your container This package contain syst em components each one represent a function 63 8 1 3 Model a function A function is represented by a system component The property Source_Language represents the implementation language of the function C Ada Simulink etc
27. with the AADL name of the subsystem before the M subSIMULINK name lt zipFile gt a zip file with the SIMULINK ERT generated C code for a subsystem with the AADL name of the subsystem before the C subC name lt zipFile gt a zip file with the C code for a subsystem with the AADL name of the subsystem before the A subAda name lt zipFile gt a zip file with the Ada code for a subsystem with the AADL name of the subsystem before the G subOG name file1 pr lt file2 pr gt ObjectGeode PR files for a subsystem with the AADL name of the subsystem before the P subRTDS name lt zipFile gt a zip file with the RTDS generated code for a subsystem with the AADL name of the subsystem before the V subVHDL name with the AADL name of the VHDL subsystem e with extra C code lt directoryWithCfiles gt Directory containing additional c files to be compiled and linked in d with extra Ada code lt directoryWithADBfiles gt Directory containing additional adb files to be compiled and linked in l with extra lib path to libLibrary1 a lt path to libLibrary2 a gt Additional libraries to be linked in The following paragraph describes each option f When this option is NOT used the orchestrator will pause between compilation stages al lowing the user to inspect the build process as it unfolds p When this is used t
28. 0 4 rneer ara ses 7 4 5 Step 5 Zip generated code to be used by the orchestrator 7 4 6 Step 6 Zip generated code to be used by the orchestrator 747 UseRT De within TASIEGUL ociosa ge ea gies eee AR DENE oi neey hse ESS HRS ESSE ESS HEHE OE ER a Use AADL models without graphical tools 81 Writing your Interface View manually 4 464646 464 eo eee a 8 1 1 Main system of an interface view 66 664 cee dee ee ee we dees 8 1 2 Model a c ontainer 22 22 2 2440745 5425 84464 0 e 04 aT 448945 813 Model f neien gt 2 s siapan HE a ee EEE Bd 914 Woedels provided lea ana hee eee ee tree 8 15 Wedel a tequired AREAS lt lt e ee OR ae hau 8 1 6 Connect provided and required interfaces dc ee wae ea ees 8 1 7 About AADL properties of the interface View 6 6 eee eee de ee es 8 1 8 Example of a manually written interface view aooaa aa 82 Writing your Deployment View manually aoaaa a 8 2 1 Model a processor board a bk ee ee HER Re nenn 8 2 2 Model A processor 24 occa een a A S20 Modela parion seora misi piia a E AE AA EASE RS ES 824 Modela MeMa ea aci had ae ee rat E E hee Bl Modela devile 222 2 88 a po ee LIE bade e 10 11 12 13 8 2 6 Example of a manually written deployment view 70 Rae ai o ores t an a RRS a a EX OR a 74 84 AADL device driver library lt os Suk aueh ne AA 74 8 5 Device driver configuration the Deployment Configuration property 74 T
29. 10 47 DataView asn bash asn2dataModel py toSIMULINK DataView asn bash Is l total 24 drwxr xr x 2 assert assert 4096 Sep 20 10 48 drwxrwxrwt 17 assert assert 4096 Sep 20 10 47 rw r r 1 assert assert 903 Sep 20 10 47 DataView asn rw r r 1 assert assert 9072 Sep 20 10 48 Simulink_DataView_asn m The model mapper generates a m file and this file is directly importable in Matlab Simulink The next steps show how 1 The generated file is placed under a new directory visible from MATLAB see 7 11 2 Right click on the file and selecting Run see 7 12 3 Matlab will be Busy while processing the type declarations see 7 13 4 When processing is finished the buseditor command is given see 7 14 5 The ASN 1 types are now visible and available to create designs in Matlab Simulink see 7 15 51 MATLAB 7 5 0 R2007b Eile Edit Yiew Debug Distributed Desktop Window Help a amp amp By a sa my 2 Current Directory E tmp Simulink example Shortcuts 2 Howto Add 7 What s New Workspace aaa a Eu Command Window O New to MATLAB Watch this Video see gt gt Figure 7 11 Use the generated file under Matlab MATLAB 7 5 0 R2007b File Edit View Debug Distributed Desktop Window Help a amp amp Ea a e q ry Current Directory C itmpiSimulink example Shorteuts 2 Howto Add 7 What s New Workspace elite ite Ze Command Window O New to MATLAB
30. 123 125 Chapter 1 Introduction why TASTE The purpose of Taste is to build Real Time Embedded RTE systems that are correct by construc tion the developer specifies programming interfaces and the Taste toolset automatically config ures and deploys the application Taste relies on key technologies such as ASN 1 for the data types description AADL for the models description code generators and Real Time operating systems This manual details how to use Taste and its associated tools 1 1 Automatic integration of multi language multi tool systems TASTE automatically supports and integrates code written in major programming languages C C Ada as well as code generated by many modelling tools SCADE Simulink etc The term automatically integrates is meant in its most absolute form when using TASTE integrating code e g written in Ada with code written in Simulink is 100 automated There are many advantages to using modeling tools for functional modeling of subsystems For one modeling tools offer high level constructs that abstract away the minute details that are common in low level languages The burden of actually representing the desired logic in e g C code falls upon the tool itself which can provide guarantees of code correctness Additionally most modeling tools offer formal verification methods which are equally important to their cer tified code generators For example a modeling tool can guarantee the
31. 6321 May 17 14 23 DataTypesFull xscade rw r r 1 assert assert 126 May 17 14 38 build sample sh drwx 2 assert assert 312 May 17 14 38 cyclic_function rw r r 1 assert assert 1018 May 17 14 37 deploymentview aadl rw r r 1 assert assert 2242 May 17 14 37 interfaceview aadl drwx 2 assert assert 216 May 17 14 38 passive_function bash cd passive_function bash Is total 16 rw r r 1 assert assert 368 May 17 14 38 mini_cv aadl rw r r 1 assert assert 740 May 17 14 38 passive_function xscade rw r r 1 assert assert 2302 May 17 14 38 passive_function_wrappers adb rw r r 1 assert assert 873 May 17 14 38 passive_function_wrappers ads Another xscade file is generated containing the skeleton for the SCADE Operator passive_f By importing this file as well as before from the FileView right click insert files the project skeleton is now available see 7 6 In order to be able to use the KCG SCADE s code generator output from TASTE the user must select Global context in the KCG options see 7 7 and 7 8 After this we can fill in the skeleton for example we can create the simplest of systems since both input and output are of the same type T_POS a pass through 7 9 Invoking KCG will generate our code which we place inside a zip file that must contain a directory with the same name as our SCADE Function passive_function unction
32. 7 1 2 The default libraries are removed and Finish is clicked see 7 2 3 The project opens FileView is selected see 7 3 4 The TASTE generated xscade file is inserted see 7 4 5 Going back to Framework the ASN 1 types are now visible and usable in SCADE see 7 3 SCADE Suite Project Project type Figure 7 1 Create anew SCADE project SCADE Suite Project Use this dialog to add or remove libraries SCADE Suite libraries as JU Cn Come Che Figure 7 2 Remove default libraries 45 My5thSCADEproject vsw SCADE Suite File Edit View Operator Insert Layout Project Tools Nar Dee a BABA oo ue DOE APO mum E x Loading project MySthS3SCADEproject etp Al Successfully loaded project MySth3CADE Figure 7 3 Select FileView G io so 8 My5thSCADE project vsw 8 My5thS CADE project etp 2 3 Design Verifier File E My5thSCADE project 14 IfLoadins project MySthSCADEproject etp 4 Figure 7 4 Add TASTE generated xscade file xl My5thSCADE project etp a My5thSCADE project E Types fF Blaray_type Boolarray_type If Enumarray_type fF Intarray_type fF intemalSeqOf_type x Loading project MySthSCADEproject etp Allsucces ully loaded project MySthSCADEproject etp Loading file DataTypesFull xscade Succes fully loaded file DataTypesFull xscade Figure 7 5 Types
33. AGE default IV container PUBLIC WITH default FV WITH DataView WITH Taste TASTE Function default IV container function SYSTEM function1 FEATURES required1 REQUIRES SUBPROGRAM ACCESS default FV provided1 Taste Coordinates gt 35 41 37 43 PROPERTIES Source_Language gt C Taste Coordinates gt 14 14 35 45 END function1 SYSTEM IMPLEMENTATION function1 others END function1 others TASTE Function default IV container function2 SYSTEM function2 FEATURES provided1 PROVIDES SUBPROGRAM ACCESS default FV provided1 Taste RCMoperationKind gt sporadic Taste RCMperiod gt 0 ms Compute_Execution_Time gt 0 ms 10 ms Taste Deadline gt 0 ms TASTE Importance gt MEDIUM Taste Coordinates gt 89 45 91 47 PROPERTIES Source_Language gt C Taste Coordinates gt 91 27 109 50 END function2 SYSTEM IMPLEMENTATION function2 others SUBCOMPONENTS provided1_impl SUBPROGRAM default FV provided1 CONNECTIONS SUBPROGRAM ACCESS provided1_impl gt provided1 END function2 others PROPERTIES Taste Coordinates gt 1 4 119 100 END default IV container PACKAGE default IV container2 68 PUBLIC WITH default FV WITH DataView WITH Taste TASTE Function default IV container2 function3 SYSTEM function3 PROPERTIES Source_Language gt C Taste Coordinates
34. DefaultOptions ini profile RTDS_ADDL_MACRO h profile RTDS_BasicTypes h profile RTDS_Common h profile RTDS_MACRO h profile RTDS_Proc c profile RTDS_Proc h profile RTDS_Scheduler h profile bricks RTDS_Include c 57 The original version of these files can be found in the following directory testSuites Demo_RTDS_SyncCa Once you have added the necessary files you can start to generate the code from the RTDS project To do so invoke the following command in the directory of the RTDS project rdp file rtdsGenerateCod f lt file project gt rdp scheduled partial linux Then the code generator will create the code with some errors and or warnings Please ig nore them the code required by TASTE is correctly generated and these warnings errors are not relevant in our context This code generation step will produce an output like the following You should get the following output Loading project HH Generating code Checking syntax semantics for my_rtds_system Generating code for diagram my_rtds_system Checking syntax semantics for my_rtds_system_p Generating code for diagram my_rtds_system_p Generating message data encoding decoding functions make RTDS_STRUCT_MSG gcc E I profile I I home assert pragmdadev second_async_rtds Inputs rt Generating makefile Updating packages for generated files Traceback most recent ca
35. Design Code Generation Scheduling Analysis Requirements Analysis Execution Compile your code and execute your system Launch compilation Run binaries Profiling Execute and analyze the system with profiling GPROF Profile system timing taste Analyze memory consumption Profile memory consumption Figure 14 3 Code generation menu with memory analysis functionnality Process selection Select the process you would ee VIER like to analyze mypart_obj190 8 4 Total size of process mypart_obj190 3028083 bytes OK Cancel Figure 14 4 Process selection for memory analysis e Glue layer memory consumed by the code generated by ASN 1 related tools and buildsup port e Middleware layer memory related to AADL generated code code produced by Ocarina and PolyORB HI C e Runtime O S layer memory from the underlying execution runtime such as Linux or RTEMS Once you choose which part of the generated application you want to analyze the tool report the functions of the chosen part with their size in bytes Figure 14 6 shows an example of the analysis of the glue part of a generated system In addition it can also detail the memory consumption related to each function For that when you choose a process to analyze it proposes to analyze the memory consumed by each function located in that process When you analyze the memory of a function the tool separate the memor
36. For each provided or re quired interface we add a feature in the system specification For example the following component models a function that provides a single interface The function is implemented using the C language SYSTEM function2 FEATURES provided PROVIDES SUBPROGRAM ACCESS default FV provided1 provided interfaces properties PROPERTIES Source_Language gt C Taste Coordinates gt 91 27 109 50 END function2 The following component models a function that requires a single interface The function is implemented using the Ada language SYSTEM function1 FEATURES required1 REQUIRES SUBPROGRAM ACCESS default FV bla required interface properties J PROPERTIES Source_Language gt Ada Taste Coordinates gt 14 14 35 45 END function1 8 1 4 Model a provided interface A provided interface is represented using two AADL artifacts 1 A subprogram component 2 Aprovides subprogram access feature in the AADL system component that repre sents the function containing this provided interface The subprogram component has the same name as the provided interface name By de fault the interface view editor adds all subprogram components in a default package called default FV Subprogram components declare features for their parameters These parameters use the types from the Data View For example the following component provided1 declares a subprogra
37. MyStruct2x val BitStreamx pBitStrm int pErrCode To indicate the presence of b2 the programmer must write myStruct2 exist b2 1 With myStryct2 is a variable of type MyStruct2 88 10 2 10 Choice ASN 1 CHOICEs are mapped to C structs which contain two fields 1 a C enum whose options are all possible CHOICE alternatives Its purpose is to indicate which CHOICE alternative is present 2 aC union with all the CHOICE alternatives An example ASN 1 CHOICE follows MyChoice CHOICE alpha MyStruct beta MyStruct2 octStr OCTET STRING SIZE 4 And here is the code that is generated by asn1scc typedef struct enum MyChoice_ NONE No components present x alpha_PRESENT beta_PRESENT octStr_PRESENT kind union MyStruct alpha MyStruct2 beta struct long nCount byte arr 4 octStr u MyChoice define MyChoice REQUIRED_BYTES_FOR_ENCODING 41 define ERR_MyChoice 1014 x define ERR_MyChoice_octStr 1015 x SIZE 4 void MyChoice_Initialize MyChoicex pVal flag MyChoice_IsConstraintValid MyChoicex val int pErrCode flag MyChoice_Encode MyChoicex val BitStreamx pBitStrm int pErrCode flag bCheckConstraints flag MyChoice_Decode MyChoicex val BitStream pBitStrm int pErrCode 10 2 11 Sequence of and Set of ASN 1 SEQUENCE OFs and SET OFs are mapped to C structs that contain two fields E 1 a static C
38. Ocarina and PolyORB HI Ocarina is used transparently through the orchestrator This tool is in charge of combining all models and source code bound in the interface and deployment views This process is sophisti cated Therefore we do not support the direct use of Ocarina as part of the TASTE toolchain 9 3 Orchestrator Invoking the orchestrator without parameters shows the available options Usage assert builder ocarina py lt options gt Where lt options gt are f fast Skip waiting for ENTER between stages n nokalva Use OSS Nokalva for ASN 1 compiler p with polyorb hi c Use PolyORB HI C instead of the default PolyORB HI Ada r with coverage Use GCC coverage options gcov for the generated applications v aadlv2 Use AADLv2 when speaking with Ocarina 78 o output lt outputDir gt Directory with generated sources and code s stack lt stackSizelnKB gt How much stack size to use in KB a asn lt asn1Grammar asn gt ASN 1 grammar with the messages sent between subsystems i interfaceView lt i_view aadl gt The interface view in AADL c deploymentView lt d_view aadl gt The deployment view in AADL w wrappers lt adaSourceFile 1 adaSourceFile2 gt The extra Ada code e g sdl_wrappers generated during VT S subSCADE name lt zipFile gt a zip file with the SCADE generated C code for a subsystem
39. PIs share state and would have issues with multiple calling threads entering two or more of them simultaneously and messing up the shared state e Unprotected can read write anything they want so they allow the calling context to enter at will e Protected and Unprotected can co exist inside a Function since you may have func tionality that has no state dependencies 19 20 Chapter 3 Overview of the Taste toolset 3 1 Labassert Labassert is a graphical tool developed by ELLIDISS TECHNOLOGIES to edit the Interface and Deployment views Labassert works on Windows and Linux However this tool is now considered as deprecated and is replaced by three programs TASTE IV TASTE DV and TASTE CV 3 2 TASTE toolset TASTE IV TASTE DV and TASTE CV TASTE IV is the tool used to edit the interface view of your system it provides functionnali ties to describe system functions their parameters and in which language they are implemented TASTE DV is the editor for the deployment view providing functionnalities to describe how sys tem functions are allocated to processing resources CPU network etc Finally TASTE CV is the concurrency view editor It is used to perform schedulability analysis and simulates system execution detecting potential system errors that can be risen at run time deadlocks etc 3 3 ASN 1 generators ASN 1 generators consist in tools that creates data types and run time data translation bridges betw
40. S ACCESS ethernet gt netdev2 ethernet ays obj5575_ethernet 5 obj4948_ethernet ENE Taste Coordinates gt 208 203 195 203 195 116 190 116 obj6140 BUS ACCESS ethernet gt board1 obj5575_ethernet Taste Coordinates gt 150 119 150 181 105 181 obj6337 BUS ACCESS ethernet gt board2 0bj4948_ethernet 73 Taste Coordinates gt 178 119 178 157 217 157 END default others PROPERTIES Taste Coordinates gt 0 0 594 420 END default DV copied aad libraries TASTE requirement Do not edit below this line 8 3 Device driver modelling Devices are specified with the AADL device component These components model the device and the buses they use ethernet spacewire etc Device drivers internals are described using AADL properties The initialization thread is specified using the Initialize_Entrypoint on the device The device driver resources are specified using an AADL abstract component that is associated with the device using the Device_Driver property on the device This component describes thread data and subprogram used for implementation purpose 84 AADL device driver library Ocarina provides a set of predefined devices you can use in your models This set of components can be found in the resources AADLv2 directory of Ocarina sources or in the INSTALLDIR share ocarin where INSTALLDIR is the installation directory of Ocarina The
41. S to write the functional code of your system By using RTDS you design system behavior Then TASTE use the code generated by RTDS and integrates it within the architecture code connecting all functions potentially written using different languages altogether 55 First of all the user has to specify RTDS as the implementation language to be designed Speci fication of functions implementation language is defined in the interface view so you have to add this requirement in the interface view see picture below Function Attributes EunctionnalStates Report Attributes Values Label pinger Container Language RTDS Source text Instance name pinger Ok Apply Cancel 7 4 2 Step 2 Generate application skeletons Then once you defined your Interface view and your Data view you can generate SDL application skeletons using buildsupport In this way you ll have a new RTDS project that will contain signals and data types to interact with the system environment To generate SDL skeletons issue the following commands buildsupport i lt interface view file aadl gt d lt data view file gt aadl o rtds_model asn2dataModel py toRTDS lt data view gt asn o rtds_model my_rtds_system 7 4 3 Step 3 Edit application skeletons After running these commands you have a new directory rtds_model that contains a new RTDS project This project should then be edited by system programmer to defined app
42. TASTE gui provides the following advanced features 1 Coverage analysis of produced binaries N Scheduling analysis with MAST 3 Configure the build process with your own compilation linking flags 4 Change the default text editor for interface code edition 5 Deploy applications with the TASTE daemon The following subsections detail each of these features 14 1 Coverage analysis TASTE gui provides the ability to execute code coverage analysis and let the user assess the cover age of generated application It details for each executed function the time taken for its execution the number of times it has been executed etc To perform coverage analysis click on the Profile system timing button in the Code Genera tion menu see 14 1 Then it executes each binary during a fixed amount of time and display a table that summarizes generated functions execution assessment The picture 14 2 depicts an example of such an analysis 14 1 1 Restriction of the coverage analysis function At this time this function can only be used on a native platform meaning that binaries has to run on the computer that executes TASTE gui This limitation is mainly due to deployment issues it would be removed as soon as possible 101 Eile Options Advanced Help System Design Code Generation Scheduling Analysis Requirements Analysis Compile and run Compile your code and execute your system Compile Configure Profil
43. Timers No_Dependence gt Ada Task_Attributes In addition the following restrictions must also be enforced by each component used in Taste programs 1 No controlled types In Ada thisisprovidedbypragma Restrictions No_Dependence gt Ada Finalization 2 No implicit dependency on object oriented features Ada provides this restriction with pragma Restrictions No_Dependence gt Ada Streams 3 No exception handler shall be defined Ada provides this restriction with pragma Restrictions No_Exception_Handlers 4 No unconstrained objects including arrays and forbidden string concatenation Ada pro vides this restriction with pragma Restrictions No_Secondary_Stack 5 Do not use allocation Ada provides this restriction with pragma Restrictions No_Allocators 6 All access references to variables must be explicitly typed Ada check that using the restric tion pragma Restrictions No_Unchecked_Access 7 Avoid explicit dispatch Ada provides this features with pragma Restrictions No_Dispatch 8 Do not use input output mechanisms Ada provides this feature restriction with pragma Restrictions No_IO 9 Do not use recursion Ada provides this feature with pragma Restrictions No_Recursion 10 As for allocation memory deallocation must be checked This is provided in Ada with pragma Restrictions No_Unchecked_Deallocation 2 3 Main components Taste is centered around the following elements 1 T
44. Video see All Files gt gt buseditor Simulink_DataView_asn m setOutputsBusSelector m passive_function_script m Figure 7 17 The FUNCTIONNAME mdl file is generated MATLAB 7 5 0 R2007b __ File Edit View Debug Distributed Desktop Window Help a amp amp E a sg A ry 2 O Current Directory C tmp Simulink example Shortcuts 2 How to iy compute Workspace File Edit View Simulation Format Tools Help ecRB In sue eleotinc All Files Simulink_Data setOutputsBus passive_function setInputsBusCre compute mdl result F 100 FixedStepDiscrete Figure 7 18 Double click on FUNCTIONNAME mdL function skeleton is shown 54 Function Block Parameters my_in_T_POS_BusSel BusSelector This block accepts a bus as input which can be created from a Bus Creator Bus Selector or a block that defines its output using a bus object The left listbox shows the signals in the input bus Use the Select button to select the output signals The right listbox shows the selections Use the Up Down or Remove button to reorder the selections Check Output as bus to output a single bus signal Parameters subType rray E label H int rray assert assert assert assert assert assert assert assert bash cd passive_function IW r r IW r r drwx 2 rw r r 1 rw r r
45. Watch this Video see All Files Type gt M file Open View Hale gt gt Simulink_Da Figure 7 12 Run the file Matlab learns the new types This allows the user to use the ASN 1 types in his Matlab Simulink Function However TASTE offers more than this it creates the Simulink skeleton with the parameters of the Func tion s interface already filled in bash asn2aadlPlus py DataView asn DataView aadl bash buildsupport gw glue i interfaceview aadl c deploymentview aad d DataView aadl bash Is IF total 48 drwx 2 assert assert 4096 Sep 20 11 33 ConcurrencyView rw r r 1 assert assert 9877 Sep 20 11 33 DataView aadl rw r r 1 assert assert 903 Sep 20 10 47 DataView asn rw r r 1 assert assert 9072 Sep 20 11 25 Simulink_DataView_asn m 14 7 2009 2 55 pp 14 7 2009 2 58 pp 5 14 7 2009 3 00 pp 14 7 2009 3 02 pp 14 7 2009 3 04 pp 14 7 2009 3 07 pp 14 7 2009 3 09 pp 20 9 2010 10 54 m 3 S Figure 7 13 Matlab processing reports Busy 52 MATLAB 7 5 0 R2007b File Edit Debug Distributed Desktop Window Help EL mm 9 amp der E O current Directory c itmpsimulink example Shortcuts 2 Howto Add 2 What s New Workspace Current Directory O x AAA c a B zZ On a MATLAB Watch this Video see All Files Type Simulink_DataView_asn m M f
46. al Linker flags Cancel OK Figure 14 10 Edition of compilation and linking flags 14 5 Change the text editor for interface code modification When editing the code of a function TASTEGUI starts a text editor and provides the ability to edit the code of each interface Using this functionnality users can write the functional code of the system By default TASTEGUI uses the nedit editor However some users prefer other text editors such as Vim Emacs or Notepad For these users TASTEGUI let you choose your own text editor To change it you must specify the PATH to the text editor or the name of the command in that case it has to be in your PATH environment in the Edit Programs menu You can access it through the menu Advanced Edit programs When TASTEGUI executes the program it executes it with all the files to edit as argu ments 14 6 Execution of applications using the TASTE daemon Once application are generated you need to execute them To ease the deployment and the ex ecution of generated applications TASTE GUI can be interfaced with the TASTE daemon This will upload the generated binary to the TASTE daemon and print the output produced by the application taking the output sent back by the TASTE daemon To use this functionnality you need to specify your deployment requirements using the Con figure button of the Code Generation part of the graphical interface By pressing this button a dedicated
47. array for the inner type of the SEQUENCE OF T 2 an integer field that indicates the number of elements in the SEQUENCE OF For example the following ASN 1 code MySqOff SEQUENCE SIZE 1 20 25 OF MyStruct2 is translated into the following C code 89 typedef struct long nCount MyStruct2 arr 25 MySqOff define MySqOff_REQUIRED_BYTES_FOR_ENCODING 351 define ERR_MySqOff 1014 SIZE 1 20 25 void MySqOff_Initialize MySqOff pVal flag MySqOff_IsConstraintValid MySqOff val int pErrCode flag MySqOff_Encode MySqOff val BitStream pBitStrm int pErrCode flag bCheckConstraints flag MySqOff_Decode MySqOff val BitStreamx pBitStrm int pErrCode T Here is another example where the inner type of the SEQUENCE OF is a composite type MySaOff2 SEQUENCE SIZE 1 20 25 OF SEQUENCE a2 INTEGER 1 10 b2 REAL OPTIONAL c2 MyEnum OPTIONAL yielding the below generated code typedef struct long nCount struct asniSccSint a2 double b2 MyEnum c2 struct unsigned int b2 1 unsigned int c2 1 exist arr 25 MySqoff2 define MySqOff2_REQUIRED_BYTES FOR_ENCODING 351 define ERR_MySqOff2 1015 x SIZE 1 20 25 define ERR_MySqOff2_elem_a2 1016 1 10 void MySqOff2_Initialize MySqOff2 pVal flag MySqOff2_IsConstraintValid MySqOff2 val int pErrCode flag MySqOff2_Encode MySqO
48. atadefinitiont asn datadefinitionX asn outputfile aadl 9 1 2 Convert ASN 1 types into Functional Data Models When building your application you need to generate interfaces of your ASN 1 types with your architecture and your application For that purpose the tool asn2dataModel exports ASN 1 data types definitions into a representation that is suitable for the tools you use to develop your Functions Ada C Simulink RTW SCADE KCG ObjectGeode or PragmaDev Python is also supported for scripting purposes The tool should be invoked like this asn2dataModel toC datadefinitionl asn datadefinitionX asn 77 It will output a file that will contain the data type definition in the language you selected For example in our example the switch toC indicates that we generate interfaces for the C language You can replace this switch with the following e toAda generate Ada type declarations e toC generate C type declarations e toPython generate Python declarations e toRTDS generate PragmaDev RTDS declarations toSIMULINK generate Simulink type declarations e t00G generate ObjectGeode type declarations e toSCADES generate SCADES type declarations toSCADE6 generate SCADE6 type declarations For example the following command exports data types definition contained in the data asn1 file into a representation suitable for Simulink asn2dataModel toSIMULINK data asn1 9 2
49. bash mkdir package bash cd package bash mkdir passive_function bash cp a path to kcg generated files passive_function bash zip 9 r passive_function zip passive_function This zip file is the one that must be passed to the orchestrator when using a SCADE subsys tem bash DMT OG assert builder ocarina py f o binary linux a DataView asn i InterfaceView aadl Y c DeploymentView aadl S passive_function path to passive_function zip 49 a Interface View Editor interfaceview tmp TOt6H4V3 1 interfaceview aadl Ey File Edit View Option OBESE mAg 2e HLS 2 EE RG BR Edit Data Attributes Label Container Language Source text Instance name Blackbox_device Figure 7 10 Creating a Simulink RTW function 7 3 Simulink specific If a Function is coded in Simulink then the TASTE editor must be used to properly select the Function s language field as depicted in Figure 7 10 The corresponding AADL part of the Interface View will then contain something like this SYSTEM passive_function FEATURES compute IN EVENT PORT Compute_Entrypoint gt compute Assert_Properties RCMoperation gt SUBPROGRAM myLib compute Assert_Properties RCMoperationKind gt unprotected y END passive_
50. correctness of a design in terms of individual components e g if input A is within rangeA and input B is within rangeB then outputC will never exceed rangeC These advantages have driven many organizations to se riously consider and use modeling tools for the functional modeling of individual subsystems After the completion of the functional modeling however the modeling tools use custom code generators that materialize the requested functionality in a specific implementation language e g C or Ada Unfortunately the generated code is quite different amongst different tools each modeling tool has a very specific way of generating data structures and operational primitives and mapping these data structures between them is a tedious and very error prone process since it has to deal with many low level details Integrating this generated code with e g manually written code is therefore quite a task ISCADE for example has been qualified for DO 178B up to level A 7 With TASTE all these tasks are completely automatically handled guaranteeing zero errors in glue ing the functional components together Calls across TASTE Functions interfaces are automatically handled via a automatically generated ASN 1 encoders decoders that marshal the interface parameters and b automatically generated PolyORB Hi containers that instantiate the communicating entities in terms of Ada tasks RTEMS threads etc By using ASN 1 as the cente
51. d2 71 FEATURES obj4948_ethernet requires bus access ethernet Taste Coordinates gt 215 156 217 158 END board2 PROCESSOR cpu2 PROPERTIES Scheduling Protocol gt Posix_1003_Highest_Priority_First_Protocol END cpu2 PROCESS part2 END part2 MEMORY mem2 END mem2 DEVICE driver2 FEATURES ethernet requires bus access ethernet Taste Coordinates gt 215 156 217 158 END driver2 SYSTEM IMPLEMENTATION board2 others SUBCOMPONENTS part2 PROCESS part2 Taste APLC_Properties gt APLC gt funci Coordinates gt 221 53 294 72 Taste APLC_Binding gt func1 Deployment Port_Number gt 0 Taste Coordinates gt 219 43 297 78 H cpu2 PROCESSOR cpu2 Taste Coordinates gt 215 22 301 87 mem2 MEMORY mem2 Taste Coordinates gt 216 97 302 127 driver2 DEVICE driver2 Taste Coordinates gt 217 135 302 170 H CONNECTIONS The bus connections BUS ACCESS 0bj4948_ethernet gt driver2 ethernet PROPERTIES Connexion des CPUs aux process drivers Actual_Processor_Binding gt reference cpu2 applies to part2 Actual_Processor_Binding gt reference cpu2 applies to driver2 Actual_Memory_Binding gt reference mem2 applies to part2 END board2 others Devices DEVICE netdev2 FEATURES ethernet requires bus access ethernet Taste Coordinates gt 202 200 208 206 END netdev2 72
52. ding Rules e ECN Encoding Control Notation e ESA European Space Agency e ESTEC European Space research and Technology Centre e LSB Least Significant Bit e OER Octet Encoding Rules e PER Packed Encoding Rules e PDU Protocol Data Unit e PI Provided Interface e RTOS Real Time Operating System e SER Signalling specific Encoding Rules e SW Software e XER XML Encoding Rules e XML eXtended Markup Language 117 118 Appendix B TASTE technology and other approaches B 1 PolyORB HI C OSAL PoilyORB HI C is the middleware used by TASTE to interface the generated code with the un derlying operating system PolyORB HI C provides some wrappers in order to get access to OS functions tasking data locking etc In this manner it is very similar to OSAL 7 a small mid dleware supported by NASA see http opensource gsfc nasa gov projects osal index php B 1 1 Services and functionalities PolyORB HI C OSAL Tasking yes yes Semaphore and Mutexes yes yes Queues yes yes Time yes yes Memory Management no yes Buffer Memory Pool no yes For memory management memory management and buffer memory pool PolyORB HI C does not provide any service it assumes that the application does not use memory allocation mapping of Ravenscar requirements and everything is declared as static in the code B 1 2 Supported O S PolyORB HI C OSAL RTEMS yes yes Linux yes yes VxWorks no yes partially OS X yes yes partially
53. ds car_controller all_messages txt all_processes txt car_controller car_controller_process rdd car_controller_project rdp dataview RTDSdataView asn profile scheduled rdd dataview unig asn keyboard dataview I asntert h dataview uniq h keyboard c keyboard h 95 Each subdirectory correspond to one subsystem And each of them contain an additional dataview folder that contains the native data types in each supported language so that the end user never needs to write any conversion code or even look at the ASN 1 model with the sole exception of SDL that natively supports ASN 1 11 0 6 Generation of system glue code Buildsupport is reponsible for making the link between user code or code generated by a set of supported modelling tools and a runtime operating system midlleware From the runtime point of view all messages that are exchanged between subsystems are opaque they are char acterized by their size but not by their content The runtime provides mechanisms buffers pro tocols to convey a set of messages of a given size from one user function to the other In that context it is the responsibility of the upper layers to format the message in a way that it can be un derstood by the receiver without any risk of loosing data whatever the underlying layers or the physical architecture of the network if the system is di
54. ead state suspended e Data state occupied e lt Get resource e gt Release resource e Send Output or Subprogram Call e 1 9 Queued events or call requests e More than 9 queued events or call requests 6 3 2 Marzhin assumptions about system behavior To simulate your system Marzhin makes the following assumptions about the behavior of your system e An AADL data component in the Concurrency View without specific properties is consid ered as protected with no specific protocol no priority inversion e An AADL data component can specifies the following protection mechanisms using the Concurrency_Control_Protocol property 1 IPCP value Immediate_Priority_Ceiling_Protocol 2 PCP value Priority_Ceiling_Protocol 40 e Allout ports from the threads send data when the thread completes its task The tool consid ers that the thread completes its job when the upper bound of its execution time is reached It ensures that out ports are trigerred e Thread components that specifies their behavior using the Behavior Annex of the AADL don t send anything on their out ports when they complete their job Instead the tool expects that the system designer specifies sending time using the Behavior Annex Finally to be able to process both scheduling feasability tests as well as scheduling simulation you must check that all timing requirements of the functional aspects of your system are described period deadline
55. ed features 15 1 Introduction Ocarina is an application that can be used to analyze and build applications from AADL descrip tions Because of its modular architecture Ocarina can also be used to add AADL functions to existing applications Ocarina supports the AADL 1 0 1 and AADLv2 2 standards and pro poses the following features 1 Parsing and pretty printing of AADL models 2 Semantics checks 3 Code generation using one of the four code generators e ARAO Ada an Ada AADL runtime built on top of PolyORB e PolyORB HI Ada a High Integrity AADL runtime and its code generator built on top of Ocarina that targets Ada targets Native or bare board runtimes e PolyORB HI C a High Integrity AADL runtime and its code generator built on top of Ocarina that targets C targets POSIX and RI POSIX systems RTEMS e POK a partioned operating system compliant with the ARINC653 standard 4 Model checking using Petri nets 5 Computation of Worst Case Execution Time using the Bound T tool from Tidorum Ltd 6 REAL Requirement Enforcement and Analysis Language an AADLv2 annex language to evaluate properties and metrics of AADLv2 architectural models 7 Scheduling analysis of AADL models with a gateway to the Cheddar scheduling analysis tool from the Universit de Bretagne Occidentale In addition Ocarina fully supports the Data Modeling Annex 3 and Code Generation Annex 4 documents 109 15 2 Code g
56. een e g SCADE KCG code and Simulink RIW code from the ASN 1 type descriptions These tools are developed by SEMANTIX INFORMATION TECHNOLOGIES 3 4 Ocarina Ocarina is a toolchain to manipulate AADL models It runs on Windows Linux and Mac OS X and proposes code generation features that produce code that targets real time middleware such as PolyORB 21 3 5 PolyORB HI PolyORB HI is the middleware that interfaces generated code from AADL models to the RTOS It maps the primitives of the generated code to the ones offered by the operating system in order to ensure their integration PolyORB HI provides the following services to the generated code e Tasking handle tasks according to their requirements period deadline etc e Data define types and locking primitives e Communication send receive data on the local application and send them to the other nodes of the distributed system e Device Drivers interact with devices when a connection uses a specific bus There are two versions of PolyORB HI one for Ada and one for C They are described in the following paragraphs 3 5 1 Ada version The Ada version can be used on top of Linux RTEMS and Open Ravenscar Kernel ORK It enforces the Ravenscar profile and has been successfully tested on LEON and x86 targets 3 5 2 C version The C version can be used on top of Linux RT Linux Maemo and RTEMS It works on LEON ARM PowerPC and x86 It was successfully tested on native co
57. eneration workflow The general philosophy of Ocarina code generators is that of a traditional compiler from a com plete AADL model Ocarina willmap AADL constructs onto PolyORB HI primitives an abstrac tion layer on top of OS concurrency primitives and communication stacks It provides the follow ing services e Tasking handle tasks according to their requirements period deadline etc e Data define types and locking primitives e Communication send receive data on the local application and send them to the other nodes of the distributed system e Device Drivers interact with devices when a connection uses a specific bus The Taste toolchain uses only the PolyORB HI runtimes provided by Ocarina They share the same design goal support Ravenscar systems in an efficient and lightweight way These mecha nisms are adapted to both the C and Ada variants to match actual features of these languages You may find more information in the Ocarina User s Guide 15 3 PolyORB HI C advanced features 15 3 1 Introduction PolyORB HI C is the minimal runtime that supports the execution of the generated code It pro vides an interface between the code generated by Ocarina which corresponds to the implementa tion of the concurrency view and the operating system primitives for thread creation manage ment protected data handling device drivers etc The following section details executive runtime operating systems platforms a
58. ent in many ways but the TASTE developpers does not provide official support on such installation Support is provided only for users that are using the tools within the VM Indeed the use of the same architecture ease bug detection and provide a similar environment for both users and developers and so is more convenient to reproduce bugs related to the toolchain and not environment of the user 4 1 Installation of the virtual machine The Virtual Machine system needs to install a software able to execute VMWare image For that purpose you can download VMWare Player at the following address http www vmware com products player Then once installed you need to download the TASTE virtual machine available at this ad dress http download tuxfamily org taste taste vm tar gz Finally launch VMWare Player open the TASTE VM so that you can start to use the tools in the configured environment 4 2 Installation on your own Linux distribution 4 2 1 Distributions At this time we support the following distributions e Debian e Ubuntu 27 e Mandriva 4 2 2 Using the installation script We provide an installation script that ease the installation and deployment of our tools You can find the installation program at http download tuxfamily org taste taste installer sh The installation program requires you have the program package dialog installed on your system If it is not installed use the package manager of your dist
59. er file The number of bits depends on a preprocessor directive called WORD_SIZE which can be set to 4 or 8 bytes The default value for WORD_SIZE directive is 8 bytes so all ASN 1 INTEGERs are mapped to 64 signed integers For example for the following piece of ASN 1 grammar MyInt INTEGER 1 2 3 Asniscc will produce the following code only header file is shown 84 typedef asniSccSint Mylnt define Mylnt REQUIRED_BYTES_FOR_ENCODING 1 define ERR_Mylnt 1002 x 1 2 3 void MyInt_Initialize Mylntx x pVal flag MylInt_IsConstraintValid Mylntx val int pErrCode flag Mylnt_Encode MylInt val BitStreamx pBitStrm int pErrCode flag bCheckConstraints flag Mylnt_Decode Mylntx val BitStreamx pBitStrm int pErrCode Besides the C data type My Int in this case asn1scc generates one define integer constant which is the maximum number of bytes required for encoding the specific type in unaligned PER 1 byte in this case four functions for initializing checking type constraints decoding and encod ing the type and an error code 1002 that can be return by IsConstraintValid and Encode functions Please note that all generated functions take as argument a pointer to a specific C data type My Int in this case Moreover the BitStreamx type is defined in the asnlcrt h and repre sents a stream of bits 10 2 2 Real Q ERS ASN 1 REAL type
60. er for Ocarina to generate the runtime code of the system and one in the same format as the interface view also in AADL for visualization in the TASTE IV tool The latter is useful for understanding how the vertical transformation works in terms of threads and shared resources protection 4 Perform a number of semantic checks on the interface and deployment views to detect de sign errors as soon as possible 5 Handle context parameters also called functional states see below 6 Generate a script that contains all parameters that are required by the TASTE orchestrator to build the complete system 7 Handle interface to device drivers As a low level command in most cases buildsupport is not called directly by the end user 93 11 0 4 Command line The command line of buildsupport is the following Usage buildsupport lt options gt otherfiles Where lt options gt are g glue Generate glue code w gw Generate code skeletons v onlycv Only generate concurrency view no code j keep case Respect the case for interface names o output lt outputDir gt Root directory for the output files i interfaceview lt i_view aadl gt The interface view in AADL c deploymentview lt d_view aadl gt The deployment view in AADL d dataview lt dataview aadl gt The data view in AADL t test Generate debug information s stack lt stack value
61. ews Data Interface and Deployment the Taste tools automatically generate code that implements the system In particular they generate data definitions in whatever language is used to describe the functionality of each system SCADE models Simulink models C header files Ada ads files etc as well as skeleton projects xscade files mdl files c adb files etc that include the formal specifications of interfaces with empty implementations The tools also create the code that connects function interfaces with their callers they can do that because the Interface View includes these connections Finally they produce the code required to execute the functions on top of Real Time operating systems such as RT Linux RTEMS etc Finally these code generators auto configure and deploy the system so that you don t have to write additional code and introduce potential errors Network addresses drivers and all other deployment code is automatically generated The whole process is illustrated in the figure below the user defines the Data View the In terface View and the Deployment View Then appropriate tools code generators automatically produce data handling functions interaction code with the functional code as well as deployment and configuration code to execute the system on top of an RTOS 17 Pj Data View to Data Function Handling Mgmt middleware Operating System e g RTEMS Interface View Application
62. execution time etc 41 42 Chapter 7 Creating Functions using modelling tools and or C Ada 7 1 Common parts The TASTE process integrates the code for the system s Functions into working executables for Linux or Leon RTEMS or Leon ORK It therefore depends on the provision of the functional code for the user s subsystems Functions This provision is done either via code generated by a modelling tool SCADE Simulink ObjectGeode PragmaDev or via manually written code C Ada Let s see how things work in each of these categories 7 2 SCADE specific If a Function is coded in SCADE then the corresponding AADL part of the Interface View will contain something like this SYSTEM passive_function FEATURES compute IN EVENT PORT Compute_Entrypoint gt compute Assert_Properties RCMoperation gt SUBPROGRAM myLib compute Assert_Properties RCMoperationKind gt unprotected y END passive_function SYSTEM IMPLEMENTATION passive_function others PROPERTIES Source_Language gt SCADE6 END passive_function others SUBPROGRAM compute FEATURES my_in in PARAMETER DataView T_POS Assert_Properties encoding gt UPER result out PARAMETER DataView T_POS Assert_Properties encoding gt NATIVE 43 PROPERTIES Compute_Execution_Time gt 1ms 1ms END compute In this example a Function called passive_function contains a provided interface called compute This
63. ff2 val BitStreamx pBitStrm int pErrCode flag bCheckConstraints flag MySqOff2_Decode MySqOff2 val BitStream pBitStrm int pErrCode 10 3 Using the generated code Using the generated encoders and decoders is a simple procedure To encode a PDU the user must 1 declare a static buffer with the size calculated by asnlscc 2 declare local variable of type Bit Stream 3 call Bit Stream_Init to link the buffer with BitStream variable and 90 4 callthe encode function 10 3 1 Encoding example Here is a code example for encoding an ASN 1 type MyTestPDU int main int argc char argv int errorCode 1 Define a static buffer where uPER stram will written byte perBuffer MyTestPDU_REQUIRED_BYTES_FOR_ENCODING 2 Define a bit stream variable BitStream bitStrm 3 Data to be encode assumed to be filled elsewhere MyTestPDU varPDU 4 Initialize bit strean BitStream_Init amp bitStrm perBuffer MyTestPDU_REQUIRED_BYTES FOR_ENCODING 5 Encode if MyTestPDU_Encode amp testPDU amp bitStrm amp errorCode TRUE printf Encode_failed Error_code is din errorCode return errorCode x The uPER encoded data are within the perBuffer variable while the length of the data can be obtained by calling BitStream_GetLength amp bitStrm 10 3 2 Decoding example The process for decoding an ASN 1 message is similar Here is a code example
64. function SYSTEM IMPLEMENTATION passive_function others PROPERTIES Source_Language gt Simulink END passive_function others SUBPROGRAM compute FEATURES my_in in PARAMETER DataView T_POS Assert_Properties encoding gt UPER 50 result out PARAMETER DataView T_POS Assert_Properties encoding gt NATIVE PROPERTIES Compute_Execution_Time gt 1ms 1ms END compute In this example a Function called passive_function contains a provided interface called compute This interface has one input parameter and one output parameter which in this exam ple are both of type T_POS This type is described in the ASN 1 grammar T POS CHOICE longitude REAL 180 0 180 0 latitude REAL 90 0 90 0 height REAL 30000 0 45000 0 subTypeArray SEQUENCE SIZE 10 15 OF TypeNested label OCTET STRING SIZE 50 intArray T ARR TypeNested SEQUENCE TARR SEQUENCE SIZE 5 6 OF INTEGER 0 32767 This type is a complex one referencing other types and containing arrays SEQUENCE OFs too Let s see how these two inputs the ASN 1 grammar and the Interface view are combined during TASTE development Invoking asn2dat aModel py on the ASN 1 grammar bash cd SimulinkExample bash Is I total 12 drwxr xr x 2 assert assert 4096 Sep 20 10 47 drwxr xr x 17 assert assert 4096 Sep 20 10 47 rw r r 1 assert assert 903 Sep 20
65. he Data View describes the data definitions of your system It defines data types using the ASN 1 standard 2 The Interface View details the system from a purely functional point of view This view describes the functions performed by the system and the data types that they handle Data associated with the functions rely on the Data View definitions Read about ASN 1 on http en wikipedia org wiki ASN 1 16 3 The Deployment View defines how system functions are bound on the hardware It defines the underlying architecture processors devices memories etc and allocates each function on these hardware components 4 The Concurrency View represents software and hardware aspects of the system It contains tasks data and communication between system artifacts tasks processes subprograms etc The concurrency view is automatically generated from the interface view and the deployment view by the buildsupport tool see section 3 6 Thus all the mapping rules that transforms system interfaces and deployment information are included in this tool that automatically generates a complete description of the system Finally the Concurrency view provides a complete view of the system giving the ability to analyze it using validation tools The TASTE CV tool 3 2 provides such functionnality linking the concurrency view with schedulability analysis tool 2 4 Development process overview Once designers have specified the different vi
66. he automatically generated TASTE GUIs mes sage exchanges i e telemetry and telecommands can be monitored in real time via the freely available PragmaDev MSC Tracer This allows for direct and simple monitoring of the commu nications channels between the TASTE GUIs and the main applications see figure 1 2 SMSC Tracer available at http www pragmadev com product tracing html 9 Trace View Windows Help oA 2 lu l gt System ti MainSystem console_GUI La 0x01 0x02 285969 285969 print_tette gt 286017 trn_magr command 4 args 286017 new_mode 0 19 314884 314884 print_teite gt 314907 tm_mgr command 4 args 314907 new_mode 0 HD 334821 334821 print_tette gt 334865 tm_mar enmenand A Tracing 4 new_mode U Hh Wa Figure 1 2 Automatic monitoring of TM TCs via MSC Tracer 10 1 6 Automatic Python test scripts Testing the usually complex logic inside space systems requires big regression checking suites TASTE tools automatically create Python bridges that offer direct access to the contents of the ASN 1 parameters as well as direct runtime access to the TM TCs offered by the system All that the user needs to do to create his set of regression checks is to write simple Python scripts that exercise any behavioural aspect of the system For example a scenario like this when I send a TC with value X in param Y then I expect a TM
67. he compilation is using PolyORB HI C instead of the default PolyORB HI Ada If all Functions are using only C code this will cause a decrease in the generated 79 Y 0 S m C S C G V e l binary size since Ada s run time won t be linked in Uses the appropriate GCC coverage options to allow invocation of gcov on the generated binary only for Linux builds Use AADLv2 when speaking with Ocarina will become the default soon currently using AADLv1 Specify the output directory where the generated code and binaries will be placed This option specifies how much stack size to use in KB This depends on your Functional code set it appropriately This option specifies the ASN 1 grammar describing the messages sent between subsystems This option specifies the interface view AADL file This option specifies the deployment view AADL file This option specifies that the name Function is implemented in SCADE KCG and the zipFile contains the SCADE KCG generated C code for the Function This option specifies that the name Function is implemented in Simulink RTW and the zipFile contains the Simulink RTW generated C code for the Function This option specifies that the name Function is implemented in manually written C code and the zipFile contains the C code for the Function This option specifies that the name Function is implemented in manually written Ada code and the zi
68. he list of all Taste specific AADL properties is available in section E 8 1 8 Example of a manually written interface view The following example details the modeling of an interface view with AADL We provide the graphical representation as well to help the reader to understand the mapping between the graphic representation and the textual one 66 File Edit View No Selection PACKAGE default IV PUBLIC WITH DataView WITH default FV with default I1V container with default IV container2 WITH Taste TASTE Interface View SYSTEM default END default SYSTEM IMPLEMENTATION default others SUBCOMPONENTS function1 SYSTEM default IV container function1 others Taste Coordinates gt 14 14 35 45 function2 SYSTEM default I1V container function2 others Taste Coordinates gt 91 27 109 50 function3 SYSTEM default I1V container2 function3 others Taste Coordinates gt 135 33 155 70 function4 SYSTEM default I1V container2 function4 others Taste Coordinates gt 135 73 185 94 CONNECTIONS obj342 SUBPROGRAM ACCESS function2 provided1 gt function required1 Taste Coordinates gt 35 42 63 42 63 46 91 46 END default others 67 PROPERTIES Taste Coordinates gt 0 0 297 210 TASTE dataView gt DataView TASTE dataViewPath gt tmp dataview aadl END default IV PACK
69. hernet Taste Coordinates gt 105 180 107 182 END boardi PROCESSOR cpu1 PROPERTIES Scheduling Protocol gt Posix_1003_Highest_Priority_First_Protocol END cpu1 PROCESS part1 END parti MEMORY mem1 END mem1 DEVICE driver1 FEATURES ethernet requires bus access ethernet Taste Coordinates gt 105 180 107 182 END driveri SYSTEM IMPLEMENTATION board1 others SUBCOMPONENTS parti PROCESS part1 Taste APLC_Properties gt APLC gt testcontainer func1 Coordinates gt 21 42 99 76 Source_Language gt C Taste APLC_Properties gt APLC gt testcontainer func2 Coordinates gt 21 79 98 113 Source_Language gt C Taste APLC_Binding gt testcontainer funci testcontainer func2 Deployment Port_Number gt 0 Taste Coordinates gt 17 28 103 118 cpu1 PROCESSOR cpu1 Taste Coordinates gt 12 19 105 123 memi MEMORY mem1 Taste Coordinates gt 12 135 105 167 driveri DEVICE driveri Taste Coordinates gt 12 172 105 201 y CONNECTIONS The bus connections BUS ACCESS obj5575_ethernet gt driver1 ethernet PROPERTIES Connexion des CPUs aux process drivers Actual_Processor_Binding gt reference cpu1 applies to parti Actual_Processor_Binding gt reference cpu1 applies to driver Actual_Memory_Binding gt reference memi applies to parti END board1 others SYSTEM boar
70. ile Figure 7 14 Invoking the buseditor Bus Types Editor Bus types in base workspace mBus elements ur oona Ey po Intarray_type Name Dimension _Data Bus Type Sample 2 Label_type latitude 1 double 1 Label_type_t Subtypearray_type TARR E T_Pos longitude 2 height Bus name Heade gt subTypeArray Subt T_POS f 5 label Label_type_t S int rray T_ARR mBus description T_STRING m Tunallactad a Figure 7 15 Types are now available MATLAB 7 5 0 R2007b File Edit View Debug Distributed Desktop Window Help Z ES h BS a H q e ry 17 Current Directory C tmp Simulink example Shortcuts 7 Howto Add 4 What s New Workspace AA AS Command Window ada e New to MATLAB Watch this Video see Der All Files Type Simulink_DataView_asn m M file gt gt buseditor setOutputsBusSelector m M file OESTE AA aa dd file setinputsBusCreator m Open Run View Help Open as Text Open Outside MATLAB Import Data Figure 7 16 Right click on FUNCTIONNAME script m select Run 53 MATLAB 7 5 0 R2007b File Edit View Debug Distributed Desktop Window Help a amp amp Ea 2 oo Ae ry 2 O Current Directory C tmp Simulink example Shortcuts 7 Howto Add 7 What s New Workspace ASAS Command Window Bir E gt New to MATLAB Watch this
71. in all these cases the maximum number of bytes required for encoding of these types cannot be determined at compile time Space software needs to be certain that all the necessary space for types is reserved up front so all constructs that can only be handled via dynamic heaps are forbidden The current version of asnlscc is also not supporting some advanced ASN 1 features such as macros parameterization and Information Class Objects 10 2 Description of generated code Asniscc generates one C source file and one header file for each input ASN 1 grammar Further more for each type assignment that exists in an ASN 1 file the following are created e one corresponding C data struct a new type as result of a typedef with the name of the type assignment e one define integer constant which is the maximum number of bytes required for storing any form of this type in unaligned PER encodings e four functions for initializing checking type constraints decoding and encoding the type e zero or more define constants with the error codes that can be returned by the check constraints function The generated C data structure depends on the ASN 1 type The following paragraphs provide a short description of the generated C data strictures for each ASN 1 type 10 2 1 Integer ASN 1 INTEGER types are mapped to asn1SccSint which is a 32 or 64 bit signed integer The asnlSccSint type is defined in the asnicrt h head
72. in this documentation within the PolyORB HI C and PolyORB HI Ada part For PolyORB HI C section 15 3 3 provides all required information 6 3 The concurrency view TASTE CV TASTE CV has the ability to edit the concurrency view generated by buildsupport It provides schedulability analysis functionalities to assess system scheduling feasability as well as scheduling simulation Using this tool we could be able to know if the deadlines of your tasks will be met and also inspect the behavior of your system including its potential problems such as deadlocks To assess scheduling feasability TASTE CV embedds the Cheddar scheduling analyzer It pro 39 cesses AADL models and transform them into a suitable representation for Cheddar The Cheddar output is based in scheduling theory and feasability tests Readers interested in scheduling tests and scheduling theory could refer to articles listed on the official Cheddar website see D for web links To simulate system scheduling TASTE CV relies on the Marzhin scheduling simulator Marzhin shows the simulation of the execution of each tasks running waiting for a resource sleeping as well as the state of shared data locked unlocked 6 3 1 Marzhin symbols The following symbols are usedby Marzhin within the simulation window e Thread state none e Thread state running e _ Thread state ready e Thread state awaiting resource e x Thread state awaiting return e Thr
73. ing Execute and analyze the system with profiling GPROF Profile system timing Analyze memory consumption Profile memory consumption taste Figure 14 1 Code generation menu Execution Analysis for binary mypart_obj102 Function Name Executionnumber TotalTime Number __Po_hi_get_entity_from_global_port 40 0 00 40 3300 _po_hi_get_time 33 0 00 33 32 000 _po_hi_gqueue_get_destinations_number 30 0 00 30 O po_hi_transport_get_node_from_entity 20 0 00 20 Po_hi_wait_for_next_period aa 00 ss _po_hi_gqueue_wait_for_incoming_event 11 0 00 11 Wo 000 Encode_NATIVE_My_Integer 10 0 00 10 Figure 14 2 Example of code coverage analysis 14 2 Memory analysis TASTEGUI gives you the ability to analyze the memory consumption of each part of the system This feature is available from the code generation menu as shown in the picture 14 3 Then the tool let you choose the process you want to analyze To do so a combobox let you choose the generated application that will be processed as shown in figure 14 4 For each generated binary it can report the memory related to each layer of the system or the memory of each function executed by the system cf figure 14 5 The different layers that can be analyzed are the following e Application layer memory consumed by the user code code contained in zip archive used by the orchestrator 102 File Options Advanced Help System
74. interface has one input parameter and one output parameter which in this exam ple are both of type T_POS This type is described in the ASN 1 grammar T POS CHOICE longitude REAL 180 0 180 0 latitude REAL 90 0 90 0 height REAL 30000 0 45000 0 subTypeArray SEQUENCE SIZE 10 15 OF TypeNested label OCTET STRING SIZE 50 intArray T ARR TypeNested SEQUENCE T ARR SEQUENCE SIZE 5 6 OF INTEGER 0 32767 This type is a complex one referencing other types and containing arrays SEQUENCE OFs too Let s see how these two inputs the ASN 1 grammar and the Interface view are combined during TASTE development Invoking asn2dataModel py on the ASN 1 grammar bash cd ScadeExample bash Is I total 9 drwxr xr x 2 assert assert 88 May 17 14 20 drwxr xr x 37 assert assert 4608 May 17 14 21 rw r r 1 assert assert 2182 May 17 14 20 DataTypesFull asn bash asn2dataModel py toSCADE6 DataTypesFull asn bash Is I total 57 drwxr xr x 2 assert assert 128 May 17 14 23 drwxr xr x 37 assert assert 4608 May 17 14 21 rw r r 1 assert assert 2182 May 17 14 20 DataTypesFull asn rw r r 1 assert assert 46321 May 17 14 23 DataTypesFull xscade The model mapper generates a xscade file and this file is directly importable in SCADE The next steps show how 1 Anew project is created in SCADE see
75. l functions or your system By default the interface view editor creates a system implementation called default others which con tains all functions system components and connects their features By connecting their features it associates provided and required interface In the following example the system default others contains 4 functions It connects func tionl and function2 the interface provided by function2 providedl is connected to the in terface required by functionl required SYSTEM default END default SYSTEM IMPLEMENTATION default others SUBCOMPONENTS functioni SYSTEM defau Taste Coordinates function2 SYSTEM defau Taste Coordinates function3 SYSTEM defau Taste Coordinates gt 135 33 155 70 function4 SYSTEM default IV container2 function4 others Taste Coordinates gt 135 73 185 94 CONNECTIONS conni SUBPROGRAM ACCESS function2 provided1 gt function1 required1 Taste Coordinates gt 35 42 63 42 63 46 91 46 END default others t IV container function1 others gt 14 14 35 45 t IV container function2 others gt 91 27 109 50 t I1V container2 function3 others gt t 8 1 7 About AADL properties of the interface view The TASTE Coordinates property was introduced to describe where components are located in the graphical example If you are using only textual representation they can be ommitted T
76. l raise an error at run time Also when the speed of the driver is not specified the driver automatically fallback to a default speed which is 34600 e Spacewire for LEON2 LEON3 with RTEMS the configuration is composed of one number that corresponds to the node identifier of the device 15 4 PolyORB HI Ada advanced features To support Taste requirement to generate code that is compatible with the Ravenscar paradigm PolyORB HI Ada relies on a set of Ada patterns that faithfully implement each concurrent con structs sporadic cyclic and protected Compliancy to the Ravenscar model is enforced at compile time by the Ada compiler that will check that each restrictions defined by the Ada 2005 Reference Manual 5 and the Guide for the use of the Ada Ravenscar Profile in high integrity systems 6 You may find more information in the PolyORB HI Ada User s Guide PolyORB HI Ada has been successfully tested on the following platforms 1 Native systems Windows Linux Solaris 2 Bareboard systems ORK GNAT Pro High Integrity Edition 3 Real Time Operating Systems RTEMS In addition PolyORB HI Ada supports the following drivers 1 Native systems UART BSD Sockets 2 ORK SpaceWire and UART for the GR RASTA board by Aeroflex Gaisler 112 15 5 Transformation from AADL to MAST Ocarina provides the ability to generate MAST models from AADL descriptions It is then used by the MAST scheduling analysis tool
77. lication be haviour The project contains a process that represents the function you can edit it to defined system concerns In addition Provided and Required Interfaces are specified in SDL using signals so that you can use them to communicate with the other entities of the TASTE systems Finally to ensure data consistency ASN 1 data types are also embedded in your SDL project so that you can use it in the description of application concerns and for communication with the other entities of the system To edit the new RTDS project run RTDS on the generated rdp file rtds lt project file gt rdp Then a project like the following will be opened Note that this project contains two parti tions one with the declarative part data types import etc another with the architecture SDL processes etc 56 Diagram Edit Search View Export Windows Help Ite al El 2 gt ax ells A ln L Declarations gt Architecture USE ASN1Types 7 signal sendint My_Integer 25 signal activator Ec wi 0 D DIAE pinger_project rdp A pinger 7 4 4 Step 4 Generate SDL related code Once you have edited your SDL model close RTDS Then you need to generate the code that corresponds to this application model First you will need to add some files in the RTDS project directory Go into the directory that contains the RTDS project and then add the following files profile
78. ll last File home rtds Tools Python2 6 Tk8 5 th bin Linux lib python2 6 site packages File home rtds Project Versions 4 12 rtds_dev src rtds editor control rtdsGene1 File home rtds Project Versions 4 12 rtds_dev srce rtds editor control rtdsGene File home rtds Project Versions 4 12 rtds_dev src rtds editor business Sd1Z1001 File home rtds Project Versions 4 12 rtds_dev src rtds editor business Project File home rtds Project Versions 4 12 rtds_dev src rtds editor business CCppCode OSError Errno 2 No such file or directory profile The errors do not seem to be an issue to be investigated 7 4 5 Step 5 Zip generated code to be used by the orchestrator Once the code has been generated you need to create an archive that will contain it To do so go into the directory of the RTDS project the one that contains the rdp file and invoke the following command zip lt SDL system name gt lt SDL system name gt x profile x For example if your SDL function is called my_rtds_system you will create the archive using the following command 58 zip my_rtds_system my _rtds_system x profile x This command creates a ZIP archive called lt SDL system name gt zip This file will be later used by the orchestrator to integrate all functions altogether 7 4 6 Step 6 Zip generated code to be used by the orchestrator When you produce your system with the orchestrato
79. llowing C code is generated typedef char MyString 11 define MyString REQUIRED _BYTES_ FOR_ENCODING 7 define ERR_MyString 1008 x SIZE 1 10 FROM A Z abcde void MyString_Initialize MyString pVal flag MyString_IsConstraintValid MyString val int pErrCode flag MyString_Encode MyString val BitStreamx pBitStrm int pErrCode flag bCheckConstraints flag MyString_Decode MyString val BitStreamx pBitStrm int pErrCode 10 2 9 Sequence and Set ASN 1 SEQUENCEs and SETs are mapped to C structs The generated C struct has as fields the fields of the SEQUENCE or SET If the SEQUENCE or SET has optional fields then there an additional field called exists for indicating the presence absence of the optional fields For example for the following ASN 1 SEQUENCE E MyStruct2 SEQUENCE a2 INTEGER 1 10 b2 REAL OPTIONAL c2 MyEnum OPTIONAL The following code is generated typedef struct asn1SccSint a2 double b2 MyEnum c2 struct unsigned int b2 1 unsigned int c2 1 exist MyStruct2 define MyStruct2_REQUIRED_BYTES_FOR_ENCODING 14 define ERR_MyStruct2_a2 1013 1 10 void MyStruct2_Initialize MyStruct2x pVal flag MyStruct2_IsConstraintValid MyStruct2 val int pErrCode flag MyStruct2_Encode MyStruct2x val BitStreamx pBitStrm int pErrCode flag bCheckConstraints flag MyStruct2_Decode
80. m component for a provided interface called providedl having one parameter one type TM_T SUBPROGRAM provided1 FEATURES paramini in PARAMETER DataView TM_T Taste encoding gt NATIVE END provided 64 The feature added in the system that represents the function which contains the interface specifies all the properties of the interface type importance etc For example the following system component function2 provides an access to the interface providedl SUBPROGRAM provided SYSTEM function2 FEATURES provided1 PROVIDES SUBPROGRAM ACCESS default FV provided Taste RCMoperationKind gt sporadic Taste RCMperiod gt 0 ms TASTE Compute_Execution_Time gt 0 ms 100ms Taste Deadline gt 0 ms Taste Importance gt MEDIUM Taste Coordinates gt 89 45 91 47 PROPERTIES Source_Language gt C Taste Coordinates gt 91 27 109 50 END function2 Here the following properties are added to the provided interface 1 Taste RCMoperationKind indicates the kind of the interface The value can be spo radic periodic protected or unprotected This property is defined in the Taste specific prop erty set 2 Taste RCMPeriod specifies the period at which the interface can be called This property is defined in the Taste specific property set 3 Taste Importance specifies if an interface is more important in terms of priority than an
81. mputers x86 with Linux LEON boards with RTEMS ARM with DSLinux and Maemo 3 6 Buildsupport Buildsupport provides several functionalities 1 It generates the concurrency view from the interface and deployment views The result is an AADL models that is subsequently processed by Ocarina to generate and build the system in C or Ada 2 It creates skeletons for each Function s target environment e g xscade files for SCADE Functions h c files for C Functions ads adb for Ada Functions etc that include the complete specifications of interfaces with empty implementations This part assumes that we have a description of all Archetypes meaning how we convert the interface and deployment view into a concurrency view that describe tasking concerns It means that this tool contain all relevant information to map a cyclic sporadic protected unprotected interface into thread and data 1 FIXME TO BE COMPLETED BY MAXIME 22 3 7 Orchestrator The orchestrator is a program that automates the build process It takes as input the data view the interface view the deployment view as well as the complete Functional code i e the filled in skeletons and then calls each tool buildsupport ocarina compilation scripts and so on As a result the Orchestrator produces the final binaries that correspond to the system implementation The tool is maintained by SEMANTIX INFORMATION TECHNOLOGIES The process that
82. n you can directly associated the device in your model since Ocarina automatically in tegrates this component when it parses and analyzes models For example the following model add an ethernet ip device in the system being configured with the IP address 192 168 0 10 and listening for incoming connections on port 45678 with ocarina_devices system main i subcomponents netif device ocarina_devices eth_linux raw Deployment Configuration gt ip 192 168 0 10 45678 end main i 8 5 Device driver configuration the Deployment Configuration property When you associate a device you must configure it it means 74 1 Specify the type of device it implements 2 Configuration items such as IP address device node etc For that purpose the designer binds the Deployment Configuration property The value of the property is clearly defined for each kind of device driver 1 For sockets ip driver the value of the property is ip ip_addr ip_port For example the value ip 192 168 0 1 1234 specifies that the device is a network device with an IP stack it is associated with the address 192 168 0 1 and listen for incoming connections on port 1234 2 For spacewire driver the value of the property is spacewire SI ENDER_CORE_ID RECEIVER_CORE_ID For example the value spacewire 4 5 specifies a spacewire device that will communicate through spacewire cores 4 and 5 3 For serial drive
83. nally the TASTE tools tracer py and tracerd py allow a direct link of the GUIs with the freely available PragmaDev MSC Tracer The user first starts the MSC Tracer see figure 9 1 and clicks on New Trace Then tracerd py is spawned bash tracerd py lt ipAddressOfMSCTracer gt lt portOfMSCTracer gt IMSC Tracer available at http www pragmadev com product tracing html 81 Trace View Windows Help a BAA IoD System ti MainSystem console_GUI ene 0x01 0x02 285969 print_ted 285969 print_te te gt 286017 gt tm_mar 4 command 4 args 4 286017 new_mode 0 HD 314884 print_ted 314884 print_tette gt 314907 m tm_mgr command 4 args 314907 new_mode 0 H 334821 print_ted 334821 print_tette gt tm_moar 334865 m enmmanrf A Tracing 4 new_mode U wa Figure 9 2 Automatic monitoring of TM TCs via MSC Tracer The IP address of the machine running the MSC Tracer and the port number of the MSC tracer as configured in the Options dialog must be provided to tracerd py After that the user must simply spawn the automatically generated TASTE GUI applications under the supervision of tracer py bash tracer py lt ipAddressOfTracerd py gt 27182 lt filenameOfGUIBinary gt The port hardcoded as 27182 can be modified if desired by editing tracerd py The TCs and TMs sent and received will then be monitored in real time in the MSC tracer
84. nd device drivers supported by PolyORB HI C 15 3 2 Supported Operating System Runtime PolyORB HI C supports the following operating systems with the following platforms e RTEMS executive for the SPARC LEON architecture BSP e RTEMS executive for the SPARC LEONJ3 architecture BSP e RTEMS executive for the i386 architecture e RTEMS executive for the ARM architecture and the Nintendo DS BSP e Linux operating system for the i386 architecture e Linux operating system with embedded real time libraries such as uClibc dedicated ker nels etc Supported for the i386 architecture 110 e Linux operating system for the ARM architecture and the MAEMO BSP Generally all POSIX compliant operating system is supported To maximize the potential of portability PolyORB HI C uses the POSIX API to interface the generated code with the underlying operating system However for the RTEMS executive PolyORB HI C is able to be interfaced directly with the RTEMS legacy API it avoids the use of the POSIX layer and so reduce the memory footprint 15 3 3 Supported drivers The following drivers are supported for each kind of supported operating systems e Linux Serial driver interface with the serial port Ethernet driver for sending data over an ethernet bus ethX interface e RTEMS Spacewire driver for the LEON2 LEONS platforms using the RASTA board Serial driver for the LEON2 LEONJ3 platforms using the serial interface
85. nerated typedef asniSccSint Mylnt typedef flag MyBool define MyBool REQUIRED_BYTES FOR_ENCODING 1 void MyBool_Initialize MyBoolx pVal flag MyBool_IsConstraintValid MyBoolx val int pErrCode flag MyBool_Encode MyBoolx val BitStreamx pBitStrm int pErrCode flag bCheckConstraints flag MyBool_Decode MyBoolx val BitStream pBitStrm int pErrCode 10 2 5 Null ASN 1 NULL types are mapped to a custom C type NullType which is defined in asnicrt h as a char Hence for the following ASN 1 code MyNull NULL The following code is generated typedef NullType MyNull define MyNull REQUIRED _BYTES FOR_ENCODING 0 void MyNull_Initialize MyNullx pVal flag MyNull_IsConstraintValid MyNullx val int pErrCode flag MyNull_Encode MyNullx val BitStream pBitStrm int pErrCode flag bCheckConstraints flag MyNull_Decode MyNullx val BitStream pBitStrm int pErrCode 86 10 2 6 Bit String ASN 1 BIT STRINGs are mapped to C structs which have two fields 1 a buffer that holds the bit stream and 2 an integer that holds the current number of bits in the bit stream For example for the following ASN 1 code MyBit BIT STRING SIZE 20 the following C code is produced begin Istlisting language c typedef asniSccSint MyInt typedef struct long nCount Number of bits in the array Max value is 20 x byte arr 3 MyBit
86. null with your own code end compute end passive_function After filling in the code the user must simply zip the contents in the directories bash mkdir package bash cd package bash mkdir passive_function bash cp a path to user filled files passive_function ch passive_function bash zip 9 r passive_function zip passive_function This zip file is the one that must be passed to the orchestrator bash DMT OG assert builder ocarina py f o binary linux a DataView asn Y i InterfaceView aadl Y c DeploymentView aadl Y C passive_function path to passive_function zip TASTE therefore completely automates the interface specification allowing the user to focus on the implementation logic of his interfaces The passing of the parameters via PolyORB the encodings decodings via ASN 1 endianess issues etc are all handled via TASTE 62 Chapter 8 Use AADL models without graphical tools You can also write the AADL views of a TASTE system by hand In that case you will need to write AADL models and ASN 1 types definitions by yourself The Interface View and Deployment View are AADL models while the Data View includes the ASN 1 data types definitions We don t explain how to write the Data View there are many tutorials about ASN 1 and we don t use exotic features of this language only the basics type declarations and constraints On the contrary
87. nux distribution If you want to upgrade the tools on your own installation you need to run the installation program again Fortunately the installation program is already installed when you run it for the first time In that case you just have to invoke the command taste installer on your system It will restart the installation program and will use the to upgrade the tools installation directory you used at installation time 30 Chapter 5 Using ASN 1 ASN 1 is a standardized notation to represent data types An overview of this standard can be found on http www itu int ITU T asnl introduction index htm For readers that are interested in ASN 1 and want to learn the language a tutorial can be found here http www obj sys com asnltutorial asnlonly html All data types exchanged between Function interfaces are described using ASN 1 Data types definitions constitute the Data View These types are then used by function interfaces to specify the parameter types in a standardized way On the implementation side code generators map the ASN 1 types into language specific definitions e g SCADE definitions or Simulink RTW defini tions or Ada C definitions etc and create functions to exchange these types between different environments regardless of their specific characteristics CPU models endianness word sizes etc If you are not familiar with ASN 1 an easy way to get acquainted is to follow the tutorial on http www obj
88. ocessor Barrier_Evaluation Time applies to processor Budget_Replenishment_Overhead Time applies to processor Budget_Exhausted_Recovery_Call Time applies to processor Devices Processor Processor_Speed Frequency applies to processor XXX to be replaced with AADLv2 property Interconnection To express the message size bounds we use the standard property Allowed_Message_Size which is a range of standard type Size To describe the propagation delay and the transmission time ona bus we use the standard properties Propagation_Delay and Transmission_Time Interconnection_Speed_Factor aadlreal applies to bus Transmission_Kind Transmission_Type applies to bus Bandwidth Data_Volume applies to bus Networking protocol Memory Memory_Size Size applies to memory Access_Time Time applies to memory Access_Bandwidth Data_Volume applies to bus 127 Deployment Properties To express the binding of an AP Level container to a processor we use the standard property Actual_Processor_Binding To express the binding of a connection between a couple of provided required interfaces of two AP Level containers to a bus a processor or a device we use the standard property Actual_Connection_Binding To express the binding of an AP level container to a particular memory we use the standard pr
89. ode oo oa na a Re we a a 96 Orchestrator advanced features 97 TASTE daemon advanced features 99 131 Date ee en Ban u aE ee EERE EHS 99 14 15 TASTE GUI advanced features 14 1 Coverage analysis 14 1 1 Restriction of the coverage analysis function 2222222 14 2 Memory analysis 14 3 Scheduling analysis with MAST 1471 Scheduling analysis restrictions u o sooro s ab AR 14 4 Change compilation linking flags 14 5 Change the text editor for interface code modification ooa 14 6 Execution of applications using the TASTE daemon a aaao Ocarina advanced features 15 1 Introduction 15 2 Code generation workflow 15 3 PolyORB HI C advanced features hbo HH a a rn 15 3 1 Introduction 15 3 2 Supported Operating System Runtime lt a porosa 440 EES SS 15 3 3 Supported drivers 15 4 PolyORB HI Ada advanced features aoaaa 15 5 Transformation from AADL to MAST 0 00000 eee eee ene 15 5 1 About protected data Abbreviations TASTE technology and other approaches B 1 PolyORB HI C OSAL B 1 1 Services and functionalities 2 2 Hm mn B 1 2 Supported O S B 1 3 Configuration and set up C More information Useful programs TASTE specific AADL property set 101 101 101 102 104 106 106 107 107 109 109 110 110 110 110 111 112 113 115 117 119 119 119 119 120 121
90. odel txt tmp NvY2g l Generation Date 2010 10 10T22 17 53 Figure 14 9 Example scheduling analysis with MAST 14 3 1 Scheduling analysis restrictions Depending on your system architecture and requirements scheduling analysis would be feasible or not Sometimes due to some restrictions on scheduling analysis techniques MAST is not able to be executed In that case TASTEGUI reports an error For a complete description of scheduling analysis kinds features and restrictions please refer to the MAST documentation links to the MAST website are provided in section D 14 4 Change compilation linking flags When you re writing the functional code of your system you may require external libraries or introduce conditional compilation to enable some features or debugging informations In that case you would change or add some flags used in the compilation process TASTEGUI gives you the ability to specify your own compilation and linking flags also known as the CFLAGS and LDFLAGS variable To do so go to the Options menu and choose the Edit compilation options item Then a window let you edit the compilation and linking flags picture 14 10 shows an example of this window The first row Additional compiler flags corresponds to the compilation options the CFLAGS option while the Additional linker flags corresponds to the linking option LDFLAGS 106 Additional Compiler flags Addition
91. of the LEON board Serial driver for the LEON2 LEONJ3 platforms using the RASTA board NE2000 driver for the i386 platform for sending receiving data over an emulated RTEMS system on top of QEMU Device drivers are specified in the Deployment View of TASTE models The user captures drivers configuration using the Configuration field in the driver properties There is the list of the configuration of each device driver e Ethernet driver for Linux and NE2000 driver for RTEMS the configuration should be writ ten like that ip XXX XXX XXX XXX NNN Where XXX XXX XXX XXX corresponds to the IP address associated to the interface and NNN the port bound to the generated application produced programs will listen on this port for incoming requests data e Serial driver for LEON2 LEON3 on RTEMS and serial driver for i386 on Linux and RTEMS the configuration should be written like this dev accessed_device speed baudrate For example 111 On RTEMS LEON a valid configuration that accesses the second serial port would be dev dev console_b speed 34600 On RTEMS LEON with a RASTA board a valid configuration that accesses the first serial port of the RASTA rack would be dev dev apburasta0 speed 19200 On Linux x86 a valid configuration that accesses the first serial COM port would be dev dev ttyS0 speed 115200 Note that the RTEMS LEON driver supports only a speed of 34600 bauds Other specified values wil
92. oolset usage 77 El ASN Tools seeria aaa en ee a 77 91 1 Convert ASN 1 types into AADL models uw are ser en 77 9 1 2 Convert ASN 1 types into Functional Data Models 77 92 Oarinaand PORE seca er ia 78 o eor ae bd eon oa a ee 78 24 Keane monitorning a osas ran irre Oe ewe AAA 81 ASN1SCC manual advanced features for standalone use of the TASTE ASN 1 compiler 83 10 1 Restrictions gt gt gt ss esos a ie ok oe a a a A ees eee de ee ee 84 10 2 Description of generated code o 2 4 bh 3 ehh ee da PALER 84 1023 MOBO 222222 52 Pe St Sid POE SSS EHSS Fhe Ges ehs Gs 84 Mz Rel eree oe ee we eo oe BS ieee es doe we oe ee ee oe ee 85 19 23 Enumerated er 0 0 da BE A ba ee A a PA eS ES 85 10 24 Boolean oa E pa ee a ee Pre 86 1025 Dill 2 22 0 ek el hehe ee Ders 86 102 De u ar rn here ee Be EOS ER ES 87 Na nen en OEE Re ae per nd 87 1028 IA5String and NumericString re re er hen en 87 a e er oa eS HES ae ea Pepe 88 102 CWE 6 ds koa See ds eb eo BS pa k aoe es Bee ea a ee es 89 10 2 11 Seguence of and SEO ir oe ee Re ae DoS ORE HOw Bd 89 10 7 Using tie generated code gk gk oe AA RA RAI OS 90 1021 Tre example 0 en a eke ee A Re EE EM BH 91 1032 Decoding example o 2 BPS eS SPER SE HSS HESS BR LES 91 buildsupport advanced features 93 1103 Cee 12 oe SS Bae Aa ie a aa as da aa 93 1104 Command ine spa a eee Oe ek re 94 11 0 5 Generation of application skeletons 0 66 6s bes ween eee we ewes 94 108 Generation of system glue c
93. operty Actual_Memory_Binding Properties relative to the RCM grammar RCMoperation classifier subprogram applies to event port event data port RCMoperationKind_list type enumeration cyclic sporadic variator protected transaction barrier unprotected deferred immediate any RCMoperationKind RCMoperationKind_list applies to event port event data port access subprogram access RCMceiling aadlinteger applies to event port event data port RCMperiod Time applies to event port event data port access subprogram access RCMpartition reference system applies to system dataview list of aadlstring applies to package dataviewpath list of aadlstring applies to package Encoding_type type enumeration native uper acn Encoding Encoding_type applies to parameter Ada_Package_Name aadlstring applies to data interfaceView aadlstring applies to package WCET Time applies to subprogram access Instance_Name aadlstring applies to system Associated_Queue_Size aadlinteger applies to subprogram EncodingDefinitionFile classifier data applies to data 128 end Taste 129 130 Bibliography 1 SAE Architecture Analysis amp Design Language AS5506 SAE sep 2004 available at http www sae org 2 SAE Architecture Analysis amp Design Language v2 AS5506A SAE jan 2009 available at http www sae org
94. or example taste generate skeletons interfaceview aadl code Generating dataview and calling buildsupport buildsupport contact maxime perrotin esa int or ttsiodras semantix gr Based on Ocarina 2 0w Working Copy from r1849 Executing asn2dataModel py o code car_controller dataview toRTDS code dataview uniq asn Executing asn2dataModel py o code car_command dataview toAda code dataview uniq asn Executing asn2dataModel py o code keyboard dataview toC code dataview uniq asn Executing asn2dataModel py o code arduino_handler dataview toC code dataview uniq asn code is the output directory as requested by the user It is created if it did not previously exist What is done is that the interface view is parsed to gather all dataviews then the buildsupport command is called Buildsupport calls the asn2dataModel py script to generate ASN 1 datatypes in the subsystem languages and generates code that is ready to be filled by the end user If we look at the directory tree that is generated by buildsupport we find all the ingredients to start the real job which is to implement functional code or model tree code code arduino_handler arduino_handler c arduino_handler h dataview I asntcrt h dataview uniq h build script sh car_command car_command adb car_command ads dataview adaasntirtl ads dataview a
95. os era bi es nr SOM SEES ERS eee SE es 3 9 TASTE daemon tasted occ ewe Che arre 310 Additional tools sses 23 ae me ee be ee baw hans aid eee Oe be 4 Installation and upgrade of the TASTE toolchain 4 1 Installation of the virtual machine 0 Komm nn 4 2 Installation on your own Linux distribution o ooo 3 13 13 15 16 17 18 18 21 21 21 21 21 22 22 22 22 23 24 24 25 471 Disttibut ns o socca 24 we kani SSA EE da E ea 422 Using the installation script o o cos s coso cat rn 43 Upgrade within the virtual machine 22 0 so 4 ake g a en ee ie 4 4 Upgrade on your own Linux distribution aooaa en Using ASN 1 Using the graphical tool The TASTE toolsuite 6 1 The interface view TASTE IV oaaae a 62 Thedeployment view TASTE DV 2 2 0 6s nen a ores a bess 63 Thec on urrenecy view TASTE YV zu en AR ir ED ES 02 1 MIST MUNG oer set a BEE PEPE SEES EES CED SS 6 3 2 Marzhin assumptions about system behavior 04 Creating Functions using modelling tools and or C Ada Pol CONN ANS ea be Che eRe ese ee Ses oe Sb a AR 2 ie PS BES a APES SS a LES RASS ES es FI POR SOR 2 br dabas A A A EES ES TA IAS ES A es A A 2G AA herr ee 74 1 Step 1 specify RTDS as implementation language 7 4 2 Step 2 Generate application skeletons ss oss ee Han nen EGE OH 743 Dep Edit application skeletons lt lt lt cocida RRR 744 Step 4 Generate SDL related code va 0
96. other The value can be low medium or high 4 Compute_Execution_Time specifies the execution time of the code The value is a time range This property is defined in the standard AADL property set 5 Taste Deadline specifies when the job associated with the interface should be com pleted This property is defined in Taste specific property set 8 1 5 Model a required interface A provided interface is represented by a requires subprogram access feature in the AADL system component Taste function that calls the interface The required subprogram component is defined in the default FV package It was de fined when the user write the provided subprogram for this interface see previous section The feature added in the system that represents the function that calls this interface specifies all the properties of the interface type importance etc For example the following system component function1 provides an access to the interface providedl SYSTEM function1 FEATURES required1 REQUIRES SUBPROGRAM ACCESS default FV bla Taste Coordinates gt 35 41 37 43 PROPERTIES 65 Source_Language gt C Taste Coordinates gt 14 14 35 45 END function1 We don t need to specify additional properties since all required properties are declared in the declarations of the provided interface 8 1 6 Connect provided and required interfaces The interface view contains a single system that gathers al
97. pFile contains the Ada code for the Function This option specifies that the name Function is implemented in ObjectGeode and the pr files that implement the Function are provided as arguments This option specifies that the name Function is implemented in PragmaDev RTDS and the zipFile contains the generated C code for the Function This option specifies that the name Function is implemented as a Leon VHDL component TASTE will automatically generate the driver component necessary so no zipFile is used If additional C code not Function specific is needed this option specifies the directory containing the additional c files to be compiled and linked in If additional Ada code not Function specific is needed this option specifies the directory containing the additional Ada files to be compiled and linked in If additional black box libraries are neeeded during linking this option specifies them 80 2 MSC Tracer a E 2 2 To Dp System time MSC Tracer Socket opened on port number 9999 Tracing lt Figure 9 1 Spawning the MSC Tracer and starting a new trace 9 4 Real time MSC monitoring If your system was designed with a GUI block configured ie your AADL definition includes a SUBPROGRAM with Source_Language gt GUI then the TASTE build mechanisms will auto matically create a Graphical User Interface that allows you to invoke TCs and see the incoming TM values see 1 1 Additio
98. passive_function diagram_passive_function_1 8 File Edit View Operator Insert Layout Project Tools Navigate Window Help xXx iD dl IRE A ST MYSHSCADEprojectetp wa 28 SaaS 3 aS Fereeel gt ox gt udy 0OD Avr x I DA OD ELY COQVARLAROAA Ge Geoenes AA iw G fo a sl My5thSCADE project etp 2 3 MySthSCADE project H E Types S E Operators 0 passive_function E Interface min 3 result E diagram_passive_function_1 File view Design Verifier x Loading project MySth3CADEproject etp Al Successfully loaded project MySth3C DEproject etp Loading file DataType Full xscade Success fully loaded file DataTypesFull xscade Loading file passive Ffunction sscade 4114 DEA Messages AMTC jl For Help press Fi Figure 7 9 The simplest of systems a pass through 48 This allows the user to use the ASN 1 types in his SCADE Function However TASTE offers more than this it creates the SCADE skeleton with the parameters of the Function s interface already filled in bash buildsupport gw glue i interfaceview aadl c deploymentview aadl d DataTypesFull aadl bash Is 1 total 88 drwx 2 assert assert 80 May 17 14 38 Backdoor drwx 2 assert assert 200 May 17 14 38 ConcurrencyView rw r r 1 assert assert 22393 May 17 14 35 DataTypesFull aadl rw r r 1 assert assert 2182 May 17 14 20 DataTypesFull asn rw r r 1 assert assert 4
99. r you have to specify the archive file that contains the code of each system function For each language supported by TASTE a special flag must be specified to indicate the kind of application language is used for each function For RTDS you have to use the flag P So when invoking the orchestrator if you SDL system is called my_rtds_system you must have the following in the command line that invokes the orchestrator P my_rtds_system my_rtds_system zip 7 4 7 Use RTDS within TASTEGUI To ease system development we provide a graphical interface that automatically calls all TASTE components data view generator orchestrator etc TASTEGUI This tool is also capable to be interfaced with RTDS When a function uses the RTDS implemen tation language its edition automatically laucnhes RTDS In addition it produces all required files to generated RTDS SDL related code so that you don t have to worry about archive production However to be able to use RTDS within TASTEGUI you have to specify the RTDS_HOME en vironment variable that is also required by the RTDS toolsuite Be sure this variable is set in your environment before starting RTDS 7 5 C and Ada specific For these two languages the user writes manually the code for his Function s interfaces TASTE helps by automatically generating the C Ada header implementation files i e the h c files for C or the ads adb files for Ada Here s an example taken from the
100. r of a star formation in this communication process the problem of modelling tools and languages speaking to one another is therefore reduced to mapping the data structures of the exchanged messages between those generated by the modeling tools and those generated by an ASN 1 compiler This process lends itself to a large degree of automation and this is the task performed by TASTE s Data Modeling Toolchain the automated and error proof generation of the necessary mappings TASTE can automatically interface with code generated from the following modeling tools SCADE KCG Simulink RTW ObjectGeode PragmaDev RTDS and is also supporting manually written C C and Ada code External black box libraries are also supported 1 2 Multiple supported platforms TASTE is able to generate systems from a high level abstraction It can generate applications for the following architectures 1 x86 with the following operating systems Linux Mac OS X FreeBSD RTEMS 2 ARM with RTEMS and Linux successfully tested on Maemo and DSLinux 3 SPARC LEON with RTEMS and OpenRavenscar For LEON RTEMS TASTE can be inter faced with the RASTA board which provides interfaces for serial spacewire and 1553 buses 1 3 Easy adaptation to changing deployment configurations By separating the overall system design into Data Interface and Deployment views TASTE al lows for easy adaptation to multiple deployment scenarios
101. ribution to install it Then invoke the program you would see the following screen Welcome in the TASTE installer Hello and welcome in the TASTE installer This program will guide you to compile and install all TASTE programs It will first check that all required packaged are installed on your system At first you are asked to provide the installation directory This directory must exist on your system and you must be allowed to write in it Then you can choose which packages to install on your system We advise you to choose and install every TASTE tools Choose the components you want to install AS Buildsupport Dcarina Orchestrator RTEMS compiler for LEON2 from GAISLER TASTE GUI TASTE Graphical Tools from Ellidiss K IK gt lt Cancel gt As the TASTE graphical tools are not directly available on the internet and require you down load them manually on Ellidiss website http www ellidiss com you are asked to pro vide the archive file of the program of you want to install them To do so a file dialog chooser will ask you to provide the location of the TASTE tools as shown in the following picture 28 Directories lost found homer julien K OK gt lt Cancel gt Then the installation process starts download software archive on the internet compile and install them Installation in progress Install ASN 1 DMT tools 0 Finally if everything runs fine the
102. rivers serial spacewire for the Ada runtime PRAGMADEV provides the free MSC tracer that can be used to trace communication within the blocks of the system ASSERT partners provided inputs to the overal process see ASSERT website for more infor mation 12 Chapter 2 Taste concepts 2 1 The TASTE steps in building an application Lustre definitions SDL definitions C Code go oO PolyORB Container PolyORB Container C Code Figure 2 1 Data Modeling with ASN 1 Figure 2 1 displays a high level view of how TASTE integrates the individual pieces of an overall system The yellow blocks depict stages where manual labour is required and the green ones depict machine generated entities 1 The process begins with manual specification of the data models for the messages exchanged between subsystems TASTE Functions This is where details about types and constraints 13 of the exchanged messages are specified To be usable from within the system AADL spec ifications these message definitions are translated into AADL data definitions These defi nitions are in turn used by the system designer the one doing the high level interface mod eling they are referenced inside the high level design of the system when describing the system s interfaces The Interface View in AADL explicitel
103. rs the value of the property is serial D EVICE BAUDS DATA_BITS PARITY STOP_BIT For example the value serial dev ttyS0 9600 8 N 1 specified a device that will use dev ttys0 at 9600 bauds It will use 8 bits for each caracter use parity and one stop bit For more information about serial line configuration interested can refer to the following web article Inttp en wikipedia org wiki Serial_port 75 76 Chapter 9 Toolset usage 91 ASN 1 tools ASN 1 tools are used to transform ASN 1 types definitions into AADL models as well as functional modelling representations SCADE models Simulink models Ada C code etc 9 1 1 Convert ASN 1 types into AADL models To be able to use the ASN 1 type definitions with AADL models and thus with your interface and deployment views you must convert ASN 1 type definitions into AADL models The resulting AADL model will contain data components that represent the ASN 1 types For that purpose the tool asn2aad1P1us automatically converts ASN 1 definitions into AADL models You can use it as it asn2aadlPlus datadefinitionit asn datadefinitionX asn outputfile aadl It will process all ASN 1 files given in the command line parameter list and output an AADL specification that describes ASN 1 types in output file aadl If you use the version 2 of the AADL language you must use the switch aadlv2 So the command would be asn2aadlPlus aadlv2 d
104. s are mapped to C doubles Everything else is just like ASN 1 INTE Therefore for the following ASN 1 grammar MyReal REAL 10 0 20 0 25 0 26 0 The following C code is generated typedef asniSccSint Mylnt typedef double MyReal define MyReal REQUIRED BYTES FOR ENCODING 13 define ERR_MyReal 1007 10 20 25 26 void MyReal_Initialize MyRealx pVal flag MyReal_IsConstraintValid MyRealx val int pErrCode flag MyReal_Encode MyRealx val BitStream pBitStrm int pErrCode flag bCheckConstraints flag MyReal_Decode MyRealx val BitStream pBitStrm int pErrCode 10 2 3 Enumerated ASN 1 ENUMERATED types are mapped to C enum types For example from the following ASN 1 code MyEnum ENUMERATED alpha beta gamma The following C code is generated typedef enum alpha 0 85 beta 1 gamma 2 MyEnum define MyEnum_REQUIRED_BYTES_FOR_ENCODING 1 void MyEnum_lnitialize MyEnum pVal flag MyEnum_IsConstraintValid MyEnum val int pErrCode flag MyEnum_Encode MyEnum val BitStreamx pBitStrm int pErrCode flag bCheckConstraints flag MyEnum_Decode MyEnum val BitStreamx pBitStrm int pErrCode 10 2 4 Boolean ASN 1 BOOLEAN types are mapped to a custom C type flag which is defined in asnicrt h as int Hence for the following ASN 1 code MyBool BOOLEAN The following code is ge
105. ssert 121 122 Appendix D Useful programs e Cheddar http beru univ brest fr singhoff cheddar e GNAT compiler http libre adacore com e Gnatforleon http polaris dit upm es ork e MAST http mast unican es e PuTTY http putty very rulez org download html e RTEMS http www rtems com e SWIG http www swig org e WinSCP http winscp net e WxWidgets http www wxwidgets org 123 124 Appendix E TASTE specific AADL property set property set Taste is Interface_Coordinates aadlstring applies to subprogram access bus access Coordinates aadlstring applies to system package device memory processor process access subprogram access connection Data_Transport enumeration legacy asn1 applies to device abstract Importance enumeration low medium high applies to system subprogram access access APLC_Binding list of reference process applies to process device system bus virtual bus APLC_Properties record APLC aadlstring Coordinates aadlstring Source_Language Supported _Source_Language ASN1_types type enumeration asequenceof asequence aenumerated aset asetof ainteger aboolean areal achoice aoctetstring astring ASN1_Basic_Type ASN1_types applies to data FS_Default_Value aadlstring applies to data Deadline inherit Time gt Period applies to thread thread group process system
106. stributed the message must be understood in the same way by both ends of the communication link This is ensured by ASN 1 encoders and decoders which code is invoked by this glue layer generated by buildsupport The wrappers first intercept the runtime dependent calls to execute a provided interface They receive a formatted or encoded message which they must decode before calling user code as shown below TBW 96 Chapter 12 Orchestrator advanced features TBD gcov to check statement coverage of the generated binaries 97 98 Chapter 13 TASTE daemon advanced features By default the taste daemon waits for incoming connection on the port 1234 It can be modified in the configuration file In addition to execute binaries on the LEON processor it requires to specify the path to the grmon utility monitoring program for the execution of applications on LEON boards 13 1 Configuration file The configuration file should be located in etc tasted conf or in your home directory under the name tasted It defines the following configuration items e Path to grmon e Default port to wait for incoming requests There is an example of a valid configuration file lt config gt lt directive name grmonpath value path to grmon gt lt directive name port value 5678 gt Then to execute the daemon just run it as a single user 99 100 Chapter 14 TASTE GUI advanced features
107. sys com asnitutorial asnionly html 31 32 Chapter 6 Using the graphical tool The TASTE toolsuite 6 1 The interface view TASTE IV The interface view provides the ability to describe system functions with their provided and re quired interfaces The picture below gives an example of the Interface View 33 File Edit View 4 gt No Selection In the interface view you define containers functions and provided required interfaces The picture below illustrates the definition of two containers each one containing one function The function on the right uses a Provided Interface PI that is required by the function on the left To describe that using the graphical interface the interfaces are connected using a line and an arrow 34 File Edit View Gb Saa dds alone HEIM a When you define an interface you have to define its characteristics periodic sporadic arrival time etc For that right click on the provided interface a menu will open Choose Properties 35 File Edit View RR Edit Properties E Delete Copy o Cut Paste Then a new window gives you the ability to define the characteristics of the Provided Inter face as shown in the following picture PI Attributes Parameters l Attributes Values Operation Name Kind Minimum Inter arrival Time Deadline Unit Importance In the same window you can also specify
108. taste The Assert Set of Tools for Engineering TASTE Documentation v1 1 Maxime Perrotin Thanassis Tsiodras Julien Delange J r me Hugues February 21 2011 Contents 1 Introduction why TASTE 1 1 Automatic integration of multi language multi tool systems 12 Multiple supported platforms u ke sure eee en ee EN ru 1 3 Easy adaptation to changing deployment configurations 14 Automatic GUls for telemetry and telecommands 20 lt o lt ozos ses 1 5 Automatic run time monitoring of TM TCs viaMSCs oo ooo L6 Amable Pyihon Peeters see c ra A ARA RARA ee g 1 7 Acknowledgements who did TASTE 6 4056 eo eGe eo a a eR ea 2 Taste concepts 21 The TASTE steps in building an appllesten ee ss corws ga ar en 22 Were A eee BER ES OA k CAE EO EAE eee ee we t 2 INICIOS oos s es a ee Ee e are Nee AA 24 Development process OVervieW o ioc AAA AAA 25 Definitions eu rea risans as pr a ite cadca aaan a ra 20 Modelngrules sa oce era ee ee Bee ge AS oS 3 Overview of the Taste toolset Bel Te a ot ee a A OO ee ec ee in 3 2 TASTE toolset TASTE IV TASTE DV and TASTE CV 2 2 22 2220 ie PANA DECIAS o s oe are he dados daa a AA OE DIEB 2 ee Reed essere TR Bea ec ee aw ee Bs A A dere ED dine Koa 29 TOA ee oe oe eee A ee ee ACA ee ee eee 351 Adaverion ooo kc cac mosa ee 3 o aea kw ahd ee ere kh Gl we ee Boe ws A oO Ve eae a EG AA AP SHEE E AA er ACUESTA era a TASTEGUL 22 28 s
109. the data types of the interface parameters as il lustrated in the following picture Please also note that the types you specify in this window are defined in your Data View your ASN 1 type definitions 36 PI Attributes Parameters Encoding Protocol Direction EARE NATIVE inout gt NATIVE inout Ok Apply Cancel 6 2 The deployment view TASTE DV The deployment view editor is a graphical tool that provides the ability to edit the AADL defini tion of your architecture A screenshot of the program follows 37 File Edit View alale x ol El gt Object Created obj40 You can then add hardware components in your architecture It mainly consists of adding computer boards with their processors and memories Partitions are then added that will host the functions from your functional view You can connect partitions and thus functions by adding buses to your architecture and by connecting the processors with these buses 38 File Edit View HEN EA E ERROREEN Note that when you add specify a driver in the deployment view it has to be configured For example for a network card that uses the TCP IP protocol you have to specify the IP address and the port used to receive incoming data For serial port you have to specify the corresponding device dev ttyS0 etc as well as the speed of the port 115200 bauds etc This configuration is detailed
110. tten by buildsupport tool include passive_function h void passive_function_startup x Write your initialization code here but do not make any call to a required interface x void passive_function_Pl_compute const asniSccT SEQUENCE xIN_my_in asn1SccT_INTEGER OUT_result x Write your code here x Very similar things happen for Ada Functions where the generated files are the corresponding ads adb This file was generated automatically DO NOT MODIFY IT Declaration of the provided and required interfaces pragma style_checks off pragma warnings off with adaasnirtl use adaasnirtl with dataview use dataview package passive_function is Provided interface compute procedure compute my_in access asnisccT_ SEQUENCE result access asnisccT_INTEGER pragma export C compute passive_function_Pl_compute end passive_function User implementation of the passive_function function This file will never be overwritten once edited and modified Only the interface of functions is regenerated in the ads file pragma style_checks off pragma warnings off with adaasnirtl use adaasnirtl with dataview use dataview 61 package body passive_function is Provided interface compute procedure compute my_in access asnisccT SEQUENCE result access asnisccT_INTEGER is begin null Replace
111. unctional code part pinger_Pl_activator Figure 14 7 Memory analysis analysis of a function To assess application schedulability click on the the Launch MAST button of the Analysis Workshop menu see picture 14 8 You also have to choose a type of analysis before running MAST Depending of the kind of analysis you re using the system may be schedulable or not For the description of each analysis please refer to the MAST user manual see section D for references related to MAST File Options Advanced Help System Design Code Generation Analysis Workshop Analyze the schedulability of your architecture with the concurrency view analyzer TASTE CV Analyze schedulability with MAST MAST Offset Based Optimized LA Launch MAST Compile and link generated applications Figure 14 8 The system analysis menu Once scheduling analysis is completed TASTEGUI launches MAST which shows scheduling 105 events and details for each processor The figure 14 9 depicts an example of the execution of the MAST tool System file Results file Help Modeling and Analysis Suite for Realtime Applications MAST Current System System Processing Resources Transactions Shared Resources Model Name Model Date Generation Tool MAST Schedulability Analysis version 1 3 8 0 Generation Profile mast_analysis offset_based_optimized tmp a5RbqB_fl9 mast m
112. w Using this information the Taste toolchain generates the code that is responsible for compo nent execution It instantiates system resources data mutexes tasks etc and allocates software on them As is the case for every real time system the generated systems enforce a computational model as well as several restrictions The computational model that is checked is the Ravenscar computation model So every func tion of the system must comply with these restrictions 1 Tasks are scheduled using a FIFO via a priority scheduling algorithm 2 The locking policy uses the ceiling protocol 3 No blocking operations are allowed in protected functions 4 The following restrictions as defined in the Ada compiler must also be applied to any func tions that are written in other languages e No_Abort_Statements e No_Dynamic_Attachment e No_Dynamic_Priorities e No_Implicit_Heap_Allocations e No_Local_Protected_Objects e No_Local_Timing_Events e No_Protected_Type_Allocators e No_Relative_Delay e No_Requeue_Statements e No_Select_Statements e No_Specific_Termination_Handlers e No_Task_Allocators e No_Task_Hierarchy e No_Task Termination e Simple_Barriers e Max_Entry_Queue_Length gt 1 e Max_Protected_Entries gt 1 e Max_Task_Entries gt 0 e No_Dependence gt Ada Asynchronous_Task_Control 15 No_Dependence gt Ada Calendar No_Dependence gt Ada Execution_Time Group_Budget No_Dependence gt Ada Execution_Time
113. window is opened to specify the deployment concerns for each binary as showed in figure 14 11 For each generated binary you can specify e The system on which it is executed e The host who is running the TASTE daemon tasted and the port to connect to This ad dress port will be used to send and so execute the binary e In case of a binary executed on a LEON processor you have to specify also the port to which is connected the LEON on the tasted host It is most of the time a serial port Potential serial ports are proposed dev ttyS0 dev ttyUSBl etc e If you use gprof or gcov for timing or memory analysis If these boxes are checked the TASTE daemon will gather information from gcov or gprof and send them back to TASTE GUI for further analysis Note that generated applications must be compiled with gprof g cov support in order to be able to get relevant information from the execution 107 Node to configure mypart_obj179 2 Execution method grmon for leon2 Ss w Additional configuration Tasted host 10 1 11 25 Tasted port 1234 Execution delay sec a B GRMON port devittyUSB2 a Enable GCOV Yes No Enable GPROF O Yes e No Figure 14 11 Configuration of system execution Once all deployment informations are specified the execution button can be used TASTE GUI will connect to the taste daemon and shows the output produced by the binary in a dedicated window 108 Chapter 15 Ocarina advanc
114. y related to glue used by the function ASN 1 and buildsupport related code and the user code and detail each function and their associated size in bytes Figure 14 7 shows an example of the memory analysis of a function 103 Process mypart_obj190 Functional code size 0 bytes Glue code size 39940 bytes Middleware code size 25989 bytes Runtime size 0 bytes Show detail for Show detail of function function analyzed gt OK Figure 14 5 Memory analysis choose part of the system to analyze or a specific function Memory analysis for process mypart_obj190 glue part Acn_Enc_Int_Positivelnteger_ConstSize_little_endian_32 Acn_Enc_Int_Positivelnteger_ConstSize_little_endian_N Acn_Enc_Int_TwosComplement_ConstSize Acn_Enc_Int_TwosComplement_ConstSize_big_endian_16 Acn_Enc_Int_TwosComplement_ConstSize_big_endian_64 Acn_Enc_Int_TwosComplement_ConstSize_little_endian_32 Acn_Enc_Int_TwosComplement_VarSize_LengthEmbedded Acn_Enc_Real_IEEE754_32_big_endian Figure 14 6 Memory analysis analysis of the glue part of a generated application 14 3 Scheduling analysis with MAST TASTEGUI provides the ability to run scheduling analysis of the system using MAST MAST pro vides several scheduling analysis algorithms so that users can assess the feasability of their system before implement them 104 Memory analysis for function pinger pinger_Rl_receive_int vm_async_pinger_receive_int init_pinger F
115. y describes the interfaces in terms of the available ASN 1 types 2 The actual functional modeling of subsystems is next but before it begins the exchanged messages descriptions are read by TASTE and semantically equivalent definitions of the data messages are automatically created for each modeling tool s language e g Lustre def initions for SCADE modeling Simulink definitions for MATLAB Simulink modeling etc This way the teams building the individual subsystems are secure in their knowledge that their message representations are semantically equivalent and that no loss of information can occur at Interface borders 3 Functional modeling is then done for the individual subsystems The modeling uses the data definitions as they were generated in step 2 In fact the modelling has absolutely no work to do in terms of interface specification the interfaces are 100 automatically generated by TASTE in so called skeleton projects If the interface view specifies that a Function is written in SCADE a SCADE skeleton will be generated by TASTE and the user fills in the meat of the calculation If the interface view specifies that a Function is written in C then TASTE generates a h c declaration definition of the interface and the user just fills in the details Etc 4 When functional modeling is completed the modeling tools code generators are put to use and C code is generated this step does not exist if the Function is
Download Pdf Manuals
Related Search
Related Contents
Table of Contents 070425_terra-cognita_formation police Emerson PSA1000MT3-120U uninterruptible power supply (UPS) 傾斜窓タイプ 取扱説明書 兼 無償修理規定 Manual - Test Equipment Depot WSliq User`s Manual Bosch 2609255008 Informix Guide to SQL: Syntax, Version 6.0 Blue Sky Airlines Copyright © All rights reserved.
Failed to retrieve file