Guest User

Untitled

a guest
Dec 16th, 2017
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. module clock_divider_1Hz(
  2. input wire clock_50MHz, // PIN_M9
  3. output wire clock_1Hz
  4. );
  5. reg [25:0] count;
  6.  
  7. assign clock_1Hz = count[25];
  8.  
  9. always @ (posedge clock_50MHz) begin
  10. if (count > 26'd50000000) begin
  11. count <= 26'd0;
  12. end else begin
  13. count <= count + 1'b1;
  14. end
  15.  
  16. end
  17.  
  18.  
  19. endmodule
Add Comment
Please, Sign In to add comment