D Flip-Flop
The behavioral model of the D-trigger.
blockType: AcausalElectricPowerSystems.IntegratedCircuits.Logic.DataFlipFlop
Path in the library:
|
Description
Block D Flip-Flop implements a behavioral model of a clocked D-trigger. The block stores a single-bit value: 0 (low) or 1 (high).
The unit has two input ports: data port D and clock port Clk. The block transmits data from port D to the output port Q. The output value is updated only when the clock signal passes through the active edge. Otherwise, the block retains the output value in the previous state.
You can configure the update of the output value based on the falling or rising edge of the clock signal. So that the update occurs only when the clock signal transitions from the level high on low, set for the parameter Edge trigger meaning Falling. So that the update occurs only when the clock signal transitions from the level low on high, set for the parameter Edge trigger meaning Rising. The truth table below shows the logic levels at the inputs and outputs of the block. Lower index n indicates the value in the current clock cycle, and n-1 — the value in the previous clock cycle. Logic level on the inverted output port !Q is the reverse of the logical layer on port Q.
| Parameter value Edge trigger | Clkn-1 | Clkn | Qn |
|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
To set the logic level on port Q at the beginning of the simulation, in the parameter group Initial Targets set for the parameter Output logic meaning 0 or 1. For more information about the initial values, see the article Configuring physical blocks using target values.
Gate inputs have infinite resistance and finite or zero capacitance.
If the gate voltage exceeds the threshold voltage, the block interprets the logic level at the input as 1. Otherwise, the block interprets the logic level at the input as 0. The unit calculates the threshold voltage as the average value of the parameters Low level input voltage and High level input voltage.
The output signal of the shutter depends on the parameter Output current-voltage relationship. Set this parameter to Linear to speed up the simulation, or Quadratic for more accurate results. For most models, it is recommended to use the value Linear. Meaning Quadratic It can be used to verify the results obtained using a simpler linear model.
If for the parameter Output current-voltage relationship the value is set Linear:
-
At the logical level
0on the Q port, the output voltage is equal to the value of the parameter Low level output voltage. -
At the logical level
1on the Q port, the output voltage is equal to the value of the parameter High level output voltage. -
The resistive-capacitive time constant of the gate output capacitor is equal to the value of the parameter Propagation delay.
If for the parameter Output current-voltage relationship the value is set Quadratic:
-
The output voltage is a function of the output current. For zero load current:
-
if the logic level on port Q is equal to
0, the output voltage is zero; -
if the logic level on port Q is equal to
1, the output voltage is equal to the value of the parameter Supply voltage.
-
-
The delay of the shutter input signal approximately corresponds to the value of the parameter Propagation delay.
Assumptions and limitations
-
To increase the simulation speed, the unit does not simulate each internal MOSFET device of the gate individually. Therefore, the unit inaccurately models the gate response to input noise and input voltages close to the threshold voltage.
-
If you are modeling a feedback circuit around a set of logic gates, you must set the parameter Propagation delay a non-zero value for one or more gates.
Ports
Conserving
#
D
—
data output
electricity
Details
A non-directional electrical port associated with data output.
| Program usage name |
|
#
Q
—
output contact
electricity
Details
A non-directional electrical port connected to the output pin.
| Program usage name |
|
#
!Q
—
inverted output pin
electricity
Details
A non-directional electrical port connected to an inverted output pin.
| Program usage name |
|
#
Clk
—
clock output
electricity
Details
A non-directional electrical port connected to the clock pin.
| Program usage name |
|
Output
#
Invalid
—
reliability of the output signal
scalar
Details
The reliability port of the output signal, a dimensionless value. During setup and hold, the scalar signal value is 1. Under these conditions, the output signal of a real D-trigger is unpredictable. Otherwise, the value of the scalar signal is 0.
Dependencies
To use this port, check the box Expose output validity port.
| Data types |
|
| Complex numbers support |
No |
Parameters
Outputs
#
Protection diode forward voltage —
forward voltage of the protective diode
V | uV | mV | kV | MV
Details
The voltage that triggers the protective diode when exceeded.
Dependencies
To use this parameter, set for the parameter Output current-voltage relationship meaning Quadratic.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
Propagation delay —
time of change of the output voltage state
s | ns | us | ms | min | hr | d
Details
The time required to change the output voltage from the state low in the state of high or out of the state high in the state of low after changing the input logic levels.
If for the parameter Propagation delay the value is set 0, the value of the parameter Output resistance it should be positive.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
Measurement voltage —
Measuring supply voltage
V | uV | mV | kV | MV
Details
The gate supply voltage at which the output resistances and currents are set.
Dependencies
To use this parameter, set for the parameter Output current-voltage relationship meaning Quadratic.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
Low level output voltage —
output voltage at logic level 0
V | uV | mV | kV | MV
Details
Output voltage when the logic level on the output pin is equal to 0.
Dependencies
To use this parameter, set for the parameter Output current-voltage relationship meaning Linear.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
High level output voltage —
output voltage at logic level 1
V | uV | mV | kV | MV
Details
Output voltage when the logic level on the output pin is equal to 1.
Dependencies
To use this parameter, set for the parameter Output current-voltage relationship meaning Linear.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
Output resistance —
output resistance
Ohm | mOhm | kOhm | MOhm | GOhm
Details
The output resistance that the unit uses to simulate the output voltage drop caused by the output current. This value can be calculated based on the technical specifications by dividing the high-level output voltage by the maximum low-level output current.
If for the parameter Propagation delay the value is set 0, parameter value Output resistance it should be positive.
Dependencies
To use this parameter, set for the parameter Output current-voltage relationship meaning Linear.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
Logic HIGH output current I_OH when shorted to ground —
output current at the logic level 1
A | pA | nA | uA | mA | kA | MA
Details
The output current is when the logic level at the output is 1 but the load causes the output voltage to tend to zero.
Dependencies
To use this parameter, set for the parameter Output current-voltage relationship meaning Quadratic.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
Setup time —
the time during which the input data should remain stable before the transition
s | ns | us | ms | min | hr | d
Details
The minimum time before passing through the active edge of the clock signal, during which the input data must remain stable for the trigger latches to work correctly.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
# Expose output validity port — option to display the output reliability port
Details
The ability to activate the Invalid port.
| Default value |
|
| Program usage name |
|
| Evaluatable |
No |
#
Logic LOW output current I_OL when shorted to Vcc —
output current at the logic level 0
A | pA | nA | uA | mA | kA | MA
Details
The output current is when the logic level at the output is 0, but the load causes the output voltage to tend to the value of the parameter Supply voltage.
Dependencies
To use this parameter, set for the parameter Output current-voltage relationship meaning Quadratic.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
Logic HIGH output resistance at zero current and at I_OH —
resistance at the logical level 1
Ohm | mOhm | kOhm | MOhm | GOhm
Details
Resistance when the logic level at the output is 1. Set the value for this parameter as a vector, a string of two resistance values. , where — the gradient of the dependence of the output voltage on the current in the absence of an output current, and — the gradient of the dependence of the output voltage on the current when the output is short-circuited to the ground.
Dependencies
To use this parameter, set for the parameter Output current-voltage relationship meaning Quadratic.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
Output current-voltage relationship —
the model of the dependence of the output current on the voltage
Linear | Quadratic
Details
A model that determines the dependence of the output current on the output voltage. Set this parameter to Linear for faster modeling and Quadratic for more accurate results.
| Values |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
No |
#
Logic LOW output resistance at zero current and at I_OL —
resistance at the logical level 0
Ohm | mOhm | kOhm | MOhm | GOhm
Details
Resistance when the logic level at the output is 0. Set the value for this parameter as a vector, a string of two resistance values. , where — the gradient of the dependence of the output voltage on the current in the absence of an output current, and — the gradient of the dependence of the output voltage on the current, when the load causes the output voltage to tend to the value of the parameter Supply voltage.
Dependencies
To use this parameter, set for the parameter Output current-voltage relationship meaning Quadratic.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
Supply voltage —
Supply voltage
V | uV | mV | kV | MV
Details
The voltage that is applied to the gate in the circuit.
Dependencies
To use this parameter, set for the parameter Output current-voltage relationship meaning Quadratic.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
Hold time —
the time during which the input data should remain stable after the transition
s | ns | us | ms | min | hr | d
Details
The minimum time after passing through the active edge of the clock signal, during which the input data must remain stable for the trigger latches to work correctly.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
Protection diode on resistance —
resistance of the open protective diode
Ohm | mOhm | kOhm | MOhm | GOhm
Details
The voltage-current gradient for forward-biased protective diodes.
Dependencies
To use this parameter, set for the parameter Output current-voltage relationship meaning Quadratic.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
Inputs
#
Edge trigger —
the active edge of the clock signal
Falling | Rising
Details
The active edge of the clock signal. To update the output value only when the logical layer on the Clk port transitions from 1 on the value 0, set this parameter to Falling. To update the output value only when the logical layer on the Clk port transitions from 0 on the value 1, set this parameter to Rising.
| Values |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
No |
#
High level input voltage —
the input voltage above which the logic level is 1
V | uV | mV | kV | MV
Details
The input voltage above which the block interprets the input logic level as 1.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
Low level input voltage —
the input voltage below which the logic level is 0
V | uV | mV | kV | MV
Details
The input voltage below which the block interprets the input logic level as 0.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
Average input capacitance —
input capacity of the MOSFET gate
F | pF | nF | uF | mF
Details
A fixed capacity approximately corresponding to the input capacity of the MOSFET gate. The MOSFET capacity depends on the applied voltage. If this unit is controlled by another shutter, the parameter Average input capacitance provides a rise time similar to the rise time of a MOSFET. The value of this capacity can be found in the manufacturer’s technical description. For a quick simulation, set this parameter to 0.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |