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 2

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

Line No. Rev Author Line
1 2 arif_endro
-- $Id: adder_11bit.vhdl,v 1.1.1.1 2005-01-04 02:05:58 arif_endro Exp $
2
-------------------------------------------------------------------------------
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
-- Simulators  : Modelsim 6.0
11
-- Synthesizers: 
12
-- Target      : 
13
-------------------------------------------------------------------------------
14
-- Description : Ripple carry adder 11 bit with output 12 bit
15
-------------------------------------------------------------------------------
16
-- Copyright (c) 2004 Arif E. Nugroho
17
-- 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
 
21
library IEEE;
22
use IEEE.STD_LOGIC_1164.ALL;
23
use IEEE.STD_LOGIC_arith.ALL;
24
 
25
entity adder_11bit is
26
   port (
27
      addend_11bit  : in  bit_vector (10 downto 0);
28
      augend_11bit  : in  bit_vector (10 downto 0);
29
      adder11_output: out bit_vector (11 downto 0) -- 12 bit output
30
      );
31
end adder_11bit;
32
 
33
architecture structural of adder_11bit is
34
 
35
   component fulladder
36
      port (
37
      addend        : in   bit;
38
      augend        : in   bit;
39
      carry_in      : in   bit;
40
      sum           : out  bit;
41
      carry         : out  bit
42
      );
43
   end component;
44
 
45
-- internal signal
46
signal c00 : bit;
47
signal c01 : bit;
48
signal c02 : bit;
49
signal c03 : bit;
50
signal c04 : bit;
51
signal c05 : bit;
52
signal c06 : bit;
53
signal c07 : bit;
54
signal c08 : bit;
55
signal c09 : bit;
56
signal c10 : bit;
57
signal c11 : bit;
58
signal over11 : bit;
59
signal adder11_output_int : bit_vector (11 downto 0);
60
 
61
begin
62
 
63
c00                     <= '0';
64
over11                  <= (addend_11bit (10) xor augend_11bit (10));
65
adder11_output_int (11) <= ((adder11_output_int (10) and over11) or
66
                           (c11 and (not (over11))));
67
adder11_output          <= adder11_output_int;
68
 
69
fa10 : fulladder
70
   port map (
71
      addend     => addend_11bit(10),
72
      augend     => augend_11bit(10),
73
      carry_in   => c10,
74
      sum        => adder11_output_int(10),
75
      carry      => c11
76
      );
77
 
78
fa09 : fulladder
79
   port map (
80
      addend     => addend_11bit(09),
81
      augend     => augend_11bit(09),
82
      carry_in   => c09,
83
      sum        => adder11_output_int(09),
84
      carry      => c10
85
      );
86
 
87
fa08 : fulladder
88
   port map (
89
      addend     => addend_11bit(08),
90
      augend     => augend_11bit(08),
91
      carry_in   => c08,
92
      sum        => adder11_output_int(08),
93
      carry      => c09
94
      );
95
 
96
fa07 : fulladder
97
   port map (
98
      addend     => addend_11bit(07),
99
      augend     => augend_11bit(07),
100
      carry_in   => c07,
101
      sum        => adder11_output_int(07),
102
      carry      => c08
103
      );
104
 
105
fa06 : fulladder
106
   port map (
107
      addend     => addend_11bit(06),
108
      augend     => augend_11bit(06),
109
      carry_in   => c06,
110
      sum        => adder11_output_int(06),
111
      carry      => c07
112
      );
113
 
114
fa05 : fulladder
115
   port map (
116
      addend     => addend_11bit(05),
117
      augend     => augend_11bit(05),
118
      carry_in   => c05,
119
      sum        => adder11_output_int(05),
120
      carry      => c06
121
      );
122
 
123
fa04 : fulladder
124
   port map (
125
      addend     => addend_11bit(04),
126
      augend     => augend_11bit(04),
127
      carry_in   => c04,
128
      sum        => adder11_output_int(04),
129
      carry      => c05
130
      );
131
 
132
fa03 : fulladder
133
   port map (
134
      addend     => addend_11bit(03),
135
      augend     => augend_11bit(03),
136
      carry_in   => c03,
137
      sum        => adder11_output_int(03),
138
      carry      => c04
139
      );
140
 
141
fa02 : fulladder
142
   port map (
143
      addend     => addend_11bit(02),
144
      augend     => augend_11bit(02),
145
      carry_in   => c02,
146
      sum        => adder11_output_int(02),
147
      carry      => c03
148
      );
149
 
150
fa01 : fulladder
151
   port map (
152
      addend     => addend_11bit(01),
153
      augend     => augend_11bit(01),
154
      carry_in   => c01,
155
      sum        => adder11_output_int(01),
156
      carry      => c02
157
      );
158
 
159
fa00 : fulladder
160
   port map (
161
      addend     => addend_11bit(00),
162
      augend     => augend_11bit(00),
163
      carry_in   => c00,
164
      sum        => adder11_output_int(00),
165
      carry      => c01
166
      );
167
 
168
end structural;

powered by: WebSVN 2.1.0

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