using verilog to design a 8x8 unsigned multiplier(with
testbench) utilizing a 2x8 multiplier as a building block
here is the testbench and code for 2x8:
module cpp_mult(mplr,mcand, prod);
input [1:0] mplr;
input [7:0] mcand;
output [9:0] prod;
wire [9:0] mcand1;
wire [9:0] mcand2;
wire [9:0] mcand3;
assign mcand0 = 10'b00000000;
assign prod = (mplr==2'b00)?mcand0 :
((mplr==2'b01)?{2'b00,mcand[7:0]}:
((mplr==2'b10)?{1'b0,mcand[7:0],1'b0}:
((mplr==2'b11)?{2'b00,mcand[7:0]}+{1'b0,mcand[7:0],1'b0}:8'hxx)));
endmodule
____________________________________________________________________
module cpp_mult_tb();
reg [1:0] mplr;
reg [7:0] mcand;
wire [9:0] prod;
// Instantiate the...