Skip to content

add instruction trace table generation and trace to rvfi

Created by: strichmo

Annotates the RVFI with execution information from the ELF file of the program being executed:

Example:

       0.000 ns: RVFI  Order       PC    Instr M rs1 rs1_data rs2 rs2_data  rd  rd_data mem mem_addr mem_data instr
      54.000 ns: RVFI      1 00000080 0000d197 M x 1 00000000 x 0 00000000 x 3 0000d080  -- -------- -------- _start crt0.S 23 - auipc x3,0xd
      74.000 ns: RVFI      2 00000084 42018193 M x 3 0000d080 x 0 00000000 x 3 0000d4a0  -- -------- -------- _start crt0.S 24 - addi x3,x3,1056 # d4a0 <__global_pointer$>
      89.000 ns: RVFI      3 00000088 00400117 M x 0 00000000 x 4 00000000 x 2 00400088  -- -------- -------- _start crt0.S 28 - auipc x2,0x400
     110.000 ns: RVFI      4 0000008c f7810113 M x 2 00400088 x24 00000000 x 2 00400000  -- -------- -------- _start crt0.S 28 - addi x2,x2,-136 # 400000 <__heap_end>
     125.000 ns: RVFI      5 00000090 00000517 M x 0 00000000 x 0 00000000 x10 00000090  -- -------- -------- _start crt0.S 31 - auipc x10,0x0
     140.000 ns: RVFI      6 00000094 f7050513 M x10 00000090 x16 00000000 x10 00000000  -- -------- -------- _start crt0.S 31 - addi x10,x10,-144 # 0 <__vector_start>
     164.000 ns: RVFI      7 00000098 00156513 M x10 00000000 x 1 00000000 x10 00000001  -- -------- -------- _start crt0.S 32 - ori x10,x10,1
     176.000 ns: RVFI      8 0000009c 30551073 M x10 00000001 x 5 00000000 x 0 00000000  -- -------- -------- _start crt0.S 33 - csrrw x0,mtvec,x10
     194.000 ns: RVFI      9 000000a0 20418513 M x 3 0000d4a0 x 4 00000000 x10 0000d6a4  -- -------- -------- _start crt0.S 36 - addi x10,x3,516 # d6a4 <_PathLocale>
     212.000 ns: RVFI     10 000000a4 24c18613 M x 3 0000d4a0 x12 00000000 x12 0000d6ec  -- -------- -------- _start crt0.S 37 - addi x12,x3,588 # d6ec <__bss_end>
     230.000 ns: RVFI     11 000000a8 ----8e09 M x12 0000d6ec x10 0000d6a4 x12 00000048  -- -------- -------- _start crt0.S 38 - c.sub x12,x10
     239.000 ns: RVFI     12 000000aa ----4581 M x 0 00000000 x 0 00000000 x11 00000000  -- -------- -------- _start crt0.S 39 - c.li x11,0
     248.000 ns: RVFI     13 000000ac ----2bd1 M x 0 00000000 x20 00000000 x 1 000000ae  -- -------- -------- _start crt0.S 40 - c.jal 680 <memset>
     272.000 ns: RVFI     14 00000680 00f00313 M x 0 00000000 x15 00000000 x 6 0000000f  -- -------- -------- memset memset.S 30 - addi x6,x0,15
     290.000 ns: RVFI     15 00000684 00050713 M x10 0000d6a4 x 0 00000000 x14 0000d6a4  -- -------- -------- memset memset.S 31 - addi x14,x10,0
     308.000 ns: RVFI     16 00000688 02c37e63 M x 6 0000000f x12 00000048 x 0 00000000  -- -------- -------- memset memset.S 32 - bgeu x6,x12,6c4 <memset+0x44>

Signed-off-by: Steve Richmond Steve.Richmond@silabs.com

Merge request reports

Loading