Electronics Directory Articles/ Tutorials Ebooks
Electronics Directory Articles/ Tutorials Ebooks
Electronics Directory
Articles/ Tutorials
eBooks
FORUM
Links
Contact Us
"Verilog Tutorial"
by Harsha Perla
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
eBooks
Privacy Policy