Re: [sv-ec] tasks and function default values


Subject: Re: [sv-ec] tasks and function default values
From: Francoise Martinolle (fm@cadence.com)
Date: Wed Feb 26 2003 - 09:45:40 PST


Why would we require the tool to initialize systemVerilog variables which
are pointer to C objects to NULL?
Why not leaving the variable uninitialized until the variable object is
assigned in some ways either in the SV code or when passed as an inout to a
directC function?

Default value in function/task declarations cannot be provided for handle
types because they
are not singular data types. The reason they are not singular data type is
that C handles cannot be cast to other data types.

Francoise
        '

At 08:16 AM 2/26/2003 -0800, Andy Tsay wrote:
>Hi,
>
>In SV3.1 Draft 3, section 3.7 Handle data type:
>Handles shall always be initialized to the value null,
>which has a value of 0 on the C side, which ...
>
>Does the above paragraph require the tool to set
>default value null for all handles?
>
>Thanks,
>Andy
>
>--- Francoise Martinolle <fm@cadence.com> wrote:
> > section 10.5.3 states that you can have a default
> > value for any singular
> > data type.
> > A singular type excludes handles.
> > Why wouldn't we allow a default value of null for
> > handle types?
> >
> > Are we allowing array and structure literals as
> > argument default values if
> > the array/struct or union is packed? The section on
> > array and struct
> > literals only shows unpacked arrays and literal
> > examples.
> >
> > Example:
> > typedef struct packed {
> > logic [3:0] a;
> > logic [5:0] b;
> > } mystruct
> >
> > function void foo(mystruct s = {4'b1, 5});
> >
>
>
>__________________________________________________
>Do you Yahoo!?
>Yahoo! Tax Center - forms, calculators, tips, more
>http://taxes.yahoo.com/



This archive was generated by hypermail 2b28 : Wed Feb 26 2003 - 09:46:39 PST