Re: [sv-bc] applying '{default:} struct assignment pattern on array of structs

From: Jonathan Bromley <jonathanbromley@ymail.com>
Date: Mon Jan 24 2011 - 03:08:51 PST

Shalom

I would say it's illegal, because the inner assignment pattern has no
self-determined type. So the array's element type doesn't meet any of the three
criteria in the default: matching rule (last bullet point at the foot of p.192
in 1800-2009 clause 10.9.1). I think it has to be that way, because of the
recursive nature of the default: key.

I can easily imagine users saying it should be correct using the well-known
mathematical technique of proof from obviousness.

Jonathan

>
>From: "Bresticker, Shalom" <shalom.bresticker@intel.com>
>To: "sv-bc@eda.org" <sv-bc@eda.org>
>Cc: Alex Shot <Alex.Shot@synopsys.com>
>Sent: Mon, 24 January, 2011 10:35:15
>Subject: [sv-bc] applying '{default:} struct assignment pattern on array of
>structs
>
> Hi,
>
>Is the following legal? Why or why not?
>
>module test;
> struct { int a; int b; } str[2:0];
> assign str = '{default:'{a:1, b:2}};
>endmodule
>
>Thanks,
>Shalom
>
>Shalom Bresticker
>Intel LAD DA, Jerusalem, Israel
>+972 2 589 6582 (office)
>+972 54 721 1033 (cell)
>http://www.linkedin.com/in/shalombresticker
>
> ---------------------------------------------------------------------
>Intel Israel (74) Limited
>
>This e-mail and any attachments may contain confidential material for
>the sole use of the intended recipient(s). Any review or distribution
>by others is strictly prohibited. If you are not the intended
>recipient, please contact the sender and delete all copies.
>--
>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 Mon Jan 24 03:09:23 2011

This archive was generated by hypermail 2.1.8 : Mon Jan 24 2011 - 03:09:28 PST