Vlsi Exp 6&7 158
Vlsi Exp 6&7 158
Marks
Particulars Max. Marks
Obtained
Pre-Lab and Post Lab 10
Design, HDL Code, In-
15
Lab Performance
Output verification
10
&viva
Lab Report 05
Total 40
REPORT VERIFICATION
Staff Name :
Signature :
Lab Experiment #6
Realization of Multiplier-1
6.1 Objective: To design and simulate the Braun array multiplier in Verilog and synthesize using EDA
tools
Simulation waveforms:
// TEST BENCH
module braunarray_tb_v;
// Inputs
reg [3:0] a;
reg [3:0] b;
// Outputs
wire [7:0] p;
initial begin
// Initialize Inputs
a = 15; b = 15; #100;
end
endmodule
integer i;
reg E1;
always @ (X, Y)
begin
Z = 8'd0;
E1 = 1'd0;
for (i = 0; i < 4; i = i + 1)
begin
case (temp)
2'd2 : Z [7 : 4] = Z [7 : 4] + Y1;
2'd1 : Z [7 : 4] = Z [7 : 4] + Y;
endcase
Z = Z >> 1;
Z[7] = Z[6];
E1 = X[i];
end
if (Y == 4'd8)
begin
Z = - Z;
end
end
endmodule
TEST BENCH :
module BOOTHTP_v;
// Inputs
reg [3:0] X;
reg [3:0] Y;
// Outputs
wire [7:0] Z;
BOOTH uut (
.X(X),
.Y(Y),
.Z(Z)
);
initial begin
// Initialize Inputs
X = 0;
Y = 0;
#100;
X=-5;
Y=7;
end
endmodule
6.6 Result: Therefore ,4-bit braun array multiplier was performed using structural model and testbench.
Laboratory Report Cover Sheet
Marks Ob-
Particulars Max. Marks
tained
Output verification
10
&viva
Lab Report 05
Total 40
REPORT VERIFICATION
Staff Name :
Signature :
Lab Experiment #7 Realization of Multiplier-II
7.1 Objective: To design and simulate the Wallace tree multiplier in Verilog and synthesize using EDA tools
Equipment’s:
Logic Diagram:
Source code:
Simulation waveforms:
// TEST BENCH
module wallace_tree_mul_tb_v;
reg [3:0] b;
.a(a),
.b(b),
.z(z)
);
initial begin
// Initialize Inputs a = 0;
b = 0;
end endmodule
Simulation waveforms:
7.5 Post Lab:
1. Write the verilog code for 4-bit Baughly multiplier in structural modeling and implement using EDA tools.
Source code
input [3:0] b;
output [7:0] p;
w17, w23, w18); fa_df f8 (p[3], w29 , w19, w24, w20); fa_df f9
(p[6], p[7], w21, w25, w31); fa_df f10(p[5], w31 , w26, w27,
xor(z1,a,b);
xor(s,z1,cin);
and(z2,z1,cin);
and(z3,a,b);
or(cout,z2,z3); endmodule
Test Bench
module multi_tb_v;
reg [3:0] b;
initial begin
// Initialize Inputs a = 0;
b = 0;
a=4'b0001; b=4'b0010;
#100; a=4'b0011; b=4'b0001;
end
endmodule