Proposal: Add a new section 10.3.3
10.3.3 Constant Function Calls
In System Verilog a constant function call is a function invocation of a constant function local to
the calling module or from a package or $unit where the arguments to the function are all constant
expressions. Verilog has a number of constraints that constant functions shall meet. The Verilog
constraints for constant functions are modified in System Verilog as follows:
- A constant function may call any system functions that may be called in a constant expression.
This includes $bits, the array query functions and $typeof.
- A constant function may reference parameters defined in packages or $unit.
System Verilog adds the following additional constraints on constant functions.
- A constant function shall not have output, inout or ref ports.
- A void function shall not be a constant function.
- A constant function may have default argument values (see section 10.4.3), but any default
argument values used in a constant function call shall be constant expressions.
Mark Hartoog
700 E. Middlefield Road
Mountain View, CA 94043
650 584-5404
markh@synopsys.com
Received on Sun Sep 26 22:30:22 2004
This archive was generated by hypermail 2.1.8 : Sun Sep 26 2004 - 22:30:39 PDT