In reply to cgales:
cgales,
I agree with your statement! Truly, the code waits for @(posedge spi_sck) signal for ages.
Thank you very much for your explanation!
I think I need to try avoid using while statements, because of high chance of having race conditions. Could someone share his experience on using the while statements? and how you usually create iterations in initial blocks