Home

Awesome

Virtual development board for HDL design

This is a (proof of concept) library/framework of virtual components which can be reused for building testbenches using Hardware Description Languages (HDLs) and including software models/visualizations of non-trivial peripherals. Each virtual component is composed of three parts:

The purpose of this repository is to document the APIs used between the frontend and the transport, and between the tansport and the backend. Multiple projects exist which combine either GHDL, Icarus Verilog or Verilator with foreign languages (C/C++, Python, m, golang, JavaScript, etc.). Many of them implement the same peripherals (e.g. virtual VGA screen, pushbuttons, LEDs, etc.). However, there is no documented framework for sharing common resources. For instance, drawing the content of a framebuffer in a window is independent from how it is filled (either from VHDL, Verilog or some other HDL). Documenting intermediate APIs can hopefully help code reuse in the open source hardware development community.

<p align="center"> <img src="./vboard.png"/> </p>

Development environment

All of these simulators and virtual peripherals can be executed on high-performance workstations or on low-cost SBCs. Some solutions are available on Android smartphones/tablets too. See hdl/packages for further info about packaging/distribution alternatives for open source EDA tooling.

Tha main languages used for interfacing HDLs (VHDL, Verilog and/or System Verilog) with foreign languages are C/C++, since standard co-simulation interfaces are defined in those terms. However, several languages have built-in support for interacting with shared libraries and executable binaries using C semantics. Python, Rust or Julia, to name a few, provide built-in features for doing so. Moreover, libffi provides a generalized solution for defining target functions at runtime, instead of compile time.

With regard to distribution, there is work in progress for using *.core (YAML) files as a portable solution for defining filesets. See OSVB: Core.

Virtual peripherals

Ideas

<p align="center"> <a href="https://gitlab.ensta-bretagne.fr/bollenth/ghdl-vpi-virtual-board"><img src="https://gitlab.ensta-bretagne.fr/bollenth/ghdl-vpi-virtual-board/-/raw/master/images/screenshot_main_window.png"/></a> </p> <p align="center"> <a href="https://blog.chuckstechtalk.com/software/2021/12/27/interactive-vhdl-testbench.html"><img width=400 src="https://github.com/chuckb/ghdl-interactive-sim/raw/8a466215dd18c6c809dd96f8d03fa53cad8417c2/test/images/screen_shot.png"/></a> </p> <p align="center"> <a href="https://github.com/VUnit/vunit/pull/568"><img src="https://user-images.githubusercontent.com/38422348/58502061-0c17d500-8186-11e9-8aed-7536f5737f32.gif"/></a> </p>

References