SR Flip Flop

Description of the SR Flip Flop component in Schematic Editor, which implements the functionality of the SR Flip Flop sequential logic.

Component Icon

Figure 1. SR Flip Flop icon

Description

The SR Flip Flop component implements the functionality of the SR Flip Flop sequential logic.

S input can be viewed as a Set input and R as a Reset input. If S is active, the Flip Flop will store the value 1. If R is active, the Flip Flop will store the value 0. A special case is when both S and R are active. This is an invalid case and the state of the Flip Flop will be -1. The state is available on the Q terminal

The output of SR Flip Flop can be described using the truth table displayed in Truth table of SR Flip Flop.
Table 1. Truth table of SR Flip Flop
S R Q
0 0 No change No change
1 0 1 0
0 1 0 1
1 1 -1 -1

The SR Flip Flop component stores the value as Boolean, as far as the input values are concerned. Every number that is not 0 will be treated as 1.

Q̅ output is an inverted state output.

Ports

  • Input S (in)
    • Input signal Set
      • Supported types: uint, int and real.
      • Vector support: yes.
  • Input R (in)
    • Input signal Reset
      • Supported types: uint, int and real.
      • Vector support: yes.
  • Q (out)
    • The output of the component, according to the Truth table.
      • Supported types: uint, int and real.
        • The output type is inherited from the input signal.
      • Vector support: yes.
        • The vector length is inherited from the input signal or calculated using properties value lengths. If the property is defined as a vector, the output will be a vector of the same length.
  • Q̅ (out)
    • The inverse of the output Q, according to the Truth table.
      • Supported types: uint, int and real.
        • The output type is inherited from the input signal.
      • Vector support: yes.
        • The vector length is inherited from the input signal or calculated using properties value lengths. If the property is defined as a vector, the output will be a vector of the same length.

Properties

  • Initial Value
    • Type in the initial value of the SR Flip Flop component. The property can be scalar or vector.
  • Execution rate
    • Type in the desired signal processing execution rate. This value must be compatible with other signal processing components of the same circuit: the value must be a multiple of the fastest execution rate in the circuit. There can be up to four different execution rates, but they must all be multiple of the basic simulation timestep. To specify the execution rate, you can use either decimal (e.g. 0.001) or exponential values (e.g. 1e-3) in seconds. Alternatively, you can type in ‘inherit’ in which case the component will be assigned execution rate based on the execution rate of the components it is receiving input from.