Pure and Impure Function

In reply to Mukund Sojitra:

Ok, little more search in the SV 2012 standard,
From Section 35.5.2… (Part of DPI section)

“Only nonvoid functions with no output or inout arguments can be specified as pure. Functions specified as pure shall have no side effects whatsoever; their results need to depend solely on the values of their input arguments. Calls to such functions can be removed by SystemVerilog compiler optimizations or replaced with the values previously computed for the same values of the input arguments.”

Didn’t find a mention of “impure function” in the spec though.

Hope this helps you to start with (before someone else responds here).