architecture ALG_MOD2 of JKFF is begin process(CLK,S,R) variable QTEMP : BIT; begin if S = '1' and R = '0' then QTEMP := '1'; Q <= QTEMP after SRDEL; QN <= not QTEMP after SRDEL; elsif S = '0' and R = '1' then QTEMP := '0'; Q <= QTEMP after SRDEL; QN <= not QTEMP after SRDEL; elsif CLK'EVENT and CLK = '1' and S='0' and R='0' then if J = '1' and K = '0' then QTEMP := '1'; Q <= QTEMP after CLKDEL; QN <= not QTEMP after CLKDEL; elsif J = '0' and K ='1' then QTEMP := '0'; Q <= QTEMP after CLKDEL; QN <= not QTEMP after CLKDEL; elsif J= '1' and K= '1' then QTEMP := QTEMP; Q <= QTEMP after CLKDEL; QN <= not QTEMP after CLKDEL; end if; end if; end process; end ALG_MOD2;