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

Subversion Repositories simple_fm_receiver

[/] [simple_fm_receiver/] [trunk/] [source/] [adder_14bit.vhdl] - Blame information for rev 38

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

Line No. Rev Author Line
1 22 arif_endro
-- $Id: adder_14bit.vhdl,v 1.4 2008-06-26 06:12:29 arif_endro Exp $
2 2 arif_endro
-------------------------------------------------------------------------------
3
-- Title       : Adder 14 bit
4
-- Project     : FM Receiver 
5
-------------------------------------------------------------------------------
6
-- File        : adder_14bit.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 14 bit with output 15 bit
15
-------------------------------------------------------------------------------
16 13 arif_endro
-- Copyright (C) 2004 Arif E. Nugroho
17 2 arif_endro
-- This VHDL design file is an open design; you can redistribute it and/or
18
-- modify it and/or implement it after contacting the author
19
-------------------------------------------------------------------------------
20 13 arif_endro
-------------------------------------------------------------------------------
21
-- 
22
--      THIS SOURCE FILE MAY BE USED AND DISTRIBUTED WITHOUT RESTRICTION
23
-- PROVIDED THAT THIS COPYRIGHT STATEMENT IS NOT REMOVED FROM THE FILE AND THAT
24
-- ANY DERIVATIVE WORK CONTAINS THE ORIGINAL COPYRIGHT NOTICE AND THE
25
-- ASSOCIATED DISCLAIMER.
26
-- 
27
-------------------------------------------------------------------------------
28
-- 
29
--      THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
30
-- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
31
-- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
32
-- EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
34
-- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
35
-- OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
36
-- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
37
-- OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
38
-- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39
-- 
40
-------------------------------------------------------------------------------
41 2 arif_endro
 
42
library IEEE;
43
use IEEE.STD_LOGIC_1164.ALL;
44
 
45
entity adder_14bit is
46
   port (
47
      addend_14bit  : in  bit_vector (13 downto 0);
48
      augend_14bit  : in  bit_vector (13 downto 0);
49
      adder14_output: out bit_vector (14 downto 0) -- 15bit output
50
      );
51
end adder_14bit;
52
 
53
architecture structural of adder_14bit is
54
 
55
   component fulladder
56
      port (
57
      addend        : in   bit;
58
      augend        : in   bit;
59
      carry_in      : in   bit;
60
      sum           : out  bit;
61
      carry         : out  bit
62
      );
63
   end component;
64
 
65
-- internal signal
66
signal c00 : bit;
67
signal c01 : bit;
68
signal c02 : bit;
69
signal c03 : bit;
70
signal c04 : bit;
71
signal c05 : bit;
72
signal c06 : bit;
73
signal c07 : bit;
74
signal c08 : bit;
75
signal c09 : bit;
76
signal c10 : bit;
77
signal c11 : bit;
78
signal c12 : bit;
79
signal c13 : bit;
80
signal c14 : bit;
81
signal over14 : bit;
82 22 arif_endro
signal adder14_output_int : bit_vector (13 downto 0);
83
signal ov  : bit;
84 2 arif_endro
 
85
begin
86
 
87
c00                     <= '0';
88
over14                  <= (addend_14bit (13) xor augend_14bit (13));
89 22 arif_endro
ov                      <= ((adder14_output_int (13) and over14) or
90 2 arif_endro
                           (c14 and (not (over14))));
91 22 arif_endro
adder14_output(13 downto 00) <= adder14_output_int;
92
adder14_output(14)           <= ov;
93 2 arif_endro
 
94
fa13 : fulladder
95
   port map (
96
      addend     => addend_14bit(13),
97
      augend     => augend_14bit(13),
98
      carry_in   => c13,
99
      sum        => adder14_output_int(13),
100
      carry      => c14
101
      );
102
 
103
fa12 : fulladder
104
   port map (
105
      addend     => addend_14bit(12),
106
      augend     => augend_14bit(12),
107
      carry_in   => c12,
108
      sum        => adder14_output_int(12),
109
      carry      => c13
110
      );
111
 
112
fa11 : fulladder
113
   port map (
114
      addend     => addend_14bit(11),
115
      augend     => augend_14bit(11),
116
      carry_in   => c11,
117
      sum        => adder14_output_int(11),
118
      carry      => c12
119
      );
120
 
121
fa10 : fulladder
122
   port map (
123
      addend     => addend_14bit(10),
124
      augend     => augend_14bit(10),
125
      carry_in   => c10,
126
      sum        => adder14_output_int(10),
127
      carry      => c11
128
      );
129
 
130
fa09 : fulladder
131
   port map (
132
      addend     => addend_14bit(09),
133
      augend     => augend_14bit(09),
134
      carry_in   => c09,
135
      sum        => adder14_output_int(09),
136
      carry      => c10
137
      );
138
 
139
fa08 : fulladder
140
   port map (
141
      addend     => addend_14bit(08),
142
      augend     => augend_14bit(08),
143
      carry_in   => c08,
144
      sum        => adder14_output_int(08),
145
      carry      => c09
146
      );
147
 
148
fa07 : fulladder
149
   port map (
150
      addend     => addend_14bit(07),
151
      augend     => augend_14bit(07),
152
      carry_in   => c07,
153
      sum        => adder14_output_int(07),
154
      carry      => c08
155
      );
156
 
157
fa06 : fulladder
158
   port map (
159
      addend     => addend_14bit(06),
160
      augend     => augend_14bit(06),
161
      carry_in   => c06,
162
      sum        => adder14_output_int(06),
163
      carry      => c07
164
      );
165
 
166
fa05 : fulladder
167
   port map (
168
      addend     => addend_14bit(05),
169
      augend     => augend_14bit(05),
170
      carry_in   => c05,
171
      sum        => adder14_output_int(05),
172
      carry      => c06
173
      );
174
 
175
fa04 : fulladder
176
   port map (
177
      addend     => addend_14bit(04),
178
      augend     => augend_14bit(04),
179
      carry_in   => c04,
180
      sum        => adder14_output_int(04),
181
      carry      => c05
182
      );
183
 
184
fa03 : fulladder
185
   port map (
186
      addend     => addend_14bit(03),
187
      augend     => augend_14bit(03),
188
      carry_in   => c03,
189
      sum        => adder14_output_int(03),
190
      carry      => c04
191
      );
192
 
193
fa02 : fulladder
194
   port map (
195
      addend     => addend_14bit(02),
196
      augend     => augend_14bit(02),
197
      carry_in   => c02,
198
      sum        => adder14_output_int(02),
199
      carry      => c03
200
      );
201
 
202
fa01 : fulladder
203
   port map (
204
      addend     => addend_14bit(01),
205
      augend     => augend_14bit(01),
206
      carry_in   => c01,
207
      sum        => adder14_output_int(01),
208
      carry      => c02
209
      );
210
 
211
fa00 : fulladder
212
   port map (
213
      addend     => addend_14bit(00),
214
      augend     => augend_14bit(00),
215
      carry_in   => c00,
216
      sum        => adder14_output_int(00),
217
      carry      => c01
218
      );
219
 
220
end structural;

powered by: WebSVN 2.1.0

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