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

Subversion Repositories simple_fm_receiver

[/] [simple_fm_receiver/] [trunk/] [source/] [adder_18bit.vhdl] - Blame information for rev 46

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 46 arif_endro
-- ------------------------------------------------------------------------
2 39 arif_endro
-- Copyright (C) 2004 Arif Endro Nugroho
3 46 arif_endro
-- All rights reserved.
4 13 arif_endro
-- 
5 46 arif_endro
-- Redistribution and use in source and binary forms, with or without
6
-- modification, are permitted provided that the following conditions
7
-- are met:
8 13 arif_endro
-- 
9 46 arif_endro
-- 1. Redistributions of source code must retain the above copyright
10
--    notice, this list of conditions and the following disclaimer.
11
-- 2. Redistributions in binary form must reproduce the above copyright
12
--    notice, this list of conditions and the following disclaimer in the
13
--    documentation and/or other materials provided with the distribution.
14 13 arif_endro
-- 
15 46 arif_endro
-- THIS SOFTWARE IS PROVIDED BY ARIF ENDRO NUGROHO "AS IS" AND ANY EXPRESS
16
-- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
-- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
-- DISCLAIMED. IN NO EVENT SHALL ARIF ENDRO NUGROHO BE LIABLE FOR ANY
19
-- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20
-- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21
-- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22
-- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23
-- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
24
-- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25
-- POSSIBILITY OF SUCH DAMAGE.
26 13 arif_endro
-- 
27 46 arif_endro
-- End Of License.
28
-- ------------------------------------------------------------------------
29 2 arif_endro
 
30
library IEEE;
31
use IEEE.STD_LOGIC_1164.ALL;
32
 
33
entity adder_18bit is
34
   port (
35
      addend_18bit  : in  bit_vector (17 downto 0);
36
      augend_18bit  : in  bit_vector (17 downto 0);
37
      adder18_output: out bit_vector (17 downto 0)
38
      );
39
end adder_18bit;
40
 
41
architecture structural of adder_18bit is
42
 
43
   component fulladder
44
      port (
45
      addend        : in   bit;
46
      augend        : in   bit;
47
      carry_in      : in   bit;
48
      sum           : out  bit;
49
      carry         : out  bit
50
      );
51
   end component;
52
 
53
-- internal signal
54
signal c00 : bit;
55
signal c01 : bit;
56
signal c02 : bit;
57
signal c03 : bit;
58
signal c04 : bit;
59
signal c05 : bit;
60
signal c06 : bit;
61
signal c07 : bit;
62
signal c08 : bit;
63
signal c09 : bit;
64
signal c10 : bit;
65
signal c11 : bit;
66
signal c12 : bit;
67
signal c13 : bit;
68
signal c14 : bit;
69
signal c15 : bit;
70
signal c16 : bit;
71
signal c17 : bit;
72
signal c18 : bit;
73
 
74
begin
75
 
76
c00 <= '0';
77
 
78
fa17 : fulladder
79
   port map (
80
      addend     => addend_18bit(17),
81
      augend     => augend_18bit(17),
82
      carry_in   => c17,
83
      sum        => adder18_output(17),
84
      carry      => c18
85
      );
86
 
87
fa16 : fulladder
88
   port map (
89
      addend     => addend_18bit(16),
90
      augend     => augend_18bit(16),
91
      carry_in   => c16,
92
      sum        => adder18_output(16),
93
      carry      => c17
94
      );
95
 
96
fa15 : fulladder
97
   port map (
98
      addend     => addend_18bit(15),
99
      augend     => augend_18bit(15),
100
      carry_in   => c15,
101
      sum        => adder18_output(15),
102
      carry      => c16
103
      );
104
 
105
fa14 : fulladder
106
   port map (
107
      addend     => addend_18bit(14),
108
      augend     => augend_18bit(14),
109
      carry_in   => c14,
110
      sum        => adder18_output(14),
111
      carry      => c15
112
      );
113
 
114
fa13 : fulladder
115
   port map (
116
      addend     => addend_18bit(13),
117
      augend     => augend_18bit(13),
118
      carry_in   => c13,
119
      sum        => adder18_output(13),
120
      carry      => c14
121
      );
122
 
123
fa12 : fulladder
124
   port map (
125
      addend     => addend_18bit(12),
126
      augend     => augend_18bit(12),
127
      carry_in   => c12,
128
      sum        => adder18_output(12),
129
      carry      => c13
130
      );
131
 
132
fa11 : fulladder
133
   port map (
134
      addend     => addend_18bit(11),
135
      augend     => augend_18bit(11),
136
      carry_in   => c11,
137
      sum        => adder18_output(11),
138
      carry      => c12
139
      );
140
 
141
fa10 : fulladder
142
   port map (
143
      addend     => addend_18bit(10),
144
      augend     => augend_18bit(10),
145
      carry_in   => c10,
146
      sum        => adder18_output(10),
147
      carry      => c11
148
      );
149
 
150
fa09 : fulladder
151
   port map (
152
      addend     => addend_18bit(09),
153
      augend     => augend_18bit(09),
154
      carry_in   => c09,
155
      sum        => adder18_output(09),
156
      carry      => c10
157
      );
158
 
159
fa08 : fulladder
160
   port map (
161
      addend     => addend_18bit(08),
162
      augend     => augend_18bit(08),
163
      carry_in   => c08,
164
      sum        => adder18_output(08),
165
      carry      => c09
166
      );
167
 
168
fa07 : fulladder
169
   port map (
170
      addend     => addend_18bit(07),
171
      augend     => augend_18bit(07),
172
      carry_in   => c07,
173
      sum        => adder18_output(07),
174
      carry      => c08
175
      );
176
 
177
fa06 : fulladder
178
   port map (
179
      addend     => addend_18bit(06),
180
      augend     => augend_18bit(06),
181
      carry_in   => c06,
182
      sum        => adder18_output(06),
183
      carry      => c07
184
      );
185
 
186
fa05 : fulladder
187
   port map (
188
      addend     => addend_18bit(05),
189
      augend     => augend_18bit(05),
190
      carry_in   => c05,
191
      sum        => adder18_output(05),
192
      carry      => c06
193
      );
194
 
195
fa04 : fulladder
196
   port map (
197
      addend     => addend_18bit(04),
198
      augend     => augend_18bit(04),
199
      carry_in   => c04,
200
      sum        => adder18_output(04),
201
      carry      => c05
202
      );
203
 
204
fa03 : fulladder
205
   port map (
206
      addend     => addend_18bit(03),
207
      augend     => augend_18bit(03),
208
      carry_in   => c03,
209
      sum        => adder18_output(03),
210
      carry      => c04
211
      );
212
 
213
fa02 : fulladder
214
   port map (
215
      addend     => addend_18bit(02),
216
      augend     => augend_18bit(02),
217
      carry_in   => c02,
218
      sum        => adder18_output(02),
219
      carry      => c03
220
      );
221
 
222
fa01 : fulladder
223
   port map (
224
      addend     => addend_18bit(01),
225
      augend     => augend_18bit(01),
226
      carry_in   => c01,
227
      sum        => adder18_output(01),
228
      carry      => c02
229
      );
230
 
231
fa00 : fulladder
232
   port map (
233
      addend     => addend_18bit(00),
234
      augend     => augend_18bit(00),
235
      carry_in   => c00,
236
      sum        => adder18_output(00),
237
      carry      => c01
238
      );
239
 
240
end structural;

powered by: WebSVN 2.1.0

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