# Control sequences & tasks/functions using virtual sequences

**URL:** <https://verificationacademy.com/forums/t/control-sequences-tasks-functions-using-virtual-sequences/37037>\
**Category:** UVM\
**Tags:** UVM, UVM-virtual\_sequences\
**Created:** [January 17, 2020, 11:16am UTC](https://verificationacademy.com/forums/t/control-sequences-tasks-functions-using-virtual-sequences/37037 "2020-01-17T11:16:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlanJoy](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/a/3da27b/32.png) [@AlanJoy](https://verificationacademy.com/forums/u/AlanJoy)\
**Post date:** [January 17, 2020, 11:16am UTC](https://verificationacademy.com/forums/t/control-sequences-tasks-functions-using-virtual-sequences/37037/1 "2020-01-17T11:16:37Z")

</div>

Hi All,

I have used virtual sequences for controlling multiple sequences.  
But recently in discussions, I have came across we can control sequences & tasks/functions using virtual sequences.  
I have browsed a lot, did not find any documents that describes this implementation.  
If its possible, can you help me how to implement this?

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [January 17, 2020, 4:06pm UTC](https://verificationacademy.com/forums/t/control-sequences-tasks-functions-using-virtual-sequences/37037/2 "2020-01-17T16:06:40Z")

</div>

_In reply to [Alan1990](https://verificationacademy.com/forums/t/control-sequences-tasks-functions-using-virtual-sequences/37037):_

It is a little bit confusing what you are asking.  
Virtual sequences are a proper means to control the execution of agent’s sequences. I believe this is what you mean in your first sentence.  
But I do onot understand the remaining part of your question. Virtual sequences can start only other sequences. You might run more than 1 virtual sequence. But virtual sequences cannot be used to call tasks or functions. But you can call tasks and functions in the body method of your sequence.

---

<div class="post-metadata">

**Author:** ![AlanJoy](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/a/3da27b/32.png) [@AlanJoy](https://verificationacademy.com/forums/u/AlanJoy)\
**Post date:** [January 18, 2020, 8:17am UTC](https://verificationacademy.com/forums/t/control-sequences-tasks-functions-using-virtual-sequences/37037/3 "2020-01-18T08:17:35Z")

</div>

_In reply to [chr\_sue](https://verificationacademy.com/forums/t/control-sequences-tasks-functions-using-virtual-sequences/37037/2):_

> _In reply to [Alan1990](https://verificationacademy.com/forums/t/control-sequences-tasks-functions-using-virtual-sequences/37037/2):_  
> It is a little bit confusing what you are asking.  
> Virtual sequences are a proper means to control the execution of agent’s sequences. I believe this is what you mean in your first sentence.  
> But I do onot understand the remaining part of your question. Virtual sequences can start only other sequences. You might run more than 1 virtual sequence. But virtual sequences cannot be used to call tasks or functions. But you can call tasks and functions in the body method of your sequence.

Thanks chr\_sue.  
We are planing to have tasks/functions to backdoor accessing memories as well as C tasks to be imported by DPI for configuration. Other than using sequences , is there any way to control these from virtual sequences ?

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [January 18, 2020, 8:42am UTC](https://verificationacademy.com/forums/t/control-sequences-tasks-functions-using-virtual-sequences/37037/4 "2020-01-18T08:42:26Z")

</div>

_In reply to [Alan1990](https://verificationacademy.com/forums/t/control-sequences-tasks-functions-using-virtual-sequences/37037/3):_

What I said is you can use c-tasks and functions inside the body method of a sequence. For backdoor access of memories you do not need specific c-code. This is provided by the RAL methods.

---

<div class="post-metadata">

**Author:** ![AlanJoy](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/a/3da27b/32.png) [@AlanJoy](https://verificationacademy.com/forums/u/AlanJoy)\
**Post date:** [January 18, 2020, 8:48am UTC](https://verificationacademy.com/forums/t/control-sequences-tasks-functions-using-virtual-sequences/37037/5 "2020-01-18T08:48:01Z")

</div>

Thanks chr\_sue.
