Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nachiket/55b7fd71d14949cc3902420d7a0196fa to your computer and use it in GitHub Desktop.
Save nachiket/55b7fd71d14949cc3902420d7a0196fa to your computer and use it in GitHub Desktop.
Download build and install GHDL on Ubuntu 18.04 (tested 2018-09-28)
#!/bin/sh
#
# download-buidl-and-install-ghdl.sh
#
# It took about 5 minutes on my desktop (2019-06-17).
sudo apt update
sudo apt install -y git make gnat-4.9 zlib1g-dev
git clone https://github.com/ghdl/ghdl
cd ghdl
./configure --prefix=/usr/local
make
# Need to disable install.libghdl as it tried to overwrite/recreate Python directory
sudo make install
echo "$0: All done!"
# See the quick start guide to learn basic usage
# https://ghdl.readthedocs.io/en/latest/using/QuickStartGuide.html
#
# The two main commands are `ghdl -a` (analyse) and `ghdl -r` (run)
# If you copied the full adder example from the quick start guide into
# `full-adder.vhd` and `full-adder_tb.vhd`, you can use ghdl like so:
#
# ghdl -a full-adder.vhd full-adder_tb.vhd
# ghdl -r adder_tb
# > full-adder_tb.vhd:55:16:@8ns:(assertion note): end of test
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment