Skip to content

Instantly share code, notes, and snippets.

@hughesjs
Created April 29, 2020 17:40
Show Gist options
  • Save hughesjs/447517619a4a62eb82885e7762159e3f to your computer and use it in GitHub Desktop.
Save hughesjs/447517619a4a62eb82885e7762159e3f to your computer and use it in GitHub Desktop.
39 io_sync: process(clk, rst)
40 begin
41 if (rst = '1') then
42 io_pipe <= (others => '0');
43 elsif (rising_edge(clk)) then
44 io_pipe(0) <= dri; -- Add new value to start of queue
45 io_pipe <= io_pipe(io_pipe_len - 1 downto 0) & '0' ; --Left shift whole queue
46 if (io_pipe(io_pipe_len) = '1') then
47 if (filter_counter < io_delay) then
48 filter_counter <= filter_counter + 1;
49 else
50 filter_counter <= io_delay;
51 dfo <= '1';
52 end if;
53 else
54 if (filter_counter > 0) then
55 filter_counter <= filter_counter - 1;
56 else
57 filter_counter <= 0;
58 dfo <= '0';
59 end if;
60 end if;
61 end if;
62
63 end process;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment