All Projects → ghdl → Ghdl Yosys Plugin

ghdl / Ghdl Yosys Plugin

Licence: gpl-3.0
VHDL synthesis (based on ghdl)

Labels

Projects that are alternatives of or similar to Ghdl Yosys Plugin

Neppielight
FPGA-based HDMI ambient lighting
Stars: ✭ 114 (-40.62%)
Mutual labels:  vhdl
Vhdl lib
Library of VHDL components that are useful in larger designs.
Stars: ✭ 139 (-27.6%)
Mutual labels:  vhdl
Hardh264
A hardware h264 video encoder written in VHDL. Designed to be synthesized into an FPGA. Initial testing is using Xilinx tools and FPGAs but it is not specific to Xilinx.
Stars: ✭ 155 (-19.27%)
Mutual labels:  vhdl
Rust hdl
Stars: ✭ 120 (-37.5%)
Mutual labels:  vhdl
C64 Video Enhancement
Component video modification for the C64 8-bit computer
Stars: ✭ 136 (-29.17%)
Mutual labels:  vhdl
Space Invaders Vhdl
Space Invaders game implemented with VHDL
Stars: ✭ 142 (-26.04%)
Mutual labels:  vhdl
Fpgba
GBA on FPGA
Stars: ✭ 113 (-41.15%)
Mutual labels:  vhdl
Uvvm
UVVM (Universal VHDL Verification Methodology) is a free and Open Source Methodology and Library for very efficient VHDL verification of FPGA and ASIC – resulting also in significant quality improvement. Community forum: https://forum.uvvm.org/ UVVM.org: https://uvvm.org/
Stars: ✭ 191 (-0.52%)
Mutual labels:  vhdl
Mega65 Core
MEGA65 FPGA core
Stars: ✭ 137 (-28.65%)
Mutual labels:  vhdl
Tinytpu
Implementation of a Tensor Processing Unit for embedded systems and the IoT.
Stars: ✭ 153 (-20.31%)
Mutual labels:  vhdl
Neo430
A very small msp430-compatible customizable soft-core microcontroller-like processor system written in platform-independent VHDL.
Stars: ✭ 120 (-37.5%)
Mutual labels:  vhdl
Fmcw3
Two RX-channel 6 GHz FMCW radar design files
Stars: ✭ 126 (-34.37%)
Mutual labels:  vhdl
Fletcher
Fletcher: A framework to integrate FPGA accelerators with Apache Arrow
Stars: ✭ 144 (-25%)
Mutual labels:  vhdl
Zpu
The Zylin ZPU
Stars: ✭ 118 (-38.54%)
Mutual labels:  vhdl
Degate
Open source software for chip reverse engineering.
Stars: ✭ 156 (-18.75%)
Mutual labels:  vhdl
Artix 7 Hdmi Processing
Receiving and processing 1080p HDMI audio and video on the Artix 7 FPGA
Stars: ✭ 113 (-41.15%)
Mutual labels:  vhdl
Osvvm
OSVVM Utility Library: AlertLogPkg, CoveragePkg, RandomPkg, ScoreboardGenericPkg, MemoryPkg, TbUtilPkg, TranscriptPkg, ...
Stars: ✭ 140 (-27.08%)
Mutual labels:  vhdl
Fpga displayport
An implementation of DisplayPort protocol for FPGAs
Stars: ✭ 192 (+0%)
Mutual labels:  vhdl
Potato
A simple RISC-V processor for use in FPGA designs.
Stars: ✭ 181 (-5.73%)
Mutual labels:  vhdl
Vna2
Second version of homemade 30 MHz - 6 GHz VNA
Stars: ✭ 150 (-21.87%)
Mutual labels:  vhdl

'push' workflow Status

ghdl-yosys-plugin: VHDL synthesis (based on GHDL and Yosys)

This is experimental and work in progress! See ghdl.github.io/ghdl: Using/Synthesis.

TODO: Create table with features of VHDL that are supported, WIP and pending.


Build as a module (shared library)

On Windows, Yosys does not support loading modules dynamically. Therefore, this build approach is not possible. See Build as part of Yosys below.

  • Get and install Yosys.
  • Get sources, build and install GHDL. Ensure that GHDL is configured with synthesis features (enabled by default since v0.37). See Building GHDL.

NOTE: GHDL must be built with at least version of 8 GNAT (gnat-8).

HINT: The default build prefix is /usr/local. Sudo permission might be required to install tools there.

  • Get and build ghdl-yosys-plugin: make.

HINT: If ghdl is not available in the PATH, set GHDL explicitly, e.g.: make GHDL=/my/path/to/ghdl.

The output is a shared library (ghdl.so on GNU/Linux), which can be used directly: yosys -m ghdl.so.

To install the module, the library must be copied to YOSYS_PREFIX/share/yosys/plugins/ghdl.so, where YOSYS_PREFIX is the installation path of yosys. This can be achieved through a make target: make install.

Alternatively, the shared library can be copied/installed along with GHDL:

cp ghdl.so "$GHDL_PREFIX/lib/ghdl_yosys.so"

yosys-config --exec mkdir -p --datdir/plugins
yosys-config --exec ln -s "$GHDL_PREFIX/lib/ghdl_yosys.so" --datdir/plugins/ghdl.so

Build as part of yosys (not recommended)

  • Get and build GHDL as in the previous section.

  • Get Yosys sources.

  • Get ghdl-yosys-plugin and:

    • Copy src/* to yosys/frontends/ghdl.
    • Configure Yosys by adding (to) Makefile.conf:
ENABLE_GHDL := 1
GHDL_PREFIX := <ghdl install dir>
  • Build and install Yosys.

Pre-built packages

Some projects provide pre-built packages including GHDL, Yosys and ghdl-yosys-plugin. Unless you have specific requirements (targeting a different arch, OS, build options...), we suggest using one of the following solutions before building ghdl-yosys-plugin from sources.

Usage

Example for IceStick, using GHDL, Yosys, nextpnr and icestorm:

cd examples/icestick/leds/

# Analyse VHDL sources
ghdl -a leds.vhdl
ghdl -a spin1.vhdl

# Synthesize the design.
# NOTE: if GHDL is built as a module, set MODULE to '-m ghdl' or '-m path/to/ghdl.so',
#       otherwise, unset it.
yosys $MODULE -p 'ghdl leds; synth_ice40 -json leds.json'

# P&R
nextpnr-ice40 --package hx1k --pcf leds.pcf --asc leds.asc --json leds.json

# Generate bitstream
icepack leds.asc leds.bin

# Program FPGA
iceprog leds.bin

Alternatively, it is possible to analyze, elaborate and synthesize VHDL sources at once, instead of calling GHDL and Yosys in two steps. In this example:

yosys $MODULE -p 'ghdl leds.vhdl spin1.vhdl -e leds; synth_ice40 -json leds.json'

Containers

Container (aka Docker/Podman) image hdlc/ghdl:yosys includes GHDL, Yosys and the ghdl-yosys-plugin module (shared library). These can be used to synthesize designs straightaway. For example:

docker run --rm -t \
  -v $(pwd)/examples/icestick/leds:/src \
  -w /src \
  hdlc/ghdl:yosys \
  yosys -m ghdl -p 'ghdl leds.vhdl blink.vhdl -e leds; synth_ice40 -json leds.json'

In a system with docker installed, the image is automatically downloaded the first time invoked.

Furthermore, the snippet above can be extended in order to P&R the design with nextpnr and generate a bitstream with icestorm tools:

cd examples/icestick/leds/

DOCKER_CMD="$(command -v winpty) docker run --rm -it -v /$(pwd)://wrk -w //wrk"

$DOCKER_CMD hdlc/ghdl:yosys    yosys -m ghdl -p 'ghdl leds.vhdl rotate4.vhdl -e leds; synth_ice40 -json leds.json'
$DOCKER_CMD hdlc/nextpnr:ice40 nextpnr-ice40 --hx1k --json leds.json --pcf leds.pcf --asc leds.asc
$DOCKER_CMD hdlc/icestorm      icepack leds.asc leds.bin

iceprog leds.bin

See hdl/containers for further info about containers including other EDA tools.

NOTE: on GNU/Linux, it should be possible to use board programming tools through hdlc/icestorm. On Windows and macOS, accessing USB/COM ports of the host from containers is challenging. Therefore, board programming tools need to be available on the host. Windows users can find several board programming tools available as MSYS2 packages. See mingw-w64-x86_64-eda|mingw-w64-i686-eda and hdl/MINGW-packages.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].