Hi
I am having a doubt in the driver communicating the response back to sequencer through the seq_item_port.item_done (rsp) but how does this rsp is implemented in sequence body task,can anybody explain with one example?
I have checked the Cookbook Driver/Sequence API but things are not clear
.
Thanks
Taahir
In reply to syed taahir ahmed:
Hi
I am having a doubt in the driver communicating the response back to sequencer through the seq_item_port.item_done (rsp) but how does this rsp is implemented in sequence body task,can anybody explain with one example?
I have checked the Cookbook Driver/Sequence API but things are not clear
.
Thanks
Taahir
Can anybody explain how set_item_done(rsp) is implemented in Sequence?
In reply to syed taahir ahmed:
-
Use seq_item_port.put(rsp) in driver after the item done, and use get_response(rsp) in sequence after finish item.
-
or if you are assigning $cast(req,rsp) rsp handle to req handle, then without using get/put method, u will get automatically req handle (replica of rsp object) in sequence after finish item.
Regards,
Deepak
In reply to Deepak Ameta:
In reply to syed taahir ahmed:
- Use seq_item_port.put(rsp) in driver after the item done, and use get_response(rsp) in sequence after finish item.
- or if you are assigning $cast(req,rsp) rsp handle to req handle, then without using get/put method, u will get automatically req handle (replica of rsp object) in sequence after finish item.
Regards,
Deepak
Hi Deepak,
Thanks.
I m pasting pseudo code ,please me if iam wrong
task run_phase(uvm_phase);
…
//Driver Code
seq_item_port.get_next_item(seq_item);
task drive(…);
seq_item_port.item_done();
seq_item_port.put(rsp);
endtask
//Sequence Code
task body();
//…creating the sequence_item
start_item(tx);
assert(tx.randomize());
finsih_item(tx);
get_response(rsp);
endtask