This repository has been archived on 2024-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
justhomework/Quartus/v3/jyh_4490_3_divide.v

16 lines
179 B
Coq
Raw Permalink Normal View History

2022-04-09 13:38:47 +00:00
module jyh_4490_3_divide(clkin,clkout);
input clkin;
output reg clkout=0;
2022-04-12 08:38:43 +00:00
reg [2:0] temp;
2022-04-09 13:38:47 +00:00
always@(posedge clkin)
begin
temp<=temp+1;
if(temp==0)
clkout=~clkout;
end
2022-04-12 08:38:43 +00:00
endmodule