Hello,
I hope I am posting in the correct forum section.
I searched previous forum entries but could not find anything similar to my issue.
I am implementing a UVM Testbench, with a SCB receiving data, checking it and sending it to coverage model.
My issue involves a 64 bits logic value and its related coverpoint.
When defining the coverpoint, I would like to use 10 bins for the range.
This is a code example of my implementation:
covergroup cg_val (string name, int min, int max) with function sample (int value);
cp_value: coverpoint value
{
bins min = {min};
bins val[10] = {[min+1 : max-1]};
bins max = {max};
}
endgroup: cg_val
While this code generates 10 bins for smaller ranges, it seems to not work when “max” is (2**64)-1.
Is this related to datatypes sizes, as int should be only 32 bits?
I tried by declaring the argument “value” as a longint, but with no effect.
So this did not work :
covergroup cg_val (string name, int min, int max) with function sample (longint value);
cp_value: coverpoint value
{
bins min = {0};
bins val[10] = {[1 : (2**64-2)]};
bins max = {(2**64-1)};
}
endgroup: cg_val
Please let me know if something is not clear or missing.
I am running on Questa Sim-64 2019.3
Thanks in advance for help.
Luca