lowRISC / ibex

Ibex is a small 32 bit RISC-V CPU core, previously known as zero-riscy.
https://www.lowrisc.org
Apache License 2.0
1.29k stars 495 forks source link

[tracer] Fix reporting of load/store data #2136

Closed alees24 closed 4 months ago

alees24 commented 5 months ago

Modify the tracer to use the appropriate read/write masks when logging load/store traffic from the Load Store Unit. The logging code was using the wrong strobes when appending the loaded/stored values to the report as may be seen in the following snippet from a core trace:

         249402     104397  000081cc    0062ae23    sw  x6,28(x5)     x5:0x30470000  x6:0x03b9aca0 PA:0x3047001c store:0x03b9aca0 load:0x00000000
         249404     104398  000081d0    4305    c.li    x6,1      x6=0x00000001
         249442     104417  000081d2    0062aa23    sw  x6,20(x5)     x5:0x30470000  x6:0x00000001 PA:0x30470014 store:0x00000001 load:0x00000000
         249444     104418  000081d6    30134537    lui x10,0x30134  x10=0x30134000
         249554     104473  000081da    3d852283    lw  x5,984(x10)  x10:0x30134000  x5=0x00000000 PA:0x301343d8 store:0x00000000

Specifically, when storing data the indicated 'store' value is correct but there is a spurious additional 'load: 0x00000000' indication, and when loading data, the trace instead shows 'store: 0x00000000'