Professional Documents
Culture Documents
DIGITAL SYSTEM DESIGN Manual 2
DIGITAL SYSTEM DESIGN Manual 2
A combinational logic circuit is one in which the present state of the combination of the logic
inputs decides the output. The term combination logic means combining of two or more logic
gates to form a required function where the output at a given time depends only on the input.The
logic gates are the fundamental building blocks of a combinational circuit. By using the
combination of logic gates more complex combinational circuits can be implemented such as
multiplexers and de-multiplexers, comparators, adders and subtractors, etc.
A combinational circuit comprises of input variables, logic gates and output variables. The logic
gates accepts the inputs and depending on the type of functioning of the logic gate,output signals
are generated from them.The required output data is obtained from this process by transforming
the binary information given at the input. The figure below shows the schematic representation
of a generalized combinational logic circuit consisting of n input variable and m output variables.
In the above figure, there are n input variables and hence there will be 2n possible combinations
of bits at the input. By a Boolean expression of input variables, each output is expressed. So the
result of above generalized combinational logic circuit can be expressed by m Boolean
expressions.
In the above figure, the circuit accepts the binary variables and depending on the logical
combination of gates it generate outputs.
Top-Down Design
The desired design-style of all designers is the top-down one. A real top-down design allows
early testing, easy change of different technologies and a structured system design along with
many other advantages.
Lab task: Implementation of 8 bit ripple carry adder.
Block diagram of 2 bit ripple carry adder
Endmodule
Test bench
module ADDER_2_BIT_TB;
// Inputs
reg [1:0] a;
reg [1:0] b;
reg cin;
// Outputs
wire [1:0] s;
wire cout;
end
endmodule
Simulation
// Inputs
reg [3:0] a;
reg [3:0] b;
reg cin;
// Outputs
wire [3:0] s;
wire cout;
initial begin
// Initialize Inputs
a = 4'b0001;
b = 4'b0010;
cin = 1;
end
endmodule
Simulation
end
endmodule
Simulation