D Latch
Model an enabled D Latch flip-flop
Libraries:
Simulink Extras / Flip Flops
Description
The D Latch block models an enabled D Latch flip-flop. The D Latch block has two inputs:
D — Data input.
C — Chip enable input signal.
The chip enable input signal (C) controls when the block executes. When C is greater than zero, the output Q is the same as the input D. The truth table for the D Latch block follows.
Note
The D Latch block treats a nonzero input as true
(1
).
C | D | Q | !Q |
---|---|---|---|
0 | Any | No change | No change |
1 | 0 | 0 | 1 |
1 | 1 | 1 | 0 |
When the D Latch block is not enabled, the block remains in the previous state.
Logic Signals as Boolean or Double Data Types
The Implement logic signals as boolean data (vs. double) configuration parameter setting affects the input and output data types of the D Latch block because this block is a masked subsystem that uses the Logical Operator block. The Logical Operator block in the masked subsystem has the following parameter settings:
Block Parameter | Setting |
---|---|
Output data type | Inherit: Logical |
Require all inputs and output to have the same data type | On |
For more information about the Implement logic signals as boolean data (vs. double) configuration parameter, see Implement logic signals as Boolean data (vs. double).
Ports
Input
Output
Version History
Introduced in R2008b