Professional Documents
Culture Documents
LOGIC DIAGRAM:-
TRUTH TABLE:-
PROGRAM:-
Library IEEE;
Use IEEE.STD_LOGIC_1164.ALL;
Use IEEE.STD_LOGIC_ARITH.ALL;
Use IEEE.STD_LOGIC_UNSIGNED.ALL;
Entity srff is
Port (s,r.clk:in bit;
Q,qbar:out bit);
End srff;
Architecture behavioral of srff is
Begin
Process (s,r)
Begin
Assert (s=’1’ nand r=’1’)
Report “undefined o/p”;
1
If s=’1’ then
Q<=’1’;
Elsif r=’1’ then
Q<=’0’;
Else
Q<=’x’;
End if
end process;
Qbar<=not q;
End behavioral;
RTL VIEW:-
WAVE FORM:-