Warning (332060): Node: sysclk:mysysclk|ic2_100khz was determined to be a clock but was found without an associated clock assignment.
Warning (332060): Node: sysclk:mysysclk|mclk1m was determined to be a clock but was found without an associated clock assignment.
Warning (332060): Node: sysclk:mysysclk|mck10k was determined to be a clock but was found without an associated clock assignment.
reg[3:0] clk100kDiv;
always@(posedge mclk2m)
begin
if (!clk_in)
begin
clk100kDiv <= 'b0;
ic2_100khz <= 'b0;
end
else
begin
if( clk100kDiv == 4'd9)
begin
ic2_100khz <= ~ic2_100khz ;
clk100kDiv <= 4'd0;
end
else
clk100kDiv <= clk100kDiv + 4'd1;
end
end