Frequently Asked Questions

General | Work 1 | Work 2 | Work 3

General

How to use ghdl?

O ghdl is installed on IC-3 computers (Linux). To use it, you must first perform the analysis (compile) of each file with the command:
    ghdl -a --ieee = synopsys
and then you must prepare (link) the project with the command:
    ghdl -e --ieee = synopsys
Note that to elaborate, you must not put the . Vhd at the end of the file. The resulting file will have the name of the main entity and you will be able to run it to simulate your project.
As an example, see the Work 1 from last year, and the feedback files: arbiter.vhd, tb_arbiter.vhd, arbiter.input e referee.expected. To use it, you must run:
    ghdl -a --ieee = synopsys arbiter.vhd ghdl -a --ieee = synopsys tb_arbiter.vhd ghdl -e --ieee = synopsys tb_arbiter tb_arbiter diff arbiter.output arbiter.expected
The first two lines perform the analysis of the code, the third elaborates the executable. The fourth line runs the testbench simulating the circuit and the fifth line tests the generated output with the expected template.

How to see the inputs / outputs through the ghdl?

You must use a testbench to read / write input / output directly from the disk. To view the output it is also possible to generate a file in the format .vcd, but this format does not support some of the VHDL data types. A viewer of .vcd free gtkwave.

Work 1

Work 2

Work 3