aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue2361/jkff.vhdl
blob: 0417089e23aebae649fb5de9bf9b713936ac222f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
entity jkff is
  port (
    j_n, k_n, clk : in bit;
    q, q_n : inout bit);
end entity;

architecture behavioral of jkff is
begin
  flip_flop : process (j_n, k_n, clk) is
  begin
    case j_n & k_n & clk is
      when "010" | "011" => q <= '1';
      when "100" | "101" => q <= '0';
      when "001" => q <= q_n;
      when others => q <= unaffected;
    end case;
  end process;
  q_n <= not q;
end architecture;