[sv-bc] RE: task/function prototype syntax question

From: Stuart Sutherland <stuart@sutherland-hdl.com>
Date: Wed Jul 21 2004 - 08:19:42 PDT

Peter,

Was this change to the BNF between 3.0 and 3.1a intentional, or an
unintentional change due to other clean of the BNF? If I remember my C
syntax correctly for function prototypes, the SV 3.0 syntax was like C. I
would think that we would want to have SV follow the C conventions unless
there is a good reason to be different.

I'm adding the SV BC and EC committees to this message. I'd like to hear
what others on the committees think (please read my original question at the
end of this thread). If this is an errata in the 3.1a BNF, someone will
need to add it to the data base. I am do not have write permissions to do.

Stu
~~~~~~~~~~~~~~~~~~~~~~~~~
Stuart Sutherland
stuart@sutherland-hdl.com
503-692-0898

> -----Original Message-----
> From: Peter Flake [mailto:Peter.Flake@synopsys.com]
> Sent: Wednesday, July 21, 2004 2:46 AM
> To: stuart@sutherland-hdl.com
> Subject: Re: task/function prototype syntax question
>
> Hi Stu,
>
> Good question.
>
> In the 3.0 BNF, a prototype can omit the names of the arguments. So
> Systemsim used to be correct.
>
> In the 3.1 or 3.1A BNF, a prototype must include the names of the
> arguments. So VCS is correct now.
>
> Regards,
>
> Peter.
>
> At 00:28 21/07/2004 -0700, you wrote:
> >Peter,
> >
> >I have another syntax question regarding the SV book examples...
> >
> >SystemSim accepts the following prototypes, but VCS does not.
> >
> > extern task Relinquish (input int);
> > extern forkjoin task ReadMem (input logic [19:0],
> > output logic [15:0],
> > bit);
> >
> >It appears to me that the BNF requires each t/f argument to
> have a name
> >after the direction and type.
> >
> >Section A.2.7
> >tf_port_item ::=
> > { attribute_instance }
> > [ tf_port_direction ] data_type_or_implicit
> > port_identifier variable_dimension [ = expression ]
> >
> >Is this correct? Adding argument names does make it so VCS
> compiles the
> >prototypes, BTW.
> >
> >Stu
> >~~~~~~~~~~~~~~~~~~~~~~~~~
> >Stuart Sutherland
> >stuart@sutherland-hdl.com
> >503-692-0898
>
>
>
>
Received on Wed Jul 21 08:20:33 2004

This archive was generated by hypermail 2.1.8 : Wed Jul 21 2004 - 08:20:40 PDT