Repository with self-made exercises to improve my VHDL skills. The NVC tool is used as the compiler and simulator for the VHDL code. To produce and visualize waveform files from NVC simulations, GTKWave wave viewer is used.
- Install NVC.
brew install nvc
- Check NVC's version.
nvc --version
- Install dependencies.
brew install desktop-file-utils shared-mime-info \
gobject-introspection gtk-mac-integration \
meson ninja pkg-config gtk+3 gtk4
- Build GTKWave. Head to the GitHub folder where you've got all your cloned repositories and run this:
git clone "https://github.com/gtkwave/gtkwave.git"
cd gtkwave
meson setup build && cd build && meson install
- Check GTKWave's version.
which gtkwave
To run a simulation and generate the corresponding waveform, follow the structure of this command:
nvc -a design.vhd design_tb.vhd -e design_tb -r design_tb --wave=waves.vcd
, where:
- design.vhd is the Design Under Test (DUT), containing the logic design and the hardware's behavior. It gets compiled into the work folder.
- design_tb.vhd is the testbench, used only in simulation to instantiate the DUT, drive its inputs, and verify its outputs.
- waves.vcd is the file that stores the waveform generated during simulation.
To visualize the waveform file corresponding to a simulation, run GTKWave:
gtkwave waves.vcd
To test all exercises at once, simply run the testing script from anywhere inside the repository.