taichi-ishitani / tvip-axi

AMBA AXI VIP
Apache License 2.0
331 stars 99 forks source link

Problem with On the Fly Reset #46

Closed kkurenkov closed 1 year ago

kkurenkov commented 1 year ago

Hi @taichi-ishitani ! I have a problem when i have reset on AXI. In my test I have AXI4 slave and DUT.
When i asserted reset the BValid, Bid not reset to zero.
The figure below 1_problem

So i find the problem. I think it happened because of race conditions https://github.com/taichi-ishitani/tvip-axi/blob/master/src/tvip_axi_slave_driver.svh#L524

this happened after

  protected task drive_response(bit valid, tvip_axi_slave_driver_response_item item);
    vif.slave_cb.bvalid <= valid;
    if (valid) begin
      vif.slave_cb.bid    <= item.get_id();
      vif.slave_cb.bresp  <= item.get_response_status();
    end
  endtask

This

protected task reset_if();
    vif.awready = configuration.default_awready;
    vif.wready  = configuration.default_wready;
    vif.bvalid  = '0;
    vif.bid     = '0;
    vif.bresp   = tvip_axi_response'(0);
  endtask

So my decision

  protected task drive_response(bit valid, tvip_axi_slave_driver_response_item item);
    vif.bvalid <= valid;
    if (valid) begin
      vif.bid    <= item.get_id();
      vif.bresp  <= item.get_response_status();
    end
  endtask

I'm not sure, that I understand your logic correctly, but in my case, it's work fine...

2_solve

Best regards.

kkurenkov commented 1 year ago

Also, the same situation in R channel image

taichi-ishitani commented 1 year ago

Hi @kkurenkov ,

Thank you for opening this issue and sorry for delay response. I pushed the fix for this issue to fix_46 branch. https://github.com/taichi-ishitani/tvip-axi/tree/fix_46

Can you try to use it?

kkurenkov commented 1 year ago

Hi @taichi-ishitani ! Ok, I'll check your decision tomorrow. Also, I'll try to check master agent.

kkurenkov commented 1 year ago

Hi @taichi-ishitani ! I checked your fix and all works fine. Thank you for your work!

taichi-ishitani commented 1 year ago

I've merged the fix to master branch.