[sv-bc] void casting on void function call

From: Surya Pratik Saha <spsaha_at_.....>
Date: Thu Aug 30 2007 - 08:10:38 PDT
Hi,
As per LRM-BNF, void casted statment is:
Subroutine_call_statement ::= subroutine_call;
| void'(function_subroutine_call);
And for void function, LRM mentions following text (page no. 156 of IEEE 1800).

Function calls are expressions unless of type void, which are statements:
a = b + myfunc1(c, d); //call myfunc1 (defined above) as an expression
myprint(a); //call myprint (defined below) as a statement
function void myprint (int a);
...
endfunction

Can function_subroutine_call contain void function call? I don't think so, as void function call is a statement. But some simulators don't think like that and passes the following case:
module top;
    initial begin
        void'(f());
    end
    function void f;
        return ;
    endfunction
endmodule
Any expert comment?
-- 
Regards
Surya

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean. Received on Thu Aug 30 08:11:31 2007

This archive was generated by hypermail 2.1.8 : Thu Aug 30 2007 - 08:11:51 PDT