It would be the same for a select of a vector. I think the reason is that allowing it would harm performance. Shalom From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Rados?aw Nawrot Sent: Thursday, December 05, 2013 09:43 To: sv-ec@eda.org Subject: [sv-ec] Packed union member pass by reference Hi, I have question about packed union elements pass by reference. Simple example: module top ( ); union packed {reg r; bit b;}u; function automatic void foo(ref reg x); x=1'bz; endfunction task automatic tsk (ref bit b); #1; case ( b ) 0: $display("0"); 1: $display("1"); default : $display("Error"); endcase endtask initial fork foo(u.r); tsk(u.b); join endmodule LRM say's:" Only the following shall be legal to pass by reference: - A variable, - A class property, - A member of an unpacked structure, or - An element of an unpacked array. " That means union member cannot be passed by reference. Am I right? Why? What are the contraindications to allow such construction? Regards, Radek -- This message has been scanned for viruses and dangerous content by MailScanner<http://www.mailscanner.info/>, and is believed to be clean. --------------------------------------------------------------------- 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.Received on Thu Dec 5 01:29:23 2013
This archive was generated by hypermail 2.1.8 : Thu Dec 05 2013 - 01:32:54 PST