Uvm_comparer::compare_field_int error

Hi ,
I’m running verification environment with SB.
added the uvm_comparer::compare_field_int to my env.
but got an error
image

who can help with this issue?
the size of bits that i compare is 36 bits, less then 64…

Thanks!

@Brurya
Could you please provide the code of the class you are trying to compare it’s fields?

Yes, thanks.

just 2 of 4 field should be compared

thanks a lot

Not sure it is the reason for the failure.
Your class is not a parametric class, so you should not use:
`uvm_object_param_utils_begin

Just use instead the regular:
`uvm_object_utils_begin

Please try to fix it, and see if it solves the problem.

If it won’t help,
please provide next some code from:
…/env/sb/include/vrs_comprer.svh

I don’t think that is the reason for the failure. Please show us the line 95 of the comparer.

BTW, it would really help if you posted your code as formatted text, not as a picture.

1 Like

These are the problematic lines:
94 function bit compare_field_int (string name,
95 logic[63:0] lhs,
96 logic[63:0] rhs,
97 int size,
98 uvm_radix_enum radix=UVM_NORADIX);

This function called from:

function bit compare_field (string name,
uvm_bitstream_t lhs,
uvm_bitstream_t rhs,
int size,
uvm_radix_enum radix=UVM_NORADIX);

if(size <= 64)
return compare_field_int(name, lhs, rhs, size, radix);

endfunction

The issue is resolved.
I run now with UVM-1.2,
so, I need to change the lines above from:
94 function bit compare_field_int (string name,
95 logic[63:0] lhs,
96 logic[63:0] rhs,
97 int size,
98 uvm_radix_enum radix=UVM_NORADIX);

To:

 function bit compare_field_int (string name, 
                                         uvm_integral_t lhs, 
                                          uvm_integral_t rhs, 
                                          int size,
                                          uvm_radix_enum radix=UVM_NORADIX);

Thanks all