[sv-bc] Query on cast operation

From: Datta, Kausik <Kausik_Datta@mentor.com>
Date: Tue Feb 18 2014 - 01:52:19 PST
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, and is
believed to be clean.
Received on Tue Feb 18 02:10:26 2014

This archive was generated by hypermail 2.1.8 : Tue Feb 18 2014 - 02:10:45 PST