Verilog HDL
Verilog HDL
Book:
by
Samir Palitkar
HDL
HDL Hardware Description Language
Verilog VHDL
Verilog:
Comments.
VERILOG HDL
Module:
Basic Building Block
Provides necessary functionality to higher
level blocks
Syntax:
Dataflow Level
Switch Level
VERILOG HDL
Comments:
0 to 9 and a to f
Binary (b or B)
Decimal(d or D)
Octal (o or O)
Hexadecimal (h or H)
wire a;
wire a, b;
wire a = 1’b0;
2.Register:-
reg a,b;
VERILOG HDL
3. Vectors:-
wire [7:0] a;
4. Integer:-
integer count = - 4;
integer data = 10;
VERILOG HDL
5. Real:-
real data;
data = 4e6
(or)
data = 6.234
6. Array:-
endmodule
GATE LEVEL MODELING
Module fullsub (diff, bout, x, y, bin);
output diff, bout;
input x, y, bin;
wire g0, g1, g2, h0;
endmodule
GATE LEVEL MODELING
Module 4bitPA (s, cout, a, b, cin);
output [3:0] s;
output cout;
input [3:0] a, b;
input cin;
wire c0, c1, c2;
endmodule
DATA FLOW MODELING
DATA FLOW MODELING
DATA FLOW MODELING
1. Arithmetic:-
x = 4’b1010
y = x>>2 y = 0010
y = x<<1 y = 0100
DATA FLOW MODELING
8. Concatenation:-