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

Subversion Repositories leros

[/] [leros/] [trunk/] [vhdl/] [altera/] [cyc_pll.vhd] - Blame information for rev 5

Go to most recent revision | 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
 
25
LIBRARY ieee;
26
USE ieee.std_logic_1164.all;
27
 
28
LIBRARY altera_mf;
29
USE altera_mf.altera_mf_components.all;
30
 
31
ENTITY pll IS
32
        generic (multiply_by : natural; divide_by : natural);
33
        PORT
34
        (
35
                inclk0          : IN STD_LOGIC  := '0';
36
                c0              : OUT STD_LOGIC
37
        );
38
END pll;
39
 
40
 
41
ARCHITECTURE SYN OF pll IS
42
 
43
        SIGNAL sub_wire0        : STD_LOGIC_VECTOR (5 DOWNTO 0);
44
        SIGNAL sub_wire1        : STD_LOGIC ;
45
        SIGNAL sub_wire2        : STD_LOGIC ;
46
        SIGNAL sub_wire3        : STD_LOGIC_VECTOR (1 DOWNTO 0);
47
        SIGNAL sub_wire4_bv     : BIT_VECTOR (0 DOWNTO 0);
48
        SIGNAL sub_wire4        : STD_LOGIC_VECTOR (0 DOWNTO 0);
49
 
50
 
51
 
52
        COMPONENT altpll
53
        GENERIC (
54
                clk0_duty_cycle         : NATURAL;
55
                lpm_type                : STRING;
56
                clk0_multiply_by                : NATURAL;
57
                inclk0_input_frequency          : NATURAL;
58
                clk0_divide_by          : NATURAL;
59
                pll_type                : STRING;
60
                clk0_time_delay         : STRING;
61
                intended_device_family          : STRING;
62
                operation_mode          : STRING;
63
                compensate_clock                : STRING;
64
                clk0_phase_shift                : STRING
65
        );
66
        PORT (
67
                        inclk   : IN STD_LOGIC_VECTOR (1 DOWNTO 0);
68
                        clk     : OUT STD_LOGIC_VECTOR (5 DOWNTO 0)
69
        );
70
        END COMPONENT;
71
 
72
BEGIN
73
        sub_wire4_bv(0 DOWNTO 0) <= "0";
74
        sub_wire4    <= To_stdlogicvector(sub_wire4_bv);
75
        sub_wire1    <= sub_wire0(0);
76
        c0    <= sub_wire1;
77
        sub_wire2    <= inclk0;
78
        sub_wire3    <= sub_wire4(0 DOWNTO 0) & sub_wire2;
79
 
80
        altpll_component : altpll
81
        GENERIC MAP (
82
                clk0_duty_cycle => 50,
83
                lpm_type => "altpll",
84
                clk0_multiply_by => multiply_by,
85
                inclk0_input_frequency => 50000,        -- 20MHz = 50000ps
86
                clk0_divide_by => divide_by,
87
                pll_type => "AUTO",
88
                clk0_time_delay => "0",
89
                intended_device_family => "Cyclone",
90
                operation_mode => "NORMAL",
91
                compensate_clock => "CLK0",
92
                clk0_phase_shift => "0"
93
        )
94
        PORT MAP (
95
                inclk => sub_wire3,
96
                clk => sub_wire0
97
        );
98
 
99
 
100
 
101
END SYN;
102
 

powered by: WebSVN 2.1.0

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