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 https://github.com/ghdl/ghdl.git

I configured and built ghdl, using

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

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
vhdl:-$ 
Advertisements

Layered books

I have started over. The book creation project, previously reported on Books with Views is continued, but as Layered Books.

I moved from XML to pandoc, replacing many lines of Python with significantly fewer lines of Python, for processing the book source files and generating output.

For the moment, there is one book, in html format.