In reply to Ramababu:
It is returning the sum as a truncated 5-bit unsigned value.
It would make more sense if it was written as
$display( h.a.sum(D1) with (D1.sum(D2) with (32'(D2))) );
In reply to Ramababu:
It is returning the sum as a truncated 5-bit unsigned value.
It would make more sense if it was written as
$display( h.a.sum(D1) with (D1.sum(D2) with (32'(D2))) );