Friday, 20 September 2013

Carry select Adder using Verilog





                                                           RTL SCHEMATIC





















                                                 

SIMULATION RESULTS





                                                                   CODE



 To Download:Click On the PDF and press (CNTRL+S)



BLOCK DIAGRAM FOR IMPLEMENTATION 




Advantages : 
  • No need to wait for carry in every stage
  • Once the carry is known immediately the result can be obtained
  • Low delay of just 3 Ripple Carry Adders
I have been getting lot of mail & requests to provide the test bench also for CSA. Here is the Test feature module for CSA for you :


module test_csa;

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

// Outputs
wire [3:0] sum;
wire co;

// Instantiate the Unit Under Test (UUT)
carry_select uut (
.a(a), 
.b(b), 
.cin(cin), 
.sum(sum), 
.co(co)
);

initial begin
// Initialize Inputs
a = 0;
b = 0;
cin = 0;
#100;

a = 4'd5;
b = 4'd10;
cin = 0;
#100;

a = 4'd5;
b = 4'd10;
cin = 1;
#100;


a = 4'd15;
b = 4'd10;
cin = 0;
#100;


a = 4'd15;
b = 4'd11;
cin = 1;
#100;


// Add stimulus here

end

endmodule


Also look at our exciting new course



Link for the coupons : Here

46 comments:

  1. thanks :) it helped a lot

    ReplyDelete
  2. Can you please put the code in text format?

    ReplyDelete
    Replies
    1. Please do mail us for details asicworld.co@gmail.com

      Delete
  3. Can we do this as part of our project for BE?

    ReplyDelete
    Replies
    1. Hello :) For BE this can be a minor project. If you are willing to go for further analysis like power,area, etc and compare the results with the recent adders u can use this for major project too.

      Delete
  4. please can i get verilog test fixture

    ReplyDelete
    Replies
    1. yeah sure , please mail us at sgatesrobo@gmail.com with :
      subject=code request.
      and also the need for the code .

      Delete
  5. sir can u plz send the lower and area effiecient carry select adder program

    ReplyDelete
  6. sir when i run in xilinx 13.2 i am geting ERROR:HDLCompiler:1654 - "C:\.Xilinx\jesus\carry_select.v" Line 32: Instantiating from unknown module ...how can i overcome this....

    ReplyDelete
    Replies
    1. create a new file and a new verilog project. Copy the carry select code and paste it in the project and save the module.

      Delete
  7. sir, i am working on modified carry select adder using binary to excess 1 converter technique.But i am not able to reduce the area as compared to conventional carry select adder.can you please mail me the code.I think i have the problem in my design.
    Mail id= er.garimasngh@gmail.com
    I did every possible optimization in my design upto my knowledge but i am not getting the required results.

    ReplyDelete
    Replies
    1. Use the following logic to code your bec:
      x0=~b0;
      x1=b0^b1;
      x2:b2(b0&b1);
      x3=b3^(b0&b1&b2)














      Delete
    2. What is the use of X0,X1,X2.....???

      Delete
  8. code you priveded produce this error while simulating
    please help me to remove this errorERROR:HDLParsers:3482 - Could not resolve instantiated unit a in Verilog module work/carryselectadder in any library
    ERROR:Simulator:198 - Failed when handling dependencies for module carryselectadder_test_v

    ReplyDelete
    Replies
    1. please create a new file and verilog project and copy the above code.

      Delete
  9. sir iam working on carry select adder with BEC structure.. can you pls give me the code for this structure.. pls sir.. its very urgent. mail id- anithagopalan.gopalan@gmail.com

    ReplyDelete
    Replies
    1. its a simple code. take the output bits of rca with carry input 0 (b3 b2 b1 b0 ) and write a code for bec using the expression:
      x0=~b0;
      x1=b0^b1;
      x2:b2(b0&b1);
      x3=b3^(b0&b1&b2)

      Delete
  10. I want to write a code for 8-bit carry select adder using common boolean function introducing clock also for my major project to analyse area and power . can you please help me out.

    ReplyDelete
    Replies
    1. hello mail your requirements to verilogblog@gmail.com . you can avail the complete project with source code with power/area/timing reports

      Delete
  11. sir i am unable to write code for 8 bit carry skip adder,can you tell me how a single stage carry skip adder looks like,along with its
    internal block diagram,actually i want to know how a single carry skip adder works,kindly mail it me sir,my mail id is rinkyrox@gmail.com

    ReplyDelete
  12. need code for carry propagate adder

    ReplyDelete
  13. can i select this 'CARRY SELECT ADDER" with some analysis like power and area as part of our project for MTECH

    ReplyDelete
  14. sir,reply me soon ....for above question

    ReplyDelete
  15. i am having simulation error and zero compilation error for above program in model sim .. can any one please help how to sort it out?

    ReplyDelete
  16. How can i make 16-bit CSA from this 4-bit CSA?

    ReplyDelete
  17. This comment has been removed by the author.

    ReplyDelete
  18. Can I get code for 16 bit parallel adder (Brent Kung) using excess one unit

    ReplyDelete
  19. thank you...it helped us a lot..can u please send the code for low power and area efficient csla using add-1 circuit and also 16-bit csla.

    ReplyDelete
  20. sir !! i wrote 32bitcsa adder using BEC+RCA but flies were not linking when im adding to sorece file please help me how link as set main file as top module

    ReplyDelete
  21. This comment has been removed by the author.

    ReplyDelete
  22. thank u above code helped me a lot but i need help on carry select adder using binary to excess 1 converter verilog .can you help

    ReplyDelete
  23. sir!!iam doing a paper on carry select adder and modified carry select adder,can you send the code for power,area ,delay

    ReplyDelete
  24. hello sir...i want 16-bit squareroot csa with BEC full vhdl code.i want to do my project about comparision of time and area to be better than general serial adder.'suareroot csadder using bec Versus serial adder'. send meto mail manginaraju@gmail.com. reply me soon sir/mam.thankyou.

    ReplyDelete
  25. Modified SQRT CSLA architecture using zero finding logic.. i have internal diagram nd it is prposed Square root Carry Select Adder 16 bit using zero finding logic for ripple carry adder for input Carry =1 and multiplexer to optimize the area and power..
    i have used Xilinx ISE 8.1 , so can thz program using thz software . if u send me logic 4bit nd bit nd 16 bit code..my mail id is saktiprasannaswain870@gmail.com

    ReplyDelete
  26. Can you please upload the Verilog program for Carry Save Adder with test bench and report. It will be really helpful for our mini project.

    ReplyDelete
  27. Hello sir I want the vhdl code for low power area efficient carry select adder please upload the program

    ReplyDelete
  28. Please send me the vhdl code for low power area efficient carry select adder for the email id :sherin16189112@gmail.com

    ReplyDelete
  29. I want to write a code for 8-bit carry select adder using bec and clock cycle report for my major project to analyse area and power . can you please help me out.its very urgent sir?
    Mail I'd - sai.07cn32@gmail.com

    ReplyDelete
  30. sir Please send me the vhdl code for 16bit low power area efficient carry select adder for the email id :kamboju.gioe@gmail.com

    ReplyDelete
  31. This comment has been removed by the author.

    ReplyDelete
  32. sir iam working on power efficient carry select adder with BEC-3 converter structure and i like to do this in 4-bit. can you pls give me the complete code in verilog and some explanation for this structure.. pls sir.. its very urgent. mail id- hareesh2424777@gmail.com

    ReplyDelete
  33. sir could you provide me the code for carry select adder using binary to excess 1 converter.please sir i am in the end of my final year project..

    ReplyDelete
  34. Sir,how to write verilog code and testbench for 8 bit carry select adder then we have to assume cin=1, sir please solve this as soon as posible.

    ReplyDelete
  35. Can you please explain how propogation delay is reduced if we use carry select adder instead of ripple carry adder though we are only giving the different cin inputs to both ladders both ladders will take 4 units of time which is similar to using of ripple carry adder.
    Thank you

    ReplyDelete