Line 59... |
Line 59... |
variable cycle_wait_oversample : STD_LOGIC_VECTOR ((nBitsLarge-1) downto 0);
|
variable cycle_wait_oversample : STD_LOGIC_VECTOR ((nBitsLarge-1) downto 0);
|
begin
|
begin
|
if rst = '1' then
|
if rst = '1' then
|
wait_clk_cycles := (others => '0');
|
wait_clk_cycles := (others => '0');
|
|
|
-- Divide cycle_wait by 4
|
-- Divide cycle_wait by 8
|
--cycle_wait_oversample := '0' & cycle_wait(cycle_wait'high downto 1);
|
--cycle_wait_oversample := '0' & cycle_wait(cycle_wait'high downto 1);
|
--cycle_wait_oversample := '0' & cycle_wait_oversample(cycle_wait_oversample'high downto 1);
|
--cycle_wait_oversample := '0' & cycle_wait_oversample(cycle_wait_oversample'high downto 1);
|
cycle_wait_oversample := "00" & cycle_wait(cycle_wait'high downto 2); -- Shift right by 2
|
--cycle_wait_oversample := '0' & cycle_wait_oversample(cycle_wait_oversample'high downto 1);
|
|
cycle_wait_oversample := "000" & cycle_wait(cycle_wait'high downto 3); -- Shift right by 3
|
|
|
|
|
-- Half of cycle_wait_oversample
|
-- Half of cycle_wait_oversample
|
half_cycle := '0' & cycle_wait_oversample(cycle_wait_oversample'high downto 1); -- Shift right by 1
|
half_cycle := '0' & cycle_wait_oversample(cycle_wait_oversample'high downto 1); -- Shift right by 1
|
genTickOverSample <= '0';
|
genTickOverSample <= '0';
|
Line 84... |
Line 85... |
end if;
|
end if;
|
end if;
|
end if;
|
|
|
-- Avoid creation of transparent latch (By default the VHDL will create an register for vectors that are assigned only in one
|
-- Avoid creation of transparent latch (By default the VHDL will create an register for vectors that are assigned only in one
|
-- ocasion of a (if, case) instruction
|
-- ocasion of a (if, case) instruction
|
cycle_wait_oversample := "00" & cycle_wait(cycle_wait'high downto 2);
|
cycle_wait_oversample := "000" & cycle_wait(cycle_wait'high downto 3);
|
half_cycle := '0' & cycle_wait_oversample(cycle_wait_oversample'high downto 1);
|
half_cycle := '0' & cycle_wait_oversample(cycle_wait_oversample'high downto 1);
|
end if;
|
end if;
|
end process;
|
end process;
|
|
|
end Behavioral;
|
end Behavioral;
|