preet723 Posted May 24, 2012 Report Share Posted May 24, 2012 hi experts, Please help me figure out this. Also please pardon the syntax. Just trying to write the logic here. 1) i have class my_seqr derived from uvm_sequencer; class my_seqr extends uvm_sequencer; 2) class my_sequence_item derived from uvm_sequence_item; Now in agent i have created the sequencer using create method. class my_agent extends uvm_agent; my_seqr seqr; seqr = my_seqr::type_id::create("seqr") // ignore syntax please The problem is, inside my_sequence_item i want to point to "seqr" object. How can i do this. example: class my_sequence_item extends uvm_sequence_item; my_seqr local_seqr; now i want local_seqr to point to seqr in agent class. I know m_sequencer handle to uvm_sequencer is there in UVM, but that is for uvm_sequencer class and not for my_seqr derived class. To be honest one of my friends did this: $cast( local_seqr, m_sequencer) and it works, but i dont understand how local_seqr derived class sequencer handle can be pointed to m_sequencer handle which is base class handle and pointing to base uvm_sequencer in uvm. Am i missing something in how m_sequencer works ? Please help. much thanks. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.