Forum Discussion
Altera_Forum
Honored Contributor
18 years agoI missed this when I first looked at the code, but I'm not sure what is supposed to happen when L=0 and M=0. I thought everything just held their values(like a latch does), but they hold someone else's value, in a roundabout way. Conceptually, a latch is an output that feeds back on itself and into a mux(the select line of the mux is the latch's gate). What you're describing is a cross-connect and I'm not surprised they start toggling.
Ignoring the other states, in this condition you have three nodes where Q <= S <= R <= Q <= S <= R <= etc., i.e. something that will toggle unless S = Q = R.