What is Sampled value of signal?

In reply to sj1992:

Not always true, it depends on where do you put the above code to monitor the signal.
If the code is not executed at right time (maybe after the signal asserts), it will never meet the condition. Normally, I usually use “wait” statement if I want to check a signal is asserted at specific time. Or you can loop with clock event to check the signal.