Configuring the ELA-600 use case scripts

To configure the ELA-600, you can use the configuration GUI interface. The application-specific use case script allows you to script a specific debug recipe. The debug recipe is used to debug a specific debug scenario with the ELA-600. This debug recipe is achieved by programming the Common and Trigger State registers of the ELA-600. Programming the Trigger State registers sets up the comparison and counter logic to debug a scenario of interest. The Common registers set up the general configuration of the ELA-600.

To add the DTSLELA-600 project use case scripts to the Scripts view in Arm DS, do the following:

  1. Connect to a target with Arm DS.

    Learn how to connect to a target with Arm DS, read the "Configuring debug connections in Arm Debugger" section of the Arm Development Studio User Guide.

  2. If the Scripts view is not open, click Window > Show View > Scripts.
  3. In the Scripts view, click Import a Script or Directory > Add Use Case Script Directory…. Add Use Case Script Directory... to Scripts view

  4. In the Select Folder dialog, browse to the DTSLELA-600 project in your Arm DS Workspace and click Select Folder.

In the Scripts view, the DTSLELA-600 use case scripts appear under Use Case > Scripts in <path to Arm Development Studio Workspace>\DTSLELA-600\.

After use case scripts are added in Scripts view

For this demonstration, we use the GUI ELA-600 Configuration Utility provided by the Arm DS use case script at

Scripts view > Use case > Scripts in <path to Arm Development Studio Workspace>\DTSLELA-600\ > ela_setup.py > Configure.

to configure the ELA-600 for our specific debug scenario.

Note: Before configuring the ELA-600, you must connect Arm DS to the target SoC.

  1. Open the GUI ELA-600 configuration utility:
    1. Navigate to: Scripts view > Use case > Scripts in <path to Arm Development Studio Workspace>\DTSLELA-600\ > ela_setup.py > Configure.
    2. Right-click Configure ELA and select Configure… .

      Configure... the ela_setup.py Configure ELA use case script

We now configure the Common registers:

  1. Open the Common tab.
  2. In the Pre-trigger action section, select Enable trace.
    When the ELA-600 is enabled, this setting configures the ELA to start tracing. It sets TRACE of the Pre-Trigger Action register (PTACTION). When trace is active, trace capture occurs either on each ELA clock cycle, on a Trigger Signal Comparison match, or on a Trigger Counter Comparison match.
  3. Tick ATB Control and Set ATID[6:0] value for ATB transactions to 0x18.
    This setting configures the ATB trace ID for the ELA-600. It sets ATID_VALUE of the ATB Control register (ATBCTRL). If other trace sources are using the ATB, this value is used to identify the trace stream belonging to the ELA-600.
  4. Tick Counter Select and set Position 1 to 1.
    This setting makes the trace data capture the counter value for Trigger State 1. It sets POSITION1 of the Counter Select register (CNTSEL).

    When the preceding steps are finished, the Common tab looks like the following:

    Common tab of Configure ELA view

  5. Click Apply.

We now configure our first Trigger State:

  1. Open the Trigger State 0 tab.
  2. Set Select Signal Group to 0x1.
    This setting selects the Signal Group we want to trigger on for the Trigger State. This configuration means that Trigger State 0 is associated with the signals in Signal Group 0. It sets Signal Select 0 register (SIGSEL0). The ELA-600 uses a 'ones hot' encoding for the Signal Group in the Signal Select registers.

    In our example, Cortex-A55 + ELA-600 + CCI-500, the VALID_P1, Address_P1, and Type_P1 signals reside in Signal Group 0. To locate the wanted signal locations for other targets, check your IP JSON file or documentation.
  3. In the Trigger Control section:
    1. Set Signal Comparison (COMP) to Equal.
      This setting configures the Signal Comparison condition for the Trigger State. It sets COMP of the Trigger Control 0 register (TRIGCTRL0). In this case, we want to trigger when:
      • VALID_P1 is 1.
      • Address_P1 is 0xB1000000.
      • Type_P1 is 1.
    2. Set Comparison mode (COMPSEL) to 1.
      This setting configures the Trigger State 0 counters and selects Trigger Counter Comparison mode. It sets COMPSEL of the TRIGCTRL0 register.
    3. Set Counter source (COUNTSRC) to 1.
      This setting causes the Trigger State 0 counter to increment on every Trigger Signal Comparison Match. It sets COUNTSRC of the TRIGCTRL0 register.
  4. Set Next State to 0x2.
    Here we set the Next State. This is the ELA state we enter when we meet the Trigger Condition. It sets NEXTSTATE0 of the Next State 0 register (NEXTSTATE0). In this example, when the Trigger Condition is met, we want the ELA-600 to move to Trigger State 1.
  5. In the Action section:
    1. Set the CTTRIGOUT[1:0] value to 0x1.
      This setting has Trigger State 0 drive CTTRIGOUT[0] when moving to the next Trigger State. It sets CTTRIGOUT of the Action 0 register (ACTION0). In our case, driving CTTRIGOUT[0] corresponds to a halt signal on the core. When the Trigger State 0 Trigger Condition is met, this halt signal causes the core to halt.
    2. Tick Enable trace.
      This setting enables Trigger State 0 trace capture. It sets TRACE of the ACTION0 register.
  6. Set Counter compare to 0x3.
    This setting configures COUNTCOMP0 of the Counter Compare 0 register (COUNTCOMP0). With this setting, after 3 Trigger Conditions are met, the ELA-600 moves to Trigger State 1. In our case, the third access to the target address is the data corruption we are monitoring for.
  7. Set both the Signal Mask and Signal Compare fields to the following:
    1. Set the [31:0] value to 0x0.
    2. Set the [63:32] value to 0x0.
    3. Set the [95:64] value to 0x200.
    4. Set the [127:96] value to 0x80000162.

    We must set Trigger State 0 Signal Compare and Signal Mask values for Signal Group 0 to monitor the VALID_P1, Address_P1, and Type_P1 signals. It sets SIGCOMP of the Signal Compare 0 registers (SIGCOMP0) and SIGMASK of the Signal Mask 0 registers (SIGMASK0).

    For the Cortex-A55 + ELA-600 + CCI-500 system, the bit positions are:

    • VALID_P1 at bit position 127
    • Address_P1 at bit position 114:75
    • Type_P1 at bit position 73.

    Note: You must check where these signals are positioned in the JSON file or documentation for your IP.

  8. Tick Trace Write Byte Select and set TWBSEL to 0x0000FFFF.
    This setting enables trace write for each byte of Signal Group 0 we want to trace. It sets TRACE_BYTE of the Trace Write Byte Select 0 register (TWBSEL0).

    When the preceding steps are finished, the Trigger State 0 tab looks like the following: Trigger State 0 Selection and Control of Configure ELA viewTrigger State 0 Action and Counter of Configure ELATrigger State 0 Signal Mask and Compare of Configure ELA viewTrigger State 0 Trace Write Byte Select of Configure ELA view

  9. Click Apply.

We now configure our second Trigger State:

  1. Open the Trigger State 1 tab.
  2. Set Select Signal Group value to 0x0.

    It sets the SIGSEL1 register. This setting causes Trigger State 1 to not trigger on any Signal Group. We do not want to trigger on any Signal Group because we are using Trigger State 1 to wait for External Trigger input.

  3. In the Trigger Control section:
    1. Set Signal Comparison (COMP) to Equal.
      This setting configures the Signal Comparison condition. It sets the TRIGCTRL1 register. In this case, we want to trigger when an External Trigger Signal from the CTI comes in.
    2. Set Trace Capture (TRACE) to 3.
      This setting causes Trigger State 1 to trace the Counter Comparison. It sets TRACE of the TRIGCTRL1 register.
  4. Set Next State to 0x0.
    We set the Next State to 0, so that Trigger State 1 is our final Trigger State. It sets the NEXTSTATE1 register.
  5. In the Action section, tick Enable trace.
    This enables Trigger State 1 trace capture. It sets the ACTION1 register.
  6. Set Counter compare to 0xFFFFFFFF.
    This setting configures the COUNTCOMP1 register to a nonzero value to ensure Trigger State 1 counts. We are using the maximum value allowed as the ultimate count value is unknown in this case.
  7. In both the External Mask and External Compare sections, set CTTRIGIN[1:0] to 0x1.
    These settings configure a comparison with the external signal associated with the CTIIN[0] bit. It sets CTTRIGIN of the External Mask 1 register (EXTMASK1) and the External Compare 1 register (EXTCOMP1). In our case, CTIIN[0] is the halt response from the core.
  8. Set both the Signal Mask and Signal Compare fields all to 0x0.
    We must set these fields to 0, so we do not match on any of the signals from any of the Signal Groups. It sets the SIGCOMP1 and the SIGMASK1 registers.
  9. Tick Trace Write Byte Select and set TWBSEL to 0x0000FFFF.
    This setting enables trace write for the data we are interested in. It sets the TWBSEL1 register.

    When the preceding steps are finished, the Trigger State 1 tab looks like the following: Trigger State 1 Select and Control of Configure ELA viewTrigger State 1 Action of Configure ELA viewTrigger State 1 Counter and External CTTRIGIN of Configure ELA viewTrigger State 1 Trace Write Byte Select of Configure ELA

  10. Click Apply and OK.

Alternatively, if you already have a saved ELA-600 configuration, you can import the configuration by clicking Import configuration in the ela_setup.py - Configure ELA view. An ELA-600 configuration that includes the settings mentioned in this section is available here.

Previous Next