Created
September 28, 2014 18:24
-
-
Save coldcue/303c81e84885774af904 to your computer and use it in GitHub Desktop.
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
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment