How to combine req and rsp sequence item into single class?

In reply to UVM_SV_101:

Thanks. But where is your problem?
Your req conatins both input and output data.
But I do not believe you want to randomize valid, ready, out_valid and data_out.
I believe valid, ready and valid_out do not belong to the transaction. They are signals in your virtual interface.
Your req in transaction monitors the data members aadr, daat_in and cmd.
And the rsp especially data_out. There ios nothing to combine.
But I believe you need a tlm_fifo to stote the req.