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 14

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

Line No. Rev Author Line
1 14 arif_endro
-- $Id: adder_11bit.vhdl,v 1.3 2005-03-04 08:06:12 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
signal adder11_output_int : bit_vector (11 downto 0);
80
 
81
begin
82
 
83
c00                     <= '0';
84
over11                  <= (addend_11bit (10) xor augend_11bit (10));
85
adder11_output_int (11) <= ((adder11_output_int (10) and over11) or
86
                           (c11 and (not (over11))));
87
adder11_output          <= adder11_output_int;
88
 
89
fa10 : fulladder
90
   port map (
91
      addend     => addend_11bit(10),
92
      augend     => augend_11bit(10),
93
      carry_in   => c10,
94
      sum        => adder11_output_int(10),
95
      carry      => c11
96
      );
97
 
98
fa09 : fulladder
99
   port map (
100
      addend     => addend_11bit(09),
101
      augend     => augend_11bit(09),
102
      carry_in   => c09,
103
      sum        => adder11_output_int(09),
104
      carry      => c10
105
      );
106
 
107
fa08 : fulladder
108
   port map (
109
      addend     => addend_11bit(08),
110
      augend     => augend_11bit(08),
111
      carry_in   => c08,
112
      sum        => adder11_output_int(08),
113
      carry      => c09
114
      );
115
 
116
fa07 : fulladder
117
   port map (
118
      addend     => addend_11bit(07),
119
      augend     => augend_11bit(07),
120
      carry_in   => c07,
121
      sum        => adder11_output_int(07),
122
      carry      => c08
123
      );
124
 
125
fa06 : fulladder
126
   port map (
127
      addend     => addend_11bit(06),
128
      augend     => augend_11bit(06),
129
      carry_in   => c06,
130
      sum        => adder11_output_int(06),
131
      carry      => c07
132
      );
133
 
134
fa05 : fulladder
135
   port map (
136
      addend     => addend_11bit(05),
137
      augend     => augend_11bit(05),
138
      carry_in   => c05,
139
      sum        => adder11_output_int(05),
140
      carry      => c06
141
      );
142
 
143
fa04 : fulladder
144
   port map (
145
      addend     => addend_11bit(04),
146
      augend     => augend_11bit(04),
147
      carry_in   => c04,
148
      sum        => adder11_output_int(04),
149
      carry      => c05
150
      );
151
 
152
fa03 : fulladder
153
   port map (
154
      addend     => addend_11bit(03),
155
      augend     => augend_11bit(03),
156
      carry_in   => c03,
157
      sum        => adder11_output_int(03),
158
      carry      => c04
159
      );
160
 
161
fa02 : fulladder
162
   port map (
163
      addend     => addend_11bit(02),
164
      augend     => augend_11bit(02),
165
      carry_in   => c02,
166
      sum        => adder11_output_int(02),
167
      carry      => c03
168
      );
169
 
170
fa01 : fulladder
171
   port map (
172
      addend     => addend_11bit(01),
173
      augend     => augend_11bit(01),
174
      carry_in   => c01,
175
      sum        => adder11_output_int(01),
176
      carry      => c02
177
      );
178
 
179
fa00 : fulladder
180
   port map (
181
      addend     => addend_11bit(00),
182
      augend     => augend_11bit(00),
183
      carry_in   => c00,
184
      sum        => adder11_output_int(00),
185
      carry      => c01
186
      );
187
 
188
end structural;

powered by: WebSVN 2.1.0

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