--- Quote Start ---
You have a forever statement inside the initial block. The initial block is for things that happen at time 0. You can't have something go on forever at time 0.
--- Quote End ---
In a testbench, initial blocks can be used to drive stimulus during simulation for example - a reset:
initial begin
rst = 1;
repeat(5) @ (posedge clk) ;
rst = 0;
end
But the OP has generated the clock incorrectly. By using# 5 on the assignment, you only delay the assignment, not the loop, causing the 5000 iteration limit as it is trying to assign the clock at time zero. To do it correctly in an inital block:
inital begin
forever begin
CLK_50MHz= ~CLK_50MHz;
# 20;
end
end