Install Yosys GHDL - VHDLTool/sonar-VHDLRC GitHub Wiki

Install instructions

General prerequisite

sudo apt-get update

Installing yosys

sudo apt-get install build-essential clang bison flex \
libreadline-dev gawk tcl-dev libffi-dev git \
graphviz xdot pkg-config python3 libboost-system-dev \
libboost-python-dev libboost-filesystem-dev zlib1g-dev

git clone https://github.com/YosysHQ/yosys.git
cd yosys
make config-gcc
make
sudo make install

Installing ghdl

sudo apt install gnat-8

git clone https://github.com/ghdl/ghdl.git
cd ghdl
./configure --prefix=/usr/local
make
sudo make install

Installing ghdl-yosys-plugin

git clone https://github.com/ghdl/ghdl-yosys-plugin.git
cd ghdl-yosys-plugin
make
sudo make install

Usage

Manual use

Use the generic script https://github.com/Linty-Services/VHDL-RC/blob/master/vhdlrc-synth-master/vhdlrcsynth.sh [top entity name] [list of source files] inside your project's folder to analyze files with ghdl. Yosys will be executed by the plugin, fsynopsys and fexplicit parameters can be set in the Yosys section of VHDL-RC plugin. The list of source files to analyze is an optional parameter, if it is not passed each file with a vhd or vhdl extension will be found recursively in the project's folder and subfolders and analyzed.
For example use vhdlrcsynth.sh from https://github.com/Linty-Services/VHDL-RC/tree/master/vhdlrc-synth-master/example_proj :
vhdlrcsynth.sh top "top.vhd mealy_4s_badname.vhd"

Advanced usage for plasma_demo example use this custom ghdl build script
https://github.com/Linty-Services/VHDL-RC/blob/master/plasma_demo/trunk/vhdl/ghdl-yoysyRC.sh

Automatic execution with Sonarqube and vhdlrc plugin

Ghdl build script path and parameters can be set up in the Rcsynth section of VHDL-RC plugin. Top entity name can be set up in the BuildPath section of the plugin. If Autoexec is true, ghdl build script will be automatically executed in the projects analysed with rc-scanner.