Skip to content

Instantly share code, notes, and snippets.

@oleander
Created February 6, 2011 16:06
Show Gist options
  • Save oleander/813463 to your computer and use it in GitHub Desktop.
Save oleander/813463 to your computer and use it in GitHub Desktop.
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use work.mypackage.all;
entity ftr is
port (
clk, reset, t : in std_logic;
q : out std_logic
) ;
end entity; -- ftr
architecture arch of ftr is
signal i, q_inner : std_logic;
begin
runner : process(clk)
begin
if(clk = '1' and clk'event and reset = '1') then
q_inner <= '0';
else
q_inner <= q_inner xor t;
end if;
end process;
ss0 : fd port map(clk, q_inner, q); -- Här är D-vippan
end architecture; -- arch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment