Concept Flow - Clock gating for power reduction
Input Clock
Enable Signal Check
Pass Clock
Flip-Flop or Logic Block
Output Signal
The clock signal is passed or blocked based on an enable signal to reduce power by stopping unnecessary clock toggling.
module clock_gating( input clk, input enable, output gated_clk ); assign gated_clk = clk & enable; endmodule
| Step | clk | enable | gated_clk (clk & enable) | Action |
|---|---|---|---|---|
| 1 | 0 | 0 | 0 | Clock low, enable low, gated_clk low |
| 2 | 1 | 0 | 0 | Clock high, enable low, gated_clk blocked (0) |
| 3 | 1 | 1 | 1 | Clock high, enable high, gated_clk passes (1) |
| 4 | 0 | 1 | 0 | Clock low, enable high, gated_clk low |
| 5 | 1 | 1 | 1 | Clock high, enable high, gated_clk passes (1) |
| 6 | 0 | 0 | 0 | Clock low, enable low, gated_clk blocked (0) |
| Variable | Start | After 1 | After 2 | After 3 | After 4 | After 5 | After 6 |
|---|---|---|---|---|---|---|---|
| clk | 0 | 0 | 1 | 1 | 0 | 1 | 0 |
| enable | 0 | 0 | 0 | 1 | 1 | 1 | 0 |
| gated_clk | 0 | 0 | 0 | 1 | 0 | 1 | 0 |
Clock gating reduces power by stopping clock toggling when not needed. Use an enable signal to AND with the clock. When enable=0, gated clock stops toggling. When enable=1, clock passes through. Simple AND gate can implement clock gating. Helps save power in synchronous circuits.
gated_clk when clk=1 and enable=0?
assign gated_clk = clk & enable;
module clk_gate(input clk, input enable, output gated_clk);
always @(posedge clk) begin
if (enable)
gated_clk <= clk;
else
gated_clk <= 0;
end
endmodulePass the test and this pattern moves unknown