# Can't understand how covergroup sample works

**URL:** <https://verificationacademy.com/forums/t/cant-understand-how-covergroup-sample-works/36179>\
**Category:** UVM\
**Tags:** UVM-SystemVerilog, UVM\
**Created:** [June 13, 2019, 1:36pm UTC](https://verificationacademy.com/forums/t/cant-understand-how-covergroup-sample-works/36179 "2019-06-13T13:36:46Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![alexd555](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/a/bbe5ce/32.png) [@alexd555](https://verificationacademy.com/forums/u/alexd555)\
**Post date:** [June 14, 2019, 5:21pm UTC](https://verificationacademy.com/forums/t/cant-understand-how-covergroup-sample-works/36179/10 "2019-06-14T17:21:16Z")

</div>

I do it

```verilog
....
task run_phase(uvm_phase phase);
      calc_trans tx;
    
    repeat(300)
    begin

      @(posedge ifc.clk);

      tx=calc_trans::type_id::create("tx");
      tx.a = ifc.a;
      tx.b = ifc.b;
      tx.opcode = ifc.opcode;
      tx.res=ifc.res;
      tx.error=ifc.error;

      // run write function from scoreboard
      aport.write(tx);
     end
   endtask: run_phase
   
endclass: calc_monitor

```

Where is my problem ?

---

_[View the full topic](https://verificationacademy.com/forums/t/cant-understand-how-covergroup-sample-works/36179)._
