Skip to content

Instantly share code, notes, and snippets.

@rbarzic
Created October 5, 2016 06:49
Show Gist options
  • Save rbarzic/74ffcf75f6b169fbd20dc6923c603e0a to your computer and use it in GitHub Desktop.
Save rbarzic/74ffcf75f6b169fbd20dc6923c603e0a to your computer and use it in GitHub Desktop.
Integrated clock gating cell, Code from "Low Power Design Methodologies and Flows"
// Integrated clock gating cell
// Code from "Low Power Design Methodologies and Flows"
module icg(/*AUTOARG*/
// Outputs
gclk,
// Inputs
en, clk
);
input en;
input clk;
output gclk;
reg en_out;
always @(en or clk) begin
if (!clk) begin
en_out = en;
end
end
assign gclk = en_out && clk;
endmodule // icg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment