XSIM trace output¶
XSIM trace output is produced by using xsim -t, xsim --trace
or xsim --trace-to.
The following example shows an except of the trace output from a program built for an xcore.ai device. It shows 8 logical cores running on tile 0.
For each logical core, indentations using . to the addess field and subsequent fields is applied based on the logical core number.
tile[0]@0- -SI A-a-a-a-p-p-p-p-.----000803a8 (iprintf + 18) : add r1(0x81e04), r11(0x81e04), 0x0 @307446
tile[0]@1- -DI p-A-a-a-a-p-p-p-.----.00080390 (iprintf + 0) : entsp 0x0 S[0x81f24] @307447
tile[0]@2- -DI p-p-A-a-a-a-p-p-.----..00080390 (iprintf + 0) : entsp 0x0 S[0x81f24] @307448
tile[0]@3- -DI p-p-p-A-a-a-a-p-.----...00080390 (iprintf + 0) : entsp 0x0 S[0x81f24] @307449
tile[0]@4- -DI p-p-p-p-A-a-a-a-.----....00080390 (iprintf + 0) : entsp 0x0 S[0x81f24] @307450
tile[0]@5- -DI a-p-p-p-p-A-a-a-.----.....00080390 (iprintf + 0) : entsp 0x0 S[0x81f24] @307451
tile[0]@6- -DI a-a-p-p-p-p-A-a-.----......00080390 (iprintf + 0) : entsp 0x0 S[0x81f24] @307452
tile[0]@7- -DI a-a-a-p-p-p-p-A-.----.......00080390 (iprintf + 0) : entsp 0x0 S[0x81f24] @307453
Each row represents the execution of a single instruction. For the first line in the above example, the fields show the following information:
tile[0]: the tile executing the instruction@0: the logical core executing the instruction- -SI: the I0, I1, I2, I3 and I4 fields - see belowA-a-a-a-p-p-p-p-: the S0 and S1 fields for the eight active logical cores000803a8: program counter address(iprintf + 18): the function name symbol and offset from itadd r1(0x81e04), r11(0x81e04), 0x0 @307446: instruction and operands@3261: tile clock cycle count
When an instruction makes a load or store to memory the address will be shown, for example (L[0x42000]).
Further detail on the fields and the values they may contain is shown in the table below:
Tile and core |
Core State (single character fields) |
||||||||||
Name from XN |
I0 |
I1 |
I2 |
I3 |
I4 |
S0 |
S1 |
M |
S |
K |
N |
Address |
Instruction |
Mem |
Cycle |
||
PC |
(sym+offset): |
name |
operands |
access |
@val |
For each field, the possible values and their meanings are shown below. Note the S0 and S1 character fields are repeated for each active core.
- No debug interruptD Instruction caused debug interrupt* Instruction exceptedP Instruction paused- Not in debug moded Tile in debug modeS Logical core in single issue modeD Logical core in dual issue modeI Always shows I- Logical core not in usea Logical core activeA Logical core active (the instruction being traced belongs to this core)i Logical core active with ININT bit setI Logical core active with ININT bit set (belongs to this core)p Logical core paused due to instruction fetchm Logical core paused with MSYNC bit sets Logical core paused with SSYNC bit setw Logical core paused with WAITING bit set- Interrupts and events disabledb Interrupts and events enabledi Interrupts enabled and events disablede Interrupts disabled and events enabled- MSYNC not setm MSYNC set- SSYNC not sets SSYNC set- INK not setk INK set- INENB not setn INENB setrn(val) Value val of register nres[id] Resource identifier idL/S[addr] Load from/Store to address addr