# Is there a build-in API to get the obj of seq in the seqr which the seq is running?

**URL:** <https://verificationacademy.com/forums/t/is-there-a-build-in-api-to-get-the-obj-of-seq-in-the-seqr-which-the-seq-is-running/48531>\
**Category:** UVM\
**Tags:** sequence\
**Created:** [September 20, 2024, 8:40pm UTC](https://verificationacademy.com/forums/t/is-there-a-build-in-api-to-get-the-obj-of-seq-in-the-seqr-which-the-seq-is-running/48531 "2024-09-20T20:40:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![VE1](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/v/54ee81/32.png) [@VE1](https://verificationacademy.com/forums/u/VE1)\
**Post date:** [September 20, 2024, 8:40pm UTC](https://verificationacademy.com/forums/t/is-there-a-build-in-api-to-get-the-obj-of-seq-in-the-seqr-which-the-seq-is-running/48531/1 "2024-09-20T20:40:22Z")

</div>

we have a large scale test bench flow with multi layer seqs. Unfortunately i am not able to change the flow, so “to have a better methodology to do it” is out of question. I think i might be able to achieve it by adding some code in seq/seqr then use p\_senquencer to communicate, but just wondering if there is build-in API in sequencer to get the running sequence.  
Thanks

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [September 20, 2024, 9:47pm UTC](https://verificationacademy.com/forums/t/is-there-a-build-in-api-to-get-the-obj-of-seq-in-the-seqr-which-the-seq-is-running/48531/2 "2024-09-20T21:47:37Z")

</div>

See [get\_current\_item()](https://verificationacademy.com/verification-methodology-reference/uvm/docs_1.2/html/files/seq/uvm_sequencer_param_base-svh.html#uvm_sequencer_param_base#(REQ,RSP).get_current_item)

---

<div class="post-metadata">

**Author:** ![VE1](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/v/54ee81/32.png) [@VE1](https://verificationacademy.com/forums/u/VE1)\
**Post date:** [September 25, 2024, 12:20am UTC](https://verificationacademy.com/forums/t/is-there-a-build-in-api-to-get-the-obj-of-seq-in-the-seqr-which-the-seq-is-running/48531/3 "2024-09-25T00:20:49Z")

</div>

Thanks Dave.

get\_currect\_item() works. A follow-up question, let say if i have below “wait” statements Does get\_currect\_item() without any arguments unblock wait expression? (a warning from one of simulator)

```auto
task run_phase(...) 
    forever begin 
       **wait(get_current_item() !=null);**
       execute_item();
      .... 
      //work around for wait ( get_current_item != null);
       while ( get_current_item() == null) begin 
           dummy_run()
        end
```
