1. Engineering
  2. Electrical Engineering
  3. write the verilog code for 6 bit adder circuit reverenced...

Question: write the verilog code for 6 bit adder circuit reverenced...

Question details

Write the Verilog Code for 6 bit adder circuit reverenced from following 4-bit adder module :

module _4bit_adder (S,C4,A,B,C0);

   input [3:0] A,B;     // Input vectors A, B with bits 0 through 3

   input C0;

   output [3:0] S;

   output C4;

   wire C1,C2,C3; //Intermediate carries

//Instantiate the fulladder

   fulladder FA0 (S[0],C1,A[0],B[0],C0),

                   FA1 (S[1],C2,A[1],B[1],C1),

                   FA2 (S[2],C3,A[2],B[2],C2),

                   FA3 (S[3],C4,A[3],B[3],C3);

endmodule

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution