Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • Logic Synthesis Glossary
  • Logic Synthesis Cheatsheet
  • Synthesis Foundations14
  • Logic Optimisation and Mapping20
  • Constraints and Timing15
  • Sequential, FSM and Memory19
  • Datapath Synthesis14
  • Area, Power and Test14
    • Area, Power and Timing Trade-offs
    • Clock Gating and Low Power
      • Latch-Based Gating versus AND Gating
      • Enable Flops and the Gating Opportunity
      • Switching-Activity Power Model
      • Operand Isolation
      • Power Intent, Multi-Vt and UPF
    • DFT and Scan Insertion
  • Verification, ECO and Handoff15
  • Flows and Debugging15
  • Interview and Judgment11
Loading lesson

‹Clock Gating and Low Power
  1. Topics
  2. Logic Synthesis
  3. Area, Power and Test
  4. Clock Gating and Low Power
  5. Enable Flops and the Gating Opportunity

Part 6 · Area, Power and Test · Intermediate

Enable Flops and the Gating Opportunity

Enable flops as the gating opportunity, pinned by a Yosys count.

On this page

    The enable pattern

    An enable flop keeps its value unless the enable is set. The RTL pattern is one line: on each clock, update only when the enable holds.

    Synthesis builds a flop with a feedback mux on its data input. The mux recirculates the old value while the enable is low.

    RTL style

    Inferred structure

    Gating opportunity

    Plain register

    Bare flops, no mux

    None: the clock must toggle every cycle.

    Enabled register

    One flop plus one feedback mux per bit

    The enable marks exactly when the clock may stop.

    The gating opportunity in Yosys

    The script below builds four enabled flops beside four free-running flops. Its two assertions pin the structure the lesson claims.

    yosys
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    read_verilog <<EOV
    module gated(input wire clk, input wire en,
      input wire d0, input wire d1, input wire d2, input wire d3,
      input wire e0, input wire e1, input wire e2, input wire e3,
      output wire [3:0] q, output wire [3:0] f);
    reg r0; reg r1; reg r2; reg r3;
    reg s0; reg s1; reg s2; reg s3;
    always @(posedge clk) if (en) r0 <= d0;
    always @(posedge clk) if (en) r1 <= d1;
    always @(posedge clk) if (en) r2 <= d2;
    always @(posedge clk) if (en) r3 <= d3;
    always @(posedge clk) s0 <= e0;
    always @(posedge clk) s1 <= e1;
    always @(posedge clk) s2 <= e2;
    always @(posedge clk) s3 <= e3;
    assign q = {r3, r2, r1, r0};
    assign f = {s3, s2, s1, s0};
    endmodule
    EOV
    hierarchy -check -top gated
    proc
    opt_clean
    check
    select -assert-count 8 t:$dff
    select -assert-count 4 t:$mux
    log PASS: 4 enable-mux flops mark the gating opportunity beside 4 free-running flops

    What the tool does with it

    The feedback mux is the marker the clock-gating step looks for. Each mux says the flop tolerates a stopped clock whenever the enable is low.

    Which flops share one gating cell depends on the flow and the library. The opportunity is visible in any case; the grouping varies.

    Common mistakes

    An enable derived from deep combinational logic may arrive too late to gate with. The enable path has its own timing, and a late enable forces the clock back on.

    Common pitfall

    Reading the mux count as saved power overstates the win. The muxes mark where gating is possible; the saving follows only from the activity factor, which the next lesson computes.

    Interview

    Likely probes: reading the structure and naming the opportunity.

    • Four enabled flops give four feedback muxes; four plain flops give none.

    • Eight flops and four muxes are pinned by the two assertions.

    • The enable, not the mux, is what the gating cell eventually uses.

    Check yourself The script asserts 8 flops and 4 muxes. Which flops own the muxes, and why?

    The four enabled flops own one feedback mux each. The four free-running flops update unconditionally, so they need no mux.

    Check yourself The enable comes from a slow comparator. What breaks first: the function or the gating?

    The gating. The register still works on a free-running clock, but the enable cannot reach the gating cell in time, so the saving shrinks or vanishes.

    Related topics

    • Latch-based gating versus AND gating

    • Switching-activity power model

    • Flip-flops and registers

    Previous

    91 / 139

    Next: Switching-Activity Power Model

    Up next

    Up nextSwitching-Activity Power Model

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Operand Isolation
    • Power Intent, Multi-Vt and UPF