The relationship and difference between latches, D flip-flops and registers

The relationship and difference between latches, D flip-flops and registers



Preface

In digital IC design, latches, D flip-flops and registers often appear. Many people (such as me) are confused and can’t figure out the difference between them. This blog mainly explains the working principles of latches, D flip-flops and registers and their relationships and differences.


1. Latch and D flip-flop

Latch is a kind of memory cell circuit that is sensitive to pulse level. They can change state under the action of specific input pulse level [1]. In other words, if a module will update the input information to its output pin only under the influence of a specific level, otherwise the output of the module will remain unchanged, then this module can be regarded as a Latches.

for example:

As shown in the figure, when CLK = 0, Q = D; when CLK = 1, Q remains unchanged; then this module is a latch;

2. Latch construction D flip-flop


As shown in the figure is a schematic diagram of a D flip-flop. When CLK inputs a rising edge, the input of the D terminal is transmitted to Q. When CLK does not input a rising edge, Q remains unchanged.


As shown in the figure, when CLK = 0, Q1 = D; when CLK = 1, Q = Q1; that is, when the rising edge of CLK comes, the D signal is transmitted to the Q terminal, so thisTwo latches form a D flip-flop

3. What is a register?

Register is a very important storage unit in integrated circuits, usually composed of flip-flops. Registers are high-speed storage components with limited storage capacity. They can be used to temporarily store instructions, data and addresses [2]. In other words, anything with the function of caching data can be called a register, and registers are often used in CPUs, so they are edge signal sensitive devices.

The D flip-flop has the function of buffering data. When the CLK input rises, D is transferred to Q, and then Q will remain unchanged until the next rising edge of CLK.Therefore, the D flip-flop can be used as a register, that is (D flip-flop ∈ register), the change of the latch state is related to a specific level (high level and low level), while the state change of the register often requires an edge signal (rising edge and falling edge), soLatch $\notin$ register, since two latches can build an edge-sensitive flip-flop (as shown in the previous section), soLatches can build registers

4. Summary

    1. Latches are level sensitive devices, while D flip-flops and registers are edge signal sensitive devices;
    1. Two latches can build a D flip-flop;
    1. D flip-flops belong to registers;

5. Reference materials

Related Posts

Start learning FPGA from the underlying structure (12)—-Introduction to FIFO IP core and its key parameters

Design of electronic scale based on 51 microcontroller

About AD20 PCB circuit diagram printing settings

FPGA – Detailed explanation of AXI4 bus

How to calculate PCB trace resistance

Using USB to TTL serial port burning program STM32F103C8T6 core board (CH340)

TI millimeter wave cascade radar evaluation boards MMWCAS-DSP-EVM and MMWCAS-RF-EVM

Model machine design (VERILOG)-instruction decoder and ALU

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*