Efficient use of Virtual Prototypes in HW/SW Development and Verification

Similar documents
EEM870 Embedded System and Experiment Lecture 4: SoC Design Flow and Tools

Virtual PLATFORMS for complex IP within system context

Hardware Design and Simulation for Verification

The Use Of Virtual Platforms In MP-SoC Design. Eshel Haritan, VP Engineering CoWare Inc. MPSoC 2006

Will Everything Start To Look Like An SoC?

Yafit Snir Arindam Guha Cadence Design Systems, Inc. Accelerating System level Verification of SOC Designs with MIPI Interfaces

The Veloce Emulator and its Use for Verification and System Integration of Complex Multi-node SOC Computing System

Tim Kogel. June 13, 2010

Validation Strategies with pre-silicon platforms

Will Everything Start To Look Like An SoC?

NetSpeed ORION: A New Approach to Design On-chip Interconnects. August 26 th, 2013

Optimizing Hardware/Software Development for Arm-Based Embedded Designs

IBM PowerPC Enablement Kit: ChipBench-SLD: System Level Analysis and Design Tool Suite. Power.org, September 2005

Generation of UVM compliant Test Benches for Automotive Systems using IP-XACT with UVM-SystemC and SystemC AMS

Hardware Software Bring-Up Solutions for ARM v7/v8-based Designs. August 2015

The Architects View Framework: A Modeling Environment for Architectural Exploration and HW/SW Partitioning

ESE Back End 2.0. D. Gajski, S. Abdi. (with contributions from H. Cho, D. Shin, A. Gerstlauer)

Cycle Approximate Simulation of RISC-V Processors

QEMU for Xilinx ZynqMP. V Aug-20

Graph-Based Verification in a UVM Environment

Test and Verification Solutions. ARM Based SOC Design and Verification

Verification Futures The next three years. February 2015 Nick Heaton, Distinguished Engineer

Embedded Hardware and Software

Making the Most of your MATLAB Models to Improve Verification

Optimizing Cache Coherent Subsystem Architecture for Heterogeneous Multicore SoCs

RISC-V based core as a soft processor in FPGAs Chowdhary Musunuri Sr. Director, Solutions & Applications Microsemi

Verification Futures Nick Heaton, Distinguished Engineer, Cadence Design Systems

100M Gate Designs in FPGAs

System Level Design with IBM PowerPC Models

Pre-Silicon Host-based Unit Testing of Driver Software using SystemC Models

Performance Optimization for an ARM Cortex-A53 System Using Software Workloads and Cycle Accurate Models. Jason Andrews

Multi-core microcontroller design with Cortex-M processors and CoreSight SoC

Development of a modern Airbag System Prototype COSIDE User Experience

Part 2: Principles for a System-Level Design Methodology

Xilinx Vivado/SDK Tutorial

Extending Fixed Subsystems at the TLM Level: Experiences from the FPGA World

Fast and Accurate Source-Level Simulation Considering Target-Specific Compiler Optimizations

Veloce2 the Enterprise Verification Platform. Simon Chen Emulation Business Development Director Mentor Graphics

Network simulation with. Davide Quaglia

Platform-based Design

A Meta-Modeling-Based Approach for Automatic Generation of Fault- Injection Processes

Next Generation Verification Process for Automotive and Mobile Designs with MIPI CSI-2 SM Interface

Hardware/Software Co-design

Model-Based Design for effective HW/SW Co-Design Alexander Schreiber Senior Application Engineer MathWorks, Germany

Contents 1 Introduction 2 Functional Verification: Challenges and Solutions 3 SystemVerilog Paradigm 4 UVM (Universal Verification Methodology)

Benefits of Network on Chip Fabrics

Using Virtual Platforms To Improve Software Verification and Validation Efficiency

Hardware/Software Co-Verification Using the SystemVerilog DPI

SoC Verification Strategies for Embedded Systems Design

Software Driven Verification at SoC Level. Perspec System Verifier Overview

Performance Verification for ESL Design Methodology from AADL Models

Assembling and Debugging VPs of Complex Cycle Accurate Multicore Systems. July 2009

Ten Reasons to Optimize a Processor

Fast architecture prototyping on FPGAs: frameworks, tools, and challenges

Integrating Instruction Set Simulator into a System Level Design Environment

SYSTEMS ON CHIP (SOC) FOR EMBEDDED APPLICATIONS

Support for RISC-V. Lauterbach GmbH. Bob Kupyn Lauterbach Markus Goehrle - Lauterbach GmbH

Co-Design of Many-Accelerator Heterogeneous Systems Exploiting Virtual Platforms. SAMOS XIV July 14-17,

OSCI Update. Guido Arnout OSCI Chief Strategy Officer CoWare Chairman & Founder

BeiHang Short Course, Part 5: Pandora Smart IP Generators

SOFTWARE DRIVES HARDWARE, LESSONS LEARNED AND FUTURE DIRECTIONS

New technological opportunities coming along with SystemC/SystemC AMS for AMS IP Handling and Simulation

2. HW/SW Co-design. Young W. Lim Thr. Young W. Lim 2. HW/SW Co-design Thr 1 / 21

Combining Arm & RISC-V in Heterogeneous Designs

Designing Embedded Processors in FPGAs

Introduction to gem5. Nizamudheen Ahmed Texas Instruments

Creating hybrid FPGA/virtual platform prototypes

UVM in System C based verification

CoFluent Design FPGA. SoC FPGA. Embedded. Systems. HW/SW

Digital Control for Space Power Management Devices

Responding to TAT Improvement Challenge through Testbench Configurability and Re-use

HVSoCs: A Framework for Rapid Prototyping of 3-D Hybrid Virtual System-on-Chips

Does FPGA-based prototyping really have to be this difficult?

Rad-Hard Microcontroller For Space Applications

Fault-Injection testing and code coverage measurement using Virtual Prototypes on the context of the ISO standard

Hardware-Software Codesign

Copyright 2014 Xilinx

Virtual Prototypes and Pla1orms A Primer

Outline. SLD challenges Platform Based Design (PBD) Leveraging state of the art CAD Metropolis. Case study: Wireless Sensor Network

Reuse MATLAB Functions and Simulink Models in UVM Environments with Automatic SystemVerilog DPI Component Generation

ECE 587 Hardware/Software Co-Design Lecture 11 Verification I

Introduction. Definition. What is an embedded system? What are embedded systems? Challenges in embedded computing system design. Design methodologies.

System-level simulation (HW/SW co-simulation) Outline. EE290A: Design of Embedded System ASV/LL 9/10

INDUSTRIAL TRAINING: 6 MONTHS PROGRAM TEVATRON TECHNOLOGIES PVT LTD

Vivado Design Suite User Guide

Embedded HW/SW Co-Development

IMPROVES. Initial Investment is Low Compared to SoC Performance and Cost Benefits

A 1-GHz Configurable Processor Core MeP-h1

Agenda. How can we improve productivity? C++ Bit-accurate datatypes and modeling Using C++ for hardware design

SoC Verification Methodology. Prof. Chien-Nan Liu TEL: ext:

Embedded Systems: Hardware Components (part II) Todor Stefanov

Design methodology for multi processor systems design on regular platforms

Test Scenarios and Coverage

Integrated Development Environment

What is gem5 and where do I get it?

Emerging Platforms, Emerging Technologies, and the Need for Crosscutting Tools Luca Carloni

Design and Verification of FPGA Applications

What is needed on top of TLM-2 for bigger Systems?

Evaluating SiFive RISC- V Core IP

RunBMC - A Modular BMC Mezzanine Card BUV - Bring Up Vehicle For BMC Mezzanine. Eric Shobe & Jared Mednick Hardware Engineer - Salesforce

Transcription:

Efficient use of Virtual Prototypes in HW/SW Development and Verification Rocco Jonack, MINRES Technologies GmbH Eyck Jentzsch, MINRES Technologies GmbH Accellera Systems Initiative 1

Virtual prototype by example VP use in HW Development VP use in SW Development Agenda Accellera Systems Initiative 2

Eyck Jentzsch VIRTUAL PROTOTYPE BY EXAMPLE Accellera Systems Initiative 3

Motivation VPs allow flexible and early prototyping Usage of VP is beneficial as part of cyber-physical systems (CPS) CPS mixture HW, SW running on that HW and the surrounding system consisting of sensors and actors interacting with environment Useful for automotive, medical, (I)IoT but also others This tutorial aims to illustrate these statements Accellera Systems Initiative 4

Overview The Virtual Prototype shown implements a Brushless-DC (BLDC) motor control As such it contains analog and digital components interacting with each other There are 2 flavors of the VP: a pure digital model solely using SystemC a analog/mixed signal (AMS) model using SystemC/AMS Accellera Systems Initiative 5

Structure of the Platform The model consists of Motor & load model ADC, H-Bridge Microcontroller Peripherals Interconnect RISC-V ISS HiFive1 RISC-V ISS 6 Wrapper UART UART GPIO PWM SPI RAM PLIC H-Bridge ADC system environment/test bench Accellera Systems Initiative 6

System components BLDC Motor model Ordinary Differential Equation (ODE) model solved using Runge-Kutta method with fixed step width H-Bridge simplified Switch Model Analog Digital Converter (ADC) 8-channel 12bit ADC with SPI Interface equivalent to MCP3208 HiFive1 microcontroller platform 7 HiFive1 H-Bridge ADC system environment/test bench Accellera Systems Initiative 7

HiFive1 Platform components Peripherals register accurate functionality and timing implemented as needed Interconnect loosely-timed router Wrapper SystemC Wrapper containing pure C++ based ISS of RISC-V HiFive1 ISS 8 Wrapper UART UART GPIO PWM SPI RAM PLIC Accellera Systems Initiative 8

RISC-V Some Background HiFive1 is the first incarnation of the RISC-V Instruction Set Architecture developed by SiFive, a company established by the creators of the RISC-V ISA implements the RV32 base instruction set (I) together with the M (Integer multiplication) and C (compressed instructions) extensions There are ports of the design to Xilinx Artix chips RISC-V ISA is open source (governed by the RISC-V foundation) and there are plenty of open- and closed-source IPs and tool chains Further information can be found at https://riscv.org/ Accellera Systems Initiative 9

RISC-V Some Background There are several ISS available. e.g Spike the reference simulator but too slow for SW development QEmu very fast DBT based ISS but GNU license restrictions limit commercial use RV8 DBT based full-system ISS, difficult to tailor to ISA modifications, limited debugging capabilities Accellera Systems Initiative 10

Alternative: DBT-RISE-RISCV BSD licensed open-source DBT-RISE based RISC-V ISS fast ISS (suitable for SW development) easy to extend and tailor to ISA combinations and extensions easy to integrate into SystemC simulations builds on DBT-RISE, an infrastructure and library for rapid implementation of DBT based instruction set simulators Accellera Systems Initiative 11

DBT-RISE-RISCV ISS full-system simulator based on DBT-RISE uses dynamic binary translation to achieve high simulation speed instruction accurate with cycle estimation GDB ADAPTER SERVER SystemC Wrapper ADAPTER VM RV32 IMAC VM ARCH RV32 IMAC generated out of a DSL describing the machine instructions fast turn-around times when changing/extending the ISA well suited for HW/SW co-design & exploration Accellera Systems Initiative 12

DBT-RISE based Implementation Flow Core Specification Core DSL RISC-V: ~ 500 LOC Target specific C++ RV32IMAC: ~ 1.5k LOC DBT-RISE ~ 5k LOC Generated C++ RV32IMAC: ~ 6k LOC GDB Adapter HiFive1 SERVER 13 ADAPTER VM ARCH Platform Spec. DBT-RISE ISS UART UART GPIO SPI PWM RAM PLIC SystemC Platform Model system environment/test bench Accellera Systems Initiative

Implementation details SystemC Configuration and Control Interface used to configure the entire design Transaction tracing using SystemC Verification Library (SCV) Modeling blocks taken from SystemC Components library (SCC) available at https://git.minres.com/systemc/systemc-components Register implementation generated from SystemRDL description Source available at https://git.minres.com/dvcon2018 Accellera Systems Initiative 14

Demo Accellera Systems Initiative 15

Rocco Jonack VP USE IN HARDWARE DEVELOPMENT Accellera Systems Initiative 16

Motivation VP model usage for hardware design Software driven testing Augmentation of HW tests with realistic stimulus Bridging gaps in model availability Different abstraction level imply different requirements Mixing abstraction levels is powerful Planning of reasonable use models is required Accellera Systems Initiative 17

Behavioral/untimed Used for algorithm modeling Functional/loosely timed (LT) Modeling abstractions Used for SW interaction, also called programmers view (PV) virtual prototyping (VP) Cycle-accurate/approximately timed (AT) Used for architectural modeling, also called architecture view (AV) Register-transfer-level Link into verification domain Accellera Systems Initiative 18

Functional/loosely timed (LT) OS+SW CPU MEM ACCEL I/O The loosely timed model is a structural and behavioral refinement of the functional model. Mapping of functional blocks to HW and SW components and communication interfaces inbetween based on a chosen architecture Subsystems can execute ahead-oftime Accellera Systems Initiative 19

Cycle-accurate/approximately timed (AT) OS+SW CPU MEM ACCEL I/O Approximated timing on bus communication and on hardware resource access Interface communication time Average processing time in hardware IP Transactions are broken down into a number of phases corresponding much more closely to the phasing of particular hardware protocols Accellera Systems Initiative 20

Pin accurate models - RTL OS+SW CPU MEM ACCEL I/O Pin accurate in SystemC Adapter between transactions and pin level RTL simulators support pin level interfaces for standard types Requires typically usage of simulator provided library versions and compilers Verification effort RTL models are typically more detailed and require more attention to details Bridging multiple abstractions levels introduces need for interpretation Accellera Systems Initiative 21

Integration environments for testing TB DUT AT TB DUT RTL Standalone testing environments Easier analysis and debugging Lighter/faster environments Reuse of common transactors Using common components like TLM2 BFMs and memories Productivity libraries Links to tools and open source projects C based environment allows easy integration Accellera Systems Initiative 22

RTL components integrated into example system I 23 HiFive1 RISC-V ISS Wrapper UART UART GPIO PWM SPI RAM PLIC Replacing some components with RTL through TLM2pin adapters Mix allows stepwise refinement of prototype H-Bridge ADC system environment/test bench Accellera Systems Initiative 23

RTL components integrated into example system II 24 HiFive1 RISC-V ISS UART UART GPIO PWM SPI Wrapper RAM PLIC Replacing some components with RTL through TLM2pin adapters Mix allows stepwise refinement of prototype H-Bridge ADC system environment/test bench Accellera Systems Initiative 24

Demo Accellera Systems Initiative 25

Recommendations Use common interfaces for bridging between abstraction levels Preferably well known and standardized interface like AMBA, OCP Use libraries of common components Productivity libraries decrease turnaround time Tools often contain useful components but also imply specific infrastructure Planning and testing of components Functionality requirements Speed requirements Debugging and analysis Dynamic switching between abstraction levels is very powerful Accellera Systems Initiative 26

Architectural exploration & performance analysis Mapping of a behavioral model to one or more points in the architectural space consisting of different HW implementations Evaluation based on performance characteristics for different system architectures, such as a HW/SW split, communication system, or system components Typical use case for platform authors Important properties: accuracy wrt. to performance metrics i.e. timing, latency, throughput, power Accellera Systems Initiative 27

Tool Flow Specification floorplan outline Floorplan Estimation routing congestion Timing P&R sockets domains memory map traffic scenario Exploration Architecture use case performance switch topology, QoS buffers, serialization, pipe stages Structure area estimate RTL, SystemC IP-XACT scripts / constraints Verification Synthesis Accellera Systems Initiative testbench tests 28

AT Simulation Traffic Scenario NoC Model Accellera Systems Initiative 29

RTL Simulation Traffic Scenario RTL Running RTL model provides full signal access Reuse of traffic scenarios Accellera Systems Initiative

Recommendations (re-)using a VP for different purposes needs careful planning critical components need to provide the important information and accuracy component in different representations need to be compatible wrt. to communication, build settings etc. Accellera Systems Initiative 31

Eyck Jentzsch VP USE IN SOFTWARE DEVELOPMENT Accellera Systems Initiative 32

Test-Lab vs. VP Accellera Systems Initiative 33

Test-Lab vs. VP A classical Test-Lab uses Hardware-in-the-loop (HiL) HiL requires expensive Test-Equipment and space Bring-up of the lab setup is usually time consuming Virtual Prototype is a simulation providing FW a runtime environment Test-Suites don t need much space, just a work station or compute server Test-Suites can be scaled easily by adding compute power Simulations are reproducible internal states can easily be traced Environment can be stressed easily Simulation can be executed virtually anywhere Accellera Systems Initiative 34

Anatomy of a VP Test Suite Firmware Test Suite Test Case Hardware (VP) Tool-Chain (i.e. Docker, LXC, LXD) Environment (VP test bench) Accellera Systems Initiative 35

Anatomy of a VP Test Suite A Test-Suite works as follows: Fetch the source code repositories Start Container containing stable and host-independent tool-chain Build Firmware Build VP Build Environment/test-bench Run the test case(s) Evaluate test case execution and collect results Source: https://stefanprodan.com/2016/continuous-integration-with-jenkins-and-disposable-containers/ Accellera Systems Initiative 36

Integration-Aspects Tool-Chain (i.e. Third-Party libs, Compiler version) can be switched back and forth (i.e. by using different container images) Run different FW-Versions on same HW (VP) Run same FW-Version on different HW (VPs) Failing tests are always reproducible and (i.e. in a Debug-Session on developers computer) Internal states can be traced (VCD, Trace- and Log-Files) Accellera Systems Initiative 37

Short Demo Accellera Systems Initiative 38

Stressing the Environment The VP-Environment is a just a model as well A virtual environment can stress your system beyond reality Loads can be applied arbitrarily Stress the environment (VP-)Model to push FW into corner cases Whenever a random scenario causes a failure, the scenario can be reproduced Accellera Systems Initiative 39

Code-Coverage An embedded system doesn t give users much insight into the system (e.g. CPU states, program counters) therefore coverage collection is difficult VP-Simulations support Code- and (in some cases) Branch-Coverage collection Contributors (Test-Cases) to overall Code-Coverage can be identified to streamline testing Accellera Systems Initiative 40

Continuous Integration A VP-Test-Suite can easily be combined with Git/Gerrit Run selected VP-Tests upon every FW-Code-Commit e.g. highest contributors to code coverage Run full VP-Test-Suite over night Generate FW-Releases e.g. nightlies Ensures to have stable working mainline Combined with a FW test plan it allows to monitor implementation progress Accellera Systems Initiative 41

Benefits of using VP based SW development Each SW change is tested before propagating to the main line of development Allows close monitoring of the esw development progress effort of VP development pays off esp. when consistently used in SW development even after the availability of the HW Maximum benefits in situations where one software system addresses multiple hardware variants in different system contexts Accellera Systems Initiative 42

Questions Accellera Systems Initiative 43