I have a 64bit register and I need to write coverage for all 64 onehot bins, so I thought that writing a with
expression would have solved the issue, but it looks like this brute force approach is causing the tool to run for a long time (with no clear indication that it will finish!).
This is the code snippet:
bit [63:0] register;
covergroup mycg();
my_cp: coverpoint register {
bins onehot [] = register with ($onehot(item));
}
endgroup
a 64bit register will have 2**64 combinations, which means the onehot
function will need to run 2**64 times.
Is there any alternative way to achieve that?