Jump to content

Unable to call a task using a sequence handle present inside another sequence


Recommended Posts

Hi All

I am facing a problem while accessing a task which is present inside a sequence.

Scenario:

1. I am creating the handle of a sequence seq_1( which has a task defined say suppose task_1) inside body of another sequence say suppose seq_2.

2. Inside the body of sequence seq_2 did create for seq_1.

3. Trying to access task_1 by using "seq_1.task_1" inside the body of seq_2.

The task_1 is not invoked at all as the functionality performed by task_1 is not getting executed.

Can anyone tell me the reason?

Thanks and Regards

Mohammad Zafar

Link to comment
Share on other sites

Hi,

Issue is with the create method of seq_1 inside seq_2. I have other idea which might helpful to you.

i) Define a parent sequence and define a task inside it say;

class parent_seq extends uvm_sequence#(seq_item);

......define task here.........

endclass

ii) Define a child sequence extends from parent sequence and call the parent task inside it say ;

class child_seq extends parent_sequence;

super.disp();//disp() is the task present in parent sequence

endclass

Thanks,

Mahee.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...