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

Subversion Repositories simple_fm_receiver

[/] [simple_fm_receiver/] [trunk/] [source/] [adder_09bit.vhdl] - Blame information for rev 43

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 22 arif_endro
-- $Id: adder_09bit.vhdl,v 1.4 2008-06-26 06:12:29 arif_endro Exp $
2 2 arif_endro
-------------------------------------------------------------------------------
3
-- Title       : Adder 09 bit
4
-- Project     : FM Receiver 
5
-------------------------------------------------------------------------------
6
-- File        : adder_09bit.vhdl
7
-- Author      : "Arif E. Nugroho" <arif_endro@yahoo.com>
8
-- Created     : 2004/12/23
9
-- Last update : 
10 13 arif_endro
-- Simulators  : 
11 2 arif_endro
-- Synthesizers: 
12
-- Target      : 
13
-------------------------------------------------------------------------------
14
-- Description : Ripple carry adder 09 bit with output 10 bit
15
-------------------------------------------------------------------------------
16 39 arif_endro
-- Copyright (C) 2004 Arif Endro Nugroho
17 2 arif_endro
-------------------------------------------------------------------------------
18 13 arif_endro
-- 
19
--      THIS SOURCE FILE MAY BE USED AND DISTRIBUTED WITHOUT RESTRICTION
20
-- PROVIDED THAT THIS COPYRIGHT STATEMENT IS NOT REMOVED FROM THE FILE AND THAT
21
-- ANY DERIVATIVE WORK CONTAINS THE ORIGINAL COPYRIGHT NOTICE AND THE
22
-- ASSOCIATED DISCLAIMER.
23
-- 
24
-------------------------------------------------------------------------------
25
-- 
26
--      THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
27
-- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
28
-- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
29
-- EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31
-- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
32
-- OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
33
-- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
34
-- OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
35
-- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36
-- 
37
-------------------------------------------------------------------------------
38 2 arif_endro
 
39
library IEEE;
40
use IEEE.STD_LOGIC_1164.ALL;
41
 
42
entity adder_09bit is
43
   port (
44
      addend_09bit  : in  bit_vector (08 downto 0);
45
      augend_09bit  : in  bit_vector (08 downto 0);
46
      adder09_output: out bit_vector (09 downto 0)
47
      );
48
end adder_09bit;
49
 
50
architecture structural of adder_09bit is
51
 
52
   component fulladder
53
      port (
54
      addend        : in   bit;
55
      augend        : in   bit;
56
      carry_in      : in   bit;
57
      sum           : out  bit;
58
      carry         : out  bit
59
      );
60
   end component;
61
 
62
signal c00 : bit;
63
signal c01 : bit;
64
signal c02 : bit;
65
signal c03 : bit;
66
signal c04 : bit;
67
signal c05 : bit;
68
signal c06 : bit;
69
signal c07 : bit;
70
signal c08 : bit;
71
signal c09 : bit;
72
signal over09 : bit;
73 22 arif_endro
signal adder09_output_int : bit_vector (08 downto 0);
74
signal ov  : bit ;
75 2 arif_endro
 
76
begin
77
 
78
c00                     <= '0';
79
over09                  <= (addend_09bit (08) xor augend_09bit (08));
80 22 arif_endro
ov                      <= ((adder09_output_int (08) and over09) or
81 2 arif_endro
                           (c09 and (not (over09))));
82 22 arif_endro
adder09_output(08 downto 00) <= adder09_output_int;
83
adder09_output(09)           <= ov;
84 2 arif_endro
 
85
fa08 : fulladder
86
   port map (
87
      addend     => addend_09bit(08),
88
      augend     => augend_09bit(08),
89
      carry_in   => c08,
90
      sum        => adder09_output_int(08),
91
      carry      => c09
92
      );
93
 
94
fa07 : fulladder
95
   port map (
96
      addend     => addend_09bit(07),
97
      augend     => augend_09bit(07),
98
      carry_in   => c07,
99
      sum        => adder09_output_int(07),
100
      carry      => c08
101
      );
102
 
103
fa06 : fulladder
104
   port map (
105
      addend     => addend_09bit(06),
106
      augend     => augend_09bit(06),
107
      carry_in   => c06,
108
      sum        => adder09_output_int(06),
109
      carry      => c07
110
      );
111
 
112
fa05 : fulladder
113
   port map (
114
      addend     => addend_09bit(05),
115
      augend     => augend_09bit(05),
116
      carry_in   => c05,
117
      sum        => adder09_output_int(05),
118
      carry      => c06
119
      );
120
 
121
fa04 : fulladder
122
   port map (
123
      addend     => addend_09bit(04),
124
      augend     => augend_09bit(04),
125
      carry_in   => c04,
126
      sum        => adder09_output_int(04),
127
      carry      => c05
128
      );
129
 
130
fa03 : fulladder
131
   port map (
132
      addend     => addend_09bit(03),
133
      augend     => augend_09bit(03),
134
      carry_in   => c03,
135
      sum        => adder09_output_int(03),
136
      carry      => c04
137
      );
138
 
139
fa02 : fulladder
140
   port map (
141
      addend     => addend_09bit(02),
142
      augend     => augend_09bit(02),
143
      carry_in   => c02,
144
      sum        => adder09_output_int(02),
145
      carry      => c03
146
      );
147
 
148
fa01 : fulladder
149
   port map (
150
      addend     => addend_09bit(01),
151
      augend     => augend_09bit(01),
152
      carry_in   => c01,
153
      sum        => adder09_output_int(01),
154
      carry      => c02
155
      );
156
 
157
fa00 : fulladder
158
   port map (
159
      addend     => addend_09bit(00),
160
      augend     => augend_09bit(00),
161
      carry_in   => c00,
162
      sum        => adder09_output_int(00),
163
      carry      => c01
164
      );
165
 
166
end structural;

powered by: WebSVN 2.1.0

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