Why OSVVM™? › Forums › OSVVM › Coverage and sequences
Tagged: coverage
*Hello
I’m doing a testbench for an ALU.
In SystemVerilog is possible to create a bin for a sequence of ALU operations for example:
typedef enum {add, sub, mult, and, or, xor, nand, nor} op_t;
op_t AluOp;
ent1: coverpoint AluOp {
bins l1 = (and => or => mult);
bins l2 = (mult => mult => add);
}
This bin will be activated only if those operation happen in this sequence. Is it possible to write a bin like that with OSVVM?
Sure, it is easy. Sequences imply history. We create history explicitly just like RTL – by using clocked processes / flip-flops.
Once you have history, this is just a simple cross product of selected current values and two previous values.
WRT sampling, in OSVVM, we trigger on transaction completion using an explicit call to ICover.