Need help with virtual sequencer

I have written the code for virtual sequencer to control subsequences in the lower sequencers in the IVC verification components-IVC1&IVC2 following the ovm userguide guidelines. When I try to simulate the code wth the MVC test top, I am getting the following error:

# ** Error: (vsim-3046) base/ovm_registry.svh(53): Too many arguments to ‘new’. Expected 0, found 2.
# Region: /SATAphy_wrapper_top/ovm_component_registry::ovm_component_registry__11
# ** Error: (vsim-3046) base/ovm_registry.svh(53): Too many arguments to ‘new’. Expected 0, found 2.
# Region: /SATAphy_wrapper_top/ovm_component_registry::ovm_component_registry__11

I have tried extending the virtual sequencer from ovm_sequencer & ovm_virtual_sequencer. The error comes only when I am including the sequencer in my code. How to write a virtual sequencer properly?
Hope to get a response to this post. Would be very thankful if someone can attatch some example code.

Hi Rohan,

I have attached an example of the virtual sequencer.

Thanks,

Hi Rohan,

Attached one more example of virtual sequencer which uses the grab/ungrab methods to control sequencers…

Thank you so much vaibhav. Can anyone suggest a solution to this problem I am encountering now?

While running my code of virtual sequencer, I am getting the first value of my lower sequence twice. I havr tried by disabling the default sequence of lower sequencers using
set_config_int(“.sqr1", “count”, 0);
set_config_int("
.sqr2”, “count”, 0);
set_config_int(“virtual_sequencer”, “count”, 1);
Why is it that the same sequence value is accessed twice?

Hi Rohan,

Can you elaborate what you mean by “getting the first value of lower sequence twice”?

Is it that you get the same data item twice in the lower sequence or something else?

Setting count to 0 only shuts down sequences started automatically using the default_sequence string in the sequencer. You should double check if any sequences are getting started manually in the lower sequencer in which case count doesn’t have any effect.

I hope this helps,

Umer

Thank you for your help.

Hello Vaibhav,

Do you have any example for layered sequences/sequecers which can be used for layered protocols like TCP?

=Ovmboy

Hi OvmBoy,

I hope below link will help you.

http://www.ovmworld.org/forums/showthread.php?t=270

Regards,

Thanks Vaibhav. I’ve gone through this example, I can see that lower sequencer is registered to a sequence (upper_2_lower_seq) which translate upper sequence (ATM cells) to lower sequence (APB trans). Ideally lower sequencer act as a slave to upper sequencer for driving upper sequencer’s data by using upper_2_lower_seq.

My requirement is that I want to use the lower_sequencer as both master and slave. ie, It should able to work for its own sequences (APB trans) and whenever high level packets (ATM cells) are available, it should act on upper_2_lower_seq.

Any suggestions?

=ovmboy

Hi OvmBoy,

I guess You can do something like below.

//Sequencer_2
class sequencer_2 extends ovm_sequencer #(packet_2);
sequencer_1 sqr_1;
ovm_sequencer_utils(sequencer_2) function new(string name = "sequencer_2", ovm_component parent=null); super.new(name, parent); ovm_report_info(get_name(), $psprintf("In new() of %s :: ", get_name()),OVM_LOW); ovm_update_sequence_lib_and_item(packet_2)
endfunction : new
endclass : sequencer_2

So here sequencer_2 can execute its ovm sequences as well as sequencer_1 sequences.

Hope this could work for you.

Regards,

Hi OvmBoy,

Attahced is the example.

This may help you…

Regards,