SourceRTL Design Directory

Register: An Overview

A register in digital design is a fast storage sequential circuit that can hold data temporarily. A widely used register is D Flip-FLop. A D Flip-Flop is an edge-triggered circuit that combines a pair of latches to store one bit.

Advantages of Registers

  1. Registers provide fast access to data compared to main memory.
  2. Ideal for temporary storage during data processing.

Desgin: D Flip-Flop

A D Flip-Flop is an edge-trigger register, either positive edge-triggered, negative edge-triggered, or dual edge-triggered. For the purpose of discussion let’s consider a positive edge-triggered :flip-flop.

The truth table of a positive edge-triggered D Flip-Flop is shown below:

ClkDQDescription
0XQNo Change
0->100Q to 0
0->111Q to 1
1XQNo Change

Verilog Code: D Flip-Flop

always_ff@(posedge clk)
  if(rst)
    q <= 1'b0;
  else
    q <= d;