[sv-ec] RE: New proposal for 2112 Remove restrictions on NBA assignments to class members

From: Rich, Dave <Dave_Rich@mentor.com>
Date: Tue Mar 29 2011 - 00:18:14 PDT

Hi Steven,

My intent was to keep the rules as simple as possible. The LRM already allows

always @(classA_h.m1) classB_h.m2 = classA_h.m1;

leaving it up to the user to prevent null handle references. So why not allow

assign classB_h.m2 = classA_h.m1;

leaving it up to the user to prevent the same null references. I gave an example using a static initialization to prevent a null reference in my proposal.

We have related issue in that most implementations already allow these kinds of illegal assignments with virtual interface members, even though it's referencing a dynamic variable. See related http://www.eda.org/svdb/view.php?id=1441

If the rules are clear to the user and mistakes are clear to the user (error: NULL de-reference!), then I think it's worth specifying it this way.

Dave Rich
Verification Technologist
Mentor Graphics Corporation
[Description: Twitter-32]<http://www.twitter.com/dave_59> [Description: Technorati-32] <http://go.mentor.com/drich>

From: Steven Sharp [mailto:sharp@cadence.com]
Sent: Monday, March 28, 2011 11:12 PM
To: Rich, Dave; sv-ec@eda.org
Subject: RE: New proposal for 2112 Remove restrictions on NBA assignments to class members

Dave,

Your first change in 6.21 would allow class members to be assigned with not only NBAs, but also continuous assignments and procedural continuous assignments. I don't think this was your intent, and there would be problems with that. For example, continuous assignments could have the same problem you describe later for the class member on the RHS of a continuous assignment, but without any way of avoiding the possible null handle dereference.

I think you will either need to split out a sentence which describes the limits for NBAs separately from the ones for the other assignments, or leave the original sentence that disallows all combinations, but then specifically says that NBAs to class members are an exception that are allowed.

________________________________
From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Rich, Dave
Sent: Monday, March 28, 2011 1:57 AM
To: sv-ec@eda.org
Subject: [sv-ec] New proposal for 2112 Remove restrictions on NBA assignments to class members
I have uploaded a proposal for 2112. The only actual change is the relaxation of the restriction in 6.21. The other edits are suggested clarifications as we discussed in earlier sv-bc meetings.

Dave Rich
Verification Technologist
Mentor Graphics Corporation
New Office Number: 510-354-7439
[Description: Twitter-32]<http://www.twitter.com/dave_59>[Description: Technorati-32]<http://go.mentor.com/drich>

--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


image001.png
image002.png
Received on Tue Mar 29 00:18:43 2011

This archive was generated by hypermail 2.1.8 : Tue Mar 29 2011 - 00:18:56 PDT