Created
October 5, 2016 06:49
-
-
Save rbarzic/74ffcf75f6b169fbd20dc6923c603e0a to your computer and use it in GitHub Desktop.
Integrated clock gating cell, Code from "Low Power Design Methodologies and Flows"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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