Library: | Memory |
Introduced: | 2.0 Beta 1 |
Appearance: | ![]() |
Behavior
Each flip-flop stores a single bit of data, which is emitted throughthe Q output on the east side. Normally, the value can becontrolled via the inputs to the west side. In particular, the valuechanges when the clock input, marked by a triangle oneach flip-flop, rises from 0 to 1 (or otherwise as configured); on this risingedge, the value changes according to the table below.
D Flip-Flop | T Flip-Flop | J-K Flip-Flop | S-R Flip-Flop | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
Another way of describing the different behavior of the flip-flopsis in English text.
D Flip-Flop: When the clock triggers, thevalue remembered by the flip-flop becomes the value of the Dinput (Data) at that instant.
T Flip-Flop: When the clock triggers, thevalue remembered by the flip-flop either toggles or remains the samedepending on whether the Tinput (Toggle) is 1 or 0.
J-K Flip-Flop: When the clock triggers,the value remembered by the flip-floptoggles if the J and K inputs are both 1and the value remains the same if both are 0;if they are different, then the value becomes 1 if the J(Jump) input is 1 and 0 if the K (Kill)input is 1.
S-R Flip-Flop: When the clock triggers,the value remembered by the flip-flopremains unchanged if R and S are both 0,becomes 0 if the R input (Reset) is 1, andbecomes 1 if the S input (Set) is 1.The behavior in unspecified if both inputs are 1.(In Logisim, the value in the flip-flop remains unchanged.)
By default, the clock triggers on a rising edge — that is, when theclock input changes from 0 to 1. However, theTrigger attribute allows this to change to a falling edge (when the clockinput changes from 1 to 0), a high level (for the duration that the clock inputis 1), or a low level (for the duration that the clock input is 0). Thelevel-trigger options are unavailable for the T and J-K flip-flops, becausea flip-flop behaves unpredictably when told to toggle for an indeterminateamount of time.
Pins
- West edge, marked by triangle (input, bit width 1)
- Clock input: At the instant that this input value switches from 0 to1 (the rising edge), the value will be updated according to the otherinputs on the west edge. As long as this remains 0 or 1, the otherinputs on the west edge have no effect.
- West edge, other labeled pin(s) (input(s), bit width 1)
- These inputs control how the flip-flop's value changes during therising edge of the clock. Their exact behavior depends on theflip-flop; the above tables summarize their behavior.
- East edge, labeled Q, north end (output, bit width 1)
- Outputs the value currently stored by the flip-flop.
- East edge, south end (output, bit width 1)
- Outputs the complement of the value currently stored by theflip-flop.
- South edge, east end (input, bit width 1)
- Asynchronous reset: When 0 or undefined, this input has no effect.As long as it is 1, the flip-flop's value is pinned to 0. This occursasynchronously - that is, without regard to the current clock inputvalue. As long as this is 1, the other inputs have no effect.
- South edge, center end (input, bit width 1)
- Enable: When this is 0, clock triggers are ignored. The current bitcontinues to appear on the output. The clock triggers are enabled when thisinput is 1 or undefined.
- South edge, west end (input, bit width 1)
- Asynchronous set: When 1 or undefined, this input has no effect.When 1, the flip-flop's value is pinned to 1. This occurs asynchronously- that is, without regard to the current clock input value. As long asthis input is 1, the other inputs have no effect, except for theasynchronous reset input, which has priority.
Attributes
- Trigger
- Configures how the clock input is interpreted. The value
rising edge
indicates that the flip-flop should update its value at the instant when theclock rises from 0 to 1. Thefalling edge
value indicates that it shouldupdate at the instant the clock falls from 1 to 0. Thehigh level
valueindicates that the flip-flop should update continuously whenever the clockinput is 1. And thelow level
value indicates that it should updatecontinuously when the clock input is 0. Note that the latter two optionsare unavailable for T and J-K flip-flops. - Label
- The text within the label associated with the flip-flop.
- Label Font
- The font with which to render the label.
Poke Tool Behavior
Clicking a flip-flop using the Poke Tool toggles the bit stored inthe flip-flop, unless the asynchronous set/reset inputs currentlypin the flip-flop's value.
Text Tool Behavior
Allows the label associated with the component to be edited.
Back to Library Reference