# Flush function of uvm\_in\_order\_class\_comparator not working

**URL:** <https://verificationacademy.com/forums/t/flush-function-of-uvm-in-order-class-comparator-not-working/30056>\
**Category:** UVM\
**Tags:** UVM, uvm\_tlm\_fifoflush, uvm\_in\_order\_class\_comparator\
**Created:** [October 22, 2014, 3:59am UTC](https://verificationacademy.com/forums/t/flush-function-of-uvm-in-order-class-comparator-not-working/30056 "2014-10-22T03:59:48Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Reuben](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/reuben/32/1409_2.png) [@Reuben](https://verificationacademy.com/forums/u/Reuben)\
**Post date:** [October 23, 2014, 5:11am UTC](https://verificationacademy.com/forums/t/flush-function-of-uvm-in-order-class-comparator-not-working/30056/6 "2014-10-23T05:11:43Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/flush-function-of-uvm-in-order-class-comparator-not-working/30056/5):_

From the parent component?

I created a uvm\_in\_order\_class\_comparator in the build\_phase of my scoreboard.  
Then in the write function I’m calling the do\_flush()

```verilog

virtual function void build_phase(uvm_phase phase);
  comp_cmd = uvm_in_order_class_comparator#(packet)::type_id::create("comp_cmd", this);
endfunction

virtual function void write_exp_imp(packet tr);
  if(tr.reset) begin
    comp_cmd.do_flush();
  end
endfunction

```

What do you mean by calling it from the parent component?

---

_[View the full topic](https://verificationacademy.com/forums/t/flush-function-of-uvm-in-order-class-comparator-not-working/30056)._
