Verilog HDL: A Solution For Everybody
Verilog HDL: A Solution For Everybody
Verilog HDL: A Solution For Everybody
Schematic Design
Gate Level Design
Where is the problem?
System specification is behavioral
Comments in Verilog
One line comment (// ………….)
Block Comment (/*…………….*/)
Port List
Port Declaration
One language, Many Coding Style
One language, Many Coding Style
(contd.)
One language, Many Coding Style
(contd.)
Structural style: Verilog Code
Dataflow style: Verilog Code
Behavioral style: Verilog Code
Data Values and Representation
Four Data value
Data representation
Type
Binary 6’b100101
Hex 6’h25
Class of Signals
Nets: physical
connection
between hardware
elements
Registers: Store
value even if
disconnected
Nets
wire/tri
wand/triand
wor/trior
Supply0,supply1,
tri0,tri1,trireg
Specifications of Ports
Registered Output
Delay Statement
Parameter
Test Bench
module main;
reg a, b, c;
wire sum, carry;
fulladder add(a,b,c,sum,carry);
initial
begin
a = 0; b = 0; c = 0;
#5
a = 0; b = 1; c = 0;
#5
a = 1; b = 0; c = 1;
#5
a = 1; b = 1; c = 1;
#5
end
endmodule
Memory Operation
Verilog is concurrent
http://www.asic-world.com/verilog/