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

Subversion Repositories all_digital_fm_receiver

[/] [all_digital_fm_receiver/] [trunk/] [circuit.vhd] - Blame information for rev 7

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

Line No. Rev Author Line
1 2 rahmatulla
LIBRARY ieee;
2
USE ieee.std_logic_1164.all;
3
USE IEEE.numeric_std.ALL;
4
 
5
 
6
 
7
ENTITY circuit IS
8
-- Declarations
9
 PORT(
10
      clk               : IN            std_logic;
11
      reset     : IN    std_logic;
12
                fmin  : IN              std_logic_vector(7 downto 0);
13
      dmout : OUT   std_logic_vector (11 DOWNTO 0)
14
   );
15
END circuit ;
16
 
17
 
18
ARCHITECTURE behavior OF circuit IS
19
 
20
   -- Architecture declarations
21
 
22
   -- Internal signal declarations
23
   SIGNAL d1     : signed(11 DOWNTO 0);
24
   SIGNAL d2     : signed(11 DOWNTO 0);
25
   SIGNAL dout   : signed(7 DOWNTO 0);
26
   SIGNAL output : signed(7 DOWNTO 0);
27
 
28
 
29
 
30
   -- Component Declarations
31
   COMPONENT multiplier
32
   PORT (
33
                        clk             : IN     std_logic ;
34
      reset     : IN     std_logic ;
35
                        input1  : IN     std_logic_vector (7 DOWNTO 0);
36
      input2    : IN     signed (7 DOWNTO 0);
37
      output    : OUT    signed (7 DOWNTO 0)
38
   );
39
   END COMPONENT;
40
   COMPONENT fir
41
   PORT (
42
      clock    : IN     std_logic ;
43
      reset    : IN     std_logic ;
44
      data_in  : IN     signed (11 DOWNTO 0);
45
      data_out : OUT    std_logic_vector (11 DOWNTO 0)
46
   );
47
   END COMPONENT;
48
   COMPONENT loop_filter
49
   PORT (
50
      clk   : IN     std_logic ;
51
      reset : IN     std_logic ;
52
      c     : IN     signed (7 DOWNTO 0);
53
      d1    : OUT    signed (11 DOWNTO 0);
54
      d2    : OUT    signed (11 DOWNTO 0)
55
   );
56
   END COMPONENT;
57
   COMPONENT nco
58
   PORT (
59
      clk   : IN     std_logic ;
60
      reset : IN     std_logic ;
61
      din   : IN     signed (11 DOWNTO 0);
62
      dout  : OUT    signed (7 DOWNTO 0)
63
   );
64
   END COMPONENT;
65
 
66
 
67
BEGIN
68
   -- Instance port mappings.
69
   I1 : multiplier
70
      PORT MAP (
71
           clk => clk,
72
         reset => reset,
73
         input1 => fmin,
74
         input2 => dout,
75
         output => output
76
      );
77
   I4 : fir
78
      PORT MAP (
79
         clock    => clk,
80
         reset    => reset,
81
         data_in  => d1,
82
         data_out => dmout
83
      );
84
   I3 : loop_filter
85
      PORT MAP (
86
         clk   => clk,
87
         reset => reset,
88
         c     => output,
89
         d1    => d1,
90
         d2    => d2
91
      );
92
   I2 : nco
93
      PORT MAP (
94
         clk   => clk,
95
         reset => reset,
96
         din   => d2,
97
         dout  => dout
98
      );
99
 
100
 
101
   END behavior;

powered by: WebSVN 2.1.0

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