Exp 4
Exp 4
Aim
To design, simulate and implement 8 bit simple and ripple carry adders circuit in FPGA using
Verilog HDL
Software Required
Vivado 2014.4
Hardware Required
Nexys A7: FPGA Trainer Board
Theory
Adders are the combinatorial circuits which are used to add two binary numbers. The nature of
the adders chosen depends on the characteristics of the binary numbers which need to be added. Say for
example, if one needs to add two single bit binary digits, then one can use half adder while if there is an
additional carry which needs to be added along with them, then one may resort to the use of full adder.
However what if we want to add a binary number which has multiple bits in it. In such a case, the need
arises to use a parallel adder.
Parallel adder is nothing but a cascade of several full adders. The number of full adders used will
depend on the number of bits in the binary digits which require to be added. Such a n-bit adder formed by
cascading n full adders (FA1 to FAn)
From the discussion presented we can say that in the case of n-bit parallel adder, each adder has
to wait for the carry term to be generated from its preceding adder in order to finish its task of adding.
This can be visualized as if the carry term propagates along the chain in the fashion of a ripple. Thus these
kind of adders are even referred to as ripple carry adders. Further, the delay associated with the travelling
of carry bit is called carry propagation delay and is found to worsen with an increase in the length of the
binary numbers which require to be added. For example, if each full adder is considered to have a delay
of 10 ns, then the total delay to produce the output of a 4-bit parallel adder would be 4×10=40 ns.
8-Bit Simple Adder
A B Sum
0101 0001 0011 0110 1000 0111
0000 0010 1000 0011 1000 0101
18. Goto project manager right click on Simulation SourcesSelect Add or create simulation sources,
19. Click on Create File Select your file type as Verilog
20. Enter your “file name” and click Finish.,
21. Goto project manager and click your verilog file under Simulation Sources.,
22. Enter your program and save file.,
23. Click on”run synthesis”
24. Running synthesis.,
25. After successful synthesis completion, close the pop-up window and select Simulation Run
Behavioural Simulation is enough to see output waveform If we run through testbench program.
26. Else After the Run Behavioral Simulation, Force the value for inputs by Force Constant option and
save the waveform
27. Run the simulation by clicking on Run for amount of time previously set
28. Output of simulation is verified with the help of waveform
8-Bit Ripple Carry Adder
Logic Diagram
TruthTable
A B Sum
0101 0001 0011 0110 1000 0111
0000 0010 1000 0011 1000 0101
Steps for Implementation
a b
Result
Thus the simulation of simple and ripple carry adders were done, implemented in Nexys A7
FPGA Trainer Board and outputs were verified
Practice Question
Implement and verify adder/ subtractor circuit in FPGA using Verilog HDL