diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2025-05-01 09:15:23 -0400 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2025-05-01 09:15:23 -0400 |
commit | 0bfa029ee6c5bdbc6d5601b3200d7367fcea02ba (patch) | |
tree | 2d6fd716e8ffd32c8df1151fb2ee229ab468ad0c /pb_APP_log_comb.srcs/sources_1/new/full_adder.vhd |
Batman
Diffstat (limited to 'pb_APP_log_comb.srcs/sources_1/new/full_adder.vhd')
-rw-r--r-- | pb_APP_log_comb.srcs/sources_1/new/full_adder.vhd | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/pb_APP_log_comb.srcs/sources_1/new/full_adder.vhd b/pb_APP_log_comb.srcs/sources_1/new/full_adder.vhd new file mode 100644 index 0000000..7f5148d --- /dev/null +++ b/pb_APP_log_comb.srcs/sources_1/new/full_adder.vhd @@ -0,0 +1,54 @@ +---------------------------------------------------------------------------------- +-- Company: +-- Engineer: +-- +-- Create Date: 04/30/2025 01:11:03 PM +-- Design Name: +-- Module Name: full_adder - Behavioral +-- Project Name: +-- Target Devices: +-- Tool Versions: +-- Description: +-- +-- Dependencies: +-- +-- Revision: +-- Revision 0.01 - File Created +-- Additional Comments: +-- +---------------------------------------------------------------------------------- + + +library IEEE; +use IEEE.STD_LOGIC_1164.ALL; + +-- Uncomment the following library declaration if using +-- arithmetic functions with Signed or Unsigned values +--use IEEE.NUMERIC_STD.ALL; + +-- Uncomment the following library declaration if instantiating +-- any Xilinx leaf cells in this code. +--library UNISIM; +--use UNISIM.VComponents.all; + +entity full_adder is + Port ( c_in : in STD_LOGIC; + a : in STD_LOGIC; + b : in STD_LOGIC; + o : out STD_LOGIC; + c_o : out STD_LOGIC); +end full_adder; + +architecture Behavioral of full_adder is + + signal aXb : STD_LOGIC; + +begin + + aXb <= a xor b; + + o <= aXb xor c_in; + c_o <= (aXb and c_in) or (a and b); + + +end Behavioral; |