This website uses cookies. By using this site, you consent to the use of cookies. For more information, please take a look at our Privacy Policy.
Home > FPGA Technical Tutorials > Design Recipes for FPGAs Using Verilog and VHDL > ALU Functions > Structural n-Bit Addition

TABLE OF CONTENTS

Xilinx FPGA FPGA Forum

Structural n-Bit Addition

FONT SIZE : AAA

Using the simple 1-bit full adder defined previously, it is a simple matter to create a multiple bit full adder using this model as a building block. As an example, to create a 4-bit adder, with a single bit carry in and single bit carry out, we can define a VHDL model as shown here:

entity four_bit_adder is

port (sum: out bit_vector (3 downto 0); co : out bit;

a, b : in bit_vector (3 downto 0); ci : in bit);

end entity four_bit_adder;

architecture simple of four_bit_adder is

signal carry : bit_vector (3 downto 1);

begin

fa0 : entity work.full_adder

port map (sum(0),carry(1),a(0),b(0),ci);

fa1 : entity work.full_adder

port map (sum(1),carry(2),a(1),b(1),carry(1));

fa2 : entity work.full_adder

port map (sum(2),carry(3),a(2),b(2),carry(2));

fa3 : entity work.full_adder

port map (sum(3),co,a(3),b(3),carry(3));

end architecture simple;

This can obviously be extended to multiple bits by repeating the component use in the architecture for as many bits as are required.

  • XC5VLX110-2FFG1136C

    Manufacturer:Xilinx

  • Xilinx BGA1136
  • Product Categories:

    Lifecycle:Any -

    RoHS:

  • XC5VLX110-3FF1153C

    Manufacturer:Xilinx

  • FPGA Virtex-5 LX Family 110592 Cells 65nm Technology 1V 1153-Pin FCBGA
  • Product Categories: FPGAs (Field Programmable Gate Array)

    Lifecycle:Active Active

    RoHS: No RoHS

  • XC2V2000-4FGG676C

    Manufacturer:Xilinx

  • FPGA Virtex-II Family 2M Gates 24192 Cells 650MHz 0.15um Technology 1.5V 676-Pin FBGA
  • Product Categories: FPGAs (Field Programmable Gate Array)

    Lifecycle:Obsolete -

    RoHS:

  • XC2V2000-5BGG575I

    Manufacturer:Xilinx

  • FPGA Virtex-II Family 2M Gates 24192 Cells 750MHz 0.15um Technology 1.5V 575-Pin BGA
  • Product Categories: FPGAs (Field Programmable Gate Array)

    Lifecycle:Obsolete -

    RoHS:

  • XC4003E-3VQ100I

    Manufacturer:Xilinx

  • FPGA XC4000E Family 3K Gates 238 Cells 0.35um Technology 5V 100-Pin VTQFP
  • Product Categories: FPGAs (Field Programmable Gate Array)

    Lifecycle:Obsolete -

    RoHS: No RoHS

Need Help?

Support

If you have any questions about the product and related issues, Please contact us.