一个req,一个rsp。
On the side of driver:
1)Create the response to send back
rsp = new(“s_rsp”);
2)Update the sequence info(important for respose routing)
rsp.set_id_info(req);
3)Update the response with relevant info
Rsp.answer = req.question + 1;
4)Return the response via the argument to item_done
seq_item_port.item_done(rsp);
On the side of sequence:
You can retrieve the resp after execute the request.
...
// Execute the request
`ovm_do_with(req, {req.question == i;});
// Retrieve the response
get_response(rsp);