根据真值表的描述结合VHDL编程思想很好实现你想要的程序;
程序并不难,关键是你用心的程度;
我猜你也许也是一名我的同行……
自己的努力才是过硬的本领!!!!
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
ENTITY RS_clk IS
PORT( S,R,res :IN std_logic;
Q,NOT_Q:out std_logic);
END RS_clk;
ARCHITECTURE behav OF RS_clk IS
signal sel1,sel2: std_logic;
BEGIN
process(res,sel1,sel2)
begin
if res='0' then sel1<='0';
sel2<='1';
elsif (S='1' and R='0') then sel1<='1';
sel2<='0';
elsif (S='0' and R='1') then sel1<='0';
sel2<='1';
elsif (S='0' and R='0') then sel1<=sel1;
sel2<=sel2;
end if;
Q<=sel1;
NOT_Q<=sel2;
end process;
END behav;