Just wondering if there's a more efficient way of creating two phase shifted signals which are going to be used later for sampling. Also, is it possible to create a phase shifted signal running at the maximum frequency of the clock? my guess is no, but maybe i'm wrong.
here's what i came up with.
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
-- Uncomment the following lines to use the declarations that are
-- provided for instantiating Xilinx primitive components.
--library UNISIM;
--use UNISIM.VComponents.all;
entity phase_shift is
Port ( clock : in std_logic;
clock_out : out std_logic; --NOTE: phase shifted and non-phase shifted clocks
clock_out90 : out std_logic); --are half the frequency of the clock.
end phase_shift;
architecture Behavioral of phase_shift is
signal sig1 : std_logic := '0';
signal sig2 : std_logic := '0';
begin
no_phase_shiftrocess(clock)
begin
-- sig1 <= clock; doesn't work
if clock'event and clock = '0' then
sig1 <= not sig1;
else
sig1 <= sig1;
end if;
end process;
clock_out <= sig1;
phase_shiftrocess(clock)
begin
-- sig2 <= clock; doesn't work
if clock'event and clock='1' then
sig2 <= not sig2;
else
sig2 <= sig2;
end if;
end process;
clock_out90 <= sig2;
end Behavioral;
here's what i came up with.
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
-- Uncomment the following lines to use the declarations that are
-- provided for instantiating Xilinx primitive components.
--library UNISIM;
--use UNISIM.VComponents.all;
entity phase_shift is
Port ( clock : in std_logic;
clock_out : out std_logic; --NOTE: phase shifted and non-phase shifted clocks
clock_out90 : out std_logic); --are half the frequency of the clock.
end phase_shift;
architecture Behavioral of phase_shift is
signal sig1 : std_logic := '0';
signal sig2 : std_logic := '0';
begin
no_phase_shiftrocess(clock)
begin
-- sig1 <= clock; doesn't work
if clock'event and clock = '0' then
sig1 <= not sig1;
else
sig1 <= sig1;
end if;
end process;
clock_out <= sig1;
phase_shiftrocess(clock)
begin
-- sig2 <= clock; doesn't work
if clock'event and clock='1' then
sig2 <= not sig2;
else
sig2 <= sig2;
end if;
end process;
clock_out90 <= sig2;
end Behavioral;