In reply to dave_59:
In reply to Etrx91:
[A1] The LRM requires that functions in constraints have no side-effects, and technically $display is a side effect.
[A2] Ordering is based on input arguments. You have broken that ordering by referencing a inside the function directly.
[A3] No. The function calls implicitly create the same ordering.
[A4] Since get_a() has no arguments, it is treated as a state variable and has no ordering.
Hi Dave ,
On checking again I saw Simulator 3 throws an error at " return a " of function get_a() which may be a side effect. The $diplay() within the 2 Functions works ( on Commenting return a )
Regards,
AGIS