Hi,
I am doing sequence layering (upper layer and lower layer), lower layer sequencer is connected with lower driver. This Driver is connected with DUT. The request send to the DUT by driver (seq_item_port.get(req)) from lower sequencer. Now DUT will give response after executing the request to the driver. Now driver will put the response to the lower sequencer through seq_item_port.put(rsp). This transaction flow is happening finely for a simple transaction like for giving one request and getting one response. But the problem I am facing is, I want to give one request, now the DUT will give two or more consecutive responses. I am able to get first response, after getting this response the driver ↔ sequencer communication is ended. Because of that I am not able to receive the further responses. How can I keep alive my sequence until getting all responses?? Is this possible with reponse_handler (Reponse API)?
Code Snippet:
//////////////////////////////////////////////////////////////////////////////
// Lower Sequence
///////////////////////////////////////////////////////////////////////////////
class lower_seq extends uvm_sequence # (lower_packet);
…
…
upper_packet upp_pkt, rsp_upp;
lower_packet low_pkt, rsp_low;
task body();
upper_sqr.get (upp_pkt);
start_item(low_pkt);
.......
finish_item(low_pkt);
// Response
get_response (rsp_low);
rsp.print();
///putting reponse to upper layer
upper_sqr.put (rsp_upp);
endtask
endclass
//////////////////////////////////////////////////////////////////////////////
// Lower Driver (Driver)
///////////////////////////////////////////////////////////////////////////////
class driver extends uvm_driver # (lower_packet);
…
…
task run_phase();
lower_packet low_pkt, rsp;
forever
begin
seq_item_port.get(low_pkt);//sumit
// drive to DUT task
send_to_DUT (low_pkt);
// Response
$cast(rsp, low_pkt.clone());
rsp.set_id_info(low_pkt);
//collecting reponse from DUT
rsp_to_low_sqr (rsp);
// put to lower sequencer
seq_item_port.put(rsp);
end
endtask
task send_to_DUT (lower_packet low_pkt);
.......
.......
endtask
task rsp_to_low_sqr (lower_packet rsp);
wait(intf.valid)
#10;
while (intf.valid)
rsp.payload = intf.data; // here i haven't show full logic
endtask
endclass
According to my code the DUT will give data while valid is high, here DUT will give 3 or more data payloads respecting to the valid signal. But once I have received first data payload from DUT, my driver is not taking other data payload from DUT (i.e once the seq_item_port.put (rsp) is reached, driver thinks my transaction completed, it never takes my next data payload from DUT respecting to the intf.valid signal )
My aim: I have to collect the data payload from DUT for each valid signal (intf.valid ) high duration and send this response to lower sequencer respectively.
Please help me to get rid of this problem…Thank you.