Electronics Directory Articles/ Tutorials Ebooks

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

About Us

Electronics Directory

Articles/ Tutorials

eBooks

FORUM

Links

Contact Us

"Verilog Tutorial"

by Harsha Perla

Overview of Verilog HDL

If you can express working of a digital circuit and visualize the flow of data inside a IC, then
learning any HDL or Hardware Description Language is very easy. This chapter is a overview of how
Verilog code looks like.
This article will always be under construction.
Let us start with an AND gate. Here is the truth table:
A
0
0
1
1

B
0
1
0
1

Y
0
0
0
1

/*AsimpleANDgate
File:and.v*/
moduleandgate(a,b,y);
inputa,b;
outputy;
assigny=a&b;
endmodule
Now let us try to understand the code.
/* This is multi line
comment */
// this is single line comment, Comments are same as in C language.
In verilog, one circuit is represented by set of "modules". We can consider a module as a black
box. With this assumption, if you draw a block diagram of the circuit with a set of signals connection each

Home

About Us

Articles/ Tutorials | Downloads | Feedback | Links


Copyright 2005-2007 electroSofts.com.
webmaster@electroSofts.com

eBooks

Privacy Policy

You might also like