Proposal for SV-BC7c


Subject: Proposal for SV-BC7c
From: Steven Sharp (sharp@cadence.com)
Date: Fri Dec 06 2002 - 13:19:14 PST


At the 11/15 meeting, I was given the action item of proposing language to
clarify the meaning of type "matching" in structural literals. (SV-BC7c)
Peter's input indicated that any types that can be legally assigned were OK.
This effectively means that no matching is required, contrary to the text.

WAS:
Each element must match the type being initialized, so the following do
not give size warnings:

 bit unpackedbits [1:0] = {1, 1}; // no size warning, bit can be set to 1
 int unpackedints [1:0] = {1'b1,1'b1}; //no size warning, int can be set to 1'b1

PROPOSED IS:
Each element is assigned as if in a separate assignment statement, with type
and size conversions applied where necessary. The following examples
illustrate size conversions:

 bit unpackedbits [1:0] = {1, 1}; // both bits set to 1
 int unpackedints [1:0] = {1'b1, 1'b1}; // both ints set to 1
 
Steven Sharp
sharp@cadence.com



This archive was generated by hypermail 2b28 : Fri Dec 06 2002 - 13:19:38 PST