Questa complains with “Illegal value (0) for ref formal (Arg). Value must be assignable.”
However, in the IEEE Std 1800-2012 §15.5.3 it seems it is possible to assign a default value to an inout. Questa limitation?
The problem is not with the presence of a default, but the fact that the default argument cannot be written to. Although it is not very clear from the text of the LRM, the example shows that a default argument for output, inout, and ref argument must be assignable. For an output or inout argument, the “value” needs to be written to upon exiting the task or function.
Thanks for your reply.
So if I understand well, the default value should be a variable declared in the context from where the task is called?
My idea was to use the default value for backward compatibility, since I added new features requiring new arguments to the task.
I guess the only solution is to override the task?