Subject: Re: [sv-bc] if statement
From: Dave Rich (David.Rich@synopsys.com)
Date: Tue Nov 25 2003 - 13:00:27 PST
More specifically, The branch is defined in terms of result of
(expression !=0). So the comparison must be valid for the expression be
legal.
An exception is made for handles, they are defined in terms of (handle
!= null)
Dave
Rishiyur S. Nikhil wrote:
> Francoise, it is my understanding that you cannot use an unpacked var.
>
> The semantics of if and case are given in terms of whether the bits
> contain 0, 1, x, or z bits, and I don't think this is meaningful
> for unpacked items.
>
> (I'll let the experts correct me if my understanding is wrong!)
>
> Nikhil
>
>
> Francoise Martinolle wrote:
>
>> Which type of expression can you use as a condition expression to an
>> if statement?
>> Can you have a unpacked struct, union or array type variable?
>>
>> if (structVar)
>> do...
>>
>> What are the semantics of if (structvar)?
>>
>
>
>
-- -- David.Rich@Synopsys.com Technical Marketing Consultant http://www.SystemVerilog.org tele: 650-584-4026 cell: 510-589-2625
This archive was generated by hypermail 2b28 : Tue Nov 25 2003 - 13:01:21 PST