Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Divisor(input clk_in, output reg clk_out);
- parameter division = 50;
- reg [31:0] contador;
- always@(posedge clk_in) begin
- if(contador <= division) begin
- contador <= contador + 1;
- clk_out <= 0;
- end
- else if((contador > division)&&(contador < division*2 - 1)) begin
- contador <= contador + 1;
- clk_out <= 1;
- end
- else contador <= 32'd0;
- end
- endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement