Model-Based Hardware Generation and Programming - the MADES Approach
Total Page:16
File Type:pdf, Size:1020Kb
1 Model-based hardware generation and programming - the MADES approach Ian Gray∗, Nikos Matragkas∗, Neil C. Audsley, Leandro Soares Indrusiak, Dimitris Kolovos, Richard Paige University of York, York, U.K. F Abstract—This paper gives an overview of the model-based hardware the proposed hardware development flow and the way generation and programming approach proposed within the MADES that embedded software can be targeted at the resulting project. MADES aims to develop a model-driven development process complex architectures. for safety-critical, real-time embedded systems. MADES defines a sys- tems modelling language based on subsets of MARTE and SysML that allows iterative refinement from high-level specification down to 1.1 MADES Project Goals final implementation. The MADES project specifically focusses on three The MADES project (Model-based methods and tools unique features which differentiate it from existing model-driven develop- ment frameworks. First, model transformations in the Epsilon modelling for Avionics and surveillance embeddeD systEmS) aims framework are used to move between system models and provide to develop the elements of a fully model-driven ap- traceability. Second, the Zot verification tool is employed to allow early proach for the design, validation, simulation, and code and frequent verification of the system being developed. Third, Compile- generation of complex embedded systems to improve Time Virtualisation is used to automatically retarget architecturally- the current practice in the field. MADES differentiates neutral software for execution on complex embedded architectures. itself from similar projects in that way that it covers This paper concentrates on MADES’s approach to the specification of hardware and the way in which software is refactored by Compile-Time all the phases of the development process: from system Virtualisation. specification and design down to code generation, vali- dation and deployment. Design activities exploit a ded- Index Terms—Model Driven Engineering, Epsilon, MADES, Embedded icated language developed on top of the OMG standard Systems, Real-Time Systems. MARTE (Modeling and Analysis of Real-time and Em- bedded systems) [12], and foster the reuse of components by annotating them with properties and constraints to 1 INTRODUCTION aid selection and enforce overall consistency. The architectures of embedded systems are becoming Validation activities comprise the verification of key increasingly non-standard and application-specific. They properties of designed artifacts and of the transforma- frequently contain multiple heterogenous processing tions used throughout the development process, and also cores, non-uniform memory, complex interconnect or the closed-loop simulation of the entire system. Code custom hardware elements such as DSP and SIMD cores. generation addresses both conventional programming However, programming languages have traditionally as- languages (e.g., C) and hardware description languages sumed a single processor architecture with a uniform (e.g., VHDL), and uses the novel technique of Compile- logical address space and have abstracted away from Time Virtualisation to smooth the impact of the diverse hardware implementation details. As a result, develop- elements of modern hardware architectures and cope ing software for these architectures can be challenging. with their increasing complexity. Equally, such systems are frequently deployed in high- All these aspects will be fully supported by proto- integrity or safety-critical systems which require the type tools integrated in a single framework, and will highest levels of predictability and reliability. be thoroughly validated on real-life case studies in the The MADES Project is an EU-funded project that aims surveillance and avionic domains. The project also aims to use model-driven techniques to enable the develop- to develop a handbook to provide detailed guidelines ment of the next generation of highly complex embed- on how to use MADES tools in the development of ded systems, whilst reducing development costs and in- embedded systems and promote their adoption. creasing reliability. In this paper we provide an overview of the MADES approach to model-driven development 2 OVERVIEW OF THE MADES APPROACH of embedded systems. We also give specific details of This section provides an overview of the model-based ∗Supported by EU Framework 7 research contract FP7-248864 hardware generation and programming aspects of the 2 time embedded systems) and SysML [16] (a general- Design Models purpose modelling language for systems engineering applications). The language aims to overcome shortcom- ings of these existing languages and to provide: Verification Simulation • Specifications of functionality in an architecturally- MHS description User input scripts scripts neutral way. • Descriptions of target hardware. Zot verification VHDL • Deployment diagrams that map functionality to Verification hardware/software. Hardware description • Timing and non-functional properties for early and generation Platform- frequent verification. agnostic • Code-reuse, component-based design, and main- code Hardware/ Hardware tainability. software architecture mappings description A full specification and motivation for the MADES language is outside of the scope of this document and Compile-Time Virtualisation will be presented in a dedicated paper at a later date. Verification and simulation play a key role in the Platform-specific code MADES approach. This involves verification of key Embedded software generation properties on designed artifacts, closed-loop simulation based on detailed models of the environment and ver- Fig. 1. Overview of the artifacts in the MADES approach ification of designed transformations (from high-level system models down to low-level hardware/software implementations). The Zot tool [13] will be used to MADES project and identifies the high level artifacts and provide this. The input to Zot depends on the action the the mappings between them. A conceptual model of the tool is required to perform. In the case of verification, different inter-relationships between the various artifacts Zot needs a verification script and user input which of the approach is illustrated in figure 1. will specify the properties to be verified. In the case One of the main characteristics of the MADES ap- of simulation the input to Zot is a simulation script. proach to software development for embedded systems Zot uses Common Lisp as internal scripting language is that it is model-driven and transformation-based. of the tool. The purpose of the verification phase is to Model transformations (also called mappings) are used provide rapid and early verification of the system being to transform one or more input specifications into one developed with the aim of reducing design time and or more output specifications. guaranteeing correctness of the final system. From figure 1, it can be seen that the MADES model- The second set of artifacts is related to code generation. driven approach focusses on the generation of platform- The code generation phase allows the designer to model specific embedded software from architecturally-neutral the target hardware at a high-level of abstraction and use software specifications, generation of hardware descrip- deployment diagrams to map the input code (which is tions of the modelled target architecture, and verifica- provided in an architecturally-neutral form) to elements tion. of the hardware. Three different artifacts are needed Since the MADES approach is model-driven, every de- for this. Firstly, normal architecturally-neutral code with velopment effort starts with building the relevant design distributed operating system features such as threading, and analysis models. These models are expressed in the shared memory, cache coherency etc. Currently, we are MADES modelling language and they are considered considering Real Time Java as the target programming as first-class artifacts. As such, they guide the rest of language. The benefits of using Real Time Java for real the development process by being used as input to the time and embedded systems development are reported various tools of the MADES toolset such as the verifi- in the literature (e.g. [3]). Second, a target architecture cation and code generation tools. MADES diagrams are description is required, which provides a high-level view able to model different viewpoints and different levels of the target architecture. Finally, a set mappings which of abstraction. They are able to describe the structure map constructs from the input software to hardware fea- and the behaviour of the system, as well as time system tures are required. Finally, the output is a set of platform- constraints. Hence, all the system aspects of interest can specific programs (one for each target processor), written be modelled using the MADES notation. Any additional in the same language as the input architecturally-neutral information required by the transformation engines can code, i.e. Real Time Java. be provided by attaching annotations on the system Finally, the last artifact of the MADES approach con- models or by user input. siders generation of synthesisable hardware descriptions The top-level MADES modelling language (‘design from the hardware model. The deployment mappings of models’ in figure 1) is based on a combined subset of the code generation phase use a high-level description OMG MARTE [12] (a UML profile for modelling real- of the capabilities of the desired target