[sv-bc] RE: [sv-ec] Doubts related to typecasting

From: Rich, Dave <Dave_Rich_at_.....>
Date: Thu Mar 01 2007 - 13:29:06 PST
Shabnam,

The types allowed for a cast are defined by the first paragraph of 4.14.
Basically, the types must already be assignment compatible by means of
an implicit cast or the types must be compatible under the bit-stream
casting rules of 4.16.

Dave


> -----Original Message-----
> From: owner-sv-ec@server.eda.org [mailto:owner-sv-ec@server.eda.org]
On
> Behalf Of Shabnam Banu
> Sent: Monday, February 26, 2007 11:19 PM
> To: sv-bc@server.eda-stds.org; sv-ec@server.eda.org
> Subject: [sv-ec] Doubts related to typecasting
> 
> Hi,
> I have some doubts related to typecasting.
> 
> The  template for a typecast operator is casting_type'(expression).
> 
> Where the  casting_type may be:
> 
> casting_type ::= simple_type | constant_primary | signing
> simple_type ::= integer_type | non_integer_type | ps_type_identifier |
> ps_parameter_identifier
> 
> I want to know that  typedefs of which of the simple and aggregate
types
> are allowed
> for casting_type.
> 
> P.S:: LRM already contains examples with typedefs of structures.i.e
> 
> typedef struct {
> bit isfloat;
>  union { int i; shortreal f; } n;
> } tagged_st;
> typedef bit [$bits(tagged_st) - 1 : 0] tagbits;
> tagged_st a [7:0];
> tagbits t = tagbits '(a[3]);
> bits a[4] = tagged_st' (t);
> 
> I want to know the details of all possible types that can be used as
> above.
> 
> Thanks and regards,
> Shabnam.
> 
> 
> 
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Mar 1 13:29:23 2007

This archive was generated by hypermail 2.1.8 : Thu Mar 01 2007 - 13:29:34 PST