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

Subversion Repositories simple_fm_receiver

[/] [simple_fm_receiver/] [trunk/] [source/] [adder_11bit.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_11bit.vhdl,v 1.4 2008-06-26 06:12:29 arif_endro Exp $
2 2 arif_endro
-------------------------------------------------------------------------------
3
-- Title       : Adder 11 bit
4
-- Project     : FM Receiver 
5
-------------------------------------------------------------------------------
6
-- File        : adder_11bit.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 11 bit with output 12 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_11bit is
46
   port (
47
      addend_11bit  : in  bit_vector (10 downto 0);
48
      augend_11bit  : in  bit_vector (10 downto 0);
49
      adder11_output: out bit_vector (11 downto 0) -- 12 bit output
50
      );
51
end adder_11bit;
52
 
53
architecture structural of adder_11bit 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 over11 : bit;
79 22 arif_endro
signal adder11_output_int : bit_vector (10 downto 0);
80
signal ov  : bit;
81 2 arif_endro
 
82
begin
83
 
84
c00                     <= '0';
85
over11                  <= (addend_11bit (10) xor augend_11bit (10));
86 22 arif_endro
ov                      <= ((adder11_output_int (10) and over11) or
87 2 arif_endro
                           (c11 and (not (over11))));
88 22 arif_endro
adder11_output(10 downto 00) <= adder11_output_int;
89
adder11_output(11)           <= ov;
90 2 arif_endro
 
91
fa10 : fulladder
92
   port map (
93
      addend     => addend_11bit(10),
94
      augend     => augend_11bit(10),
95
      carry_in   => c10,
96
      sum        => adder11_output_int(10),
97
      carry      => c11
98
      );
99
 
100
fa09 : fulladder
101
   port map (
102
      addend     => addend_11bit(09),
103
      augend     => augend_11bit(09),
104
      carry_in   => c09,
105
      sum        => adder11_output_int(09),
106
      carry      => c10
107
      );
108
 
109
fa08 : fulladder
110
   port map (
111
      addend     => addend_11bit(08),
112
      augend     => augend_11bit(08),
113
      carry_in   => c08,
114
      sum        => adder11_output_int(08),
115
      carry      => c09
116
      );
117
 
118
fa07 : fulladder
119
   port map (
120
      addend     => addend_11bit(07),
121
      augend     => augend_11bit(07),
122
      carry_in   => c07,
123
      sum        => adder11_output_int(07),
124
      carry      => c08
125
      );
126
 
127
fa06 : fulladder
128
   port map (
129
      addend     => addend_11bit(06),
130
      augend     => augend_11bit(06),
131
      carry_in   => c06,
132
      sum        => adder11_output_int(06),
133
      carry      => c07
134
      );
135
 
136
fa05 : fulladder
137
   port map (
138
      addend     => addend_11bit(05),
139
      augend     => augend_11bit(05),
140
      carry_in   => c05,
141
      sum        => adder11_output_int(05),
142
      carry      => c06
143
      );
144
 
145
fa04 : fulladder
146
   port map (
147
      addend     => addend_11bit(04),
148
      augend     => augend_11bit(04),
149
      carry_in   => c04,
150
      sum        => adder11_output_int(04),
151
      carry      => c05
152
      );
153
 
154
fa03 : fulladder
155
   port map (
156
      addend     => addend_11bit(03),
157
      augend     => augend_11bit(03),
158
      carry_in   => c03,
159
      sum        => adder11_output_int(03),
160
      carry      => c04
161
      );
162
 
163
fa02 : fulladder
164
   port map (
165
      addend     => addend_11bit(02),
166
      augend     => augend_11bit(02),
167
      carry_in   => c02,
168
      sum        => adder11_output_int(02),
169
      carry      => c03
170
      );
171
 
172
fa01 : fulladder
173
   port map (
174
      addend     => addend_11bit(01),
175
      augend     => augend_11bit(01),
176
      carry_in   => c01,
177
      sum        => adder11_output_int(01),
178
      carry      => c02
179
      );
180
 
181
fa00 : fulladder
182
   port map (
183
      addend     => addend_11bit(00),
184
      augend     => augend_11bit(00),
185
      carry_in   => c00,
186
      sum        => adder11_output_int(00),
187
      carry      => c01
188
      );
189
 
190
end structural;

powered by: WebSVN 2.1.0

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