第一题
module sfp_pwm(
input wire clk, //clk is 200M
input wire rst_n,
input wire clk_10M_i,
input wire PPS_i,
output reg pwm
)
reg [6:0] cunt ;
always @(posedge clk ) begin
if(!rst_n)
cunt<=0;
else if(cunt==19) //200M是10M的20倍
cunt<=0;
else
cunt<=cunt+1;
end
always @(posedge clk_10M_i