In reply to Balaji Murugan:
wait fork waits for all children of the current process to end before continuing. Each initial block is an independent process and there are no child processes of the last initial block.
Your simulation ends at time 5 instead of time 100 is reason #3 of why I recommend never using program blocks. Use a module instead.