Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module pwm(clk_in,select,clk_out);
- input clk_in;
- input [1:0] select;
- output reg clk_out;
- initial
- begin
- clk_out = 0;
- end
- integer count = 0;
- always @(posedge clk_in)
- begin
- if(count!=25)
- count <= count + 1;
- else
- begin
- clk_out <= ~clk_out;
- count <= 0;
- end
- end
- endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement