taichi-ishitani / tvip-axi

AMBA AXI VIP
Apache License 2.0
354 stars 102 forks source link

NULL pointer dereference is observed after the reset in the middle #33

Closed kazt81 closed 2 years ago

kazt81 commented 2 years ago

I have encountered the following issue when tvip-axi is used as AXI4 memory slave.

xmsim: *E,TRNULLID: NULL pointer dereference.
          File: /path/to/tvip-axi/src/tvip_axi_payload_store.svh, line = 29, pos = 7
         Scope: worklib.tvip_axi_pkg::tvip_axi_payload_store::store_response
          Time: 4054 NS + 6
Verilog Stack Trace:
0: function worklib.tvip_axi_pkg::tvip_axi_payload_store::store_response at /path/to/tvip-axi/src/tvip_axi_payload_store.svh:29
1: task worklib.tvip_axi_pkg::tvip_axi_master_sub_driver@11260_6.sample_response at /path/to/tvip-axi/src/tvip_axi_master_driver.svh:256
2: task worklib.tvip_axi_pkg::tvip_axi_master_sub_driver@11260_6.response_thread at /path/to/tvip-axi/src/tvip_axi_master_driver.svh:207
3: process in worklib.tvip_axi_pkg::tvip_axi_master_sub_driver@11260_6.main at /path/to/tvip-axi/src/tvip_axi_master_driver.svh:91

The test sequence is:

  1. Reset
  2. AXI4 memory access are issued from masters
  3. Reset
  4. AXI4 memory access are issued again from masters then this issue is detected
taichi-ishitani commented 2 years ago

Hi @kazt81 , Thank you for reporting this error. Could you please insert disable fork after this join_any keyword and try again? https://github.com/taichi-ishitani/tvip-axi/blob/21a3bfc5f4137fa032b655b43f4ea83ae6f3b368/src/tvip_axi_master_driver.svh#L31

taichi-ishitani commented 2 years ago

Can you also insert disable fork after this join_any keyword? https://github.com/taichi-ishitani/tvip-axi/blob/21a3bfc5f4137fa032b655b43f4ea83ae6f3b368/src/tvip_axi_slave_driver.svh#L136

kazt81 commented 2 years ago

@taichi-ishitani Thanks a lot! I have confirmed your suggestion works fine.

taichi-ishitani commented 2 years ago

Thank you for opening PR #34 ! I've merged it.