Question

In: Electrical Engineering

Implement a 4x4 multiplier using gate level (verilog code and test bench)

Implement a 4x4 multiplier using gate level (verilog code and test bench)

Solutions

Expert Solution

//verlog code

`timescale 1ns / 1ps

module mul44(c, a, b);

output [8:0] c;
   input [3:0] a;
   input [3:0] b;

   assign c = a * b;

endmodule
-------------------------------


------------------------------------

//verilog test bench

`timescale 1ns / 1ps

module mult44_tb;

   // Inputs
   reg [3:0] a;
   reg [3:0] b;

   // Outputs
   wire [8:0] c;

   // Instantiate the Unit Under Test (UUT)
   mul44 uut (
       .c(c),
       .a(a),
       .b(b)
   );

   initial begin
      
       #100;

      
a=4'b1000;
       b=4'b1100;
       #100;
   end
  
endmodule

--------------------------


Related Solutions

Implement a JK Flip flop using behavioral modeling in verilog, also write its test bench code.
Implement a JK Flip flop using behavioral modeling in verilog, also write its test bench code.
Write down the VERILOG code for an XOR gate and the testbench code to test it
Write down the VERILOG code for an XOR gate and the testbench code to test it
Write in verilog, code to implement a 6 bit multiplier. Cascade a 1 bit multiplier to...
Write in verilog, code to implement a 6 bit multiplier. Cascade a 1 bit multiplier to implement this.
Type up Verilog Verilog program , test bench and screenshot of the wavefore using verilog xilinx....
Type up Verilog Verilog program , test bench and screenshot of the wavefore using verilog xilinx. (PLEASE ONLY ANSWER IF YOU UNDERSTAND HOW TO USE XILINX. ******************no need to show me the state diagram or state table just the verilog code , test bench and the screenshot of the waveforem **************** Implement the function given below using each of the following methods. As few 16-1 multiplexers as possible. Behavioral Verilog. F( w , x, y , z) = ?(2 ,...
Using the conditional assignment statements, write the verilog code for 16:1 Mux. Write the test bench...
Using the conditional assignment statements, write the verilog code for 16:1 Mux. Write the test bench for this module.
Implement 1x4 de-multiplexer using data flow modeling in verilog, also write its test bench.
Implement 1x4 de-multiplexer using data flow modeling in verilog, also write its test bench.
Write the VERILOG code for an arithmetic/logic unit (ALU) with a test bench that does the...
Write the VERILOG code for an arithmetic/logic unit (ALU) with a test bench that does the following with 4 bit inputs , and can be tested in on nexys 4 board This is to be implement on : ISE Design Suite - Xilinx /* ALU Arithmetic and Logic Operations ---------------------------------------------------------------------- |ALU_Sel| ALU Operation ---------------------------------------------------------------------- | 0000 | ALU_Out = A + B; ---------------------------------------------------------------------- | 0001 | ALU_Out = A - B; ---------------------------------------------------------------------- | 0010 | ALU_Out = A * B;...
Can anyone write a Verilog code and a test bench for a universal shift register with...
Can anyone write a Verilog code and a test bench for a universal shift register with 4 bits using D flip flop? Thanks
Write the Verilog code and test bench for the following circuits: - Mealy State machine design...
Write the Verilog code and test bench for the following circuits: - Mealy State machine design for a Serial Adder Circuit - Moore State Machine design for a Serial Adder Circuit
verilog code of a 64 x64 array with 128 parameters please include test bench
verilog code of a 64 x64 array with 128 parameters please include test bench
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT