Section: Scientific Foundations
Co-modeling for HP-SoC design
The main research objective is to build a set of metamodels (application, hardware architecture, association, deployment and platform specific metamodels) to support a design flow for SoC design. We use a MDE (Model Driven Engineering) based approach.
Foundations
System-on-Chip Design
SoC (System-on-Chip) can be considered as a particular case of embedded systems. SoC design covers a lot of different viewpoints including the application modeling by the aggregation of functional components, the assembly of existing physical components, the verification and the simulation of the modeled system, and the synthesis of a complete end-product integrated into a single chip.
The model driven engineering is appropriate to deal with the multiple abstraction levels. Indeed, a model allows several viewpoints on information defined only once and the links or transformation rules between the abstraction levels permit the re-use of the concepts for a different purpose.
Model-driven engineering
Model Driven Engineering (MDE) [79] is now recognized as a good approach for dealing with System on Chip design issues such as the quick evolution of the architectures or always growing complexity. MDE relies on the model paradigm where a model represents an abstract view of the reality. The abstraction mechanism avoids dealing with details and eases reusability.
A common MDE development process is to start from a high level of abstraction and to go to a targeted model by flowing through intermediate levels of abstraction. Usually, high level models contain only domain specific concepts, while technological concepts are introduced smoothly in the intermediate levels. The targeted levels are used for different purposes: code generation, simulation, verification, or as inputs to produce other models, etc. The clear separation between the high level models and the technological models makes it easy to switch to a new technology while re-using the previous high level designs. Transformations allow to go from one model at a given abstraction level to another model at another level, and to keep the different models synchronized
In an MDE approach, a SoC designer can use the same language to design application and architecture. Indeed, MDE is based on proved standards: UML 2 [45] for modeling, the MOF (Meta Object Facilities [75] ) for metamodel expression and QVT [76] for transformation specifications. Some profiles, i.e. UML extensions, have been defined in order to express the specificities of a particular domain. In the context of embedded system, the MARTE profile in which we contribute follows the OMG standardization process.
Models of computation
We briefly present our main models of computation that consist of the Array-OL language and the synchronous model. The former allows us to express the parallelism in applications while the latter favors the formal validation of the design.
Array-OL. The Array-OL language [56] , [57] , [54] , [52] is a mixed graphical-textual specification language dedicated to express multidimensional intensive signal processing applications. It focuses on expressing all the potential parallelism in the applications by providing concepts to express data-parallel access in multidimensional arrays by regular tilings. It is a single assignment first-order functional language whose data structures are multidimensional arrays with potentially cyclic access.
The synchronous model. The synchronous approach [50] proposes formal concepts that favor the trusted design of embedded real-time systems. Its basic assumption is that computation and communication are instantaneous (referred to as “synchrony hypothesis”). The execution of a system is seen through the chronology and simultaneity of observed events. This is a main difference from visions where the system execution is rather considered under its chronometric aspect (i.e., duration has a significant role). There are different synchronous languages with strong mathematical foundations. These languages are associated with tool-sets that have been successfully used in several critical domains, e.g. avionics, nuclear power plants.
In the context of the DaRT project, we consider declarative languages such as Lustre [55] and Signal [71] to model various refinements of Array-OL descriptions in order to deal with the control aspect as well as the temporal aspect present in target applications. The first aspect is typically addressed by using concepts such as mode automata, which are proposed as an extension mechanism in synchronous declarative languages. The second aspect is studied by considering temporal projections of array dimensions in synchronous languages based on clock notion. The resulting synchronous models are analyzable using the formal techniques and tools provided by the synchronous technology.
Contributions of the team
Our proposal is partially based upon the concepts of the “Y-chart” [63] . The MDE contributes to express the model transformations which correspond to successive refinements between the abstraction levels.
Metamodeling brings a set of tools which enable us to specify our application and hardware architecture models using UML tools, to reuse functional and physical IPs, to ensure refinements between abstraction levels via mapping rules, to initiate interoperability between the different abstraction levels used in a same codesign, and to ensure the opening to other tools, like verification tools, thought the use of standards.
The application and the hardware architecture are modeled separately using similar concepts inspired by Array-OL to express the parallelism. The placement and scheduling of the application on the hardware architecture is then expressed in an association model.
All the previously defined models, application, architecture and association, are platform independent. No component is associated with an execution, simulation or synthesis technology. Such an association targets a given technology (OpenMP, SystemC/PA, VHDL, Lustre, etc.). Once all the components are associated with some technology, the deployment is realized. This is done by the refinement of the association model to the deployed model first, and then to further abstraction levels (e.g. polyhedron, loop in figure 1 ).
The simulation results can lead to a refinement of the application, the hardware architecture, the association and the deployment models. We propose a methodology to work with these models. The stages of design are:
-
Separation of application and hardware architecture modeling.
-
Association with semi-automatic mapping and scheduling.
-
To achieve the deployment, selection of IPs for each element of application/architecture models.
-
Automatic generation of the various platform specific simulation or execution models.
-
Automatic simulation or execution code generation with calls to the IPs.
-
Refinement at the highest level taking account of the simulation results.
High-level modeling in Gaspard2
In Gaspard2, models are described by using the recent OMG standard MARTE profile combined with a few native UML concepts (see Figure 1 ). The former Gaspard2 profile is no longer used. Today, the Hardware Resource Model (HRM) concepts of MARTE enable to describe the hardware part of a system. The Repetitive Structure Modeling (RSM) concepts allow one to describe repetitive structures. Finally, the Generic Component Modeling (GCM) concepts are used as the base for component modeling.
The above concepts are expressive enough to permit the modeling of different aspects of an embedded system:
functionality (or applicative part): the focus is mainly put on the expression of data dependencies between components in order to describe an algorithm. Here, the manipulated data are mainly multidimensional arrays. Furthermore, a form of reactive control can be described in modeled applications via the notion of execution modes. This last aspect is modeled with the help of some native UML notions in addition to MARTE.
hardware architecture: similar mechanisms are also used here to describe regular architectures in a compact way. Regular parallel computation units are more and more present in embedded systems, especially in SoCs. HRM is fully used to model these concepts.
association of functionality with hardware architecture: the main issues concern the allocation of the applicative part of a system onto the available computation resources, and the scheduling. Here also, the allocation model takes advantage of the repetitive and hierarchical representation offered by MARTE to enable the association at different granularity levels, in a factorized way.
In addition to the above usual design aspects, Gaspard2 also defines a notion of deployment specification (see Figure 1 ) in order to generate compilable code from a SoC model. The corresponding package defines concepts that (i) enable to describe the relation between a MARTE representation of an elementary component (a box with ports) to a text-based code (and Intellectual Property - IP, or a function with arguments), and (ii) allow one to inform the Gaspard transformations of specific behaviors of each component (such as average execution time, power consumption...) in order to generate a high abstraction level simulation in adequacy with the real system.
Intermediate concept modeling
According to Figure 1 , one can notice that Gaspard2 targets different technologies for various purposes: formal verification, high-performance computing, simulation and hardware synthesis. This is achieved via model transformations that relate intermediate representations towards the final target representations. Below are briefly presented these intermediate representations:
A metamodel based on polyhedra (Polyhedron in Figure 1 ). It presents the association mechanism from the architecture viewpoint. Instead of having concepts to indicate the placement of tasks and data arrays as in the Deployed metamodel (i.e. , allocation and distribution), in the Polyhedron metamodel, the data arrays are contained into memories and the tasks are linked to the processors. In order to faithfully represent the repetitions of these distributed elements, the polyhedron mathematical concept is used. A polyhedron is basically a set of linear equations and inequalities. In literature, several works on parallel scheduling rely on them because they enable to determine an efficient execution of loop iterations on processors. A whole set of theories and tools are available to generate optimized code out of such a representation (our implementation uses the CLooG tool [48] ).
A metamodel based on loops (Loop in Figure 1 ). It is very close to the Polyhedron metamodel. The unique difference is the representation of the task repetition. Instead of using a polyhedron, the repetition is represented by a LoopStatement . It corresponds to the pseudo-code structure that for a given processor index, goes all over the repetition index of the associated tasks [49] . The SystemC code is directly generated from this metamodel whereas another intermediary metamodel is used to target OpenMP technologies.
A metamodel for procedural language with OpenMP (OpenMP in Figure 1 ). It is inspired by the ANSI C and Fortran grammars and extended by OpenMP statements [77] . The aim of this metamodel is to use the same model to represent Fortran and C code. Thus, from an OpenMP model, it is possible to generate OpenMP/Fortran or OpenMP/C. The generated code includes parallelism directives and control loops to distribute task (IPs code) repetitions over processors [81] .
A RTL metamodel (RTL in Figure 1 ). It gathers the necessary concepts to describe hardware accelerators at the RTL (Register Transfer Level) level, which allows the hardware execution of applications. This metamodel introduces, e.g. , the notions of clock and register in order to manipulate some of the usual hardware design concepts. The RTL metamodel is independent from any Hardware Description Languages (HDL) such as VHDL [43] or Verilog [82] with the corresponding IPs. However, it is precise enough to enable the generation of synthesizable HDL code [70] .
Synchronous metamodel (Synchronous Equational in Figure 1 ). It allows a description of applications at the functional level. It relies on the concepts of Signal , Equation and Node . A Signal corresponds to a variable. An Equation is a relation defining the outputs in term of a function of the inputs. A node is a system of equations over signals that specifies relations between values and clocks of the signals. From this metamodel, either Lustre or Signal synchronous language an be generated with the good IPs, allowing one to check functional properties of applications described with MARTE [84] .