This is set of VHDL examples and how to simuate and check results on MacOS.
-
install GHDL from its github
-
install gtkwave viewer to see simulation results, it can be done using homebrew on MacOS and it will be installed as App (launch from spotlight)
Breefly about necessary steps for using ghdl to simulate VHDL designs (some examples can be found here):
-
create you vhdl design, save it in code editor (example from combinational_logic)
-
analyze your design in console
ghdl -a comb_ckt.vhd
-
analyze your test bench desing
ghdl -a --ieee=synopsys comb_ckt_tb.vhd
-
create executable
ghdl -e --ieee=synopsys CKT_TB
, CKT_TB is entity described in testbench -
run the testbench
ghdl -r --ieee=synopsys CKT_TB
-
you can add signals output when runing
ghdl -r --ieee=synopsys CKT_TB --vcd=CKT_TB.vcd
-
to see results in gtkwave app run
open CKT_TB.vcd
from terminal