Installation Verilog

You might also like

You are on page 1of 5

Specific commands for iverilog installation in linux

Check if iverilog is already installed using command;

Iverilog

Install using:

sudo add­apt­repository ppa:team­electronics/ppa

sudo apt­get update

sudo apt­get install iverilog gtkwave
Iverilog and vvp

Commands to run:
iverilog ­o hello hello.v
vvp hello

● "iverilog" command—> read and interpret the source file, then


generate a compiled result in vvp form
● Vvp is a simulation runtime engine --> Execute the compiled vvp
--> to display output
Manage large designs
● Download the mux files from Lab1
● Create a text file called "file_list.txt" with the file names of the mux
example listed one per line:
– lab1-mux2.v
– lab1-mux2_tb.v

Commands to run:
iverilog ­o design ­c file_list.txt
vvp design


You can alternately copy all the modules in a single file
– Testbench code and the main code in a single .v file and just run that file
– But for large designs, it is better to separate out the modules into
separate files
Lab practice problems

1. Download the 2:1 mux from Lab2 folder on LMS


2. Create a 4:1 mux from the 2:1 mux provided
1. Structural design
2. Using case statements

4
Lab practice problems

3. Write the Verilog code for a 2: 1 Mux which takes 16 bit


inputs and produces a 16 bit output
4. Write the Verilog code for a 4 bit adder using just the
“+” operator (eg: out = a + b). Inputs and outputs should
be 4 bit wide.

You might also like