[sv-bc] SV-EC ERR_70/SV-BC Iss 117


Subject: [sv-bc] SV-EC ERR_70/SV-BC Iss 117
From: David W. Smith (David.Smith@synopsys.com)
Date: Wed Jan 14 2004 - 14:18:43 PST


Greetings,

 

Arturo has generated a proposal and response to SV-EC ERR-70 (which was
originally SV-BC Issue 117). I am sending this to the SV-BC committee since
that is the forum to which Bill Paulsen's original email was sent.

 

To look at the proposal please look at ERR-70 at www.eda.org/sv-ec under the
Errata page.

 

Regards

David

 

From Arturo:

 

1. The LRM says, "The default_value is any expression that is visible at the
current scope. It can include any combination of constants or variables
visible at the scope of both the caller and the subroutine."

Suppose we have this situation:

 

A task is declared in a module, and a default value expression for an
argument includes a variable that is declared in that module.

The task is called from another module

The argument is omitted in the in call.

 

This should be an error, because the variable is not visible in the scope of
the caller.

 

But suppose the argument in the caller is not omitted - is this still an
error? (If not an error, then I think the LRM needs additional wording that
says default value scope checking is not done if the default value is not
used in a subroutine call.)

 

* No, that should not be an error. The LRM is modified to relax the
restriction as proposed.

 

2. Is this syntax legal for default values: task mytask2; input x = 5; // 5
is the default value ... endtask

* No, default values are only available when using ANSI style prototypes.
LRM is now explicit.

 

3) The LRM says that default values can be specified for each argument. I
think default values should only be specified for input and inout arguments.
Or can output arguments also have default values? Maybe if the task never
assigns any value to an output argument, then the output value is the
default value?

* OK. The LRM now explicitly disallows default values for output arguments.

 

 



This archive was generated by hypermail 2b28 : Wed Jan 14 2004 - 14:22:38 PST