-DRackSim icon indicating copy to clipboard operation
-DRackSim copied to clipboard

Explain mem_read_dependencies status

Open jakzy opened this issue 1 year ago • 1 comments

https://github.com/Amit-P89/-DRackSim/blob/5e19dc015711b59dad99764d1ee4b4da8fb3dd42/DRACKSim-Detailed/OOO_core.cpp#L846

Hello! Using your simulator faced a problem with instructions stuck with -3 status in mem_read_dependencies. It was set once and never changed. Can you explain logic behind it? Thank you!

jakzy avatar Oct 07 '24 08:10 jakzy

Hi, -3 value of mem_read_dependencies[i] represents that a load for the instruction waiting in the res_station has been sent to AGU for address generation and then for memory access. The initial value is -2. It is changed to -3 when sent to AGU and changed to -1 when the load is completed and broadcasted back to the waiting instruction. If it is stuck at -3, it means a load is stuck, which eventually means it was a cache miss or hit whose response is pending to load-store queue entry. You can start with printing the L3 mshrs to debug, which will tell if a miss is pending in L3. Similarily, you can go up the cache levels and try printing. Use ins_id, paddr, vaddr to get detailed info about the pending load.

The logic has been rigorously debugged on a large number of workloads for over billion of instructions. So there is small chance that there is an issue with it. I suggest you to first see if there are no more shared mem variables active from the previous run. This creates conflict if not killed properly. Commands for killing the shared-mem variables are given somewhere in the readme. You can also try to change the node_id for creating different values of shared-mem variables to avoid conflict.

Regards,

Amit

Amit-P89 avatar Oct 07 '24 14:10 Amit-P89