Multiple Req and Res

All,

----------|<----32--------|------------
Target |-----32------->| Inititator
----------|-----1-------->|------------

Simple Protocol Interface:
output int req_len
input int res_len
input bit last

Lets consider the request and responses as follows.
req_len = 10;
res_len = 3; last = 0;
after few clocks;
req_len = 7;
res_len = 5; last = 0;
after few clocks;
res_len = 2; last = 1;
after few clocks;
req_len = 8;
after few clocks;
res_len = 7; last = 1;
after few clocks;
res_len = 4; last = 0;
after few clocks;
res_len = 4; last = 1;

when I create UVC for the interface…I have few questions

req_len and delay is randomized driven to the DUT interface.

my monitor collecting the res_len and adding the res_lens till last bit set. Once last = 1 is sampled, compare the req_len vs total_res_len.

Question:

  1. Driver sends “req_len” to scoreboard and coverage subscriber. Is that right UVM approach?

  2. Monitor sum the total response lengths and once last = 1, send to scoreboard and compared against the queued “req_len”.

  3. Is there any better approach to handle the above cases?

//Note: as per protocol, responses should be in order.

Thanks
John

In reply to John Verif:

Sofar no responses yet…

Kindly help.

John