Table Of ContentLecture Notes in Electrical Engineering 530
Daniel Große
Sara Vinco
Hiren Patel Editors
Languages, Design
Methods, and
Tools for Electronic
System Design
Selected Contributions from FDL 2017
Lecture Notes in Electrical Engineering
Volume 530
BoardofSerieseditors
LeopoldoAngrisani,Napoli,Italy
MarcoArteaga,Coyoacán,México
BijayaKetanPanigrahi,NewDelhi,India
SamarjitChakraborty,München,Germany
JimingChen,Hangzhou,P.R.China
ShanbenChen,Shanghai,China
TanKayChen,Singapore,Singapore
RuedigerDillmann,Karlsruhe,Germany
HaibinDuan,Beijing,China
GianluigiFerrari,Parma,Italy
ManuelFerre,Madrid,Spain
SandraHirche,München,Germany
FaryarJabbari,Irvine,USA
LiminJia,Beijing,China
JanuszKacprzyk,Warsaw,Poland
AlaaKhamis,NewCairoCity,Egypt
TorstenKroeger,Stanford,USA
QilianLiang,Arlington,USA
TanCherMing,Singapore,Singapore
WolfgangMinker,Ulm,Germany
PradeepMisra,Dayton,USA
SebastianMöller,Berlin,Germany
SubhasMukhopadhyay,PalmerstonNorth,NewZealand
Cun-ZhengNing,Tempe,USA
ToyoakiNishida,Kyoto,Japan
FedericaPascucci,Roma,Italy
YongQin,Beijing,China
GanWoonSeng,Singapore,Singapore
GermanoVeiga,Porto,Portugal
HaitaoWu,Beijing,China
JunjieJamesZhang,Charlotte,USA
** Indexing: The books of this series are submitted to ISI Proceedings, EI-Compendex,
SCOPUS,MetaPress,Springerlink**
LectureNotesinElectricalEngineering(LNEE)isabookserieswhichreportsthelatestresearch
anddevelopmentsinElectricalEngineering,namely:
• Communication,Networks,andInformationTheory
• ComputerEngineering
• Signal,Image,SpeechandInformationProcessing
• CircuitsandSystems
• Bioengineering
• Engineering
TheaudienceforthebooksinLNEEconsistsofadvancedlevelstudents,researchers,andindustry
professionals working at theforefront of theirfields. Much likeSpringer’s other LectureNotes
series,LNEEwillbedistributedthroughSpringer’sprintandelectronicpublishingchannels.
For general information about this series, comments or suggestions, please use the contact
addressunder“serviceforthisseries”.
Tosubmitaproposalorrequestfurtherinformation,pleasecontacttheappropriateSpringer
PublishingEditors:
Asia:
China,JessieGuo,AssistantEditor([email protected])(Engineering)
India,SwatiMeherishi,SeniorEditor([email protected])(Engineering)
Japan,TakeyukiYonezawa,EditorialDirector([email protected])
(PhysicalSciences&Engineering)
SouthKorea,Smith(Ahram)Chae,AssociateEditor([email protected])
(PhysicalSciences&Engineering)
SoutheastAsia,RameshPremnath,Editor([email protected])
(ElectricalEngineering)
SouthAsia,AnindaBose,Editor([email protected])(ElectricalEngineering)
Europe:
LeontinaDiCecco,Editor([email protected])
(Applied Sciences and Engineering; Bio-Inspired Robotics, Medical Robotics, Bioengineering;
Computational Methods & Models in Science, Medicine and Technology; Soft Computing;
Philosophy of Modern Science and Technologies; Mechanical Engineering; Ocean and Naval
Engineering;WaterManagement&Technology)
([email protected])
(HeatandMassTransfer,SignalProcessingandTelecommunications,andSolidandFluid
Mechanics,andEngineeringMaterials)
NorthAmerica:
MichaelLuby,Editor([email protected])(Mechanics;Materials)
Moreinformationaboutthisseriesathttp://www.springer.com/series/7818
Daniel Große (cid:129) Sara Vinco (cid:129) Hiren Patel
Editors
Languages, Design Methods,
and Tools for Electronic
System Design
Selected Contributions from FDL 2017
123
Editors
DanielGroße SaraVinco
InstituteofComputerScience PolitecnicodiTorino
UniversityofBremenandCyber-Physical Torino,Torino,Italy
Systems,DFKIGmbH
Bremen,Germany
HirenPatel
UniversityofWaterloo
Waterloo,ON,Canada
ISSN1876-1100 ISSN1876-1119 (electronic)
LectureNotesinElectricalEngineering
ISBN978-3-030-02214-3 ISBN978-3-030-02215-0 (eBook)
https://doi.org/10.1007/978-3-030-02215-0
LibraryofCongressControlNumber:2018965211
©SpringerNatureSwitzerlandAG2019
Thisworkissubjecttocopyright.AllrightsarereservedbythePublisher,whetherthewholeorpartof
thematerialisconcerned,specificallytherightsoftranslation,reprinting,reuseofillustrations,recitation,
broadcasting,reproductiononmicrofilmsorinanyotherphysicalway,andtransmissionorinformation
storageandretrieval,electronicadaptation,computersoftware,orbysimilarordissimilarmethodology
nowknownorhereafterdeveloped.
Theuseofgeneraldescriptivenames,registerednames,trademarks,servicemarks,etc.inthispublication
doesnotimply,evenintheabsenceofaspecificstatement,thatsuchnamesareexemptfromtherelevant
protectivelawsandregulationsandthereforefreeforgeneraluse.
Thepublisher,theauthorsandtheeditorsaresafetoassumethattheadviceandinformationinthisbook
arebelievedtobetrueandaccurateatthedateofpublication.Neitherthepublishernortheauthorsor
theeditorsgiveawarranty,expressorimplied,withrespecttothematerialcontainedhereinorforany
errorsoromissionsthatmayhavebeenmade.Thepublisherremainsneutralwithregardtojurisdictional
claimsinpublishedmapsandinstitutionalaffiliations.
ThisSpringerimprintispublishedbytheregisteredcompanySpringerNatureSwitzerlandAG
Theregisteredcompanyaddressis:Gewerbestrasse11,6330Cham,Switzerland
Preface
The increasing integration and complexity of electronic system design requires
a constant evolution of the languages used and its associated design methods
and tools. The Forum on Specification & Design Languages (FDL) is a well-
established international forum devoted to the dissemination of research results,
practical experiences, and new ideas in the application of specification, design,
and verification languages to the design, modeling, and verification of integrated
circuits, complex hardware/software embedded systems, and mixed-technology
systems.
FDL is the main platform to present and discuss new trends as well as recent
works in this domain. FDL 2017 is the 20th in a series of events. Thanks to the
commitmentoftheauthors,presenters,andpanelists,the2017editionofFDLwas
anextremelyinterestingandlivelyevent.
This book is devoted to FDL 2017 and contains the papers that have been
evaluatedbestbyboththemembersoftheprogramcommitteeandtheparticipants
oftheforum,whichtookplaceinSeptember2017inVerona,Italy.Itreflectsthereby
the wide range of topics that have been covered at this event. The selected contri-
butions particularly highlight the increasing role of new modeling and verification
methodologiestargetingdigitalandanalogsystems,firmwaredevelopment,aswell
as functional and nonfunctional properties. By this, the portfolio of papers in this
bookprovidesanin-depthviewonthecurrentdevelopmentsinourdomain,which
surelywillhaveasignificantimpactinthefuture.
We would like to thank all the authors for their contributions as well as the
membersoftheorganizingandprogramcommitteesandtheexternalreviewersfor
theirhardworkinevaluatingthesubmissions.SpecialthanksgotoFrancoFummi
and his team from the University of Verona, who were responsible for a splendid
organization of FDL 2017, and to Samarjit Chakraborty for his work as program
co-chair.Finally,wewouldliketothankSpringerformakingthisbookpossible.
Bremen,Germany DanielGroße
Torino,Italy SaraVinco
Waterloo,ON,Canada HirenPatel
August2018
v
Contents
1 AutomaticIntegrationofHDLIPsinSimulinkUsingFMI
andS-FunctionInterfaces................................................... 1
Stefano Centomo, Michele Lora, Antonio Portaluri,
FrancescoStefanni,andFrancoFummi
2 Towards Early Validation of Firmware-Based Power
ManagementUsingVirtualPrototypes:AConstrainedRandom
Approach...................................................................... 25
VladimirHerdt,HoangM.Le,DanielGroße,andRolfDrechsler
3 Symbolic Simulation of Dataflow Synchronous Programs
withTimers................................................................... 45
GuillaumeBaudart,TimothyBourke,andMarcPouzet
4 Language and Hardware Acceleration Backend for Graph
Processing..................................................................... 71
Andrey Mokhov, Alessandro de Gennaro, Ghaith Tarawneh,
Jonny Wray, Georgy Lukyanov, Sergey Mileiko, Joe Scott,
AlexYakovlev,andAndrewBrown
5 Fault Analysis in Analog Circuits Through Language
ManipulationandAbstraction ............................................. 89
Enrico Fraccaroli, Francesco Stefanni, Franco Fummi,
andMarkZwolinski
6 AMethodologyforAutomatedConsistencyCheckingBetween
DifferentPower-AwareDescriptions....................................... 107
ArthurKalsing,LaurentFesquet,andChoukiAktouf
Index............................................................................... 129
vii
Chapter 1
Automatic Integration of HDL IPs in
Simulink Using FMI and S-Function
Interfaces
StefanoCentomo,MicheleLora,AntonioPortaluri,FrancescoStefanni,
andFrancoFummi
Abstract Verification of cyber-physical systems SW often requires simulation of
accurate heterogeneous HW models. However, heterogeneous system simulators
do not easily allow it and designers must connect multiple simulators in complex
co-simulation environments. Furthermore, usually HW computing platforms are
“approximated” by using abstracted models that do not accurately reproduce the
cycle-basedexecutionofHWcomponents.Inthischapterwepresenttheautomatic
generationofcycle-accurateSimulinkblocksfromthemostpopularHWdescription
languages:VHDLandVerilog.
ThemethodologystartsfromanIPcoremodeledinoneofthetwosupportedHW
description languages. Then, it relies on state-of-the-art RTL models abstraction
method to generate a functionally equivalent cycle-accurate model of the IP.
Then, it uses two alternative mapping and code-generation techniques. The first
relying on the portable FMI standard, while the other one exploits Mathworks’
proprietary C MEX S-Functions. These blocks can be easily integrated within
Simulink to simulate digital HW components while avoiding to build complex
co-simulation environments. A set of IP cores are used to evaluate the proposed
approach.Furthermore,theexperimentspresentedinthischaptercomparesthetwo
proposed mapping and code-generation alternatives to highlight their advantages
anddrawbacks.
Keywords Hardwaredescriptionlanguages · Co-simulation · Mathworks
simulink · Functionalmockupinterface · Cyber-physicalsystemssimulation ·
Virtualplatforms · Automaticcodegeneration
S.Centomo((cid:2))·M.Lora·F.Fummi
DepartmentofComputerScience,UniversityofVerona,Verona,Italy
e-mail:[email protected];[email protected];[email protected]
A.Portaluri·F.Stefanni
EdaLabs.r.l.Verona,Verona,Italy
e-mail:[email protected];[email protected]
©SpringerNatureSwitzerlandAG2019 1
D.Großeetal.(eds.),Languages,DesignMethods,andToolsforElectronicSystem
Design,LectureNotesinElectricalEngineering530,
https://doi.org/10.1007/978-3-030-02215-0_1
2 S.Centomoetal.
1.1 Introduction
Model-based design is nowadays one of the most used approach to tackle hetero-
geneityandcomplexityofmodernsystems[16].High-levelmodelsarestep-by-step
refinedtoreachthefinalsystemimplementation.Overtheyears,SimulinkbyMath-
works[24]becamethestandard“de-facto”inModel-basedsystemsengineering.It
providesanicegraphicalenvironmentthatallowsdesignerstoeasilymodelphysical
systems and their controllers. It provides many different libraries (i.e., toolboxes)
full of models and functionalities useful to build and analyze simulations. These
featuresleadittobecamethefavoritetoolofmanycontrolandsystemengineers.
However, Simulink does not provide mechanisms that allows to simulate com-
putational systems. For instance, it does not natively allow to simulate the exact
behavior of a SW running on top of an actual HW platform. A task that can
be necessary to accurately evaluate timing of HW/SW components controlling
cyber-Physical systems [9]. Thus, to perform such kind of analysis in Simulink it
will be necessary to exploit HW-in-the-loop and co-simulation techniques. These
require specific expertise and are extremely error prone and time consuming:
as such, they may negatively impact the time-to-market. This limitation must
be overcome as cyber-physical systems and smart devices are everyday more
used to control physical processes. In this work we propose a methodology to
automaticallygenerateSimulink-compliantblocksfromHWDescriptionLanguage
(HDL)models.
The methodology starts from either a Verilog or a VHDL Register Transfer
Level(RTL)model.TheHDLmodelisautomaticallyabstractedintoanequivalent
cycle-accurate C++ model by a state-of-the-art abstraction methodology [29]. We
extendthiscode-generationsteptomaptheabstractedmodelsintotwointerfacing
technologies supported by Simulink: the Functional Mock-up Interface (FMI) [3]
andtheproprietaryCMEXS-Functions.
The models of HW devices generated by the presented methodology can be
easily imported within Simulink. Thus, they provide a simpler and more efficient
alternativetoco-simulationandHW-in-the-looptechniques.Toshowtheadvantages
oftheapproachwecomparedtheperformanceintermsofsimulationspeedonaset
of HDL benchmarks. First, we integrated them within Simulink by co-simulating
them using a commercial HDL simulator. Then we integrated the benchmarks
by applying the proposed methodology. The experimental results showed up to
one order of magnitude speed-up with respect to state-of-the-art co-simulation
environments,whilepreservingaccuracy.
Section1.2presentssomeliteratureaboutheterogeneoussystemssimulation,the
necessary background and will introduce a running example used throughout the
paper. Section 1.3 will present the methodology and its application to the running
example.Section1.4reportstheexperimentalevaluationofthemethodology.After
discussingourresults,inSect.1.5wedrawsomeconclusionsandgiveanoverview
aboutourongoingandfutureresearchdirections.
1 AutomaticIntegrationofHDLIPsinSimulinkUsingFMIandS-Function... 3
1.2 RelatedWorks
Model-Based Systems Engineering [2, 23] requires a multitude of tools to be
integrated at each design step. This is imposed by the amount of heterogeneous
domains involved in modern systems [12]. Many design steps (e.g., validation or
performance estimation, etc.) require holistic system simulation, usually achieved
through co-simulation [19]. Multiple domain-specific simulators are connected to
each other; one of the simulator takes care of coordinating and synchronizing all
theinvolvedsimulatorstoachievethecompletesystememulation.Atthestate-of-
the-practice, Mathworks Simulink [24] is the standard de-facto system simulation
tool.Forthisreason,manyattempttoextenditscapabilitytospecificdomainshave
beencarriedout.Ithasbeenconnectedtonetworksimulators[15,27],digitalHW
simulators [6], instruction-set simulators [25] and many other different kinds of
simulators.Furthermore,ithasbeencoupledalsowithotherspecificmulti-physics
simulators. For instance, Haoping et al. used Synopsys Saber [31], Wang et al.
proposed an approach using Adams [30] or While in [14] it has been presented a
scenariomixingPSpicewithSimulink.Anotherworkshowsthebenefitsofcoupling
Simulink with a Manufacturing Simulator, with the objective of obtaining more
accurate estimation about the production quality of a manufacturing system [26].
Otherapproachesproposesolutionstocouplecomplexcomputationalsystemswith
Simulinkinordertomodelandverifycyber-physicalsystems.In[17]Kawaharaet
al.connectedSysMLandSimulinktotestandverifythecorrectnessofanembedded
system. In [28] Tudoret et al. uses the SIGNAL programming language to model
real-timeconstraintsofasoftwarecontrollingaaphysicalscenariodesignedusing
Simulink. Kung et al. coupled an HDL commercial simulator with Simulink for
early validation of HW constraints [18]. All the approaches mentioned above use
co-simulation techniques that have been proven to be computational demanding,
whileitssetupmaybeanerror-proneandtimeconsumingprocesses[12].Assuch,
some alternative approaches have been defined: they aim at integrating models by
translating and importing them into the target simulation environment [13, 20].
However none of the previous works provides neither abstraction nor automation.
Thesefeaturesarefocalintheapproachespresentedin[11,21]:theheterogeneous
models of the system components are translated into a homogeneous holistic
representationofthecyber-physicalsystemtosimulate.However,theseapproaches
requires that the designer can access the original source code of each single part
of the system: a rare eventuality in real design flows. The methodology presented
in this chapter aims at exploiting tools integration, while providing automation. It
automatically integrates cycle-accurate models of digital HW components within
Mathworks Simulink through automatic abstraction and translation of the original
HW IP cores, and then automatically enriching the generated code to interface it
withthetargetsimulator.