Created
September 28, 2014 18:24
-
-
Save coldcue/303c81e84885774af904 to your computer and use it in GitHub Desktop.
Revisions
-
coldcue created this gist
Sep 28, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ module rategen( input clk, input rst, output cy ); reg [25:0] cntr; assign cy = (cntr == 4); //assign cy = (cntr == 49999999); always @ (posedge clk) begin if( rst | cy ) cntr <= 0; else cntr <= cntr + 1; end endmodule