Hi Ben, Yes, assignment of a variable that does not belong to the function (i.e., neither its local variable, no argument) is illegal. But if a is a local variable in the function then a++ is legal. It also turns out that void functions are illegal (or at least, meaningless) in checkers. Regards, Dmitry From: owner-sv-ac@server.eda.org [mailto:owner-sv-ac@server.eda.org] On Behalf Of ben cohen Sent: Wednesday, September 30, 2009 7:27 PM To: sv-ac@server.eda.org; Seligman, Erik Subject: [sv-ac] checker: Clarification on functions & side effects 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<http://www.mailscanner.info/>, and is believed to be clean. --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Sep 30 12:42:08 2009
This archive was generated by hypermail 2.1.8 : Wed Sep 30 2009 - 12:43:21 PDT