DSD Report
DSD Report
DSD Report
Introduction
Verilog, standardized as IEEE 1364, is a hardware description language used to model electronic
systems. It is most commonly used in the design and verification of digital circuits at the
● Industry Standard
Verilog has become the industry standard for digital design and verification.
2
Verilog HDL vs. Traditional Programming Languages
Now, if we will talk about the verilog comparison with any traditional
programming language we will see that-
Hardware Description
Verilog HDL is specially designed for hardware description and digital
circuit modeling unlike any Traditional Programming Language.
Parallel Execution
Verilog HDL allows for parallel execution while Traditional
Programming Language is sequential.
3
Timing and Synchronization
Verilog HDL provides precise control over timing and
synchronization, unlike any Traditional Programming Language.
Now , if we will talking about its various type…the verilog is comprised of three
types-
● Structural Modeling
● Data-flow Modeling
● Behavioral Modeling
Structural Modeling-
It is the most basic type of Verilog modeling. It is used to describe the physical
structure of a digital circuit by using primitive gates and predefined modules.
Structural modeling is the most efficient type of Verilog modeling, but it can be the
most difficult to write.
DataFlow Modeling-
4
It is a more abstract type of Verilog modeling. It is used to describe the behavior of
a digital circuit by using conditional statements and assignment statements.
Dataflow modeling is easier to write than structural modeling, but it can be less
efficient.
Behavioral Modeling-
It is the most abstract type of Verilog modeling. It is used to describe the behavior
of a digital circuit by using a combination of conditional statements, assignment
statements, and procedural statements. Behavioral modeling is the easiest type of
Verilog modeling to write, but it can be the least efficient.
● Structural modeling:
module full_adder (
input a,
input b,
input cin,
output sum,
output cout);
wire half_adder_sum;
wire half_adder_cout;
half_adder (a, b, half_adder_sum, half_adder_cout);
xor (sum, half_adder_sum, cin);
and (cout, half_adder_cout, cin);
endmodule
● Dataflow modeling:
module full_adder (
5
input a,
input b,
input cin,
output sum,
output cout);
assign sum = (a ^ b) ^ cin;
assign cout = (a & b) | (a & cin) | (b & cin);
endmodule
● Behavioral modeling:
module full_adder (
input a,
input b,
input cin,
output sum,
output cout);
reg half_adder_sum;
reg half_adder_cout;
always @ (a, b) begin
{half_adder_sum, half_adder_cout} = a + b;
end
always @ (a, b, cin) begin
sum = (half_adder_sum ^ b) ^ cin;
cout = (a & b) | (a & cin) | (b & cin);
end
endmodule
Defining them
6
● Verification-Verilog HDL allows for the verification of digital designs
through the use of testbenches and assertions.
Defining them-
7
assign y = (select == 1'b0) ? a : b;
endmodule
8
// Declare a 4-bit input bus
reg [3:0] input_bus;
endmodule
9
SOME ADVANCED VERILOG CONCEPTS
1. PARAMETERIZATION
2. HIERARCHICAL DESIGN
Explaining them-
10
HALF ADDER USING VERILOG HDL
=(A^B)
=(A.B)
11
Circuit Diagram for HalfAdder
12
In the diagram, you can see that r_BIT1 and r_BIT2
change their values at different time points. Each
transition in the input signals may trigger a change in
the output signals.
3.Time Axis:
In the diagram, you can see how the input and output
signals change at different time points. The simulation
13
captures the dynamic behavior of the half adder as it
processes input bits and produces corresponding sum
and carry-out bits.
14