Altera_Forum
Honored Contributor
9 years agoPLL on Altera DE3 Development Board doenst work
Hello everyone,
im using the developement board altera DE3 (Stratix III , EP3SL150f1152C2N) for my master thesis. Im trying to use a PLL to get a higher clock. Therefor im using the internal 50 MHz clock as an input. Im using Quartus II 11.0 SP 1 for programming. I used QSYS --> PLL --> Avalon ALTPLL to generate the required PLL files. I want to use the higher clock rate to toggle an LED as a test. I used this code for this.library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
Entity Test8 is
PORT(
CLK : in std_logic;
LEDG : out std_logic:='1';
DB0 : out std_logic;
DB1 : out std_logic
);
end Entity Test8;
architecture Behavioral of Test8 is
Component PLL is
PORT(
clk : in std_logic;
locked : out std_logic;
c0 : out std_logic
);
End Component;
SIGNAL CLK_100 : std_logic;
Begin
PLL_inst : PLL PORT MAP(CLK, OPEN, CLK_100 );
DB0 <= CLK;
DB1 <= CLK_100;
process(CLK_100)
Variable cnt : integer :=0;
begin
if (CLK_100'event and CLK_100='1') then
cnt:=cnt+1;
if (cnt=100000000) then
LEDG <= '1';
elsif (cnt=200000000) then
LEDG <= '0';
cnt:=0;
end if;
end if;
end process;
End Behavioral;
and -- PLL.vhd
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
entity PLL is
Port(
clk : in std_logic :='0';
locked : out std_logic :='0';
c0 : out std_logic
);
end entity PLL;
architecture rtl of PLL is
component PLL_altpll_0 is
port (
clk : in std_logic := 'X'; -- clk
reset : in std_logic := 'X'; -- reset
read : in std_logic := 'X'; -- read
write : in std_logic := 'X'; -- write
address : in std_logic_vector(1 downto 0) := (others => 'X'); -- address
readdata : out std_logic_vector(31 downto 0); -- readdata
writedata : in std_logic_vector(31 downto 0) := (others => 'X'); -- writedata
c0 : out std_logic; -- clk
areset : in std_logic := 'X'; -- export
locked : out std_logic; -- export
phasedone : out std_logic -- export
);
end component PLL_altpll_0;
begin
altpll_0 : component PLL_altpll_0
port map (
clk => open, -- inclk_interface.clk
reset => open, -- inclk_interface_reset.reset
read => open, -- pll_slave.read
write => open, -- .write
address => open, -- .address
readdata => open, -- .readdata
writedata => open, -- .writedata
c0 => open, -- c0.clk
areset => open, -- areset_conduit.export
locked => open, -- locked_conduit.export
phasedone => open -- phasedone_conduit.export
);
end architecture rtl; -- of PLL
I can compile the project, the output DB0 gets the internal 50 MHz clock (checked with oscilloscope) but there is no signal on DB1 which means the PLL generates no signal at all. The LED keeps lit. Thanks in advance!