Question: module multiplier 4 by 3 ( input [ 2 : 0 ] B , input [ 3 : 0 ] A , output [ 7

module multiplier4by3(
input [2:0] B,
input [3:0] A,
output [7:0] Product
);
wire [7:0] P1, P2, P3, P4, P5, P6;
// Partial Products
assign P1= A[3] & B[2:0];
assign P2= A[2] & B[2:0];
assign P3= A[1] & B[2:0];
assign P4= A[0] & B[2:0];
assign P5={3'b0, A} & B[2:0];
assign P6={4'b0, B};
// Full Adders
wire [7:0] C;
wire [7:0] S;
assign C[0]=1'b0;
assign S[0]= P1;
assign {C[1], S[1]}= P2+ P3+ P4;
assign {C[2], S[2]}= P5+ P6;
// Final Product
assign Product ={C[7], S[7:3]};
endmodule
Write a test bench for this Verilog module once you have verified your design logically, modify the test bench to have your multiplier conduct the following multiplications, use a table to list your inputs and outputs.
5x3
15x5
9x7
15x7

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!