Can we able to connect two sequencers to a single driver in an agent?
In reply to Dinesh Rajendiran:
Do you have 2 different sequence items?
How many interface you have to drive?
In reply to georgean:
Hello,
In UVM, the connection between a sequencer and a driver is a one to one connection.
In theory, you can extend the type of the seq_item_export port (you need to create a class which inherits uvm_port_base #(uvm_sqr_if_base #(REQ, RSP))) to allow multiple connections to it, this can be done by overriding the new method. You must create a custom sequencer class which inherits the uvm_sequencer_param_base #(REQ, RSP) class. This custom sequencer class will instantiate a seq_item_export port whose type will be the newly port type. Your sequencers must inherit the custom sequencer class and after that you can connect two sequencers to a single driver.
Hope this helps you,
Andra Socianu
In reply to AndraRadu_AMIQ:
shall u provide the example code for two sequencers to one driver
i tried it very hard but i am not getting it.hope u will help me
thanks and regars
merugu prashanth
In reply to MERUGU PRASHANTH:
Again, the sequencer-driver connection is a ONT-TO-ONE connection.
BTW I do not understand why you need 2 sequencers connected to 1 driver.
In reply to chr_sue:
hi,
yes driver and sequencer are in one to one connection only . but i came to know in one of the reply that we can override seq_item_export, by which we can connect 2 sequencers to one driver.
cant we??
In reply to chr_sue:
hi chr_sue,thanks for the response
why because i am trying to drive 2 sequences one after other by 2 sequencers and one driver. i know that we can do with one sequencer (i.e by using nested sequences or by using 2 `uvm_do which calls 2 sequences one after other).but cant we do this with 2 sequencers and one driver.
thanks and regards
prashnath
In reply to MERUGU PRASHANTH:
In reply to chr_sue:
hi,
yes driver and sequencer are in one to one connection only . but i came to know in one of the reply that we can override seq_item_export, by which we can connect 2 sequencers to one driver.
cant we??
What do you mean with ‘we can override seq_item_export’?
And again: it is a one-to-one connection!
In reply to chr_sue:
In theory, you can extend the type of the seq_item_export port (you need to create a class which inherits uvm_port_base #(uvm_sqr_if_base #(REQ, RSP))) to allow multiple connections to it, this can be done by overriding the new method. You must create a custom sequencer class which inherits the uvm_sequencer_param_base #(REQ, RSP) class. This custom sequencer class will instantiate a seq_item_export port whose type will be the newly port type. Your sequencers must inherit the custom sequencer class and after that you can connect two sequencers to a single driver.
just explain me this.if u dont mine
In reply to MERUGU PRASHANTH:
In reply to chr_sue:
In theory, you can extend the type of the seq_item_export port (you need to create a class which inherits uvm_port_base #(uvm_sqr_if_base #(REQ, RSP))) to allow multiple connections to it, this can be done by overriding the new method. You must create a custom sequencer class which inherits the uvm_sequencer_param_base #(REQ, RSP) class. This custom sequencer class will instantiate a seq_item_export port whose type will be the newly port type. Your sequencers must inherit the custom sequencer class and after that you can connect two sequencers to a single driver.
just explain me this.if u dont mine
I do not understand what you mean with ‘a class which inherits uvm_port_base #(uvm_sqr_if_base #(REQ, RSP))) to allow multiple connections’. Because this descibes only a bidirectional interface, request - response.
The only thing you can do is to extend your uvm_sequencer and adding a second uvm_seq_item_pull_export #(REQ,RSP) and extending the uvm_driver adding a second uvm_seq_item_pull_port #(REQ, RSP). But then you have to arbitrate in your driver both TLM ports ia special way. It is a solution generating more problems than solving them.
In reply to chr_sue:
how can i add uvm_seq_item_pull_export will u give me the example please
In reply to MERUGU PRASHANTH:
This is a simple extension of the uvm_driver the uvm_sequencer, like this:
class my_uvm_sequencer extends uvm_sequencer #(my_item);
`uvm_components_utils(my_uvm_sequencer)
uvm_seq_item_pull_export #(my_item) seq_item_export;
.....
endclass
The driver implements a
uvm_seq_item_pull_port
.
In reply to MERUGU PRASHANTH:
i know that we can do with one sequencer
Then please explain why you think using 2 sequencers is better than one? The whole purpose of a sequencer is to allow multiple sequences to drive items on a single driver. It sounds like you are trying to reinvent the wheel.