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

Subversion Repositories leros

[/] [leros/] [trunk/] [vhdl/] [altera/] [cyc2_pll.vhd] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 martin
--
2
--
3
--  This file is a part of JOP, the Java Optimized Processor
4
--
5
--  Copyright (C) 2001-2008, Martin Schoeberl (martin@jopdesign.com)
6
--
7
--  This program is free software: you can redistribute it and/or modify
8
--  it under the terms of the GNU General Public License as published by
9
--  the Free Software Foundation, either version 3 of the License, or
10
--  (at your option) any later version.
11
--
12
--  This program is distributed in the hope that it will be useful,
13
--  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
--  GNU General Public License for more details.
16
--
17
--  You should have received a copy of the GNU General Public License
18
--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
--
20
 
21
 
22
 
23
-- as generated by the wizzard and added generic
24
-- used by altde2 board with Cyclone II
25
-- clock 2 is 180 degree phase shifted, but that's only
26
-- true when the frequency is set to 100 MHz (factor 5) 
27
 
28
LIBRARY ieee;
29
USE ieee.std_logic_1164.all;
30
 
31
LIBRARY altera_mf;
32
USE altera_mf.all;
33
 
34
ENTITY pll IS
35
        generic (multiply_by : natural; divide_by : natural);
36
        PORT
37
        (
38
                inclk0          : IN STD_LOGIC  := '0';
39
                c0              : OUT STD_LOGIC ;
40
                c1              : OUT STD_LOGIC ;
41
                locked          : OUT STD_LOGIC
42
        );
43
END pll;
44
 
45
ARCHITECTURE SYN OF pll IS
46
 
47
        SIGNAL sub_wire0        : STD_LOGIC_VECTOR (5 DOWNTO 0);
48
        SIGNAL sub_wire1        : STD_LOGIC ;
49
        SIGNAL sub_wire2        : STD_LOGIC ;
50
        SIGNAL sub_wire3        : STD_LOGIC ;
51
        SIGNAL sub_wire4        : STD_LOGIC ;
52
        SIGNAL sub_wire5        : STD_LOGIC_VECTOR (1 DOWNTO 0);
53
        SIGNAL sub_wire6_bv     : BIT_VECTOR (0 DOWNTO 0);
54
        SIGNAL sub_wire6        : STD_LOGIC_VECTOR (0 DOWNTO 0);
55
 
56
 
57
 
58
        COMPONENT altpll
59
        GENERIC (
60
                clk0_divide_by          : NATURAL;
61
                clk0_duty_cycle         : NATURAL;
62
                clk0_multiply_by                : NATURAL;
63
                clk0_phase_shift                : STRING;
64
                clk1_divide_by          : NATURAL;
65
                clk1_duty_cycle         : NATURAL;
66
                clk1_multiply_by                : NATURAL;
67
                clk1_phase_shift                : STRING;
68
                compensate_clock                : STRING;
69
                gate_lock_signal                : STRING;
70
                inclk0_input_frequency          : NATURAL;
71
                intended_device_family          : STRING;
72
                invalid_lock_multiplier         : NATURAL;
73
                lpm_hint                : STRING;
74
                lpm_type                : STRING;
75
                operation_mode          : STRING;
76
                port_activeclock                : STRING;
77
                port_areset             : STRING;
78
                port_clkbad0            : STRING;
79
                port_clkbad1            : STRING;
80
                port_clkloss            : STRING;
81
                port_clkswitch          : STRING;
82
                port_configupdate               : STRING;
83
                port_fbin               : STRING;
84
                port_inclk0             : STRING;
85
                port_inclk1             : STRING;
86
                port_locked             : STRING;
87
                port_pfdena             : STRING;
88
                port_phasecounterselect         : STRING;
89
                port_phasedone          : STRING;
90
                port_phasestep          : STRING;
91
                port_phaseupdown                : STRING;
92
                port_pllena             : STRING;
93
                port_scanaclr           : STRING;
94
                port_scanclk            : STRING;
95
                port_scanclkena         : STRING;
96
                port_scandata           : STRING;
97
                port_scandataout                : STRING;
98
                port_scandone           : STRING;
99
                port_scanread           : STRING;
100
                port_scanwrite          : STRING;
101
                port_clk0               : STRING;
102
                port_clk1               : STRING;
103
                port_clk2               : STRING;
104
                port_clk3               : STRING;
105
                port_clk4               : STRING;
106
                port_clk5               : STRING;
107
                port_clkena0            : STRING;
108
                port_clkena1            : STRING;
109
                port_clkena2            : STRING;
110
                port_clkena3            : STRING;
111
                port_clkena4            : STRING;
112
                port_clkena5            : STRING;
113
                port_extclk0            : STRING;
114
                port_extclk1            : STRING;
115
                port_extclk2            : STRING;
116
                port_extclk3            : STRING;
117
                valid_lock_multiplier           : NATURAL
118
        );
119
        PORT (
120
                        clk     : OUT STD_LOGIC_VECTOR (5 DOWNTO 0);
121
                        inclk   : IN STD_LOGIC_VECTOR (1 DOWNTO 0);
122
                        locked  : OUT STD_LOGIC
123
        );
124
        END COMPONENT;
125
 
126
BEGIN
127
        sub_wire6_bv(0 DOWNTO 0) <= "0";
128
        sub_wire6    <= To_stdlogicvector(sub_wire6_bv);
129
        sub_wire3    <= sub_wire0(0);
130
        sub_wire1    <= sub_wire0(1);
131
        c1    <= sub_wire1;
132
        locked    <= sub_wire2;
133
        c0    <= sub_wire3;
134
        sub_wire4    <= inclk0;
135
        sub_wire5    <= sub_wire6(0 DOWNTO 0) & sub_wire4;
136
 
137
        altpll_component : altpll
138
        GENERIC MAP (
139
                clk0_divide_by => divide_by,
140
                clk0_duty_cycle => 50,
141
                clk0_multiply_by => multiply_by,
142
                clk0_phase_shift => "0",
143
                clk1_divide_by => divide_by,
144
                clk1_duty_cycle => 50,
145
                clk1_multiply_by => multiply_by,
146
                clk1_phase_shift => "5000", -- this is in ps, and shall be an inverted clock
147
                compensate_clock => "CLK0",
148
                gate_lock_signal => "NO",
149
                inclk0_input_frequency => 20000, -- 50 Mhz = 20000 ps
150
                intended_device_family => "Cyclone II",
151
                invalid_lock_multiplier => 5,
152
                lpm_hint => "CBX_MODULE_PREFIX=pll2",
153
                lpm_type => "altpll",
154
                operation_mode => "NORMAL",
155
                port_activeclock => "PORT_UNUSED",
156
                port_areset => "PORT_UNUSED",
157
                port_clkbad0 => "PORT_UNUSED",
158
                port_clkbad1 => "PORT_UNUSED",
159
                port_clkloss => "PORT_UNUSED",
160
                port_clkswitch => "PORT_UNUSED",
161
                port_configupdate => "PORT_UNUSED",
162
                port_fbin => "PORT_UNUSED",
163
                port_inclk0 => "PORT_USED",
164
                port_inclk1 => "PORT_UNUSED",
165
                port_locked => "PORT_USED",
166
                port_pfdena => "PORT_UNUSED",
167
                port_phasecounterselect => "PORT_UNUSED",
168
                port_phasedone => "PORT_UNUSED",
169
                port_phasestep => "PORT_UNUSED",
170
                port_phaseupdown => "PORT_UNUSED",
171
                port_pllena => "PORT_UNUSED",
172
                port_scanaclr => "PORT_UNUSED",
173
                port_scanclk => "PORT_UNUSED",
174
                port_scanclkena => "PORT_UNUSED",
175
                port_scandata => "PORT_UNUSED",
176
                port_scandataout => "PORT_UNUSED",
177
                port_scandone => "PORT_UNUSED",
178
                port_scanread => "PORT_UNUSED",
179
                port_scanwrite => "PORT_UNUSED",
180
                port_clk0 => "PORT_USED",
181
                port_clk1 => "PORT_USED",
182
                port_clk2 => "PORT_UNUSED",
183
                port_clk3 => "PORT_UNUSED",
184
                port_clk4 => "PORT_UNUSED",
185
                port_clk5 => "PORT_UNUSED",
186
                port_clkena0 => "PORT_UNUSED",
187
                port_clkena1 => "PORT_UNUSED",
188
                port_clkena2 => "PORT_UNUSED",
189
                port_clkena3 => "PORT_UNUSED",
190
                port_clkena4 => "PORT_UNUSED",
191
                port_clkena5 => "PORT_UNUSED",
192
                port_extclk0 => "PORT_UNUSED",
193
                port_extclk1 => "PORT_UNUSED",
194
                port_extclk2 => "PORT_UNUSED",
195
                port_extclk3 => "PORT_UNUSED",
196
                valid_lock_multiplier => 1
197
        )
198
        PORT MAP (
199
                inclk => sub_wire5,
200
                clk => sub_wire0,
201
                locked => sub_wire2
202
        );
203
 
204
 
205
 
206
END SYN;
207
 

powered by: WebSVN 2.1.0

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