Re: Confusion between tick/tock and times
Posted by
cadet1620 on
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/Confusion-between-tick-tock-and-times-tp4026166p4026193.html
gs99 wrote
On one web site, the symbol for a falling edge DFF has a small circle on outside of DFF (touching the clock triangle).
In Logisim, the DFF symbol does not have that circle, but it operates as falling edge.
I made a Logisim D Flip-Flop as shown in play-hookey.com; it behaves in the same way.
And apparently Hardware Simulator is negative also.
Are there any advantages of either - positive or negative?
The standard symbology uses the presence or absence of the triangle inside the symbol to indicate edge vs. level triggered. The small circle means falling edge or false level triggering. No circle, positive edge or true level trigger.
You can set Logisim's flip-flops to any of the above four triggering options, but it doesn't change its symbol.
There's a lot of intricate timing involved in real hardware. Having both positive and negative edge triggered logic available lets the designer achieve the timing needed for a reliable design at highest possible speeds. There was one chip designed for use in magnetic media read circuits that was "dual edge" triggered; both positive and negative clock edges latched data into the chip.
2. How does CLK on these diagrams relate to the "tick" and "tock" of Hardware Simulator?
Evidently "tock, output;" represents the out status after CLK goes from 1 to 0.
That's the important clock event.
The Hardware Simulator is by no means a simulator of real hardware, it is a
theoretical simulation of idealized synchronous sequential circuits. Trying to relate its behavior to real hardware is nonsensical.
3. It's misleading to say we set an input at time t+ (tick) or at time t (tock), such as:
cadet1620 wrote
When we set an input at time t (tock).
The Hardware Simulator only has two discrete time quanta, tick and tock, so those are the only times that the "set" command can be applied.
If you care to take a look at it, here is a bi-directional edge triggered flip-flop implemented in Logisim.
bi-edge-ff.zip--Mark