Programmer Interface: Data¶
The CTM module generates two types of event packets: trace packets and overflow packets. Trace packets contain the data traced from the processor core. Overflow packets indicate that trace events were missed, usually if more events are generated than the module can send out to the DI.
Trace Packets¶
A Trace Packet encapsulates a single trace event.
The following fields in the header of the DI packet are set:
FLAGS.TYPE
is set toEVENT
FLAGS.TYPE_SUB
is set to 0
payload word | description |
---|---|
0 | timestamp[15:0] |
1 | timestamp[31:16] |
2 | Next Program Counter npc[15:0] |
… | … |
1 + ADDR_WIDTH / 16 |
Next Program Counter npc[ADDR_WIDTH-1:ADDR_WIDTH-16] |
1 + ADDR_WIDTH / 16 + 1 |
Program Counter pc[15:0] |
… | … |
1 + 2 * (ADDR_WIDTH / 16 + 1) |
Program Counter pc[ADDR_WIDTH-1:ADDR_WIDTH-16] |
1 + 2 * (ADDR_WIDTH / 16 + 1) + 1 |
[1:0] [2] [3] [4] [15:5] reserved |