Giter Site home page Giter Site logo

txstate-iverilog's Introduction

txstate-iverilog

This repo is to help CS3339 students at Texas State University learn the basics of modeling hardware with Icarus Verilog and GTKWave.

There is an installation guide located at http://iverilog.wikia.com/wiki/Installation_Guide where much of this information is derived from. Basic familiarity with the command line is assumed.

Usage

You can check out the basic user guide here. Included in this repository are some basic files: a hello world and a counter. If you are getting this from another source, check out this article where the files are also listed:

$ iverilog -o hello.out hello.v
$ vvp hello.out
Hello World!

Check out the advanced usage at the end to use both iverilog and gtkwave.

MacOS Installation

  1. install Homebrew
  2. Run the following shell command to install iverilog:
$ brew install icarus-verilog

GTKwave

GTKwave is hosted here: http://gtkwave.sourceforge.net/. However at the time of this writing, Sourceforge has been down for more than 24 hours, so alternative sources must be sought out:

There are two methods of MacOS installation for GTKWave. The easiest is install with a package manager. Unfortunately when I tried this most recently with Homebrew, there were checksum issues with the package.

  1. Run the following shell command:
$ brew tap caskroom/cask
$ brew install caskroom/cask/gtkwave
  1. That probably didn't work so let's try to manually install.

Other Method

  1. Download GTKwave from a kind individual
  2. Unzip the application and move it to your Applications folder:
$ unzip gtkwave.zip  
$ mv -r gtkwave.app /Applications/  
  1. The application is ready to go now, if you like you can set GTKwave up to be invoked from the command line:
$ cpan install Switch
$ /Applications/gtkwave.app/Contents/Resources/bin/gtkwave foo.vcd

Linux Installation

  1. Installation here depends on your flavor. apt-get will be easiest but you will need root. Try these first:
$ sudo apt-get install verilog
$ sudo apt-get install gtkwave  
  1. If this is unsuccessful you may need to download the source code from Github and compile it locally. There is an installation guide that is very helpful.

Advanced Usage

Now let's tie it all together:

  1. Make sure you have counter.v and counter_tb.v.
  2. Run the following:
$ iverilog -o counter_chip.out counter_tb.v counter.v  
$ vvp counter_chip.out  
  1. Now we can invoke GTKwave to view the waveform output of our simulated counter. The path of GTKwave is dependant on your system. I recommend just aliasing it to gtkwave in your shell:
$ /Applications/gtkwave.app/Contents/Resources/bin/gtkwave test.vcd
  1. This should open the GUI application. Click "test" in the upper left and expand.
  2. Right click on c1 and choose "Insert"
  3. You should see the clock, out, and reset waves in the viewer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.