Coverage and sequences

Why OSVVM™? Forums OSVVM Coverage and sequences


This topic contains 2 replies, has 3 voices, and was last updated by Avatar of Patrick Bryant Patrick Bryant 1 month, 1 week ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #1477
    Avatar of Ledoux


    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?

    Avatar of Jim Lewis
    Jim Lewis

    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.


    OK, I’m a novice, but Jim’s reply seems to be too simplistic, for he is only tracking the operations that were performed. In the real-world of validation, we have to track a number of “Usage” scenarios the DUT will be used for. In this case, the “Usage” scenarios will be a collection of operations that have to be validated. Therefore, the validation engineer has to define a map between Bin<n> and what “Usage” it covers. In addition, if the Usage is important then it must be executed many times (via “AtLeast”?).

    In addition to tracking “what has been done”, it is good to have the Coverage Type define the next Random Coverage Point. A Coverage Point is an array of integers where the size of the array is the number of Bins. A generator must be created to define the I/Os on the DUT for the next Usage to test based upon that array of integers.

    (By the way, all of this true for UVM, in that the validation engineer has to clearly define the Usages to test, and how to generate the sequences to perform the Usages.)

    Pat Bryant (the novice)

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.