DLD Introduction To Verilog
DLD Introduction To Verilog
UNIT-1
INTRODUCTION TO VERILOG
Chapter Outline
(Text Book-3: Chapter 1: 1.1, 1.2.2, 1.3.1, 1.3.2, 1.3.3, 1.4.2, 1.5.1.2, 1.5.2.2, 1.5.3.2,
1.5.4.2, 1.6.2)
Why HDL?
Case 1
A = not X
B = A and Y
C = A or B
Result: C = 1
Case 2
B = A and Y
C = A or B
A = not X
Result: C = 0
Case 3
C = A or B
A = not X
B = A and Y
Result: C = 0
Different outputs with software programming languages
with ‘0’ initial values
01/06/2025 DIGITAL LOGIC DESIGN
Features of HDLs
• Concurrent Descriptions
• Synchronizing mechanisms between concurrent
flows
• Event Scheduling
• Special object types and data types
• Hierarchy
• Design Reuse
Technology independence, standardization, portability, ease of maintenance
Logical Operators
c = ~a; c = a & b;
• a = 4’b1010;
b = 4’b1100;
c = a ^ b;
• a = 4’b1010;
b = 2’b11;
•& AND
•| OR
•^ XOR
• ~& NAND
• ~| NOR
• ~^ or ^~ XNOR
Structural level
• In this style of modeling the module is described as a set of
interconnected statements.
• Architecture/module includes the instantiation of blocks
Behavioral level
• This style of modeling specifies the behavior of an module as a set of
statements that are executed sequentially in the specified order.
• The architecture/module includes the predefined word always.
01/06/2025
DIGITAL LOGIC DESIGN
Data Flow Modeling
•A Dataflow model specifies the functionality of the entity
without explicitly specifying its structure.
•This functionality shows the flow of information through the
assign statement, which is expressed primarily using
concurrent signal.
*** Note:
red means new concept (keywords)
syntax:
always (sensitivity
list)
<declarations>
begin
<sequential
statements>;
end;
endmodule
01/06/2025 DIGITAL LOGIC DESIGN 24
Structural Modeling
• A module is modeled as a set of modules connected by
signals.
Top
TopLevel
Level E.g.
Module
Module
Full
FullAdder
Adder
Sub-Module
Sub-Module Sub-Module
Sub-Module
11 22
Half
HalfAdder
Adder Half
HalfAdder
Adder
Basic
BasicModule
Module Basic
BasicModule
Module Basic
BasicModule
Module
11 22 33
endmodule