Different between sequence start with null and sequencer argument

Dear all,

I have some question about starting sequence in uvm.
for example, I’ve got compile error when I’ve implemented with sequencer such as “seq.start(apb_env.apb_agent.sequencer)”
then I got the Null point error at the point.
so I modified as “seq.start(null)” then no error message.
from here, I want to know what differences make Null point error?
Could you guide me which case I can use “Null” and “sequencer” in .start()?

In reply to UVM_LOVE:

If you have a null pointer error, the most likely cause is that you have not “created” your apb_env.apb_agent.sequencer". Check if all the components in the hierarchy are “created”.
That should also explain why using “null” worked for you.

In reply to UVM_LOVE:

Dear all,
I have some question about starting sequence in uvm.
for example, I’ve got compile error when I’ve implemented with sequencer such as “seq.start(apb_env.apb_agent.sequencer)”
then I got the Null point error at the point.
so I modified as “seq.start(null)” then no error message.
from here, I want to know what differences make Null point error?
Could you guide me which case I can use “Null” and “sequencer” in .start()?

A virtual sequeence does not create itself seq_items, i.e you do not need a virtual sequencer. We can only start virtual sequences with ‘null’ argument as the virtual sequencer argument. In this case you need handles to the local (agent) sequencers.
In your case, when running
seq.start(apb_env.apb_agent.sequencer)
the sequencer object does not exist when getting a null point error.

In reply to chr_sue:

Thanks.
Virtual sequence always works with virtual sequencer.
local sequence always works with local sequencer.
There is no interchange between them such as

Wrong e.g )
Virtual sequence with local sequencer
local sequence with Virtual sequence

Am I understanding correctly?

In reply to KillSteal:

Thanks. I’m looking wrong “created” point in my code as your recommend.

In reply to UVM_LOVE:

No, that’s not correct.
When you are replying onmy email
christoph@christoph-suehnel.de
I’ll send you a UVM example testbench using as virtual sequencer ‘null’.
Examples with a virtual sequencer you can find everywhere.