Profiling the AI Engine in Hardware - 2023.1 English

AI Engine Tools and Flows User Guide (UG1076)

Document ID
UG1076
Release Date
2023-06-23
Version
2023.1 English

An AI Engine event gives information about the system at a specific instant in time. An event that is associated with a timestamp, type and set of data values is referred to as a payload. The interpretation of the payload depends on the type of the event. A timestamp allows ordering of events, computation of causality relationships, and implementation of verifiers on a sequence of events.

For event modeling purposes, the key modules of the AI Engine array are processor, DMA, lock modules, memory, and I/O streams. Each module can be viewed as an event generator/responder. Each module receives an event and responds to the event. As a response, new events could be generated. Events are classified based on the generator of the events. The timestamp is not mentioned explicitly in the event definitions. Each event is described with a payload, which is a couple of values associated with the event. Each AI Engine, memory, DMA, or lock is addressable by a two-dimensional index <col, row>, which is the column and row index in the AI Engine array. Some of the AI Engine events are shown in the following tables.

Events generated by the AI Engine and their corresponding IDs are listed in the following table.

Table 1. AI Engine Events
Event Number Event Name Comment
22 Group Core Stall Any or all the events from event number 23 to 31 can trigger this event
23 Memory Stall Event generated when core gets stalled due to memory conflict
24 Stream Stall Event generated when core gets stalled either due to no data at input or due to backpressure on the stream output from core
25 Cascade Stall Event generated when core gets stalled either due to no data at Input or due to backpressure on the stream output from core
26 Lock Stall Event generated when core gets stalled due to lock being acquired already
28 Active Event generated when core changes state from disabled to active
32 Group Core Program Flow Any or all the events from event number 33 to 45 can trigger this event
37 Instr Vector Event generated when AI Engine core executes a “vector” instruction
38 Instr Load Event generated when AI Engine core executes a “load” instruction
39 Instr Store Event generated when AI Engine core executes a “store” instruction
40 Instr Stream Get Event generated when AI Engine core executes a “read from stream” instruction
41 Instr Stream Put Event generated when AI Engine core executes a “write to stream” instruction
42 Instr Cascade Get Event generated when AI Engine core executes a “read from cascade stream” instruction
43 Instr Cascade Put Event generated when AI Engine core executes a “write to cascade stream” instruction
50 FP Overflow Event generated when floating point overflow exception flag bit gets set
51 FP Underflow Event generated when floating point underflow exception flag bit gets set
52 FP Invalid Event generated when floating point invalid exception flag bit gets set
53 FP Div by Zero Event generated when floating point div by zero exception flag bit gets set

Events generated by the AI Engine memory module and their corresponding IDs are listed in the following table.

Table 2. Memory Module Events
Event Number Event Name Comment
20 Group DMA Activity Any or all the events from event number 21 to 40 can trigger this event
25 DMA S2MM 0 finished packet  Event generated when S2MM channel 0 finishes the transfer of a DMA Packet
26 DMA S2MM 1 finished packet Event generated when S2MM channel 1 finishes the transfer of a DMA Packet
27 DMA MM2S 0 finished packet Event generated when MM2S channel 0 finishes the transfer of a DMA Packet
28 DMA MM2S 0 finished packet Event generated when MM2S channel 1 finishes the transfer of a DMA Packet
33 DMA S2MM 0 stalled lock acquire Event generated when S2MM channel 0 is stalled on lock acquire
34 DMA S2MM 1 stalled lock acquire Event generated when S2MM channel 1 is stalled on lock acquire
35 DMA MM2S 0 stalled lock acquire Event generated when MM2S channel 0 is stalled on lock acquire
36 DMA MM2S 1 stalled lock acquire Event generated when MM2S channel 1 is stalled on lock acquire
43 Group Lock Any or all the events from event number 44 to 75 can trigger this event
76 Group Memory Conflict Any or all the events from event number 77 to 84 can trigger this event
86 Group Errors Any or all the events from event number 87 to 100 can trigger this event

Events generated by the AI Engine interface and their corresponding IDs are listed in the following table.

Table 3. AI Engine Interface Events
Event Number Event Name Comment
74 Port_Idle_0 Event generated when specified PLIO port is Idle.

Any of the Master or Slave ports for AI Engine Tile Stream Switch can be monitored for Port Idle condition. The Stream_Switch_Event_Port_Selection_0 register bits 5:0 must be configured. If the configured Port ID is in idle state, this event will be triggered.

75 Port_Running_0 Event generated when specified PLIO port is Running.

Any of the Master or Slave ports for AI Engine Tile Stream Switch can be monitored for Port running condition. The Stream_Switch_Event_Port_Selection_0 register bits 5:0 must be configured. If the configured Port ID is in running state, this event will be triggered.

76 Port_Stalled_0 Event generated when specified PLIO port is Stalled.

Any of the Master or Slave ports for AI Engine Tile Stream Switch can be monitored for Port stalled condition. The Stream_Switch_Event_Port_Selection_0 register bits 5:0 must be configured. If the configured Port ID is in stalled state, this event will be triggered.

77 Port_TLAST_0 Event generated when specified PLIO port is transmitting a TLAST signal.

Any of the Master or Slave ports for AI Engine Tile Stream Switch can be monitored for Port TLAST condition. The Stream_Switch_Event_Port_Selection_0 register bits 5:0 must be configured. If the configured Port ID has TLAST, this event will be triggered.