Last active
April 12, 2017 17:11
-
-
Save semyonf/0a44e4bd426c9ac4622cdaf30e3abd53 to your computer and use it in GitHub Desktop.
Асинхронный T-RS триггер на VHDL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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