y7wu
Newbie level 6
stratix ii high frequency sine
Hi there,
We're trying to generate a 50Mhz square wave clock on the Altera Stratix II to send to an off-board chip.
The way we're doing this right now is using the on board 100Mhz crystal oscillator and implementing using the following VHDL block. where in_clk is the 100Mhz crystal oscillator and wave_clk is the output (supposedly 50Mhz square wave)
architecture square_wave of square_wave_test is
signal wave_clk : std_logic;
signal count : unsigned ( 2 downto 0);
begin
process(in_clk)
begin
if rising_edge(in_clk) then
wave_clk <= not wave_clk;
end if;
end process;
process(wave_clk)
begin
if wave_clk = '1' then
out_pin_array <= "11111111111111";
else
out_pin_array <= "00000000000000";
end if;
end process;
end square_wave;
The problem is that we're getting a waveform thats not like a square wave at all. (see attached image).
We suspect the 100Mhz oscillator (which is a sine wave) is unable to replicate the higher frequency component of a square wave.
It could also be our probe, but the bandwidth of our probe is 500Mhz (Agilent 10073C) see
http://www.home.agilent.com/agilent/product.jspx?nid=-536902770.536879135.00&cc=US&lc=eng
so we're ruling out the probe as potential issue.
How would you generate a 50Mhz square wave clock? Is it better if we use the PLL, but wouldnt that generate sinewaves as well? How do I know if the output pin can be switched at such high frequency?
Thank you.
Hi there,
We're trying to generate a 50Mhz square wave clock on the Altera Stratix II to send to an off-board chip.
The way we're doing this right now is using the on board 100Mhz crystal oscillator and implementing using the following VHDL block. where in_clk is the 100Mhz crystal oscillator and wave_clk is the output (supposedly 50Mhz square wave)
architecture square_wave of square_wave_test is
signal wave_clk : std_logic;
signal count : unsigned ( 2 downto 0);
begin
process(in_clk)
begin
if rising_edge(in_clk) then
wave_clk <= not wave_clk;
end if;
end process;
process(wave_clk)
begin
if wave_clk = '1' then
out_pin_array <= "11111111111111";
else
out_pin_array <= "00000000000000";
end if;
end process;
end square_wave;
The problem is that we're getting a waveform thats not like a square wave at all. (see attached image).
We suspect the 100Mhz oscillator (which is a sine wave) is unable to replicate the higher frequency component of a square wave.
It could also be our probe, but the bandwidth of our probe is 500Mhz (Agilent 10073C) see
http://www.home.agilent.com/agilent/product.jspx?nid=-536902770.536879135.00&cc=US&lc=eng
so we're ruling out the probe as potential issue.
How would you generate a 50Mhz square wave clock? Is it better if we use the PLL, but wouldnt that generate sinewaves as well? How do I know if the output pin can be switched at such high frequency?
Thank you.