litex soc builder and library
play

LiteX: SoC builder and library OSDA Workshop (2019), Florence, March - PowerPoint PPT Presentation

LiteX: SoC builder and library OSDA Workshop (2019), Florence, March 29 Florent Kermarrec, florent@enjoy-digital.fr 1 Enjoy-Digital Founded in 2011. FPGA consulting / Full FPGA based systems design. Reuse and create open-source tools/cores to


  1. LiteX: SoC builder and library OSDA Workshop (2019), Florence, March 29 Florent Kermarrec, florent@enjoy-digital.fr 1

  2. Enjoy-Digital Founded in 2011. FPGA consulting / Full FPGA based systems design. Reuse and create open-source tools/cores to be more effjcient. LiteX: SoC builder and library 2 OSDA Workshop (2019), Florence, March 29

  3. Presentation: 1) Let’s design an FPGA SoC the traditional way... 2) LiteX : Build your hardware, easily! 3) Systems using Migen/LiteX and Future! LiteX: SoC builder and library 3 OSDA Workshop (2019), Florence, March 29

  4. Let’s design an FPGA SoC the traditional way... LiteX: SoC builder and library 4 OSDA Workshop (2019), Florence, March 29

  5. Create a simple SoC: - Choose a CPU. - Add cores around it. - Connect all that. - Write low-level software. [...] LiteX: SoC builder and library 5 OSDA Workshop (2019), Florence, March 29

  6. Create a simple SoC: [One day later...] Great we got it working by only using open-source cores! ~ 500 LOC for the wrapper. LiteX: SoC builder and library 6 OSDA Workshop (2019), Florence, March 29

  7. Let’s add our own core: Let’s create the new core, simulate it with an open-source simulator. Everything is working fine, let’s integrate it! LiteX: SoC builder and library 7 OSDA Workshop (2019), Florence, March 29

  8. Let’s add our own core: It’s… almost working, but not behaving as expected, is it a bug in the core or something we miss-understood in the datasheet of the chip we are interfacing with?? We need to see what is going on…* (*signal is not observable with an external logic analyzer) LiteX: SoC builder and library 8 OSDA Workshop (2019), Florence, March 29

  9. Let’s add our own core: No standard way to debug FPGA designs: 1) Create our own debug tools: ~a few days, limited functionalities/capabilities. 2) Use vendor’s free embedded logic analyzer... LiteX: SoC builder and library 9 OSDA Workshop (2019), Florence, March 29

  10. Let’s add our own core: No standard way to debug FPGA designs: 1) Create our own debug tools: ~a few days, limited functionalities/capabilities. 2) Use vendor’s free embedded logic analyzer…* LiteX: SoC builder and library * Just this time... 10 OSDA Workshop (2019), Florence, March 29

  11. Let’s add our own core: OK, issue is understood (was a bad interpretation of the spec), core is adapted and now working fine… LiteX: SoC builder and library 11 OSDA Workshop (2019), Florence, March 29

  12. Let’s add some RAM: We need RAM to run an OS, our board has DDR3. Let’s look at open-source solutions… Nothing seems to exist except something called LiteDRAM written in ...Python, how can it be serious? :) Let’s generate a controller with vendor’s tools…* LiteX: SoC builder and library * Just this time… (again) 12 OSDA Workshop (2019), Florence, March 29

  13. We could continue with several similar examples…: - How to support difgerent vendors and reuse the same methodology/cores? - How to build high performance systems at a reasonable cost. - How to create complex SoCs and limit LOC - .... LiteX: SoC builder and library 13 OSDA Workshop (2019), Florence, March 29

  14. In addition to open-source FPGA toolchains, there is a need to high level tools and high performance cores... LiteX: SoC builder and library 14 OSDA Workshop (2019), Florence, March 29

  15. LiteX: Build your hardware easily! LiteX: SoC builder and library 15 OSDA Workshop (2019), Florence, March 29

  16. Migen : A python HDL toolbox. LiteX: SoC builder and library 16 OSDA Workshop (2019), Florence, March 29

  17. Migen : A python HDL toolbox. What is Migen? An alternative HDL based on Python LiteX: SoC builder and library 17 OSDA Workshop (2019), Florence, March 29

  18. Migen : A python HDL toolbox. FHDL is a Python DSL (Domain Specific Language) defined by Migen and allow generating Verilog or instanciating Verilog/VHDL from Python code. Principle: Use Python to create a list of combinatorial and synchronous assignments. self.comb += [“...”] self.sync += [“...”] Led blinker LiteX: SoC builder and library And generate a verilog file from these assignments. 18 OSDA Workshop (2019), Florence, March 29

  19. Migen : A python HDL toolbox. Python used for Migen.FHDL DSL: elaboration by manipulating these objects to create the logic. Switch from hardware paradigm to software Led blinker paradigm! LiteX: SoC builder and library 19 OSDA Workshop (2019), Florence, March 29

  20. Migen : A python HDL toolbox. Migen.Genlib, a library with most of the base elements required to digital logic: - Record. (Group signals together with direction) - FSM. (Finite State Machine). - Clock Domain Crossing. - Memory. - Instance. (reuse Verilog/VHDL) - FIFO. (Synchronous, Asynchronous) - ... LiteX: SoC builder and library 20 OSDA Workshop (2019), Florence, March 29

  21. Migen : A python HDL toolbox. Migen.Sim, a simulator in native Python: LiteX: SoC builder and library 21 OSDA Workshop (2019), Florence, March 29

  22. Migen : A python HDL toolbox. Could be seen as the lowest layer of an HLS. Migen != HLS Could be reused in the (High Level Synthesis) future to create an but... HLS but still full control on the generated logic. LiteX: SoC builder and library 22 OSDA Workshop (2019), Florence, March 29

  23. LiteX : Build your hardware, easily! Provide the infrastructure to create complex SoCs with Python/Migen: LiteX: SoC builder and library 23 OSDA Workshop (2019), Florence, March 29

  24. LiteX : Build your hardware, easily! Originated from a collaboration on MiSoC with : MiSoC still used successfully by M-Labs for physics equipment in LiteX since 2015 focuses on embedded-systems and provides a wider collection of tools/cores. LiteX: SoC builder and library 24 OSDA Workshop (2019), Florence, March 29

  25. LiteX : Build your hardware, easily! LiteX’s key features to simplify development / integration / debug: LiteX: SoC builder and library 25 OSDA Workshop (2019), Florence, March 29

  26. LiteX : Build your hardware, easily! Simple SoC target Reduce the amount of code to create a SoC. LiteX: SoC builder and library Execution on hardware or with litex_sim 26 OSDA Workshop (2019), Florence, March 29

  27. LiteX : Build your hardware, easily! With vendor toolchains… for now :) Ultrascale Cyclone V Scaling and portability Stratix 10 7-Series Spartan6 With open-source toolchain: Yosys/Trellis/Icestorm/Nextpnr (Even DDR3 / 1Gbps Ethernet!) 2 Mluts / 40k $ ECP5 … l l e w y t t e r p e l a c S iCE40 Used on very various FPGAs LiteX: SoC builder and library 1 Kluts / ~few $ 27 OSDA Workshop (2019), Florence, March 29

  28. LiteX : Build your hardware, easily! CPUs integration/support: - LM32 - OpenRisc (Mor1kx) - RISC-V (PicoRV32, Vexriscv, Minerva) - ARM (*through AXI on ZYNQ) - X86 (*through PCIe) Switch CPU and in command line: ./arty.py --cpu_type=vexriscv --cpu_variant=lite LiteX: SoC builder and library 28 OSDA Workshop (2019), Florence, March 29

  29. LiteX : Build your hardware, easily! Ecosystem of highly configurable and high performance cores: SDR/DDR/DDR2/DDR3/DDR4 SATA I/II/III: 1.5/3.0/6.0Gbps (Up to > 80 Gbps with DDR4 - 64 bit) (400MB/s writes / 500MB/s reads) SDCard up to 55MB/s Ethernet MAC/IP/UDP up to 1Gbps PCIe / DMA / Scatter-Gather Embedded Logic Analyzer (Up to Gen2 X4) Cores are designed to be used on various FPGAs, adding support for a new devices = just adding a new PHY. LiteX: SoC builder and library 29 [...] and more at http://github.com/enjoy-digital OSDA Workshop (2019), Florence, March 29

  30. LiteX : Build your hardware, easily! Constraint propagation / reduced duplication: Board specific constraints (automatically derived from DRAM config) User defined constraints (specific to application) LiteX: SoC builder and library 30 OSDA Workshop (2019), Florence, March 29

  31. LiteX : Build your hardware, easily! Interactive simulation (emulation) with litex_sim/Verilator: c l i t e x _ s i m - - c p u - t y p e = v e x r i s c v litex_sim --cpu-type=or1k litex_sim --cpu-type=lm32 <5s build time / ~1MHz execution speed, very useful for software dev. LiteX: SoC builder and library Easy to add additional C++ plugins (JTAG, VGA, Ethernet, etc…) 31 OSDA Workshop (2019), Florence, March 29

  32. LiteX : Build your hardware, easily! Various OS support: Micropython Zephyr Linux From bare-metal to Linux OS, collaboration with others open-source enthusiasts. LiteX: SoC builder and library 32 OSDA Workshop (2019), Florence, March 29

  33. LiteX : Build your hardware, easily! Automatic CSR registers collection / software header generation: C header or CSV file that can be use by scripts/software LiteX: SoC builder and library 33 OSDA Workshop (2019), Florence, March 29

  34. LiteX : Build your hardware, easily! Debug infrastructure with LiteX Server / LiteScope and the bridges: Speed up development, use Python scripts to control/debug the same tools for all devices! the hardware. LiteX: SoC builder and library 34 OSDA Workshop (2019), Florence, March 29

  35. Systems using Migen/LiteX and Future! LiteX: SoC builder and library 35 OSDA Workshop (2019), Florence, March 29

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend