open source virtual platforms for sw prototyping on fpga
play

Open Source Virtual Platforms for SW Prototyping on FPGA Mark Burton - PowerPoint PPT Presentation

F1 Open Source Virtual Platforms for SW Prototyping on FPGA Mark Burton Enabling System Level Design 1 Deep Learning Accelerator Nvidia has a Deep Learning Accelerator (called NVDLA) The NVIDIA Deep Learning Accelerator (NVDLA) is a free


  1. F1 Open Source Virtual Platforms for SW Prototyping on FPGA Mark Burton Enabling System Level Design 1

  2. Deep Learning Accelerator • Nvidia has a Deep Learning Accelerator (called NVDLA) The NVIDIA Deep Learning Accelerator (NVDLA) is a free and open architecture that promotes a standard way to design deep learning inference accelerators. With its modular architecture, NVDLA is scalable, highly configurable, and designed to simplify integration and portability. The hardware supports a wide range of IoT devices. Delivered as an open source project under the NVIDIA Open NVDLA License, all of the software, hardware, and documentation will be available on GitHub. Contributions are welcome • Nvidia also has a ‘c’ model of the DLA architecture (could be used as a systemc/tlm model) Enabling System Level Design 2

  3. Turing Lecture 2017 : Hennessey and Patterson https://www.youtube.com/watch?v=3LVeEjsn8Ts Enabling System Level Design 3

  4. Goals • Bring HW and SW together • Minimize time to re-spin • (change in HW/change in SW) • Enable simulation to be used by anybody • Make it easy and quick to use • Make the simulation FAST • Enable S/W development Enabling System Level Design 4

  5. Virtualization Algorithm execution (Para-)Virtualization Or full system virtualization Full binary execution Application Virtual Platform ‘real on virtual binary’ O/S Virtualization platform (model) Virtual platform (model) Full binary execution Application on REAL O/S Emulation platform (FPGA) FPGA Full binary execution Application on Hardware O/S Final Hardware Hardware Enabling System Level Design 5

  6. Virtualization Algorithm execution (Para-)Virtualization Or full system virtualization Full binary execution Application Virtual Platform ‘real on virtual binary’ O/S Virtualization platform (model) Virtual platform (model) Full binary execution Application on REAL O/S Emulation platform (FPGA) FPGA Full binary execution Application on Hardware O/S Final Hardware Hardware Enabling System Level Design 6

  7. Open Source SystemC Standard Virtual Platform Standard is SystemC TLM-2.0 IEEE 1666 • Open Source Simulator available for download from Accellera.org Corporate members 2016 • GreenSocs technology at the heart of TLM-2.0 standard. • All GreenSocs interfaces use TLM-2.0 • GreenSocs helping Accellera forge a new Model to tool standard. • Preview available in GreenConfig. • Our solutions are tool independent, and work with all vendors . Enabling System Level Design 7

  8. Qemu: Our Preferred source of CPU models • Qemu is the defacto standard Virtualizer. • Free and Open Source. • It is over 10 years old 18 1100 43000 1000 989,863 Architectures CPU’s Commits Contributors Lines of code • GreenSocs is a key contributor: Reverse execution and Multi-Core TCG Kernel. • Regular committers from many organizations … Enabling System Level Design 8

  9. Existing Model database overview: CPU Family coverage: X86 ARM MIPS Alpha PowerPC SPARC Micro- Cold- Cris SH4 Xtensa blaze fire Fast ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ SW dev model (LT) Cycle ✔ ✔ ✔ ✔ Accurate HW dev model (AT) Full list (of several hundred) available on GreenSocs.com Enabling System Level Design 9

  10. QBox QBox • Wraps up Qemu in a TLM2-0 API such that it can be used in standard SystemC SystemC QBox TLM (qemu) • QEMU is a generic and open source virtualizer – it covers almost all CPU architectures and achieves extremely high performance. Enabling System Level Design 10

  11. Qbox Syncronisation options • Real Time • Each simulator runs as close to real time as possible. • Can be simple “run as fast as you can”, no sync. • Windowed • Each simulator is allowed to run within a window, but if it reaches the end, it must stop and wait • The window will automatically extend as simulators run. • (Windowed ‘behind’ to keep SystemC behind and the tlm delta time positive) • Deterministic/single threaded • Each simulator runs in turn. • Pseudo random ordering to ‘catch’ S/W bugs. • (The advantage of a model … ) Enabling System Level Design 11

  12. Extending Qemu for Zynq GreenSocs is the partner upstreaming their device models Clock framework Enable the correct timing for events across the full Zynq device. • Large packet DMA framework Significantly increase the speed of DMA activity in the simulated • device. Fault Injection Model fault injection in a convenient and scriptable way, to enable • safety and test features to be validated. Safety and Test Library extensions to devices Model the suite of devices in the Zynq that can be self tested. • Enabling System Level Design 12

  13. Extending Qemu Speed MULTI Thread Qemu • A massive speed improvement for Qemu to take advantage of multi-core hosts 50 40 30 20 10 1 0 1 1 VCPUs 2 2 VCPUs 4 VCPUs 1 VCPUs 2 VCPUs 4 VCPUs 4 Upstream MTTCG Enabling System Level Design 13

  14. Advanced features • NON-Deterministic Reverse Execution • Ability to debug from an error backwards, irrespective of input stimulus • Supporting • No H/W required, No ‘JTAG collector’ limit. • Cache modeling • Cache Coherency performance estimation • Cache flushing S/W checking Enabling System Level Design 14

  15. What’s OpenVP Guest User • User Application and user level Space Applications UMD device code Kernel Guest Space KMD • Kernel and kernel modules HW Tests CPU Cluster Model QEMU with TLM2C Host User Space • Virtual Platform model, FPGA NVDLA device Parser • Based on QEMU and SystemC NVDLA FPGA Mem Model NVDLA Cmodel • ‘C’ model for NVDLA device itself AWS Driver Wrapper Model Enabling System Level Design 15

  16. Problem • Simulation speed … the NVDLA – Accelerator – is modelled on the host, so it will not ‘accelerate’. • Changes to the core NVDLA architecture require changes to the model. Enabling System Level Design 16

  17. Adding FPGA Guest User • User Application and user level Space Applications UMD device code Kernel Guest Space KMD • Kernel and kernel modules HW Tests CPU Cluster Model QEMU with TLM2C Host User Space • Virtual Platform model, with FPGA FPGA NVDLA device Parser wrapper NVDLA FPGA Mem Model NVDLA Cmodel AWS Driver Wrapper Model Kernel Host AWS Kernel Driver • AWS framework AWS HW and FPGA AWS Shell FPGA Transactor • NVDLA FPGA hardware module NVDLA FPGA DRAM • Runs at full speed! Enabling System Level Design 17

  18. SPEED • SW on NVDLA C-Model • Anybody can download packaged Docker release • Configurable – build time ½ hour. • FAST TO SET UP. • SW on FPGA with NVDLA RTL • Anybody can run AWS env with pre-packages AMI and AFI • With AWS setup, easy to alter both FPGA images and associated drivers. (e.g. less than a day). • FAST TO RUN. Both available from nvdla.org Enabling System Level Design 18

  19. All the components … QEMU TLM2C DLA Mem Cmodel Model Enabling System Level Design 19

  20. HW Test on FPGA Why we need HW tests on FPGA To guarantee the quality of FPGA release To identify corner case and issues in RTL HW FPGA FPGA AWS AWS SDK Description Parser Driver FPGA Enabling System Level Design 20

  21. Full S/W stack • Based on SW on Cmodel • Replace all Cmodels (NVDLA, Mem model) with FPGA wrapper • Full user code executable on combined QEMU + FPGA model FPGA AWS AWS AWS UMD KMD QEMU Wrapper SDK HDK FPGA Enabling System Level Design 21

  22. Generalisation • Making this ‘generally’ applicable requires more work L • Enable any architecture to be modeled in a ‘cloud’ (public/ private), off-loading onto FPGA when required/appropriate. • Enable ‘Virtulization’ when host/ guest match. Enabling System Level Design 22

  23. Future Possibilities • NVDLA Performance Model integration for Performance evaluation • More AWS FPGA images release for different NVDLA configuration • Enable RISCV in Virtual Platform • ARM Project Trillium • SiFive Enabling System Level Design 23

  24. More information: NVDLA page http://nvdla.org/ OpenVP Doc http://nvdla.org/contents.html OpenVP Github page https://github.com/nvdla/vp https://github.com/nvdla/vp_awsfpga www.greensocs.com mark@greensocs.com Enabling System Level Design 24

Recommend


More recommend