Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page i 2009-10-13Model-Based Design for Embedded Systems... Nicolescu/Model-Based Design for Embedded Systems 67842_C0
Trang 2Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page i 2009-10-13
Model-Based Design
for Embedded Systems
Trang 3Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page ii 2009-10-13
Computational Analysis, Synthesis, and Design of Dynamic Models Series
Series Editor
Pieter J Mosterman
The MathWorks Natick, Massachusetts
Discrete-Event Modeling and Simulation: A Practitioner's Approach,
Gabriel A Wainer
Discrete-Event Modeling and Simulation: Theory and Applications,
edited by Gabriel A Wainer and Pieter J Mosterman
Model-Based Design for Embedded Systems,
edited by Gabriela Nicolescu and Pieter J Mosterman
Model-Based Testing for Embedded Systems,
edited by Justyna Zander, Ina Schieferdecker, and Pieter J Mosterman
Multi-Agent Systems: Simulation & Applications,
e dited by Adelinde M Uhrmacher and Danny Weyns
Trang 4Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page iii 2009-10-13
CRC Press is an imprint of the
Taylor & Francis Group, an informa business
Boca Raton London New York
Model-Based Design
for Embedded Systems
Gabriela Nicolescu Pieter J Mosterman
Trang 5Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page iv 2009-10-13
MATLAB® and Simulink® are trademarks of The MathWorks, Inc and are used with permission The Works does not warrant the accuracy of the text of exercises in this book This book’s use or discussion
Math-of MATLAB® and Simulink® sMath-oftware or related products does not constitute endorsement or sponsorship
by The MathWorks of a particular pedagogical approach or particular use of the MATLAB® and Simulink® software.
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
© 2010 by Taylor and Francis Group, LLC
CRC Press is an imprint of Taylor & Francis Group, an Informa business
No claim to original U.S Government works
Printed in the United States of America on acid-free paper
10 9 8 7 6 5 4 3 2 1
International Standard Book Number: 978-1-4200-6784-2 (Hardback)
This book contains information obtained from authentic and highly regarded sources Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint.
Except as permitted under U.S Copyright Law, no part of this book may be reprinted, reproduced, ted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers.
transmit-For permission to photocopy or use material electronically from this work, please access www.copyright com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400 CCC is a not-for-profit organization that provides licenses and registration for a variety of users For organizations that have been granted a photocopy license by the CCC,
a separate system of payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used
only for identification and explanation without intent to infringe.
Library of Congress Cataloging-in-Publication Data
Model-based design for embedded systems / Gabriela Nicolescu, Pieter J Mosterman.
p cm (Computational analysis, synthesis, and design of dynamic models series)
Includes bibliographical references and index.
ISBN 978-1-4200-6784-2 (hardcover : alk paper)
1 Embedded computer systems Design and construction I Nicolescu, G (Gabriela)
II Mosterman, Pieter J III Title IV Series.
Trang 6Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page v 2009-10-13
Contents
Preface ix Introduction xi Contributors xix
Part I Real-Time and Performance Analysis in
Heterogeneous Embedded Systems
1 Performance Prediction of Distributed Platforms 3
Lothar Thiele and Simon Perathoner
2 SystemC-Based Performance Analysis of Embedded
Systems 27
Jürgen Schnerr, Oliver Bringmann, Matthias Krause,
Alexander Viehl, and Wolfgang Rosentiel
3 Formal Performance Analysis for Real-Time Heterogeneous
Embedded Systems 57
Simon Schliecker, Jonas Rox, Rafik Henia, Razvan Racu,
Arne Hamann, and Rolf Ernst
4 Model-Based Framework for Schedulability Analysis
Using U PPAAL 4.1 93
Alexandre David, Jacob Illum, Kim G Larsen, and Arne Skou
5 Modeling and Analysis Framework for Embedded
Systems 121
Jan Madsen, Michael R Hansen, and Aske W Brekling
6 TrueTime: Simulation Tool for Performance Analysis
of Real-Time Embedded Systems 145
Anton Cervin and Karl-Erik Årzén
v
Trang 7Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page vi 2009-10-13
Pierre G Paulin, Olivier Benny, Michel Langevin, Youcef Bouchebaba,
Chuck Pilkington, Bruno Lavigueur, David Lo, Vincent Gagne,
and Michel Metzger
8 Retargetable, Embedded Software Design Methodology
for Multiprocessor-Embedded Systems 207
Soonhoi Ha
9 Programming Models for MPSoC 231
Katalin Popovici and Ahmed Jerraya
10 Platform-Based Design and Frameworks:
M ETROPOLIS and M ETRO II 259
Felice Balarin, Massimiliano D’Angelo, Abhijit Davare, Douglas Densmore, Trevor Meyerowitz, Roberto Passerone, Alessandro Pinto, Alberto
Sangiovanni-Vincentelli, Alena Simalatsar, Yosinori Watanabe,
Guang Yang, and Qi Zhu
11 Reconfigurable Multicore Architectures for Streaming
Applications 323
Gerard J M Smit, André B J Kokkeler, Gerard K Rauwerda,
and Jan W M Jacobs
12 FPGA Platforms for Embedded Systems 351
Stephen Neuendorffer
Part III Design Tools and Methodology for
Multidomain Embedded Systems
13 Modeling, Verification, and Testing Using Timed and
Hybrid Automata 383
Stavros Tripakis and Thao Dang
14 Semantics of Domain-Specific Modeling Languages 437
Ethan Jackson, Ryan Thibodeaux, Joseph Porter,
and Janos Sztipanovits
15 Multi-Viewpoint State Machines for Rich
Component Models 487
Albert Benveniste, Benoît Caillaud, and Roberto Passerone
Trang 8Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page vii 2009-10-13
16 Generic Methodology for the Design of Continuous/Discrete
Co-Simulation Tools 519
Luiza Gheorghe, Gabriela Nicolescu, and Hanifa Boucheneb
17 Modeling and Simulation of Mixed Continuous and
Discrete Systems 559
Edward A Lee and Haiyang Zheng
18 Design Refinement of Embedded Mixed-Signal Systems 585
Jan Haase, Markus Damm, and Christoph Grimm
19 Platform for Model-Based Design of Integrated
Multi-Technology Systems 603
Ian O’Connor
20 CAD Tools for Multi-Domain Systems on Chips 643
Steven P Levitan, Donald M Chiarulli, Timothy P Kurzweg,
Jose A Martinez, Samuel J Dickerson, Michael M Bails,
David K Reed, and Jason M Boles
21 Smart Sensors Modeling Using VHDL-AMS for
Microinstrument Implementation with a Distributed
Architecture 697
Carles Ferrer, Laura Barrachina-Saralegui, and Bibiana Lorente-Alvarez
Index 719
Trang 9Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page viii 2009-10-13
Trang 10Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page ix 2009-10-13
Preface
The unparalleled flexibility of computation has been a key driver and ture bonanza in the development of a wide range of products across a broadand diverse spectrum of applications such as in the automotive aerospace,health care, consumer electronics, etc Consequently, the embedded micro-processors that implement computational functionality have become a part
fea-of almost every facet fea-of our world, thereby significantly improving the ity of our lives The versatility of computational features invites and endorses
qual-a degree of imqual-aginqual-ation qual-and crequal-ativity in design thqual-at hqual-as unlocked qual-an qual-almostinsatiable demand for consistently increasing both the complexity of embed-ded systems and the performance of embedded computations The quest torise to these demands has resulted in computing architectures of a heteroge-neous nature These architectures often integrate several types of processors,analog and digital electronic components, as well as mechanical and opticalcomponents, all on a single chip To efficiently design for such heterogene-ity and to maximally exploit its capabilities have become one of the mostprominent challenges that we are now faced with as a design automationcommunity
Model-Based Design is emerging as a solution to bridge the gap betweencomputational capabilities that are available but that we are yet unable toexploit Using a computational approach in the design itself allows rais-ing the level of abstraction of the system specification at which novel anddifferentiating functionalities are captured Automation can then assist inrefining this specification to an implementation For this to be successful, per-formance studies of potential implementations at a high level of abstractionare essential, combined with the necessity of traceability and parameteriza-tion throughout the refinement process
This book provides a compilation of the work of internationallyrenowned authors on Model-Based Design Each chapter contributessupreme results that have helped establish Model-Based Design and thatcontinue to expand its barriers The respective authors excel in their exper-tise on the automation of design refinement and how to relate propertiesthroughout this refinement while enabling analytic and synthetic qualities
We are delighted and honored by their participation in the effort that led tothis book, and we sincerely hope that the readers will find the indulgence ofintellectual achievement as enjoyable and stimulating as we do
In closing, we would like to express our genuine appreciation and itude for all the time and effort that each of the authors has put in Our
grat-ix
Trang 11Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page x 2009-10-13
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
See www.mathworks.com/trademarks<http://www.mathworks.com/trademarks>
for a list of additional trademarks
Trang 12Nicolescu/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 thecurrent state of Model-Based Design for embedded systems, the challengesinvolved, and the latest trends To achieve this objective, the book offers acompilation of 21 outstanding contributions from industry and academia.The contributions are grouped into three main parts Part I comprises thecontributions that focus on a key dimension in the design of embedded sys-tems: the performance analysis of real-time behavior based on computationalmodels Part II is composed of contributions proposing approaches that takeinto consideration the specific characteristics and design challenges of mul-tiprocessor systems-on-chip (MPSoCs) Part III contains contributions in thefield of system-level design of multidomain systems
An “embedded system” is a system designed to perform a dedicatedfunction, typically with tight real-time constraints, limited dimensions, andlow cost and low-power requirements It is a combination of computer hard-ware and software and additional mechanical, optical, or other parts thatare 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, faxmachines, printers, debit/credit card readers, heart rate monitors, blood gasmonitors, etc [Gan03]
The evolution of embedded systems parallels Moore’s law, which statesthat the number of transistors on an integrated circuit doubles every 18months 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 videogames
In response to the challenges of further miniaturization, the tional Technology Roadmap for Semiconductors (ITRS) emphasizes theMore Than Moore’s Law movement [ITR07] This movement focuses on
Interna-xi
Trang 13Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page xii 2009-10-13
system integration rather than an increase in transistor density and leads
to a functional diversification in integrated systems This diversificationallows 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 heterogeneous systems 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 devicesfor nonintrusive surgery, sensors for harsh environments (e.g., chemicallyaggressive, extreme temperature, excessive vibration, and high shock), carsurround sensors, precrash detection, energy autonomous systems, tire pres-sure monitoring, car-to-car communication and navigation, and ultrasonicdevices (e.g., for distance measurement and three-dimensional imaging).The heterogeneity of modern embedded systems is responsible for acomplexity that is exceptionally challenging to their design Moreover,these systems have particularly tight performance, time-to-market, and costconstraints To meet these constraints, engineers must find solutions toefficiently design systems including complex electronic components thatintegrate 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 designartifact The model enables a hierarchical design process where the entiresystem is first represented at an abstract level while model elaboration itera-tively refines this design and includes details as necessary to implement therequired functionality Thus, different models that may be playing differentroles are required for the main stages of the design: the specification, thetest and validation, and the consecutive refinement The ability to efficientlyconstruct 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, automatictest generation, building efficient specifications and execution models, codegeneration and optimization, and automatic refinement through differentabstraction levels
This book provides a comprehensive survey and overview of the benefits
of Model-Based Design in the field of heterogeneous embedded systems Theselected 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 PerformanceAnalysis in Heterogeneous Embedded Systems, Part II—Design Tools andMethodology for Multiprocessor System-on-Chip, and Part III—Design
Trang 14Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page xiii 2009-10-13
Tools and Methodology for Multidomain Embedded Systems The followingtext presents an overview of each of the parts along with a brief introduction
to the contents of each of the chapters
Part I Real-Time and Performance Analysis in Heterogeneous
Embedded Systems
Part I highlights the importance of considering the real-time aspects of 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 thesemodels in order to provide accurate performance prediction and analysis inthe early stages of design These aspects are illustrated by means of applica-tions in the fields of signal and image processing, automotive, robotics, andwireless communications
het-Chapter 1 provides a clear introduction to system-level performance diction and analysis It highlights its role in design and provides an overview
pre-of the two main approaches currently employed in this field: the analyticaland the simulation-based approaches The introduction to the performanceprediction and analysis stage is realized by means of a concrete video-processing application scenario Finally, this chapter describes a modularframework 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 sis issues by combining the advantages of simulation-based and analyticalapproaches A methodology is presented based on a cycle-accurate sim-ulation approach for embedded software that also allows the integration
analy-of abstract SystemC models The methodology is illustrated by an processing application
audio-Chapter 3 provides a comprehensive overview of a generic and modularframework for formal performance analysis After an introduction to hierar-chical communications and MPSoC architectures and their implications onperformance, this chapter presents a methodology to systematically investi-gate the sensitivity of a given system configuration and to explore the designspace for optimal configurations Finally, this chapter illustrates the tim-ing bottlenecks in an illustrative heterogeneous automotive architecture, andshows how to improve the performance guided by sensitivity analysis andsystem exploration
Chapter 4 proposes a modeling framework that may be instantiated tosuit a variety of scheduling scenarios and can be easily extended This chap-ter first introduces the formalism underlying the approach by means of anexample The framework that is used and the types of schedulability prob-lems that can be analyzed using this framework are then presented Theframework 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 Thisframework is based on an embedded system model that consists of an
Trang 15Nicolescu/Model-Based Design for Embedded Systems 67842_C000 Finals Page xiv 2009-10-13
application model, an execution platform model, and a system model, which
is a particular mapping of the application onto the execution platform Themodel is represented using timed automata Finally, this chapter shows howthe framework can be used to verify properties of an embedded system bymeans of a number of examples including that of a smart phone, showingthe ability to handle systems of realistic size
Chapter 6 introduces a MATLAB R/Simulink R-based simulation ach It provides models of multitasking real-time kernels and networks thatcan be used in simulation models for network-embedded control systems.The application of this tool is illustrated by means of a simulation of mobilerobots in a sensor network
appro-Part II Design Tools and Methodology for Multiprocessor
System-on-Chip
Part II addresses the Model-Based Design of MPSoCs This part provides
a comprehensive overview of current design practices, the MPSoC systemsapplications, as well as the theory behind the current and future tools andmethodologies for MPSoC design It consists of six chapters presentingsolutions for the main challenges of MPSoC design Tools and methodolo-gies are proposed for modeling and programming complex applications forMPSoCs, mapping these applications manually and/or automatically ontoparallel MPSoC platforms; defining programming models for abstracting thehardware/software interfaces; and exploiting novel, efficient platforms anddeveloping unified methodologies for MPSoC platform-based designs Tointroduce 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 roleplayed by MPSoC systems in contemporary industrial practice It introducesthe programming models used for MPSoCs and the main characteristics ofthe MPSoC platforms This chapter also presents the MultiFlex technologythat supports the mapping of user-defined parallel applications, expressed
in one or more programming models, onto an MPSoC platform Finally, thischapter 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 designbased on a parallel programming model, called common intermediate code(CIC) In a CIC, the function and data parallelisms of application tasks arespecified 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 illustratedusing a multimedia application, the H.263 decoder