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

Subversion Repositories simple_fm_receiver

[/] [simple_fm_receiver/] [tags/] [VSFR_1/] [source/] [addacc.vhdl] - Blame information for rev 32

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 arif_endro
-- $Id: addacc.vhdl,v 1.1.1.1 2005-01-04 02:05:58 arif_endro Exp $
2
-------------------------------------------------------------------------------
3
-- Title       : Accumulator and Adder
4
-- Project     : FM Receiver 
5
-------------------------------------------------------------------------------
6
-- File        : addacc.vhdl
7
-- Author      : "Arif E. Nugroho" <arif_endro@yahoo.com>
8
-- Created     : 2004/10/25
9
-- Last update : 2004/11/19
10
-- Simulators  : Modelsim 6.0
11
-- Synthesizers: 
12
-- Target      : 
13
-------------------------------------------------------------------------------
14
-- Description : Accumulator used in NCO of PLL in FM Receiver
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 addacc is
26
   port (
27
    clock  : in  bit;
28
    acc    : in  bit_vector (17 downto 0);
29
    result : out bit_vector (17 downto 0);
30
    offset : in  bit_vector (17 downto 0)
31
    );
32
end addacc;
33
 
34
architecture structural of addacc is
35
   component adder_18bit
36
      port (
37
      addend_18bit   : in  bit_vector (17 downto 0);
38
      augend_18bit   : in  bit_vector (17 downto 0);
39
      adder18_output : out bit_vector (17 downto 0)
40
      );
41
   end component;
42
 
43
signal result_adder01     : bit_vector (17 downto 0);
44
signal result_adder02     : bit_vector (17 downto 0);
45
signal result_adder02_reg : bit_vector (17 downto 0);
46
 
47
begin
48
adder01 : adder_18bit
49
  port map (
50
  addend_18bit     => offset,
51
  augend_18bit     => acc,
52
  adder18_output   => result_adder01
53
  );
54
adder02 : adder_18bit
55
  port map (
56
  addend_18bit     => result_adder01,
57
  augend_18bit     => result_adder02_reg,
58
  adder18_output   => result_adder02
59
  );
60
  process (clock)
61
  begin
62
          if ((clock = '1') and clock'event) then
63
                  result_adder02_reg <= result_adder02;
64
                  result <= result_adder02;
65
          end if;
66
  end process;
67
end structural;

powered by: WebSVN 2.1.0

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