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

Subversion Repositories simple_fm_receiver

[/] [simple_fm_receiver/] [trunk/] [source/] [adder_10bit.vhdl] - Blame information for rev 36

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

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

powered by: WebSVN 2.1.0

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