Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page x 2009-10-13 x Preface pleasant collaboration has certainly helped make the completion of this project as easy as possible. Of course, none of this would have been possible without the continuous support of the team at Taylor & Francis, especially our publisher, Nora Konopka, and the staff involved in the verification and production process: Amy Blalock, Ashley Gasque, and Catherine Giacari. Many thanks to each of you. A special word of thanks goes out to Jeanne Daunais for helping us with the extensive preparation of the final material. Gabriela Nicolescu Pieter J. Mosterman MATLAB R is a registered trademark of The MathWorks, Inc. For product information, please contact: The MathWorks, Inc. 3 Apple Hill Drive Natick, MA 01760-2098 USA Tel: 508 647 7000 Fax: 508-647-7001 E-mail: info@mathworks.com Web: www.mathworks.com See www.mathworks.com/trademarks<http://www.mathworks.com/trademarks> for a list of additional trademarks. Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page xi 2009-10-13 Introduction Gabriela Nicolescu and Pieter J. Mosterman The purpose of this book is to provide a comprehensive overview of the current state of Model-Based Design for embedded systems, the challenges involved, and the latest trends. To achieve this objective, the book offers a compilation of 21 outstanding contributions from industry and academia. The contributions are grouped into three main parts. Part I comprises the contributions that focus on a key dimension in the design of embedded sys- tems: the performance analysis of real-time behavior based on computational models. Part II is composed of contributions proposing approaches that take into consideration the specific characteristics and design challenges of mul- tiprocessor systems-on-chip (MPSoCs). Part III contains contributions in the field of system-level design of multidomain systems. An “embedded system” is a system designed to perform a dedicated function, typically with tight real-time constraints, limited dimensions, and low cost and low-power requirements. It is a combination of computer hard- ware and software and additional mechanical, optical, or other parts that are typically used in the specific role of actuators, sensors, and transduc- ers, in general. In some cases, embedded systems are part of a larger sys- tem or product, for example, an antilock braking system in a car. Examples of embedded systems are cell phones, digital cameras, GPS receivers, fax machines, printers, debit/credit card readers, heart rate monitors, blood gas monitors, etc. [Gan03]. The evolution of embedded systems parallels Moore’s law, which states that the number of transistors on an integrated circuit doubles every 18 months. This technological progress enabled the integration of complex elec- tronic systems on a single chip and the emergence of MPSoCs. An MPSoC is a system-on-chip that contains multiple interconnected instruction-set pro- cessors (CPUs). The typical MPSoC is a heterogeneous multiprocessor [Jer04]: it is composed of several different types of processing elements. Moreover, the memory architecture and the interconnection network may be heteroge- neous as well. MPSoCs can be found in many products such as digital tele- visions, set-top boxes, telecommunication networks, cell phones, and video games. In response to the challenges of further miniaturization, the Interna- tional Technology Roadmap for Semiconductors (ITRS) emphasizes the More Than Moore’s Law movement [ITR07]. This movement focuses on xi Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page xii 2009-10-13 xii Introduction system integration rather than an increase in transistor density and leads to a functional diversification in integrated systems. This diversification allows for nondigital functionality such as radio-frequency (RF) circuitry; power control, optical, and/or mechanical components; sensors; and actu- ators to migrate from the system board level into the so-called system-in- package (SiP) level or system-on-chip (SoC) level implementation [TUM06]. These multidomain heterogeneoussystems enable new applications and create new markets. System applications are in key fields such as transportation, mobility, security, health, energy, communication, education, and entertain- ment [ZHA06]. Some examples of applications of these systems are devices for nonintrusive surgery, sensors for harsh environments (e.g., chemically aggressive, extreme temperature, excessive vibration, and high shock), car surround sensors, precrash detection, energy autonomous systems, tire pres- sure monitoring, car-to-car communication and navigation, and ultrasonic devices (e.g., for distance measurement and three-dimensional imaging). The heterogeneity of modern embedded systems is responsible for a complexity that is exceptionally challenging to their design. Moreover, these systems have particularly tight performance, time-to-market, and cost constraints. To meet these constraints, engineers must find solutions to efficiently design systems including complex electronic components that integrate several cores, RF circuitry, digital and analog hardware compo- nents, as well as mechanical and optical components. Model-Based Design addresses this issue by focusing on computational models as the core design artifact. The model enables a hierarchical design process where the entire system is first represented at an abstract level while model elaboration itera- tively refines this design and includes details as necessary to implement the required functionality. Thus, different models that may be playing different roles are required for the main stages of the design: the specification, the test and validation, and the consecutive refinement. The ability to efficiently construct models combined with associated tools and systematic methodolo- gies primes Model-Based Design for success by providing a complete solu- tion that enables concurrent engineering, performance analysis, automatic test generation, building efficient specifications and execution models, code generation and optimization, and automatic refinement through different abstraction levels. This book provides a comprehensive survey and overview of the benefits of Model-Based Design in the field of heterogeneous embedded systems. The selected contributions present successful approaches where models, tools, and methodologies result in important cost reduction and performance gain of heterogeneous embedded systems while decreasing their time-to-market. Organization This book is divided into three parts: Part I—Real-Time and Performance Analysis in Heterogeneous Embedded Systems, Part II—Design Tools and Methodology for Multiprocessor System-on-Chip, and Part III—Design Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page xiii 2009-10-13 Introduction xiii Tools and Methodology for Multidomain Embedded Systems. The following text presents an overview of each of the parts along with a brief introduction to the contents of each of the chapters. PartI.Real-Time and Performance Analysis in Heterogeneous EmbeddedSystems Part I highlights the importance of considering the real-time aspects of het- erogeneous embedded systems along with analyses of their performance. This part comprises six chapters that focus on capturing the aspects of tim- ing in models for embedded systems, and on defining tools that exploit these models in order to provide accurate performance prediction and analysis in the early stages of design. These aspects are illustrated by means of applica- tions in the fields of signal and image processing, automotive, robotics, and wireless communications. Chapter 1 provides a clear introduction to system-level performance pre- diction and analysis. It highlights its role in design and provides an overview of the two main approaches currently employed in this field: the analytical and the simulation-based approaches. The introduction to the performance prediction and analysis stage is realized by means of a concrete video- processing application scenario. Finally, this chapter describes a modular framework that enables the analysis of the flow of event streams through a network of computation and communication resources. Chapter 2 discusses a hybrid approach that resolves performance analy- sis issues by combining the advantages of simulation-based and analytical approaches. A methodology is presented based on a cycle-accurate sim- ulation approach for embedded software that also allows the integration of abstract SystemC models. The methodology is illustrated by an audio- processing application. Chapter 3 provides a comprehensive overview of a generic and modular framework for formal performance analysis. After an introduction to hierar- chical communications and MPSoC architectures and their implications on performance, this chapter presents a methodology to systematically investi- gate the sensitivity of a given system configuration and to explore the design space for optimal configurations. Finally, this chapter illustrates the tim- ing bottlenecks in an illustrative heterogeneous automotive architecture, and shows how to improve the performance guided by sensitivity analysis and system exploration. Chapter 4 proposes a modeling framework that may be instantiated to suit a variety of scheduling scenarios and can be easily extended. This chap- ter first introduces the formalism underlying the approach by means of an example. The framework that is used and the types of schedulability prob- lems that can be analyzed using this framework are then presented. The framework is then applied to the analysis of an example system. Chapter 5 presents the MOVeS analysis framework that can be used to provide schedulability analyses for multicore embedded systems. This framework is based on an embedded system model that consists of an Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page xiv 2009-10-13 xiv Introduction application model, an execution platform model, and a system model, which is a particular mapping of the application onto the execution platform. The model is represented using timed automata. Finally, this chapter shows how the framework can be used to verify properties of an embedded system by means of a number of examples including that of a smart phone, showing the ability to handle systems of realistic size. Chapter 6 introduces a MATLAB R /Simulink R -based simulation appro- ach. It provides models of multitasking real-time kernels and networks that can be used in simulation models for network-embedded control systems. The application of this tool is illustrated by means of a simulation of mobile robots in a sensor network. Part II. Design Toolsand Methodology forMultiprocessor System-on-Chip Part II addresses the Model-Based Design of MPSoCs. This part provides a comprehensive overview of current design practices, the MPSoC systems applications, as well as the theory behind the current and future tools and methodologies for MPSoC design. It consists of six chapters presenting solutions for the main challenges of MPSoC design. Tools and methodolo- gies are proposed for modeling and programming complex applications for MPSoCs, mapping these applications manually and/or automatically onto parallel MPSoC platforms; defining programming models for abstracting the hardware/software interfaces; and exploiting novel, efficient platforms and developing unified methodologies for MPSoC platform-based designs. To introduce these concepts and to illustrate the efficiency of the proposed solu- tions, the chapters illustrate several case studies in the fields of multimedia, wireless communications, telecommunications, and control. Chapter 7 starts with an overview of the market trends and the key role played by MPSoC systems in contemporary industrial practice. It introduces the programming models used for MPSoCs and the main characteristics of the MPSoC platforms. This chapter also presents the MultiFlex technology that supports the mapping of user-defined parallel applications, expressed in one or more programming models, onto an MPSoC platform. Finally, this chapter illustrates the application of the proposed technology to the design of a wireless system, a 3G WCDMA/FDD base-station. Chapter 8 presents a novel methodology for embedded software design based on a parallel programming model, called common intermediate code (CIC). In a CIC, the function and data parallelisms of application tasks are specified independently of the target architecture and design constraints. Information on the target architecture and the design constraints is sepa- rately described in an architecture information file. Based on this informa- tion, the programmer maps tasks to processing components, either manually or automatically. The efficiency of the proposed methodology is illustrated using a multimedia application, the H.263 decoder. Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page xv 2009-10-13 Introduction xv Chapter 9 presents a definition of the programming models that abstract hardware/software interfaces in the case of heterogeneous MPSoCs. Then, a programming environment is proposed that identifies several program- ming models at different MPSoC abstraction levels. The proposed approach combines the Simulink environment for high-level programming and the SystemC design language for low-level programming. The proposed methodology is applied to a heterogeneous multiprocessor platform, to explore the communication architecture and to generate efficient executable code of the software stack for an H.264 video encoder application. Chapter 10 discusses design principles and how a unified methodol- ogy together with a supporting software framework can be developed to improve the level of efficiency of the embedded electronics industry. This chapter first presents the design challenges for future systems and a man- ifesto espousing the benefits of a unified methodology. Then a method- ology, a platform-based design, is summarized. The chapter proceeds to present Metropolis, a software framework supporting the methodology, and Metro II, a second-generation framework tailored to industrial test cases. It concludes with two test cases in diverse domains: semiconductor chips (a universal mobile telecommunication system multichip design) and energy- efficient buildings (an indoor air quality control system). Chapter 11 presents reconfigurable heterogeneous and homogeneous multicore SoC platforms for streaming digital signal–processing (DSP) appli- cations. Typical examples of streaming DSP applications are wireless base- band processing, multimedia processing, medical image processing, sensor processing (e.g., for remote surveillance cameras), and phased-array radars. This chapter first introduces streaming applications and multicore architec- tures, presents key design criteria for streaming applications, and concludes with a multidimensional classification of architectures for streaming appli- cations. For each category, one or more sample architectures are presented. Chapter 12 describes the use of partial reconfiguration capabilities of some field programmable gate array (FPGAs) to provide a platform that is similar to existing general-purpose FPGAs. Partial reconfiguration involves the reconfiguration of part of an FPGA (a reconfigurable region) while another part of the FPGA (a static region) remains active and operating. This chapter illustrates this approach by presenting a case study on the design of a software-defined radio platform. Part III. Design Toolsand Methodology forMultidomain Embedded Systems Part III covers Model-Based Design for multidomain systems. Continuous- time and discrete-event models are at the core of Model-Based Design for these systems. This part of the book is composed of nine chapters and addresses the following challenges: validating and testing traditional for- mal models used for blending the continuous and discrete worlds, defining semantics for combining models specific to different domains, defining and Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page xvi 2009-10-13 xvi Introduction exploiting new languages that embrace the heterogeneity of domains, unam- biguous specification of semantics for domain-specific modeling languages (DSMLs), and developing new methodologies for Model-Based Design for that are able to take into account the heterogeneity in multidomain systems. Model-Based Design for illustrative heterogeneous systems such as opto- electromechanical and mixed-signal systems are discussed in detail. Chapter 13 provides a comprehensive overview of modeling with timed and hybrid automata. These types of automatahavebeen introduced in order to blend the discrete world of computers with the continuous physical world. This chapter presents the basics of timed and hybrid automata models and methods for exhaustive or partial verification, as well as testing for these models. Chapter 14 captures the fundamental problems, methods, and techniques for specifying the semantics of DSMLs. The effective application of DSMLs for an embedded design requires developers to have an unambiguous spec- ification of the semantics of modeling languages. This chapter explores two key aspects of this problem: the specifications of structural and behavioral semantics. Chapter 15 emphasizes combining different modeling perspectives and provides a simple and elegant notion of parallel composition. This chapter first reviews the concepts of “component” and “contract” from a semantic point of view. Then, the extended state machine model is described. The syn- tax and the expressive power used for expressions in the transitions of the state-based model are reviewed, followed by the specialization of the model into different categories to support alternative perspectives. Chapter 16 presents an approach to solve the problem of combining continuous-time and discrete-event execution models. This chapter focuses on the analysis of the two execution models and on the definition of mod- els for simulation interfaces required for combining these models in a global continuous/discrete execution model. It proposes a generic methodology, independent of the simulation language, for the design of continuous/ discrete cosimulation tools. Chapter 17 provides an operational semantics that supports a combina- tion of synchronous/reactive (SR) systems, discrete-event (DE) systems, and continuous-time (CT) dynamics. This chapter outlines a corresponding deno- tational semantics. Dialects of DE and CT are developed that generalize SR but provide complementary modeling and design capabilities. Chapter 18 provides an overview of the analog, mixed signal (AMS) extensions for SystemC. With these extensions, SystemC becomes amenable to modeling HW/SW systems and—at the function and architecture levels— analog and mixed-signal subsystems. The intended uses include executable specification, architecture exploration, virtual prototyping, and integration validation. This chapter describes a methodology that efficiently exploits the AMS extensions together with newly introduced converter channels. The methodology is illustrated by applying it to a software-defined radio system. Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page xvii 2009-10-13 Introduction xvii Chapter 19 presents several aspects of heterogeneous design methods in the context of increasing diversification of integration technologies. This chapter first provides the rationale and analysis of the multitechnology need in terms of technological evolution and highlights the need for advances in this domain. It then presents Rune II , a platform that addresses some of these needs. Finally, it illustrates the direct application of the proposed approach for optical link synthesis and technology performance characteri- zation by analyzing optical link performance for two sets of photonic com- ponent parameters and three CMOS technology generations. Chapter 20 concentrates on multidomain modeling and multirate simula- tion tools that are required to support mixed-technology system-level design. This chapter proposes the Chatoyant environment for simulating and ana- lyzing optical microelectromechanical systems (MEMSs). By supporting a variety of multidomain components and signal modeling techniques at mul- tiple levels of abstraction, Chatoyant has the ability to perform and ana- lyze mixed-signal trade-offs, which makes it invaluable to multitechnology system designers. Chapter 21 underscores the importance of the role of behavioral model- ing in the design of multidomain systems. This chapter presents a case study where mixed-signal hardware description languages are used to specify and simulate systems composed of elements of a different nature. A VHDL- AMS-based approach is applied for the behavioral modeling of MEMS-based microinstrumentation. References [Gan03] J. Gannsle and M. Barr, Embedded Systems Dictionary, CMP Books, San Francisco, CA, 2003. [ITR07] International Technology Roadmap for Semiconductors, ITRS 2007 Rapport. [Jer04] A. Jerraya and W. Wolf, Multiprocessors Systems-on-Chip, Morgan Kaufmann, San Francisco, CA, 2004. [TUM06] R. Tummala, Moore’s law meets its match, IEEE Spectrum, 43(6), 44–49, June 2006 Issue. [ZHA06] G. Q. Zhang, M. Graef, and F. van Roosmalen, Strategic research agenda of “More than Moore,” in Proceedings of EuroSime 2006, Como, Italy, pp. 1–6, April 24–26, 2006. Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page xviii 2009-10-13 Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page xix 2009-10-13 Contributors Karl-ErikÅrzén Department of Automatic Control Lund Institute of Technology Lund University Lund, Sweden Michael M.Bails FedEx Ground Pittsburgh, Pennsylvania Felice Balarin Cadence Berkeley Labs Berkeley, California Laura Barrachina-Saralegui Institut de Microelectrònica de Barcelona Centre Nacional de Microelectrònica Barcelona, Spain Olivier Benny STMicroelectronics, Inc. Ottawa, Ontario, Canada AlbertBenveniste Institut de Recherche en Informatique et Systèmes Aléatoires Institut National de Recherche en Informatique et en Automatique Rennes, France JasonM.Boles Department of Computational Biology University of Pittsburgh Pittsburgh, Pennsylvania Youcef Bouchebaba STMicroelectronics, Inc. Ottawa, Ontario, Canada Hanifa Boucheneb Department of Computer and Software Engineering Ecole Polytechnique de Montreal Montreal, Quebec, Canada Aske W. Brekling Department of Informatics and Mathematical Modelling Technical University of Denmark Lyngby, Denmark Oliver Bringmann Forschungszentrum Informatik Karlsruhe, Germany Benoît Caillaud Institut de Recherche en Informatique et Systèmes Aléatoires Institut National de Recherche en Informatique et en Automatique Rennes, France Anton Cervin Department of Automatic Control Lund Institute of Technology Lund University Lund, Sweden xix . Performance Analysis in Heterogeneous Embedded Systems, Part II Design Tools and Methodology for Multiprocessor System-on-Chip, and Part III Design Nicolescu /Model-Based Design for Embedded Systems 67842_C000. a case study on the design of a software-defined radio platform. Part III. Design Toolsand Methodology forMultidomain Embedded Systems Part III covers Model-Based Design for multidomain systems Italy, pp. 1–6, April 24–26, 2006. Nicolescu /Model-Based Design for Embedded Systems 67842_C000 Finals Page xviii 2009-10-13 Nicolescu /Model-Based Design for Embedded Systems 67842_C000 Finals Page