I tried 3 different major simulators (not the latest versions). All 3 gave 6'b000110 for out6a. Two gave the same for out6, one gave 6'b000010. I think 6'b000110 is correct for both. Shalom From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Datta, Kausik Sent: Tuesday, February 18, 2014 11:52 To: sv-bc@eda.org Subject: [sv-bc] Query on cast operation Hi, For the below case, different tools interpret LRM differently. Some evaluate the value of out6 and out6a 6'b000010 and some evaluate 6'b000110. What should be the correct behavior? My understanding of LRM is value of out6 should be 6'b000010 and that of out6a should be 6'b000110. Thanks Kausik module cast39 (input [1:0] in1, input signed [1:0] in2, output [5:0] out5, out5a, out6, out6a); typedef logic [3:0] bit4; assign out6 = 4'(2'b10 + 1'b1 + 2'sb11); assign out6a = bit4'(2'b10 + 1'b1 + 2'sb11); endmodule -- 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 Tue Feb 18 02:30:36 2014
This archive was generated by hypermail 2.1.8 : Tue Feb 18 2014 - 02:30:42 PST