OK, thanks. It looks good.
The sequence does not know a write method. Instead it has a body task. In this task you have to implement how the seq_items should be dreated. It might have insight what you have in your write meothod. Please try the following:
(1) Specify your body task in the sequence like this:
(1)i can use this method but in my testcase each time need to write 3 steps …
means wr_seq.addr= ee;
wr_seq.data = aabb;
wr_seq.start(env.ahb_env.m_st1_ahb_agent.m_st1_sqr);
(2) my requirement is like this.from test .
wr_seq.(16’hee,16’haabb).start(env.ahb_env.m_st1_ahb_agent.m_st1_sqr);
with in one line completed means it could be good.
You can add tasks to your sequence which can be called from the test to accomplish what you want to do. The only additional requirement is that you pass a sequencer to your task so that it knows where to run.
Giving an add-on. This si what the UVM Reference Manual is saying:
virtual task body();
This is the user-defined task where the main sequence code resides. This method should not be called directly by the user.
Writing your own task is legal, but it is not recommended.
The ideal solution would be to implement a register map which does the same thing without requiring the user to add additional tasks to their sequence.