OpenCores
URL https://opencores.org/ocsvn/vhdl-pipeline-mips/vhdl-pipeline-mips/trunk

Subversion Repositories vhdl-pipeline-mips

[/] [vhdl-pipeline-mips/] [trunk/] [shared_components/] [full_adder.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 elujan
--
2
-- full_adder
3
--
4
library ieee;
5
use ieee.std_logic_1164.all;
6
use ieee.numeric_std.all;
7
 
8
entity FULL_ADDER is
9
    port(
10
                X       : in    std_logic;
11
                Y       : in    std_logic;
12
                CIN     : in    std_logic;
13
                COUT    : out   std_logic;
14
                R       : out   std_logic
15
        );
16
end FULL_ADDER;
17
 
18
architecture FULL_ADDER_ARC of FULL_ADDER is
19
 
20
 
21
signal G,P,K : std_logic;
22
 
23
begin
24
        G <= X and Y;
25
        P <= X xor Y;
26
        K <= X nor Y;
27
        COUT <= G or ( P and CIN );
28
        R <= P xor CIN;
29
end FULL_ADDER_ARC;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.