UVM Coverage

Hi,

  1. What is the right syntax for defining bins in coverage for enum? The below syntax doesnt seem to compile.


typedef enum {READ, WRITE} kind_e;

 READ_WRITE: coverpoint trans.apb_cmd {
    bins apb_cmd [] = {[trans.apb_cmd.first:trans.apb_cmd.last]};
  }

2) If i manually declare the bins as like below and if i dont issue any read transaction my coverage still shows 100%. Can anyone point me what is wrong here?

https://edaplayground.com/x/WVnJ

bins apb_cmd [] = {[0:1]};


In reply to rag123:

Your testbench works perfectly Even without running the read sequence you get 100% functional cobverage.
Look to your monitor. I was adding in your diagnostic message in the monitor the apb_cmd and this shows your are sending also READ to the coverage. You have to modify your monitor.
See how it works here

Hii, i am new to this UVM i want to know about what does coverage do and how to get good coverage if i have 32 bit address and 32 bit data and how many packets need to be send

once check this code if anything wrong