Skip to content

Instantly share code, notes, and snippets.

@semyonf
Last active April 12, 2017 17:11
Show Gist options
  • Save semyonf/0a44e4bd426c9ac4622cdaf30e3abd53 to your computer and use it in GitHub Desktop.
Save semyonf/0a44e4bd426c9ac4622cdaf30e3abd53 to your computer and use it in GitHub Desktop.
Асинхронный T-RS триггер на VHDL
library ieee;
use ieee.std_logic_1164.all;
entity trstr_vhdl is
port(t,s,r :in std_logic;
q,qi :out std_logic);
end trstr_vhdl;
architecture behaviour of trstr_vhdl is
signal Qtemp:std_logic := 'X';
begin
q<=Qtemp;
qi<=not Qtemp;
process(t, r, s)
begin
--wait until r = '0';
if r='0' then
Qtemp<='0';
elsif (t'event and t='1') then
Qtemp<=not(Qtemp);
end if;
end process;
end behaviour;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment