APB READ_TRANSFER

In reply to PJ:

In reply to chr_sue:
Hi,
Please observe the waveform, it is perfect with the write transfer,but error in read transfer
EPWave Waveform Viewer
and
Scoreboard not working…

Your sequence Body Task looks a Little bit strange.

  task body();
     
     //Create 10 random APB read/write transaction and send to driver
    rw_trans = apb_rw::type_id::create("rw_trans");
      //apb_rw::type_id::create(.name("rw_trans"),.contxt(get_full_name()));
    for(int i=0;i<5;i++) begin
       start_item(rw_trans);
       //assert (rw_trans.randomize());
      assert(rw_trans.randomize() with { addr==32'h6523_1221;data == 32'h1021_2321;apb_cmd == 1'b0;});
       finish_item(rw_trans);
      
      
      start_item(rw_trans);
       //assert (rw_trans.randomize());
      assert(rw_trans.randomize() with { addr==32'h6523_1221;data == 32'h1021_2321;apb_cmd == 1'b1;});
       finish_item(rw_trans);
      
        start_item(rw_trans);
       //assert (rw_trans.randomize());
      assert(rw_trans.randomize() with { addr==32'h6526_1551;data == 32'h5555_0202;apb_cmd == 1'b0;});
       finish_item(rw_trans);
      
        start_item(rw_trans);
       //assert (rw_trans.randomize());
      assert(rw_trans.randomize() with { addr==32'h6526_1551;data == 32'h5555_0202;apb_cmd == 1'b1;});
       finish_item(rw_trans);
      
     end
  endtask

Could you please explain which apb_cmd is RD and which is WR. The RD needs only the command and the address, but no data in the sequence.