RE: [sv-bc] Proposal for Errata 119 Constant function definition should be expanded

From: Mark Hartoog <Mark.Hartoog@synopsys.com>
Date: Mon Sep 27 2004 - 08:49:24 PDT

> -----Original Message-----
> From: Warmke, Doug [mailto:doug_warmke@mentorg.com]
> Sent: Sunday, September 26, 2004 10:35 PM
> Mark,
>
> Looks good, but don't forget to mention the constraint
> - A DPI imported function shall never be considered a constant function.
>
> Regards,
> Doug

I updated the proposal to include this:

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.
- An import "DPI" function (see section 10.5) 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.
Received on Mon Sep 27 08:49:28 2004

This archive was generated by hypermail 2.1.8 : Mon Sep 27 2004 - 08:49:31 PDT