Project

General

Profile

RE: uPP receiving problem » clock.vhd

Silvano Bertoldo, 07/21/2014 11:34 AM

 
1
----------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer: 
4
-- 
5
-- Create Date:    14:44:44 03/27/2014 
6
-- Design Name: 
7
-- Module Name:    clock - Behavioral 
8
-- Project Name: 
9
-- Target Devices: 
10
-- Tool versions: 
11
-- Description: 
12
--
13
-- Dependencies: 
14
--
15
-- Revision: 
16
-- Revision 0.01 - File Created
17
-- Additional Comments: 
18
--
19
----------------------------------------------------------------------------------
20
library IEEE;
21
use IEEE.STD_LOGIC_1164.ALL;
22

    
23
-- Uncomment the following library declaration if using
24
-- arithmetic functions with Signed or Unsigned values
25
use IEEE.NUMERIC_STD.ALL;
26

    
27
-- Uncomment the following library declaration if instantiating
28
-- any Xilinx primitives in this code.
29
library UNISIM;
30
use UNISIM.VComponents.all;
31

    
32
entity core is
33
port
34
 (-- Clock in ports
35
  CLK_IN1           : in     std_logic;
36
  -- Clock out ports
37
  CLK_OUT1          : out    std_logic; -- Multiplied clock
38
  CLK_OUT2			  : out    std_logic;  -- Buffered Clock
39
  ADC_CLK_OUT		  : out 	  std_logic;
40
   -- Status and control signals
41
  RESET             : in     std_logic;
42
  INPUT_CLK_STOPPED : out    std_logic;
43
  LOCKED            : out    std_logic
44
 );
45
end core;
46

    
47
architecture clock_gen of core is
48
  attribute CORE_GENERATION_INFO : string;
49
  attribute CORE_GENERATION_INFO of clock_gen : architecture is "core,clk_wiz_v3_6,{component_name=core,use_phase_alignment=false,use_min_o_jitter=false,use_max_i_jitter=false,use_dyn_phase_shift=false,use_inclk_switchover=false,use_dyn_reconfig=false,feedback_source=FDBK_AUTO,primtype_sel=DCM_SP,num_out_clk=1,clkin1_period=151.515151515,clkin2_period=151.515151515,use_power_down=false,use_reset=true,use_locked=true,use_inclk_stopped=true,use_status=false,use_freeze=false,use_clk_valid=false,feedback_type=SINGLE,clock_mgr_type=AUTO,manual_override=false}";
50
  -- Input clock buffering / unused connectors
51
  signal clkin1            : std_logic;
52
  -- Output clock buffering
53
  signal clk_out1_internal : std_logic;
54
  signal clk_out2_internal : std_logic;
55
  signal clkfb             : std_logic;
56
  signal clkfx             : std_logic;
57
  signal clk0              : std_logic;
58
  signal clk1					: std_logic;
59
  signal clkfbout          : std_logic;
60
  signal locked_internal   : std_logic;
61
  signal status_internal   : std_logic_vector(7 downto 0);
62
  
63
begin
64

    
65

    
66
  -- Input buffering
67
  --------------------------------------
68
  clkin1_buf : IBUFG
69
  port map
70
   (O => clkin1,
71
    I => CLK_IN1);	
72
  
73
   ADC_CLK_OUT<= clkin1;
74

    
75

    
76
--  -- Clocking primitive
77
--  --------------------------------------
78
--  
79
--  -- Instantiation of the DCM primitive
80
--  --    * Unused inputs are tied off
81
--  --    * Unused outputs are labeled unused
82
  dcm_sp_inst: DCM_SP
83
  generic map
84
   (CLKDV_DIVIDE          => 2.000,
85
    CLKFX_DIVIDE          => 1,
86
    CLKFX_MULTIPLY        => 2,
87
    CLKIN_DIVIDE_BY_2     => FALSE,
88
    CLKIN_PERIOD          => 151.515151515,
89
    CLKOUT_PHASE_SHIFT    => "NONE",
90
    CLK_FEEDBACK          => "1X",
91
    DESKEW_ADJUST         => "SYSTEM_SYNCHRONOUS",
92
    PHASE_SHIFT           => 0,
93
    STARTUP_WAIT          => FALSE)
94
  port map
95
   -- Input clock
96
   (CLKIN                 => clkin1,
97
    CLKFB                 => clkfb,
98
    -- Output clocks
99
    CLK0                  => clk0,
100
    CLK90                 => open,
101
    CLK180                => open,
102
    CLK270                => open,
103
    CLK2X                 => open,
104
    CLK2X180              => open,
105
    CLKFX                 => clkfx,
106
    CLKFX180              => open,
107
    CLKDV                 => open,
108
   -- Ports for dynamic phase shift
109
    PSCLK                 => '0',
110
    PSEN                  => '0',
111
    PSINCDEC              => '0',
112
    PSDONE                => open,
113
   -- Other control and status signals
114
    LOCKED                => locked_internal,
115
    STATUS                => status_internal,
116
    RST                   => RESET,
117
   -- Unused pin, tie low
118
    DSSEN                 => '0');
119

    
120
	 INPUT_CLK_STOPPED     <= status_internal(1);
121
	 LOCKED                <= locked_internal;
122

    
123
  -- Output buffering
124
  -------------------------------------
125
  clkfb <= clk_out1_internal;
126
   
127

    
128
  clkout1_buf : BUFG
129
  port map
130
   (O   => clk_out1_internal, -- buffered
131
    I   => clk0);
132
	 
133
  clkout2_buf : BUFG
134
  port map
135
   (O   => clk_out2_internal,	-- multiplied
136
    I   => clkfx);
137

    
138
  CLK_OUT2 <= clk_out1_internal; -- buffered
139
  CLK_OUT1 <= clk_out2_internal; -- multiplied
140
  
141

    
142
end clock_gen;
143

    
144

    
145

    
146

    
147

    
148

    
149

    
150

    
151

    
152

    
153
 
(2-2/6) Go to top
Add picture from clipboard (Maximum size: 1 GB)