Multiple sequencers to the same driver

Hi ,

I have a huge driver code and I have 5 sequencers connected to the same driver in the connect block of the env .

It gives me an error as

env.driver.sqr_pull_port [Connection Error] connection count of 5 exceeds maximum of 1

Can I connect 3-4 sequencers to the same driver ???

If not what is the alternate solution because I cant think of splitting the driver now ???:(:(:(

Thanks in advance .
Asha Rai

Hello asharai:

Probably the easiest thing to do is to add some ports to your existing driver:

ovm_seq_item_pull_port #(REQ, RSP) seq_item_port2;
ovm_seq_item_pull_port #(REQ, RSP) seq_item_port3;
...

You’ll need to new() them, and connect them - one to each sequencer.

Then, in the run task, you’ll need to decide which port to execute a get() or get_next_item() from. There is a bit of arbitration going on there.

If you want “fair” arbitration, then you might do a round-robin between the ports, and a try_next_item() so that if the next sequencer in line doesn’t have anything, you can just skip that one and go on to the next sequencer.

-Andy

Thanks Andy

Hi Andy ,

When I implement this with OVM-2.0 it gives a huge list of simulation errors

One of the sample error being

** Error: (vsim-3567) ../../src/tlm/ovm_imps.svh(91): No field named 'can_get'. # Region: /sonet_tb/ovm_get_peek_imp::ovm_get_peek_imp__1 # ** Error: (vsim-3567) ../../src/tlm/ovm_imps.svh(91): No field named 'try_peek'. # Region: /sonet_tb/ovm_get_peek_imp::ovm_get_peek_imp__1 # ** Error: (vsim-3567) ../../src/tlm/ovm_imps.svh(91): No field named 'can_peek'.

Thanks
Asha Rai

Hi Asha:

The seq_item_pull_port, is the port that is used between the sequencer and the driver. It is not a standard TLM port. The reference manual is your friend. It will show you the available methods.

This is the seq_item_pull_port has a method: try_next_item() which I believe is what you will want to use. We are not able to implement the normal TLM methods in this port.

-Andy

Hi Andy,

I have created four ports in my common driver say seq_item_port1,seq_item_port2,seq_item_port3 using ovm_seq_item_pull_port #(REQ, RSP) .

Now if I want to connect it to my three different sequencers can I do it as

driver.seq_item_port1.connect(sequencer1.seq_item_export);
driver.seq_item_port2.connect(sequencer2.seq_item_export);
driver.seq_item_port3.connect(sequencer3.seq_item_export);

If I try to do this it gives an error …

What is the importance ovm_seq_item_pull_export #(REQ, RSP) and ovm_seq_item_pull_imp #(REQ, RSP) ??
why does this given an error even though I am trying to connect to four different sequencers.
If I want to create four seq_item_export for four sequencers which class should I use?
Should I use ovm_seq_item_pull_export or ovm_seq_item_pull_imp ? The refernce PDF does not give this info clearly . I am confused …

Thanks
Asha Rai

Hi Asha:

Without seeing your code, I can’t really tell what the problem is, but here’s one guess: did you actually put a space in there?

driver.seq_item_port1.connect(sequencer1.seq_item<font color=Red>_ e</font>xport);

-Andy

No not at all typo errors … I will send a pseudocode ASAP…

Thanks for your help.

Asha Rai

Hi Andy ,

Sorry for the delay in posting the code

I am attaching a pseudocode for your reference . In the tar file there are three log files.

The log file log1 indicates the output if I use the following in each sequencer

ovm_seq_item_pull_export#(simple_item) seq_item_export1;

The log file log2 indicates the errors when I use the following in each sequencer
ovm_seq_item_pull_imp #(simple_item) seq_item_export1;

The log file log3indicates the errors when I use the following in each sequencer
ovm_seq_item_pull_port #(simple_item) seq_item_export1;

I was confused whether I am declaring the ports properly or not . Am I using the appropriate classes to declare the ports .
Why am I not able to make a simple connection between the three sequencers even after declaring three different ports

Please help me out in this regard.

Asha Rai

Hi Asharai,

After looking your code, I would like to ask you one question that You have 3 different sequencers created from ovm_sequencer which by default contains one seq_item_export inbuilt. Is there any significance of instantiating additional 'seq_item_export1,’ 'seq_item_export2.'. in a corresponding simple_sequencers. ??

I think You can directly connect seq_item_export of each sequencer to the corresponding ports of your simple_driver which You have instantiated.

e.g. in your test.sv,

driver.seq_item_port1.connect(sequencer.seq_item_export);
driver.seq_item_port2.connect(sequencer2.seq_item_export);
driver.seq_item_port3.connect(sequencer3.seq_item_export);
as sequencer, sequencer2, sequencer3 are separate sequcners extended from ovm_sequencer…

Ritesh