In reply to cgales:
In reply to ayasaad234:
You should never declare or use p_sequencer, as this reduces the reusability of your sequences.
Instead, your sequence should contain handles to all required objects that are set by the component or virtual sequence that creates the sequence.
Additionally, you should never extend uvm_sequencer to add any objects. Your agent should use a typedef of the uvm_sequencer parameterized with the agent’s sequence_item for the sequencer type.
I am not sure I would agree with any of these recommendations.
#3 - I extend uvm_sequencer all the time instead of the typedef. It makes for very clean agent code, and the sequencer is pretty much simple template code.
#1 - Some people use `uvm_declare_p_sequencer(SEQUENCER_TYPE) (not name) and they put it into a base sequence. The macro ensures that you are running on the correct virtual sequencer by calling the psequencer handle. One common virtual sequence technique is to let the environment store the subsequencer handles in a virtual sequencer so the virtual sequencer acts much like a config object for sequencer handles.
#2 - Perhaps you could explain this a bit better. How do you get handles of sequencers into the sequence? I know Verification Academy shows a set() method in the base test, but I very much dislike this technique since it requires hard-coded paths that can change over time as the verification environment grows or is modified. Am I missing something in your response?
Regards - Cliff Cummings
VP Training Paradigm Works