Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

JulyWitch/vhdl_ghdl_examples

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple VHDL + GHDL examples

This repository contains VHDL codes with their tests.

It also includes a simple Makefile to compile and run the test bench.

Requirements

Install ghdl to compile codes and gtkwave to show signals visually.

  • Linux
sudo apt-get install ghdl gtkwave
  • Mac

You can also install scansion instead of gtkwave.

brew install ghdl gtkwave
  • Windows

Install make, ghdl and gtkwave using msys2

make

ghdl

gtkwave

Usage

Clone this repo

git clone https://github.com/JulyWitch/vhdl_ghdl_examples.git

navigate to repo directory

cd vhdl_ghdl_examples

Create your vhdl file and it's test bench,

then run the following command.

make I=<input_file> T=<test_bench_file> E=<test_bench_entity_name>

example

make I=test/counter.vhdl T=test/counter.test.vhdl E=counter_tb

This will generate wave and vcd files to the waves directory.

Then open generated .ghw or .vcd file with gtkwave.

Options

To change simulation time pass S_TIME = <time> to make command. Time can be in ns, us, and ms.

example:

make I=test/counter.vhdl T=test/counter.test.vhdl E=counter_tb S_TIME=1ms

About

Simple VHDL examples using ghdl as compiler and wave generating

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.