Engee documentation

D Flip-Flop

The D-trigger model is triggered on a positive front.

blockType: SubSystem

Path in the library:

/Basic/Additional/Flip Flops/D Flip-Flop

Description

Block D Flip-Flop simulates a positive-edge D-trigger. Block D Flip-Flop It has three entrances:

  • D — data entry;

  • CLK — clock signal;

  • !CLR is the resolution input.

With a positive (rising) clock edge, if the block is enabled (port value !CLR is greater than zero), the output signal Q is the same as the input signal D. The truth table for the block is shown below. D Flip-Flop.

Block D Flip-Flop accepts a non-zero input signal as true (1).
D Q !Q

1

1

0

0

0

1

If the block is not active on the rising edge of the clock signal, Q is reset to zero. When the clock signal does not increase, the block remains in the previous state.

Logic signals as data types Bool or Float64

The configuration parameter Implement logic signals as boolean data (vs. double) affects the types of input and output data of the block D Flip-Flop because D Flip-Flop — a masked subsystem using the block Logical Operator. Block Logical Operator The masked subsystem has the following parameter settings:

Block Parameter Customization

Output data type

Inherit: Bool

Require all inputs and output to have the same data type

On

Ports

Input

# D — data input
scalar | vector | the matrix

Details

A data input signal specified as a scalar, vector, or matrix.

Dependencies

Types of data received by the block D Flip-Flop input D, depends on the value of the model configuration parameter Implement logic signals as boolean data (vs. double). If this option is enabled, the D data type must be Bool; if this option is disabled, the D data type can be as Bool, so and Float64.

Data types

Float64, Bool

Complex numbers support

No

# CLK — clock signal
scalar | vector | the matrix

Details

A clock signal specified as a scalar, vector, or matrix.

Data types

Float32, Float64, Int8, Int16, Int32, UInt8, UInt16, UInt32, Bool, Fixed-point, Enumerated, bus

Complex numbers support

No

# !CLR — resolution input
scalar | vector | the matrix

Details

A resolution input signal specified as a scalar, vector, or matrix.

Data types

Float32, Float64, Int8, Int16, Int32, UInt8, UInt16, UInt32, Bool, Fixed-point, Enumerated, bus

Complex numbers support

No

Output

# Q — The output signal
scalar | vector | the matrix

Details

The output signal is Q, having the same dimension and data type as the input signal D.

Data types

Float64, Bool

Complex numbers support

No

# !Q — The output signal
scalar | vector | the matrix

Details

The output signal is !Q, having the same dimension and data type as the input signal D.

Data types

Float64, Bool

Complex numbers support

No