250 likes | 268 Views
1. SystemC Test Case Generation with the Gazebo Simulator. Institute of Technical Informatics. 26.07.17 Thomas Wolfgang Pieber. SystemC Test Case Generation with the Gazebo Simulator. Outline. 2. Introduction Design Evaluation Results Conclusion Future Work.
E N D
1 SystemC Test Case Generation with theGazebo Simulator Institute of Technical Informatics 26.07.17 Thomas Wolfgang Pieber
SystemC Test Case Generationwith the Gazebo Simulator Outline 2 • Introduction • Design • Evaluation • Results • Conclusion • Future Work Institute of Technical Informatics 26.07.17
SystemC Test Case Generationwith the Gazebo Simulator Outline 3 • Introduction • Design • Evaluation • Results • Conclusion • Future Work Institute of Technical Informatics 26.07.17
SystemC Test Case Generationwith the Gazebo Simulator Introduction 4 • New System Designs need to be tested thoroughly • Currently done by manually specifying I/O combinations and random testing • Designing tests based on use cases and boundary conditions • Oportunity that the designer misses special cases Institute of Technical Informatics • 26.07.17
Introduction Improvement 5 • Use cases can be used to directly generate valid test scenarios • Boundary conditions are simulated through changing initial and final conditions • Simulated hardware can affect the surrounding test system Feedback Institute of Technical Informatics • 26.07.17
Introduction Example Scenario 6 • A sensor (DUT) is read out and charged via NFC by a robot • The robot approaches with activated NFC field and tries to read data • Data transmission fails due to long communication range • The robot gets closer • Data transmission suceeds • The robot leaves the sensor Institute of Technical Informatics 26.07.17
SystemC Test Case Generationwith the Gazebo Simulator Outline 7 • Introduction • Design • Evaluation • Results • Conclusion • Future Work Institute of Technical Informatics 26.07.17
SystemC Test Case Generationwith the Gazebo Simulator Design 8 • Gazebo plugin to communicate with SystemC • SystemC process is started by this plugin • Communication between the processes via standard I/O Institute of Technical Informatics • 26.07.17
Design Requirements 9 • The simulation settings in SystemC must be configurable • Commands and responses must be readable and generic • SystemC testbed must be activated continuously • Communication to affected parts must be possible • Incoming commands must be executed in correct order • Time between the simulations must be synchronized • Simulation time and memory must be reduced as much as possible Institute of Technical Informatics 26.07.17
Design Communication 10 • The Gazebo plugin restructures the internal communication and adds additional information • The SystemC testbed parses the information and passes it to the correct components and adjusts simulation parameters • The simulation sends infor-mation directly to the Gazebosimulation • The Gazebo plugin needs to restructure the information to send it to the rest simulation Institute of Technical Informatics • 26.07.17
Design Communication 11 • Gazebo starts the SystemC simulationand sends commands and a start signal • SystemC sends status informationduring the simulation • When the SystemC simulation is finished a signal to proceed is sent • If the simulation should run longer, the Gazebo simulation again sends a start signal; otherwise an empty SystemCrun is performed and both simulationsare terminated Institute of Technical Informatics • 26.07.17
Design Communication cont‘d 12 • To be as generic as possible the communication between the simulations is performed with XML • Specific tags are necessary for configuring the SystemC environment, the communication between the simulations, and the triggering of new time steps • Possible commands can look like this: Institute of Technical Informatics • 26.07.17
Design Simulation Time Reduction 13 • Normal SystemC operations are performed • If all relevant components are in an Idle-state the changing parameters are estimated and changed • The simulation is stopped and a signal that indicates that a discontinuity occurs is generated Institute of Technical Informatics • 26.07.17
SystemC Test Case Generationwith the Gazebo Simulator Outline 14 • Introduction • Design • Evaluation • Results • Conclusion • Future Work Institute of Technical Informatics 26.07.17
SystemC Test Case Generationwith the Gazebo Simulator Evaluation 15 • A robot, equipped with NFC capabilities approaches the sensor • This influences the channel and allows communication and energy transfer • The sensor gets charged and transmits the sensor values to the robot Institute of Technical Informatics • 26.07.17
Evaluation Parameters 16 • Can the robot communicate with the sensor at all? • How fast can this simulation approach be? • What are bottlenecks of this simulation approach? Institute of Technical Informatics • 26.07.17
SystemC Test Case Generationwith the Gazebo Simulator Outline 17 • Introduction • Design • Evaluation • Results • Conclusion • Future Work Institute of Technical Informatics 26.07.17
SystemC Test Case Generationwith the Gazebo Simulator Results 18 • The robot is able to communicate with the sensor • The simulation gets much slower if the sensor needs to work Time reduction works as expected • Realtime factor:Gazebo alone: 0.8Gazebo + SystemC idle: 0.5Gazebo + SystemC running: 0.0005 Institute of Technical Informatics • 26.07.17
Results Identified Bottlenecks 19 • Multiple SystemC simulations are execured sequentially • Parsing XML messages is slow • SystemC generates huge maounts of data that need to be stored and processed Institute of Technical Informatics • 26.07.17
SystemC Test Case Generationwith the Gazebo Simulator Outline 20 • Introduction • Design • Evaluation • Results • Conclusion • Future Work Institute of Technical Informatics 26.07.17
SystemC Test Case Generationwith the Gazebo Simulator Conclusion 21 • Valid inputs for the sensor are generated • Errors in the communication / execution are translated to errors appearing on the robot • Erroneous states in the hardware can be found by matching the timestamp of the error message with the generated data • Simultaneous simulation of many SystemC instances is very slow Institute of Technical Informatics • 26.07.17
SystemC Test Case Generationwith the Gazebo Simulator Outline 22 • Introduction • Design • Evaluation • Results • Conclusion • Future Work Institute of Technical Informatics 26.07.17
SystemC Test Case Generationwith the Gazebo Simulator Future Work 23 • Update plugin structure to communicate to a server and receive results in next time step • Implement a server that searches for valid SystemC simulations to connect to • Implement a structure to parallelize SystemC simulations Institute of Technical Informatics • 26.07.17
SystemC Test Case Generationwith the Gazebo Simulator Acknowledgement 24 This project has received funding from the Electronic Component Systems for European Leadership Joint Undertaking under grant agreement No 692480. This Joint Undertaking receives support from the European Union's Horizon 2020 research and innovation programme and Germany, Netherlands, Spain, Austria, Belgium, Slovakia. IoSense is funded by the Austrian Federal Ministry of Transport, Innovation and Technology (BMVIT) under the program "ICT of the Future" between May 2016 and May 2019. More information https://iktderzukunft.at/en/ Institute of Technical Informatics • 26.07.17
25 Thank you for your attention!