Re: [sv-bc] Review Items for Chapter 7


Subject: Re: [sv-bc] Review Items for Chapter 7
From: Greg Jaxon (Greg.Jaxon@synopsys.com)
Date: Thu Feb 12 2004 - 10:59:16 PST


Maidment, Matthew R wrote:

> 7.14 -
> What about changing the opening sentences:
>
> "A structure expression (packed or unpacked) can be built from member
> expressions using
> braces and commas, with the members in declaration order. Each member
> expression shall
> be evaluated in the context of an assignment to the type of the
> corresponding member
> in the structure. It can also be built with the names of the members"
>
> To:
>
> "A structure expression (packed or unpacked) can be built from member
> expressions using
> braces and commas, with the members in declaration order. Replicate
> operators can be used
> to set the values for the exact number of members. Each member
> expression shall
> be evaluated in the context of an assignment to the type of the
> corresponding member
> in the structure. It can also be built with the names of the members"

struct packed {
    bit sign;
    signed bit[8:0] exponent;
    bit[53:0] mantissa;
} my_dbl;

my_dbl = { 1'b1, {2{'0}}, 142857142 };

Does this RHS have the right number of elements in the list?
Or does "exact number" imply that replication can only be used to produce
the entire list?



This archive was generated by hypermail 2b28 : Fri Feb 13 2004 - 13:31:01 PST