The AI Engine and memory modules each have an event logic unit. Each unit has a defined set of local events. The following diagram shows the high-level logical view of events in the AI Engine tile. The event logic needs to be configured with a set of action registers that can be programmed over the memory-mapped AXI4 interface. There is event logic hardware that only interacts with the AI Engine and memory modules. Event actions can be configured to perform a task whenever a specific event occurs. There are two separate sets of configuration registers for event hardware. Also, there is separate broadcast logic to send event signals to neighboring modules.
An event itself does not have an action, but events can be used to create an action. Event broadcast and event trace can be configured to monitor the event. Examples of event actions include:
- Enable, disable, or reset of an AI Engine
- Debug-halt, resume, or single-step of an AI Engine
- Error halt of an AI Engine
- Resynchronize timer
- Start and stop performance counters
- Start and stop trace streams
- Generate broadcast events
- Drive combo events
- ECC scrubbing event
For each of these event actions there are associated registers where a 7-bit event number is set and is used to configure the action to trigger on a given event. The full list of the event action configuration registers for the AI Engine and memory modules are found in the Versal Adaptive SoC AI Engine Register Reference (AM015).
ECC Scrubbing Event
Scrubbing is provided to detect 2-bit ECC errors and correct 1-bit ECC errors, in both program memory and data memory. The scrubbing can be started by a user event. There is a register that can be programmed with an event number to start scrubbing on an event. If this register is not programmed, then scrubbing is skipped.
Events are generated in the AI Engine when ECC scrubbing corrects a 1-bit error and detects a 2-bit error in the program memory. Events are generated in the AI Engine memory module when ECC scrubbing corrects a 1-bit error and detects a 2-bit error in the data memory banks.
You can count the occurrence of an event with performance counters. These counters can behave as timers and can start and stop based on an event. This helps count the number of clocks between two events.
Broadcast events are both the events and the event actions because they are triggered when a configured event is asserted. The following figure shows the logical view of the broadcast logic inside the AI Engine tile. The units in the broadcast logic in the AI Engine and memory modules receive input from and send out signals in all four directions. The broadcast logic is connected to the event logic, which generates all the events. There are configuration registers to select the event sent over, and mask registers to block any event from going out of the AI Engine tile.
Each module has an internal register that determines the broadcast event signal to broadcast in the other directions. To avoid broadcast loops, the incoming event signals are ORed with the internal events to drive the outgoing event signals according the following list:
- Internal, east, north, south → west
- Internal, west, north, south → east
- Internal, south → north
- Internal, north → south