Automated Synthesis and Verification of Embedded Systems
Total Page:16
File Type:pdf, Size:1020Kb
AutomatedAutomated Synthesis Synthesis andand VerificationVerification of of EmbeddedEmbedded Systems:Systems: WishfulWishful Thinking Thinking or or Reality? Reality? Wolfgang Rosenstiel Computer Engineering Wilhelm-Schickard-Institute for Informatics University of Tuebingen Germany WILHELM-SCHICKARD-INSTITUT Computer Engineering FromFrom HardwareHardware SupplySupply toto thethe FinalFinal ApplicationApplication Legislator Content Regulations Provider Gateway Service Content mgmt Provider Protection Delivery System System Application infrastructure Integrator mgmt Network Chip Maker Software Equipment Semi Wafer Equipment Foundry Semi Materials Sphere of design influence Source: Medea WILHELM-SCHICKARD-INSTITUT Computer Engineering EmbeddedEmbedded SoftwareSoftware isis BecomingBecoming MoreMore ValuableValuable Innovation by Source, % Contribution to revenue, % 4 15 16 25 Electronics 70 Electronics software 80 software Electronics Electronics hardware hardware 80 Mechanics Mechanics 60 30 20 2003 2015 2003 2015 Source: 2003 McKinsey-PTW HAWK survey (Institute for Production Management at the Technical University at Darmstadt, McKinsey analysis) WILHELM-SCHICKARD-INSTITUT Computer Engineering Relatives Wachstum: Kfz, Steuergeräte, TheThe AutomotiveAutomotive SiliconSilicon DriveDrive Halbleiter 600% Semiconductors 580% 500% Cars:ECU:S/C = 1:5:12 400% ECU 300% 300% 200% Percent of Growth (2000 = 100%) Cars & light trucks 140% 100% 2000 2002 2004 2006 2008 2010 2012 2014 2016 2018 2020 Source: Bosch WILHELM-SCHICKARD-INSTITUT Computer Engineering AddedAdded ValueValue ThroughThrough NewNew ElectronicElectronic FunctionsFunctions Car fabrication cost 11.000 in EUR cost in 10.200 % relation to 2000 new functions 100 23 % 100 % todays functions 85 % 75 50 25 0 2000 2010 Source: Mercer, a.o. WILHELM-SCHICKARD-INSTITUT Computer Engineering TheThe GrowingGrowing RoleRole ofof ChipChip MakersMakers The electronic part of final applications is increasingly determined and designed by semiconductor chip makers Customer interface is shifting to the boundary between the embedded code in the semiconductor device and the application software Building intelligent systems for the future requires close collaboration between the innovation teams of chip suppliers, chip customers ÆEDA is the bridge between them Source: Panel Discussion, edaForum07 WILHELM-SCHICKARD-INSTITUT Computer Engineering OutlineOutline EDA challenges System Level Design Verification Synthesis Conclusions WILHELM-SCHICKARD-INSTITUT Computer Engineering DesignDesign CostsCosts Source: ITRS 2008 based on data from Gary Smith WILHELM-SCHICKARD-INSTITUT Computer Engineering MotivationMotivationAutomotiveAutomotiveBayesian Networks ElectronicsElectronics Modelling Automotive Software Today's readmission rate for cars is ~ 70 000 000 cars per year Average of 20 to 70 embedded systems per car 50% development effort spend on software engineering Every 2nd car recall caused by software problems Æ Software quality assessment plays an important role in cost reduction and customer satisfaction 8 WILHELM-SCHICKARD-INSTITUT Computer Engineering VerificationVerification ProblemsProblems 2004 Pontiac recalls the Grand Prix since the software did not understand leap years. 2004 was a leap year. 2003 A BMW 520 trapped a Thai politician when the computer crashed. The door locks, windows, A/C and more were inoperable. Windshield was smashed to get him out. 2002 BMW recalls the 745i since the fuel pump would shut off if the tank was less than 1/3 full. Source: http://www.embedded.com/columns/embeddedpulse/179100752?_requestid=42835 WILHELM-SCHICKARD-INSTITUT Computer Engineering VerificationVerification ChallengesChallenges Challenge: Complexity growth Example: Diesel systems 2007 Calibration parameters: 16 k Performance: 300 MIPS Memory: 4 MByte Software coding errors Finite-state machines Timing Stack/memory overflows Consistencies Non-volatile memory Source: Software Bugs seen from an Industrial Perspective. CAV07 [Kropf07] Requirements Design Coding Application WILHELM-SCHICKARD-INSTITUT Computer Engineering OutlineOutline EDA challenges System Level Design Verification Synthesis Examples and Results WILHELM-SCHICKARD-INSTITUT Computer Engineering DesignDesign FlowFlow ofof DistributedDistributed EmbeddedEmbedded SystemsSystems Model based design of distributed systems platform dependent development of the application software (UML, Matlab/Simulink, C++) early consideration of the planned target platform in the model based system design (UML) mapping of function blocks on architecture components TM SYSTEMC use of virtual prototypes for the abstract modeling of the target platform Virtual Prototype Software Network Hardware Early analysis of the system integration early verification based on virtual prototypes formal and semiformal software verification Seamless transition to the real prototype automatic “target code” generation automatic high level synthesis co-simulation/emulation SystemC as intermediate representation WILHELM-SCHICKARD-INSTITUT Computer Engineering DesignDesign andand VerificationVerification ProcessProcess 13 Challenges Requirements Management 1. Move from document centric to model centric Specification 2. Interfaces between requirements, specification, Verification aims Implementation verification aims, and implementation 3. Tracing of requirements and verification aims Verification Prozess 4. Automatic generation of Analysis (Coverage, Assertions) software, hardware and test cases (ATPG) Results WILHELM-SCHICKARD-INSTITUT Computer Engineering DesignDesign andand VerificationVerification ProcessProcess withwith UMLUML 14 Requirements Management • Interfaces between specification, verification Specification aims, and implementation • Enable code generation Verification aims Implementation • Enable test case description • Enable linking and Verification Prozess tracing of design Analysis components (Coverage, Assertions) • Missing Æ requirements Results • Missing Æ support the verification process WILHELM-SCHICKARD-INSTITUT Computer Engineering UMLUML 22 15 UML 2.x Diagram Structure Behavior Diagram Diagram Class Composition Object Activity State Machine Use-Case- Diagram Diagram Diagram Diagram Diagram Diagram Component Package Deployment Diagram Diagram Diagram Interaction Diagram Communication Sequence Timing Interaction Diagram Diagram Diagram Overview Diagram WILHELM-SCHICKARD-INSTITUT Computer Engineering SystemSystem Architecture Architecture 16 UML 2.x Diagram Structure Behavior Diagram Diagram Class Composition Object Activity State Machine Use-Case- Diagram Diagram Diagram Diagram Diagram Diagram Component Package Deployment Diagram Diagram Diagram Interaction Diagram Communication Sequence Timing Interaction Diagram Diagram Diagram Overview Diagram WILHELM-SCHICKARD-INSTITUT Computer Engineering SystemSystem BehaviorBehavior 17 UML 2.x Diagram Structure Behavior Diagram Diagram Class Composition Object Activity State Machine Use-Case- Diagram Diagram Diagram Diagram Diagram Diagram Component Package Deployment Diagram Diagram Diagram Interaction Diagram Communication Sequence Timing Interaction Diagram Diagram Diagram Overview Diagram WILHELM-SCHICKARD-INSTITUT Computer Engineering ScenarioScenario / / TestTest casecase 18 UML 2.x Diagram Structure Behavior Diagram Diagram Class Composition Object Activity State Machine Use-Case- Diagram Diagram Diagram Diagram Diagram Diagram Component Package Deployment Diagram Diagram Diagram Interaction Diagram Communication Sequence Timing Interaction Diagram Diagram Diagram Overview Diagram WILHELM-SCHICKARD-INSTITUT Computer Engineering SysMLSysML 19 SysML Structure Requirements- Behavior Diagram Diagram Diagram Block Definition Internal Block Object Activity State Machine Use-Case- Diagram Diagram Diagram Diagram Diagram Diagram Component Package Deployment Diagram Diagram Diagram Interaction Diagram Parametric Interaction Diagram Communication Sequence Timing Diagram Diagram Diagram Overview Diagram New diagrams in SysML Extended/modified diagrams in SysML WILHELM-SCHICKARD-INSTITUT Computer Engineering InterfaceInterface toto VerificationVerification 20 Requirements Management Challenge Specification • System analysis of Verification aims Implementation UML/SysML diagrams Verification Prozess • Generating for Analysis verification aims (Coverage, Assertions) (Assertions) Results WILHELM-SCHICKARD-INSTITUT Computer Engineering OutlineOutline EDA challenges System Level Design Verification Synthesis Conclusion WILHELM-SCHICKARD-INSTITUT Computer Engineering SystemSystem Analysis Analysis throughthrough Assertions Assertions 22 System Specification (UML/SysML) Sequence Deployment Structure Diagram Diagram Diagram Prozess to Communication System-Architecture Module Abstracte Property UML/SysML (High Level Description) Assertions Simulation Formale Verification System- Description WILHELM-SCHICKARD-INSTITUT Computer Engineering Assertion-basedAssertion-based VerificationVerification 23 Test bench PSL/FLTL System-Model (includes test patterns Property (Assertion) example AR Prozess1 Prozess2 Prozess3 (P1) (P2) (P3) SystemC-based Temporal Checker Accept Reject Monitors for Assertions Interfaces for test patterns Test pattern indicate test quality Assertions improve error localization Assertions for functional und formal verification WILHELM-SCHICKARD-INSTITUT Computer Engineering SoftwareSoftware ModelingModeling Integers, arrays, floating point Arithmetic operations: +, - , *, /, % Software Software Pointers Procedures