Jump to content

Recommended Posts

Posted

Hi,

I'm trying to add some functionality to the sequencer, so that when there are no more sequence items to send to the driver, it will automatically send one last sequence item.

I thought of adding in the run_phase something like this:

task run_phase()

raise_objection;

forever begin

// I need to insert here something that says that the last req is done

//checking if there are anymore seq_items available

if(!seq_item_export.has_do_available()) begin

s_item.randomize();

execute_item(s_item);

break;

end

end

drop_objection;

endtask

So, my question is how do I check in the sequencer that the last item sent is finished?

Does the sequence keep running if I add this code in the sequencer?

Thanks

P.S. The driver uses get()/put().

Posted

hi,

i dont think its the right path to update the sequencer to accomplish your scenario. a driver and even a sequencer are pure "slaves" of the scenario generation. they dont do anything on their own - they just execute what they are being told) so they cannot figure out on their own if this is the last item or not (you could do a wait for some time in the sequence and as result you dont have a "do" during this time). i think its better to use one of the following options:

1. make a base sequence which in its body do'es your final item. your normal sequences derive from the base and call as last statement in body() the base via super.body()

2. you use a sequence library which runs the set of your normal sequences (=subsequences) followed by your last-sequence as part of the uvm sequence library strategy

3. you auto instantiate the last item in case the sequencer doesnt have an item AND you notifed via a flag that the next try_next_item() returning a null should result in a last_item.

anyway, i wouldnt interfere with a sequencer (for instance you miss the super.run_phase() calls already in your code)

/uwe

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...