root/ossiedev/branches/mcarrick/VHDL/full_adder_pg/full_adder_pg.vhd @ 8226

Revision 8226, 0.7 KB (checked in by mcarrick, 5 years ago)

removed carry out, full_adder component dependence

Line 
1-- Adder with Propogate and Generate Functions
2--
3-- This component is slightly different from a
4-- real full adder which computes both the sum
5-- and the carry out. This computes only the sum
6-- and the propagate and generate functions for
7-- use in a carry look ahead adder.
8
9library ieee;
10use ieee.std_logic_1164.all;
11
12entity full_adder_pg is
13        port (  a               : in    std_logic;
14                        b               : in    std_logic;
15                        cIn             : in    std_logic;
16                        s               : out   std_logic;
17                        p               : out   std_logic;
18                        g               : out   std_logic
19        );
20end entity full_adder_pg;
21
22architecture full_adder_pg_behav of full_adder_pg is
23
24        begin
25
26                -- only calculate sum
27                s <= (a xor b) xor cIn;
28
29                -- calculate the propagate and generate functions
30                g <= a and b;
31                p <= a or b;
32
33end architecture full_adder_pg_behav;
34
35
36
Note: See TracBrowser for help on using the browser.