Understanding DFF behaviour
Posted by
jbloggz on
Apr 18, 2016; 2:50am
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/Understanding-DFF-behaviour-tp4029740.html
Hi,
I have been trying to understand the DFF behaviour and exactly how the hardware simulator "implements" it. From playing with it I can see that whatever the "in" value is when the time "ticks" (eg 4 -> 4+, rising edge?), this value will appear at "out" when the time "tocks" (eg. 4+ -> 4, falling edge?). Even if I change the value of "in" after the rising edge, this won't affect the "out" value at the falling edge.
The problem I am having is that I cannot find a physical implementation that behaves like this. I am assuming that the DFF is supposed to be
as described here. The problem is that it states on that page "the Q output always takes on the state of the D input at the moment of the clock edge". The "out" takes the value of "in" at exactly the falling edge, not what the value of "in" was at the previous rising edge.
However, I did find on
another page (look at figure 5.3.7) the exact behaviour that I was looking for, where the "out" is set at the falling edge to the "in" at the previous rising edge. Is there something different about this one that allows this behaviour?