~ruther/vhdl-spi-2

ref: 8d761360cbb661e8c9aa3ade570d30c31b1d79d4 vhdl-spi-2/hdl_spi/src/rs_latch.vhd -rw-r--r-- 491 bytes
8d761360 — Rutherther feat: implement spi model narrow sck check 1 year, 1 day ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
library ieee;
use ieee.std_logic_1164.all;

entity rs_latch is

  port (
    reset_i : in  std_logic;
    set_i   : in  std_logic;
    q_o     : out std_logic);

end entity rs_latch;

architecture a1 of rs_latch is
  signal q : std_logic;
begin  -- architecture a1

  data: process (all) is
  begin  -- process data
    if set_i = '1' then
      q <= '1';
    elsif reset_i = '1' then
      q <= '0';
    else
      q <= q;
    end if;
  end process data;

  q_o <= q;

end architecture a1;