POSTS
Installing GHDL on macOS Big Sur
I wanted to install GHDL on my Mac computer.
Starting at the GHDL GitHub site, I learned that one could use a prebuilt version.
On this page with GHDL releases, I found and downloaded such a prebuilt version, as
curl -L https://github.com/ghdl/ghdl/releases/download/v0.37/ghdl-0.37-macosx-mcode.tgz --output ghdl-0.37-macosx-mcode.tgz
After unpacking, as
tar zxvf ghdl-0.37-macosx-mcode.tgz
and moving the unpacked content to a directory where I wanted GHDL to be located, as
mkdir -p $HOME/opt/ghdl
mv bin $HOME/opt/ghdl
mv include $HOME/opt/ghdl
mv lib $HOME/opt/ghdl
I could try it out on an example code
use std.textio.all;
entity hello_world is
end hello_world;
architecture behavior of hello_world is
begin
process
variable the_line: line;
begin
write(the_line, String'("Hello, world"));
writeline(output, the_line);
wait;
end process;
end behavior;
stored in a file hello.vhdl, as
$ export PATH=$HOME/opt/ghdl/bin:$PATH
$ ghdl -a hello.vhdl
$ ghdl -r hello_world
Hello, world
$