Clock edge is not getting detected inside forever loop

I found the problem. Sorry, this was due to my carelessness. The driver was finishing at zero simulation time, because while driving I didn’t include clock edge in driver. Thanks to all of your valuable comments, I learned new things from your answers. As I didn’t post my driver code here so all the answers/suggestions are valid and helped me to narrow down to the root cause of the problem. Thank you all.