Altera_Forum
Honored Contributor
13 years agoSR flipflop problem
Hi. I made a SR ff code, and compile is done well.
but when i simulated this code.... It looks different from what i made. (p.s please don't say that use the D flipflip!! I just want to know what the problem is in my code!! Thanks!) this is code LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; ENTITY flip is PORT( s, r : in std_logic; q, nq : inout std_logic); end flip; ARCHITECTURE arc of flip is begin process(q,s,r) begin if(s='1' and r ='1') then q<='1'; nq<='1'; else nq<= s xor q; q<= r xor nq; end if; end process; end arc; and this is simulation image!! http://image.kilho.net/?pk=1013878&from=web (p.s is there anyone who know how to insert the image in here?)