LRM states that Functions shall be automatic (or preserve no state information) and have no side effects, * * *1) What is a side effect? To me a side effect is an assignment of a variable (free variable of the checker or a module).* *A function can (in a checker) only return a value. Thus the following is illegal: * *checker t_chk(...); * * logic a, x, y;* * function void inc_a; * * a ++; // same as a=a+1 // illegal blocking assignment? * * // a <= a+1; // Illegal also, cannot change value of a variable* * endfunction : a_to_1* * ap_test: assert property(@ (posedge clk) (x, inc_a()) |-> y) ;* *endchecker : t_chk* -- * 2) Can **functions be of type void in a checker? * Since a void function must have a side effect, such as assigning a value to a variable, I believe that they are illegal. Function with return type of void cannot be used in/as an expression. > > * * > -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Sep 30 10:29:11 2009
This archive was generated by hypermail 2.1.8 : Wed Sep 30 2009 - 10:30:33 PDT