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

Subversion Repositories simple_fm_receiver

[/] [simple_fm_receiver/] [trunk/] [source/] [adder_15bit.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_15bit.vhdl,v 1.4 2008-06-26 06:12:29 arif_endro Exp $
2 2 arif_endro
-------------------------------------------------------------------------------
3
-- Title       : Adder 15 bit
4
-- Project     : FM Receiver 
5
-------------------------------------------------------------------------------
6
-- File        : adder_15bit.vhdl
7
-- Author      : "Arif E. Nugroho" <arif_endro@yahoo.com>
8
-- Created     : 2004/12/02
9
-- Last update : 
10 13 arif_endro
-- Simulators  : 
11 2 arif_endro
-- Synthesizers: 
12
-- Target      : 
13
-------------------------------------------------------------------------------
14
-- Description : Ripple carry adder 15 bit with output 16 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_15bit is
43
   port (
44
      addend_15bit  : in  bit_vector (14 downto 0);
45
      augend_15bit  : in  bit_vector (14 downto 0);
46
      adder15_output: out bit_vector (15 downto 0) -- 16 bit output
47
      );
48
end adder_15bit;
49
 
50
architecture structural of adder_15bit 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
-- internal signal
63
signal c00 : bit;
64
signal c01 : bit;
65
signal c02 : bit;
66
signal c03 : bit;
67
signal c04 : bit;
68
signal c05 : bit;
69
signal c06 : bit;
70
signal c07 : bit;
71
signal c08 : bit;
72
signal c09 : bit;
73
signal c10 : bit;
74
signal c11 : bit;
75
signal c12 : bit;
76
signal c13 : bit;
77
signal c14 : bit;
78
signal c15 : bit;
79
signal over15 : bit;
80 22 arif_endro
signal adder15_output_int : bit_vector (14 downto 0);
81
signal ov  : bit;
82 2 arif_endro
 
83
begin
84
 
85
c00                     <= '0';
86
over15                  <= (addend_15bit (14) xor augend_15bit (14));
87 22 arif_endro
ov                      <= ((adder15_output_int (14) and over15) or
88 2 arif_endro
                           (c15 and (not (over15))));
89 22 arif_endro
adder15_output(14 downto 00) <= adder15_output_int;
90
adder15_output(15)           <= ov;
91 2 arif_endro
 
92
fa14 : fulladder
93
   port map (
94
      addend     => addend_15bit(14),
95
      augend     => augend_15bit(14),
96
      carry_in   => c14,
97
      sum        => adder15_output_int(14),
98
      carry      => c15
99
      );
100
 
101
fa13 : fulladder
102
   port map (
103
      addend     => addend_15bit(13),
104
      augend     => augend_15bit(13),
105
      carry_in   => c13,
106
      sum        => adder15_output_int(13),
107
      carry      => c14
108
      );
109
 
110
fa12 : fulladder
111
   port map (
112
      addend     => addend_15bit(12),
113
      augend     => augend_15bit(12),
114
      carry_in   => c12,
115
      sum        => adder15_output_int(12),
116
      carry      => c13
117
      );
118
 
119
fa11 : fulladder
120
   port map (
121
      addend     => addend_15bit(11),
122
      augend     => augend_15bit(11),
123
      carry_in   => c11,
124
      sum        => adder15_output_int(11),
125
      carry      => c12
126
      );
127
 
128
fa10 : fulladder
129
   port map (
130
      addend     => addend_15bit(10),
131
      augend     => augend_15bit(10),
132
      carry_in   => c10,
133
      sum        => adder15_output_int(10),
134
      carry      => c11
135
      );
136
 
137
fa09 : fulladder
138
   port map (
139
      addend     => addend_15bit(09),
140
      augend     => augend_15bit(09),
141
      carry_in   => c09,
142
      sum        => adder15_output_int(09),
143
      carry      => c10
144
      );
145
 
146
fa08 : fulladder
147
   port map (
148
      addend     => addend_15bit(08),
149
      augend     => augend_15bit(08),
150
      carry_in   => c08,
151
      sum        => adder15_output_int(08),
152
      carry      => c09
153
      );
154
 
155
fa07 : fulladder
156
   port map (
157
      addend     => addend_15bit(07),
158
      augend     => augend_15bit(07),
159
      carry_in   => c07,
160
      sum        => adder15_output_int(07),
161
      carry      => c08
162
      );
163
 
164
fa06 : fulladder
165
   port map (
166
      addend     => addend_15bit(06),
167
      augend     => augend_15bit(06),
168
      carry_in   => c06,
169
      sum        => adder15_output_int(06),
170
      carry      => c07
171
      );
172
 
173
fa05 : fulladder
174
   port map (
175
      addend     => addend_15bit(05),
176
      augend     => augend_15bit(05),
177
      carry_in   => c05,
178
      sum        => adder15_output_int(05),
179
      carry      => c06
180
      );
181
 
182
fa04 : fulladder
183
   port map (
184
      addend     => addend_15bit(04),
185
      augend     => augend_15bit(04),
186
      carry_in   => c04,
187
      sum        => adder15_output_int(04),
188
      carry      => c05
189
      );
190
 
191
fa03 : fulladder
192
   port map (
193
      addend     => addend_15bit(03),
194
      augend     => augend_15bit(03),
195
      carry_in   => c03,
196
      sum        => adder15_output_int(03),
197
      carry      => c04
198
      );
199
 
200
fa02 : fulladder
201
   port map (
202
      addend     => addend_15bit(02),
203
      augend     => augend_15bit(02),
204
      carry_in   => c02,
205
      sum        => adder15_output_int(02),
206
      carry      => c03
207
      );
208
 
209
fa01 : fulladder
210
   port map (
211
      addend     => addend_15bit(01),
212
      augend     => augend_15bit(01),
213
      carry_in   => c01,
214
      sum        => adder15_output_int(01),
215
      carry      => c02
216
      );
217
 
218
fa00 : fulladder
219
   port map (
220
      addend     => addend_15bit(00),
221
      augend     => augend_15bit(00),
222
      carry_in   => c00,
223
      sum        => adder15_output_int(00),
224
      carry      => c01
225
      );
226
 
227
end structural;

powered by: WebSVN 2.1.0

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