Introduction - If you have any usage issues, please Google them yourself
always @ ( posedge clk_100m or posedge rst_100m) begin
if( rst_100m == 1'b1 ) begin
SCKcnt <= 10'd0;
end
else if( SCKen == 1'b1 ) begin
if(SCKcnt != I2CSCK_DIV) begin
SCKcnt <= SCKcnt + 1'b1;
end
else begin
SCKcnt <= 10'd0;
end
end