VHDL projecting using GHDL and GTKWave

  • 1
GHDL and GTKWave are an excellent soulution, if you're looking for something to design in VHDL under GNU/Linux.
Let's look at how to install and compile.

To install the tools, just digit on the terminal:
sudo apt-get install ghdl gtkwave

The command to compile the VHDL source (with .vcd extension) is:
ghdl -a --std=02 --ieee=synopsys source.vhd

To test any VHDL project you must create an appropriate testbench.

The command to compile the testbench (with .vcd extension) is the same as shown above:
ghdl -a --std=02 --ieee=synopsys testbench.vhd

Now you need to generate the testbench executable with the command:
ghdl -e --std=02 --ieee=synopsys tb
where tb is the entity name of the file testbench.vhd.

In conclusion you must create the executable testbench with extension .vcd to be supplied to GTKWave:
ghdl -r --std=02 --ieee=synopsys tb --vcd=testbench.vcd

To graphically display the signal evolution of the realized circuit :
gtkwave testbench.vcd

1 comment: