SimXMD: Simulation-based HW/SW Co-Debugging for FPGA Embedded Systems

Similar documents
SimXMD Co-Debugging Software and Hardware in FPGA Embedded Systems

SimXMD Simulation-based HW/SW Co-debugging for field-programmable Systems-on-Chip

SIMULATION-BASED HW/SW CO-DEBUGGING FOR FIELD-PROGRAMMABLE SYSTEMS-ON-CHIP

SimXMD User Guide (c)2013 Ruediger Willenberg, University of Toronto

System Debug. This material exempt per Department of Commerce license exception TSU Xilinx, Inc. All Rights Reserved

1-1 SDK with Zynq EPP

Introduction to Embedded System Design using Zynq

Microblaze for Linux Howto

Spartan-6 LX9 MicroBoard Embedded Tutorial. Tutorial 1 Creating an AXI-based Embedded System

Copyright 2014 Xilinx

Introducing the Spartan-6 & Virtex-6 FPGA Embedded Kits

Yet Another Implementation of CoRAM Memory

ECEN 449: Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University

Practical Hardware Debugging: Quick Notes On How to Simulate Altera s Nios II Multiprocessor Systems Using Mentor Graphics ModelSim

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

Xilinx Vivado/SDK Tutorial

NIOS CPU Based Embedded Computer System on Programmable Chip

SYSTEMS ON CHIP (SOC) FOR EMBEDDED APPLICATIONS

Designing with ALTERA SoC Hardware

Test and Verification Solutions. ARM Based SOC Design and Verification

This presentation of uclinux-on-microblaze given

Parallella Linux - quickstart guide. Antmicro Ltd

EDK Base System Builder (BSB) support for XUPV2P Board. Xilinx University Program

System-on Solution from Altera and Xilinx

SoC Systeme ultra-schnell entwickeln mit Vivado und Visual System Integrator

Virtex-4 PowerPC Example Design. UG434 (v1.2) January 17, 2008

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

Designing a Multi-Processor based system with FPGAs

Creating the AVS6LX9MBHP211 MicroBlaze Hardware Platform for the Spartan-6 LX9 MicroBoard Version

Evaluating SiFive RISC- V Core IP

MATLAB/Simulink 기반의프로그래머블 SoC 설계및검증

Simplifying the Development and Debug of 8572-Based SMP Embedded Systems. Wind River Workbench Development Tools

Building and Using the ATLAS Transactional Memory System

System Ace Tutorial 03/11/2008

Laboratory Exercise 3 Comparative Analysis of Hardware and Emulation Forms of Signed 32-Bit Multiplication

Designing with ALTERA SoC

Designing with Nios II Processor for Hardware Engineers

SECURE PARTIAL RECONFIGURATION OF FPGAs. Amir S. Zeineddini Kris Gaj

EDK 7.1 PowerPC Tutorial in Virtex-4

Optimizing Models of an FPGA Embedded System. Adam Donlin Xilinx Research Labs September 2004

EB-51 Low-Cost Emulator

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

Avnet S6LX16 Evaluation Board and Maxim DAC/ADC FMC Module Reference Design

EE 361L Digital Systems and Computer Design Laboratory

RiceNIC. Prototyping Network Interfaces. Jeffrey Shafer Scott Rixner

Optimizing HW/SW Partition of a Complex Embedded Systems. Simon George November 2015.

Sundance Multiprocessor Technology Limited. Capture Demo For Intech Unit / Module Number: C Hong. EVP6472 Intech Demo. Abstract

Keil uvision development story (Adapted from (Valvano, 2014a))

TRACE32. Product Overview

Spartan-3 MicroBlaze Sample Project

Debugging System for OpenRisc based Systems

Introduction to the Qsys System Integration Tool

ECE532 Design Project Group Report Disparity Map Generation Using Stereoscopic Camera on the Atlys Board

Building an Embedded Processor System on a Xilinx Zync FPGA (Profiling): A Tutorial

Cover TBD. intel Quartus prime Design software

Exploration of Cache Coherent CPU- FPGA Heterogeneous System

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

Introduction to Zynq

Embedded System Tools Reference Manual

借助 SDSoC 快速開發複雜的嵌入式應用

Building an Embedded Processor System on Xilinx NEXYS3 FPGA and Profiling an Application: A Tutorial

A software platform to support dynamically reconfigurable Systems-on-Chip under the GNU/Linux operating system

Sundance Multiprocessor Technology Limited. Capture Demo For Intech Unit / Module Number: C Hong. EVP6472 Intech Demo. Abstract

Did I Just Do That on a Bunch of FPGAs?

Chapter 5 Embedded Soft Core Processors

Tesla GPU Computing A Revolution in High Performance Computing

ADM-PCIE-9H7 Support & Development Kit Release: 0.1.1

Designing Embedded AXI Based Direct Memory Access System

Designing Embedded Processors in FPGAs

Real-Life Design Trade-Offs

High Speed Data Transfer Using FPGA

)8-,768'HY.LW 2YHUYLHZ. )XMLWVX0LNURHOHNWURQLN*PE+ Am Siebenstein Dreieich-Buchschlag, Germany

Revolutionary Quad-Pipelined Ultra High Performance 16/32-bit Microcontroller v. 6.05

Programming Multicore Systems

FPGA Implementation and Validation of the Asynchronous Array of simple Processors

FPGA Entering the Era of the All Programmable SoC

A Seamless Tool Access Architecture from ESL to End Product

Lecture 5: Computing Platforms. Asbjørn Djupdal ARM Norway, IDI NTNU 2013 TDT

AN OCM BASED SHARED MEMORY CONTROLLER FOR VIRTEX 4. Bas Breijer, Filipa Duarte, and Stephan Wong

DQ8051. Revolutionary Quad-Pipelined Ultra High performance 8051 Microcontroller Core

Microprocessor Soft-Cores: An Evaluation of Design Methods and Concepts on FPGAs

Cover TBD. intel Quartus prime Design software

High Speed Fault Injection Tool (FITO) Implemented With VHDL on FPGA For Testing Fault Tolerant Designs

Zynq Architecture, PS (ARM) and PL

[Swain, 4(7): July, 2015] ISSN: (I2OR), Publication Impact Factor: 3.785

Park Sung Chul. AE MentorGraphics Korea

Observability in Multiprocessor Real-Time Systems with Hardware/Software Co-Simulation

SoC Systeme ultra-schnell entwickeln mit Vivado und Visual System Integrator

Santa Fe (MAXREFDES5#) MicroZed Quick Start Guide

Interrupt Creation and Debug on ML403

Hardware Design Using EDK

ISE Simulator (ISim) In-Depth Tutorial. UG682 (v 13.1) March 1, 2011

V8uC: Sparc V8 micro-controller derived from LEON2-FT

Design of Embedded Hardware and Firmware

ECEN 449: Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University

CE 435 Embedded Systems. Spring Lab 3. Adding Custom IP to the SoC Hardware Debug. CE435 Embedded Systems

High-Level Synthesis with LabVIEW FPGA

Co-Design and Co-Verification using a Synchronous Language. Satnam Singh Xilinx Research Labs

NIOS CPU Based Embedded Computer System on Programmable Chip

AC701 Built-In Self Test Flash Application April 2015

Transcription:

FPGAworld 2014 SimXMD: Simulation-based HW/SW Co-Debugging for FPGA Embedded Systems Ruediger Willenberg and Paul Chow High-Performance Reconfigurable Computing Group University of Toronto September 9, 2014

The When Harry Met Sally rule of CAD 2

The When Harry Met Sally rule of CAD 3

The When Harry Met Sally rule of CAD 4

The When Harry Met Sally rule of CAD 5

The When Harry Met Sally rule of CAD 6

FPGA embedded systems CPU Application Peripheral B FPGA 7

FPGA embedded systems CPU Application Peripheral A Peripheral B FPGA 8

FPGA embedded systems CPU Application Peripheral A Peripheral B other on-chip hardware FPGA 9

FPGA embedded systems CPU Application Peripheral A Peripheral B other (not verified) on-chip hardware (not verified) FPGA 1 0

FPGA embedded systems CPU Application Driver code Peripheral A Peripheral B other (not verified) on-chip hardware (not verified) FPGA 1 1

FPGA embedded systems CPU Application Driver code (untested) Peripheral A Peripheral B other (not verified) on-chip hardware (not verified) FPGA 1 2

FPGA embedded systems CPU Application Driver code (untested) Optimal: Peripheral A Peripheral B other (not verified) on-chip hardware (not verified) FPGA Debug hardware, software and their interaction together 1 3

FPGA embedded systems CPU Application Driver code (untested) Optimal: Peripheral A Peripheral B other (not verified) on-chip hardware (not verified) FPGA Debug hardware, software and their interaction together 1 4

Embedded SW debugging chain GUI GDB TCP XMD JTAG CPU Xilinx FPGA 1 5

Embedded SW debugging chain GUI GDB TCP XMD JTAG CPU Xilinx FPGA Debugger on host system 1 6

Embedded SW debugging chain GUI GDB TCP XMD JTAG CPU Xilinx FPGA Debugger on host system 1 7 Software runs on target system

Embedded SW debugging chain GUI GDB TCP XMD JTAG CPU Xilinx FPGA Debugger on host system Vendor-specific interface software Software runs on target system 1 8

Embedded SW debugging chain 1 9

HW debugging ModelSim system_tb.v system.v 2 0

HW debugging ModelSim system_tb.v system.v Cycle-accurate digital simulator 2 1

HW debugging ModelSim system_tb.v system.v Cycle-accurate digital simulator A system model in HDL 2 2

HW debugging ModelSim system_tb.v system.v Cycle-accurate digital simulator A system model in HDL Testbench instantiates and stimulates model 2 3

HW debugging ModelSim system_tb.v system.v Cycle-accurate digital simulator A system model in HDL Testbench instantiates and stimulates model All internal signals observable 2 4

HW debugging 2 5

HW/SW Co-Debugging? GUI GDB ModelSim system_tb.v system.v 2 6

HW/SW Co-Debugging? GUI GDB TCP SimXMD TCP ModelSim system_tb.v system.v 2 7

HW/SW Co-Debugging? GUI GDB TCP SimXMD TCP ModelSim system_tb.v system.v SimXMD: Simulation-based experimental Microprocessor Debugger 2 8

HW/SW Co-Debugging? GUI GDB TCP SimXMD TCP ModelSim system_tb.v system.v SimXMD: Simulation-based experimental Microprocessor Debugger Translates debugger requests into simulator commands 2 9

Key SimXMD enablers GDB Remote Serial Protocol Defines requests and replies for: Setting/deleting breakpoints Advancing execution by instruction, line, breakpoint Reading registers or memory state 3 0

Key SimXMD enablers GDB Remote Serial Protocol Defines requests and replies for: Setting/deleting breakpoints Advancing execution by instruction, line, breakpoint Reading registers or memory state Xilinx MicroBlaze Trace Port Reports all information about a finished instruction: Instruction code and address Register and memory writes 3 1

Key SimXMD enablers GDB Remote Serial Protocol Defines requests and replies for: Setting/deleting breakpoints Advancing execution by instruction, line, breakpoint Reading registers or memory state Xilinx MicroBlaze Trace Port Reports all information about a finished instruction: Instruction code and address Register and memory writes ModelSim (Tcl) TCP server capability Can receive remote commands and send back results 3 2

Operating SimXMD: Preparation 1. Simulation model generation by design tool Currently: Xilinx Platform Studio 2. SimXMD is started (background operation) Examines embedded project information Modifies simulation model for Co-Debugging 3. Compilation of simulation model 3 3 4. Start of simulation 5. Start of preferred debugger (GUI) 6. Debugging at will

Operating SimXMD: Modes Run x2 0x3 0x4 0x5 PC = 5 int main() { a = functiona(); b = functionb(a); c = b + 5 * d; return c; } 3 4 In Run mode, debugging drives the simulation

Operating SimXMD: Modes Run pick Replay time x2 0x3 0x4 0x5 x2 0x3 0x4 0x5 PC = 5 PC = 5 int main() { a = functiona(); b = functionb(a); c = b + 5 * d; return c; } int main() { a = functiona(); b = functionb(a); c = b + 5 * d; return c; } 3 5 In Run mode, debugging drives the simulation

Operating SimXMD: Modes Run pick Replay time Replay x2 0x3 0x4 0x5 x2 0x3 0x4 0x5 x2 0x3 0x4 0x5 PC = 5 PC = 5 PC = 3 int main() { a = functiona(); b = functionb(a); c = b + 5 * d; return c; } int main() { a = functiona(); b = functionb(a); c = b + 5 * d; return c; } int main() { a = functiona(); b = functionb(a); c = b + 5 * d; return c; } 3 6 In Run mode, debugging drives the simulation In Replay mode, debugging iterates over previously simulated data

Operating SimXMD: Modes Run pick Replay time Replay Run x2 0x3 0x4 0x5 x2 0x3 0x4 0x5 x2 0x3 0x4 0x5 x2 0x3 0x4 0x5 0x6 PC = 5 PC = 5 PC = 3 PC = 6 int main() { a = functiona(); b = functionb(a); c = b + 5 * d; return c; } int main() { a = functiona(); b = functionb(a); c = b + 5 * d; return c; } int main() { a = functiona(); b = functionb(a); c = b + 5 * d; return c; } int main() { a = functiona(); b = functionb(a); c = b + 5 * d; return c; } 3 7 In Run mode, debugging drives the simulation In Replay mode, debugging iterates over previously simulated data

SimXMD at work 3 8

Implementation: Debugging memory 3 9

Implementation: Debugging memory Digital hardware simulation models the complete memory hierarchy: On-chip and external memory All cache levels Memory-mapped peripherals 4 0

Implementation: Debugging memory Digital hardware simulation models the complete memory hierarchy: On-chip and external memory All cache levels Memory-mapped peripherals Software debugging uses a flat, linear memory model: 4 1 The debugger requests a (virtual) memory address The target hardware determines and reads the physical location

SimXMD memory access logging Shared Log GUI GDB TCP SimXMD TCP ModelSim system_tb.v system.v 4 2 Boot Memory

SimXMD memory access logging Shared Log GUI GDB TCP SimXMD TCP ModelSim system_tb.v system.v 4 3 Boot Memory

SimXMD memory access logging Shared Log $memlog VPI GUI GDB TCP SimXMD TCP ModelSim system_tb.v system.v 4 4 Boot Memory VPI: Verilog Procedural Interface

SimXMD memory access logging Shared Log $memlog VPI GUI GDB TCP SimXMD TCP ModelSim system_tb.v system.v 4 5 Boot Memory VPI: Verilog Procedural Interface

SimXMD memory access logging Shared Log $memlog VPI GUI GDB TCP SimXMD TCP ModelSim system_tb.v system.v 4 6 Boot Memory VPI: Verilog Procedural Interface

SimXMD tool support Xilinx Embedded Development Kit >= 13.x Xilinx MicroBlaze Processor >= 8.x MentorGraphics ModelSim >= 6.6g Linux Operating System Debuggers Command-line GDB Xilinx SDK (Eclipse) DDD KDbg Nemiver 4 7

SimXMD modular architecture 4 8

SimXMD limitations 4 9

SimXMD limitations Debugger can t modify variables, registers 5 0

SimXMD limitations Debugger can t modify variables, registers Volatile memory locations might be inaccurate Shared-memory multiprocessing DMA, Busmastering Memory-mapped peripherals 5 1

SimXMD limitations Debugger can t modify variables, registers Volatile memory locations might be inaccurate Shared-memory multiprocessing DMA, Busmastering Memory-mapped peripherals Trace Port reports actions after instruction completes; several cycles difference 5 2

SimXMD limitations Debugger can t modify variables, registers Volatile memory locations might be inaccurate Shared-memory multiprocessing DMA, Busmastering Memory-mapped peripherals Trace Port reports actions after instruction completes; several cycles difference 5 3 Not all MicroBlaze special registers reported

SimXMD limitations Debugger can t modify variables, registers Volatile memory locations might be inaccurate Shared-memory multiprocessing DMA, Busmastering Memory-mapped peripherals Trace Port reports actions after instruction completes; several cycles difference 5 4 Not all MicroBlaze special registers reported Instruction code only from on-chip RAM

SimXMD and multiprocessors? 5 5

SimXMD and multiprocessors? Any one core in a multicore system can be selected for debugging 5 6

SimXMD and multiprocessors? Any one core in a multicore system can be selected for debugging Future work: On-the-fly switching between cores Concurrent debugging of several cores 5 7

SimXMD and multiprocessors? Any one core in a multicore system can be selected for debugging Future work: On-the-fly switching between cores Concurrent debugging of several cores The same memory volatility issues apply: 5 8 Logging of virtual memory accesses per processor Different virtual addresses - same physical address? Race conditions likely

SimXMD Performance How much do the SimXMD modifications slow down simulation? 5 9

SimXMD Performance How much do the SimXMD modifications slow down simulation? How slow is SimXMD debugging in comparison with debugging a real target? 6 0

SimXMD Performance How much do the SimXMD modifications slow down simulation? How slow is SimXMD debugging in comparison with debugging a real target? Test system: Host: Intel i5 Nehalem 4-core, 2.5Ghz, 12GB RAM Target: Xilinx Spartan 6 (Atlys board), JTAG Microblaze @ 100MHz, 64kB on-chip BRAM AXI bus, one GPIO peripheral Application: Writing 32kB byte-by-byte into BRAM 6 1

SimXMD overhead Write size w/o SimXMD w/ SimXMD 1 kbyte 6.9 s 7.3 s 2 kbyte 13.8 s 14.5 s 4 kbyte 27.3 s 29.0 s 8 kbyte 54.9 s 57.7 s 16 kbyte 109.0 s 117.1 s 32 kbyte 218.9 s 231.7 s 6 2

SimXMD overhead Write size w/o SimXMD w/ SimXMD 1 kbyte 6.9 s 7.3 s 2 kbyte 13.8 s 14.5 s 4 kbyte 27.3 s 29.0 s 8 kbyte 54.9 s 57.7 s 16 kbyte 109.0 s 117.1 s 32 kbyte 218.9 s 231.7 s 6 3 Average overhead: 6.0%

SimXMD debugging speed Same system and application Let GDB execute script of 50 steps (1 code line) Average time for a single code step: Hardware with JTAG SimXMD Run mode SimXMD Replay mode 1.350 s 0.850 s 0.313 s 6 4

Conclusions 6 5

SimXMD enables: Conclusions Simultaneous debugging of software and hardware Hardware debugging timed by software sections Software debugging without existing/implemented HW 6 6

SimXMD enables: Conclusions Simultaneous debugging of software and hardware Hardware debugging timed by software sections Software debugging without existing/implemented HW SimXMD does not significantly slow down reasonable debugging efforts 6 7

SimXMD enables: Conclusions Simultaneous debugging of software and hardware Hardware debugging timed by software sections Software debugging without existing/implemented HW SimXMD does not significantly slow down reasonable debugging efforts 6 8 SimXMD is open source

SimXMD enables: Conclusions Simultaneous debugging of software and hardware Hardware debugging timed by software sections Software debugging without existing/implemented HW SimXMD does not significantly slow down reasonable debugging efforts 6 9 SimXMD is open source SimXMD s modular architecture facilitates extension to other processors and tools

Conclusions SimXMD can be downloaded at: http://www.eecg.toronto.edu/~willenbe/simxmd 7 0

Conclusions SimXMD can be downloaded at: http://www.eecg.toronto.edu/~willenbe/simxmd Thank you for your attention! 7 1 Questions?