[sv-bc] Expression evaluation question

From: Jason Campbell <jcampbell_at_.....>
Date: Fri Aug 28 2009 - 09:12:43 PDT
Hi,

 

What should be the proper result for the example below?

 

module test;

 

  bit [15:0] s;

  reg [15:0] a, b;

 

  initial

    begin

      a = 16'hxx15;

      b = 16'h1234;

      s = a + b;

      $display("s:%h", s);

      s = 16'hxx15 + 16'h1234;

      $display("s:%h", s);

    end

 

endmodule

 

One commercial simulator is giving:

 

s:1249

s:0000

 

But shouldn't the value of both expressions be s:0000? Isn't the

LHS evaluated in 4-state then converted to 2-state?

 

Thanks,

 

Jason


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Aug 28 09:09:50 2009

This archive was generated by hypermail 2.1.8 : Fri Aug 28 2009 - 09:10:44 PDT