Skip to content

RoiCorporation/vhdl-practice

Repository files navigation

vhdl-practice

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.

📦 Installing libraries

🖥️ Installing NVC

  1. Install NVC.
brew install nvc
  1. Check NVC's version.
nvc --version

📈 Installing GTKWave

  1. Install dependencies.
brew install desktop-file-utils shared-mime-info       \
             gobject-introspection gtk-mac-integration \
             meson ninja pkg-config gtk+3 gtk4
  1. 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
  1. Check GTKWave's version.
which gtkwave

🚀 Running a simulation and visualizing the waveform

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

🧪 Testing design files

To test all exercises at once, simply run the testing script from anywhere inside the repository.

About

Repository with exercises to improve my VHDL skills.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors