In this case, get_sequencer() returns a path to uvm sequencer defined in my env.
The simulator is telling me that it couldn’t find “super_cool_object” even though at the test top level I set “*” which I thought means the set object is visible to anyone, but it’s not working. Can anybody correct me on how my configdb set should be written to make the connection work?
It’s not clear to me…what is the difference in using m_sequencer vs get_sequencer() here? Shouldn’t they both return to me the sequencer that I invoked when I called my sequence.start() method?
In reply to silverace99:
get_sequencer returns an object of type uvm_sequencer_base.
See here:
virtual function uvm_sequencer_base get_sequencer (....);
This is your Problem. You have to perform y type Cast to your sequencer type.
Declaring the p_sequncer using this UVM macro
`uvm_declare_p_sequencer(my_sequencer)
is doing this work for you.
It is equivalent to
my_sequencer p_sequencer;
if ( ! $cast(p_sequencer, get_sequencer()) )
`uvm_fatal(...)
Ok. To be clear, what you are saying is that get_sequencer() is returning a base sequencer object instead of the derived sequencer object that I am using, and therefore even if the path string is correct the uvm_config_db get() will fail to on it’s database key search?
Because when I look at uvm debug menu via waveform gui, I can see that the path string is matching. Or perhaps I am misunderstanding how uvm_config_db get() works.
Looking at the code and tests I ran, the get_sequencer() call returns the same handle as m_sequencer, so there should be no difference.
I would therefor look at something not matching in the set() hierarchy. I noticed that you used ‘null’ in the set, where typically ‘this’ is used when within the UVM environment.
In reply to silverace99:
Looking at the code and tests I ran, the get_sequencer() call returns the same handle as m_sequencer, so there should be no difference.
I would therefor look at something not matching in the set() hierarchy. I noticed that you used ‘null’ in the set, where typically ‘this’ is used when within the UVM environment.
The question is, which kind of object is m_sequencer?
Chuck, the macro `uvm_declare_p_sequencer is part of the UVM base class library, i.e. intended to be used.
The question is what is useful!
In my projects I recommend my customers to use virtual sequences or to start a sequence explicitely on a specific sequencer.
Hey thanks guys for the information. I understand the issue better now.
My problem isn’t the use of get_sequencer() vs m_sequencer, but that somehow my pathing is incorrect. But that is probably a topic for another thread, which I will post later.
Because the sequences does not have a position in the topology of the testbenc. You have to look for a component which relates to the sequence. This is a sequencer.