OpenCores
URL https://opencores.org/ocsvn/copyblaze/copyblaze/trunk

Subversion Repositories copyblaze

[/] [copyblaze/] [trunk/] [copyblaze/] [rtl/] [vhdl/] [cpu/] [cp_FullAdder.vhd] - Blame information for rev 57

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ameziti
--------------------------------------------------------------------------------
2
-- Company: 
3
--
4
-- File: cp_FullAdder.vhd
5
--
6
-- Description:
7
--      projet copyblaze
8
--      1 bit Full adder
9
--
10
-- File history:
11
-- v1.0: 14/10/11: Creation
12
--
13
-- Targeted device: ProAsic A3P250 VQFP100
14
-- Author: AbdAllah Meziti
15
--------------------------------------------------------------------------------
16
 
17
library ieee;
18
use ieee.std_logic_1164.all;
19
use ieee.numeric_std.all;
20
 
21
use     work.Usefull_Pkg.all;           -- Usefull Package
22
 
23
--------------------------------------------------------------------------------
24
-- Entity: cp_FullAdder
25
--
26
-- Description:
27
--      
28
--      REMARQUE:
29
--
30
--      
31
-- History:
32
-- 14/10/11 AM: Creation
33
-- ---------------------
34
-- xx/xx/xx AM: 
35
--                              
36
--------------------------------------------------------------------------------
37
entity cp_FullAdder is
38
        port (
39
        --------------------------------------------------------------------------------
40
        -- Signaux Fonctionels
41
        --------------------------------------------------------------------------------
42
                Ci_i            : in std_ulogic;
43
                A_i                     : in std_ulogic;
44
                B_i                     : in std_ulogic;
45
 
46
                Co_o            : out std_ulogic;
47
                S_o                     : out std_ulogic
48
        );
49
end cp_FullAdder;
50
 
51
--------------------------------------------------------------------------------
52
-- Architecture: RTL
53
-- of entity : cp_FullAdder
54
--------------------------------------------------------------------------------
55
architecture rtl of cp_FullAdder is
56
 
57
        --------------------------------------------------------------------------------
58
        -- Définition des fonctions
59
        --------------------------------------------------------------------------------
60
 
61
 
62
 
63
        --------------------------------------------------------------------------------
64
        -- Définition des constantes
65
        --------------------------------------------------------------------------------
66
 
67
        --------------------------------------------------------------------------------
68
        -- Définition des signaux interne
69
        --------------------------------------------------------------------------------
70
 
71
        --------------------------------------------------------------------------------
72
        -- Déclaration des composants
73
        --------------------------------------------------------------------------------
74
 
75
begin
76
 
77
        --------------------------------------------------------------------------------
78
        -- Full adder
79
        --------------------------------------------------------------------------------
80
        -- SUM
81
        S_o             <=      A_i xor B_i xor Ci_i;
82
        -- CARRY
83
        Co_o    <=      (A_i and B_i) or (B_i and Ci_i) or (A_i and Ci_i);
84
 
85
end rtl;
86
 

powered by: WebSVN 2.1.0

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