Advertisement
Guest User

Untitled

a guest
Aug 28th, 2015
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. module Divisor(input clk_in, output reg clk_out);
  2.  
  3. parameter division = 50;
  4. reg [31:0] contador;
  5.  
  6. always@(posedge clk_in) begin
  7. if(contador <= division) begin
  8. contador <= contador + 1;
  9. clk_out <= 0;
  10. end
  11. else if((contador > division)&&(contador < division*2 - 1)) begin
  12. contador <= contador + 1;
  13. clk_out <= 1;
  14. end
  15.  
  16. else contador <= 32'd0;
  17.  
  18. end
  19. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement