Cross-Triggering

Cross-triggering is supported by the embedded cross-triggering (ECT) module supplied by Arm. ECT provides a mechanism for multiple subsystems in an SoC to interact with each other by exchanging debug triggers. ECT consists of two modules:

  • Cross Trigger Interface (CTI) - CTI combines and maps the trigger requests, and broadcasts them to all other interfaces on the ECT as channel events. When the CTI receives a channel event, it maps this onto a trigger output. This enables subsystems to cross trigger with each other.
  • Cross Trigger Matrix (CTM) - CTM controls the distribution of channel events. It provides Channel Interfaces for connection to either a CTI or CTM. This enables multiple ECTs to be connected to each other.

The figure below shows how CTIs and CTM are used in a generic setup.

Figure 1: CTIs and CTM in a Generic Setup


CTM forms an event broadcasting network with multiple channels. A CTI listens to one or more channels for an event, maps a received event into a trigger, and sends the trigger to one or more CoreSight components connected to the CTI. A CTI also combines and maps the triggers from the connected CoreSight components and broadcasts them as events on one or more channels. Through its register interface, each CTI can be configured to listen to specific channels for events or broadcast triggers as events to specific channels.

In the above example, there are four channels. The CTI at the top is configured to propagate the trigger event on Trigger Input 0 to Channel 0. Other CTIs can be configured to listen to this channel for events and broadcast the events through trigger outputs, to the debug components connected to these CTIs. CTIs also support channel gating such that selected channels can be turned off, without having to disable the channel to trigger I/O mapping.

Enable Cross-Triggering

You can now create/edit/remove cross-trigger breakpoints and apply the breakpoints on the target using the Debug Configurations page. To enable cross-triggering, do the following:

  1. Launch the Vitis software platform.
  2. Create a standalone application project. Alternatively, you can also select an existing project.
  3. Right-click on the application and select Debug As > Debug Configuration.
  4. Double-click Launch on Hardware (Single Application Debug) to create a new configuration.
  5. On the Target Setup view, select Enable Cross-Triggering.
  6. Click the button next to the Enable Cross-Triggering check box. The Cross Trigger Breakpoints page appears.
    You can create new breakpoints and edit or remove existing breakpoints using the Cross Trigger Breakpoints page. The options available on the page are described below.
    Create
    Click to create a new cross trigger breakpoint. The New Cross Trigger Breakpoint page appears. You need to select a cross trigger signal, which can be a source or destination of a cross-triggering breakpoint. The OK button enables only when you select at least one input and one output signal.
    Edit
    Click to edit an existing breakpoint. The Edit Cross Trigger Breakpoint page appears that allows you to edit the selected input and output signals.
    Remove
    Click to remove the selected breakpoint.

Cross-Triggering in Zynq Devices

In Zynq devices, ECT is configured with four broadcast channels, four CTIs, and a CTM. One CTI is connected to ETB/TPIU, one to FTM and one to each Cortex-A9 core. The following table shows the trigger input and trigger output connections of each CTI.

Note: The connections specified in the table below are hard-wired connections.
Table 1. CTI Trigger Ports in Zynq Devices
CTI Trigger Port Signal
CTI connected to ETB, TPIU
Trigger Input 2 ETB full
Trigger Input 3 ETB acquisition complete
Trigger Input 4 ITM trigger
Trigger Output 0 ETB flush
Trigger Output 1 ETB trigger
Trigger Output 2 TPIU flush
Trigger Output 3 TPIU trigger
FTM CTI
Trigger Input 0 FTM trigger
Trigger Input 1 FTM trigger
Trigger Input 2 FTM trigger
Trigger Input 3 FTM trigger
Trigger Output 0 FTM trigger
Trigger Output 1 FTM trigger
Trigger Output 2 FTM trigger
Trigger Output 3 FTM trigger
CPU0/1 CTIs
Trigger Input 0 CPU DBGACK
Trigger Input 1 CPU PMU IRQ
Trigger Input 2 PTM EXT
Trigger Input 3 PTM EXT
Trigger Input 4 CPU COMMTX
Trigger Input 5 CPU COMMTX
Trigger Input 6 PTM TRIGGER
Trigger Output 0 CPU debug request
Trigger Output 1 PTM EXT
Trigger Output 2 PTM EXT
Trigger Output 3 PTM EXT
Trigger Output 4 PTM EXT
Trigger Output 7 CPU restart request

Cross-Triggering in Zynq UltraScale+ MPSoCs

In Zynq UltraScale+ MPSoCs, ECT is configured with four broadcast channels, nine CTIs, and a CTM. The table below shows the trigger input and trigger output connections of each CTI. These are hard-wired connections. For more details, refer to Zynq UltraScale+ Device Technical Reference Manual (UG1085).

Table 2. CTI Trigger Ports in Zynq UltraScale+ MPSoCs
CTI Trigger Port Signal
CTI 0 (soc_debug_fpd)
IN 0 ETF 1 FULL
IN 1 ETF 1 ACQCOMP
IN 2 ETF 2 FULL
IN 3 ETF 2 ACQCOMP
IN 4 ETR FULL
IN 5 ETR ACQCOM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XTIN[3]

Cross-Triggering in Versal Devices

In Versal devices, ECT is configured with four broadcast channels, 12 CTIs, and a CTM. The table below shows the trigger input and trigger output connections of each CTI. These are hard-wired connections. For more details, refer to the Versal ACAP Technical Reference Manual (AM011).

Table 3. CTI Trigger Ports in Versal Devices
CTI Trigger Port Signal
R5 CTI 0,1 (RPU). XSDB IDs = 0-7 (R5 #0), 8-15 (R5 #1)
IN 0 R5 DBGTRIGGER
IN 1 R5 PMUIRQ
IN 2 ETM EXTOUT[0]
IN 3 ETM EXTOUT[1]
IN 4 R5 COMMRX
IN 5 R5 COMMTX
IN 6 ETM TRIGGER
IN 7 -
OUT 0 R5 EDBGRQ
OUT 1 ETM EXTIN[0]
OUT 2 ETM EXTIN[1]
OUT 3 -
OUT 4 -
OUT 5 -
OUT 6 -
OUT 7 R5 DBGRESTART
CTI 0,1,2,3 (APU). XSDB IDs = 16-23 (A72 #0), 24-31 (A72 #1), 32-39 (A72 #2), 40-47 (A72 #3)
IN 0 A72 DBGTRIGGER
IN 1 A72 PMUIRQ
IN 2 -
IN 3 -
IN 4 ETM EXTOUT[0]
IN 5 ETM EXTOUT[1]
IN 6 ETM EXTOUT[2]
IN 7 ETM EXTOUT[3]
OUT 0 A72 EDBGRQ
OUT 1 A72 DBGRESTART
OUT 2 GIC PPI 24
OUT 3 -
OUT 4 ETM EXTIN[0]
OUT 5 ETM EXTIN[1]
OUT 6 ETM EXTIN[2]
OUT 7 ETM EXTIN[3]
CTI p (pmc_debug). XSDB IDs = 48-55
IN 0 ATM TRIGOUT[0]
IN 1 -
IN 2 -
IN 3 -
IN 4 -
IN 5 -
IN 6 -
IN 7 -
OUT 0 ATM TRIGIN[0]
OUT 1 -
OUT 2 -
OUT 3 -
OUT 4 -
OUT 5 -
OUT 6 -
OUT 7 -
CTI 0d (soc_debug_lpd). XSDB IDs = 56-63
IN 0 ATM0 TRIGOUT[0]
IN 1 ATM0 TRIGOUT[1]
IN 2 ATM0 TRIGOUT[2]
IN 3 ATM0 TRIGOUT[3]
IN 4 ATM0 TRIGOUT[4]
IN 5 -
IN 6 -
IN 7 -
OUT 0 ATM0 TRIGIN[0]
OUT 1 ATM0 TRIGIN[1]
OUT 2 ATM0 TRIGIN[2]
OUT 3 ATM0 TRIGIN[3]
OUT 4 ATM0 TRIGIN[4]
OUT 5 7
OUT 6 -
OUT 7 -
CTI 1a (APU). XSDB IDs = 64-71
IN 0 ELA 1a CTTRIGOUT[0]
IN 1 ELA 1a CTTRIGOUT[1]
IN 2 ETF 1a FULL
IN 3 ETF 1a ACQCOMP
IN 4 -
IN 5 -
IN 6 -
IN 7 -
OUT 0 ELA 1a CTTRIGIN[0]
OUT 1 ELA 1a CTTRIGIN[1]
OUT 2 ETF 1a FLUSHIN
OUT 3 ETF 1a TRIGIN
OUT 4 PMUSNAPSHOT[0]
OUT 5 PMUSNAPSHOT[1]
OUT 6 -
OUT 7 -
CTI 1b (soc_debug_fpd). XSDB IDs = 72-79
IN 0 STM TRIGOUTSPTE
IN 1 STM TRIGOUTSW
IN 2 STM TRIGOUTHETE
IN 3 STM ASYNCOUT
IN 4 ETF 1 FULL
IN 5 ETF 1 ACQCOMP
IN 6 ETR FULL
IN 7 ETF ACQCOMP
OUT 0 STM HWEVENTS
OUT 1 STM HWEVENTS
OUT 2 TPIU FLUSHIN
OUT 3 TPIU TRIGIN
OUT 4 ETF 1 FLUSHIN
OUT 5 ETF 1 TRIGIN
OUT 6 ETR FLUSHIN
OUT 7 ETR TRIGIN
CTI 1c (soc_debug_fpd). XSDB IDs = 80-87
IN 0 pl_ps_trigger[0]
IN 1 pl_ps_trigger[1]
IN 2 pl_ps_trigger[2]
IN 3 pl_ps_trigger[3]
IN 4 -
IN 5 -
IN 6 -
IN 7 -
OUT 0 ps_pl_trigger[0]
OUT 1 ps_pl_trigger[1]
OUT 2 ps_pl_trigger[2]
OUT 3 ps_pl_trigger[3]
OUT 4 -
OUT 5 -
OUT 6 HALT System Timer
OUT 7 RESTART System Timer
CTI 1d (soc_debug_fpd). XSDB IDs = 88-95
IN 0 ATM1 TRIGOUT[0]
IN 1 ATM1 TRIGOUT[1]
IN 2 ATM1 TRIGOUT[2]
IN 3 ATM1 TRIGOUT[3]
IN 4 ATM1 TRIGOUT[4]
IN 5 ATM1 TRIGOUT[5]
IN 6 ATM1 TRIGOUT[6]
IN 7 -
OUT 0 ATM1 TRIGIN[0]
OUT 1 ATM1 TRIGIN[1]
OUT 2 ATM1 TRIGIN[2]
OUT 3 ATM1 TRIGIN[3]
OUT 4 ATM1 TRIGIN[4]
OUT 5 ATM1 TRIGIN[5]
OUT 6 ATM1 TRIGIN[6]
OUT 7 -

Use Cases

FPGA to CPU Triggering

This is one of the most common use cases of cross-triggering in Zynq. There are four trigger inputs on FPGA CTI, which can be configured to halt (EDBGRQ) any of the two CPUs. Similarly, the four FPGA CTI trigger outputs can be triggered when a CPU is halted (DBGACK). The FPGA trigger inputs and outputs can be connected to ILA cores such that an ILA trigger can halt the CPU(s) and the ILA can be triggered to capture the signals it’s monitoring, when any of the two CPUs is halted. For more details about setting up cross-triggering to the FTM in Vivado Design Suite, refer to the Cross Trigger Design section in Vivado Design Suite Tutorial: Embedded Processor Hardware Design (UG940).

PTM to CPU Triggering

Synchronize trace capture with the processor state. For example, an ETB full event can be used as a trigger to halt the CPU(s).

CPU to CPU Triggering

Cross-triggering can be used to synchronize the entry and exit from debug state between the CPUs. For example, when CPU0 is halted, the event can be used to trigger a CPU1 debug request, which can halt CPU1.

XSCT Cross-Triggering Commands

The XSCT breakpoint add command (bpadd) has been enhanced to enable cross triggering between different components.

For example, use the following command to set a cross trigger to stop Zynq core 1 when core 0 stops.

bpadd -ct-input 0 -ct-output 8

For Zynq, -ct-input 0 refers to CTI CPU0 TrigIn0 (trigger input 0 of the CTI connected to CPU0), which is connected to DBGACK (asserted when the core is halted). -ct-output 8 refers to CTI CPU1 TrigOut0, which is connected to CPU debug request (asserting this pin halts the core). hw_server uses an available channel to set up a cross trigger path between these pins. When core 0 is halted, the event is broadcast to core 1 over the selected channel, causing core 1 to halt.

Use the following command for the Zynq UltraScale+ MPSoC to halt the A53 core 1 when A53 core 0 stops.

bpadd -ct-input 16 -ct-output 24