Building ghdl from source for Ubuntu 16.04 – mcode version

Based on input from Patrick Lehmann, I decided to re-install ghdl, now using the official GitHub site.

I learned from the README file how to build the mcode variant. I tried, and it worked fine (and it was much simpler than the gcc-based approach I tried earlier)!

Here are the commands that I used.

I downloaded and installed an Ada compiler, as instructed, and I proceeded with the build and install of ghdl, by first setting the PATH to include my newly installed Ada compiler, as

export PATH=/usr/gnat/bin:$PATH

I cloned the repo, using

git clone

I configured and built ghdl, using

cd ghdl
./configure --prefix=/usr/local/ghdl_mcode

The installation was then done, as

ghdl:-$ sudo -i
# cd 
# PATH=/usr/gnat/bin/:$PATH make install
# exit

That was all!

I could now build and run my hello world example, from my work-in-progress book about building a computer, as

vhdl:-$ export PATH=/usr/local/ghdl_mcode/bin/:$PATH
vhdl:-$ ghdl -a hello.vhdl
vhdl:-$ ghdl -e hello_world
vhdl:-$ ghdl -r hello_world
Hello, world