> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/ehs/3.7/model-in-sps-rt-lab-only/configure-the-ehs-circuit-interfaces.md).

# Configure the eHS Circuit Interfaces

The eHS circuit model exchanges information with the CPU model and/or an external device under test (DUT) through **sources**, **measurements**, and **switch gate signals**. These interfaces are configured directly in the **eHS CPU Block**.

<figure><img src="https://521571437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo99Izmvvw5eHT4ldzI4g%2Fuploads%2Fgit-blob-41368e792b9b253ac7776326d41d7b7550ed7f60%2Fse-ehs-interfaces.png?alt=media" alt=""><figcaption></figcaption></figure>

For a simpler setup, **it is recommended to start from the example model delivered with your system or from an example model installed with RT-LAB**. These examples already include a correctly configured **OpCtrl** block and **eHS CPU Block** matching the firmware.

Otherwise, configure the **eHS CPU Block** manually:

{% stepper %}
{% step %}

### Configure the Communications tab

1. Double-click the **eHS CPU Block** to open its mask, then navigate to the **Communications** tab.
2. Enable **Communications Settings Automatic Configuration** to automatically configure the communication ports. When enabled, the `.conf` file associated with the bitstream selected in the **OpCtrl** block is parsed, and the communication settings are configured accordingly.
   {% endstep %}

{% step %}

### Configure the Firmware Config tab

For most firmware, leave **Use a custom firmware configuration** unchecked. The input source and gate source enumerations are configured automatically from the selected firmware.

<figure><img src="https://521571437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo99Izmvvw5eHT4ldzI4g%2Fuploads%2Fgit-blob-c6ecfbf1a2253213455227f63319812cd57aeb06%2Fimage%20(36).png?alt=media" alt=""><figcaption></figcaption></figure>

For custom firmware:

1. Enable **Use a custom firmware configuration**. This option allows custom definitions for the **input source** and **gate source enumerations**. To configure it correctly, you must know the firmware-specific group definitions and channel mappings. This information is typically provided in the firmware documentation delivered with the custom firmware or can be obtained from the corresponding **RT-XSG model**.
2. Configure **Custom input source enumeration** and **Custom gate source enumeration**. Enter the enumeration values required by the firmware. Each one must be defined using an **N × 3 cell array**: `{GroupName1, GroupIndex1, NbChannels1;2...3GroupNameN, GroupIndexN, NbChannelsN}`

   Where:

   * `GroupName`: Display name shown in the **eHS CPU Block Inputs** tab or **Gates** tab configuration. This field is informational only and does not affect firmware operation.
   * `GroupIndex`: Firmware-specific group identifier. This value must match the group index defined by the firmware. Refer to the **firmware documentation** or **RT-XSG model**.
   * `NbChannels`: Number of channels available in the group. This value must also match the firmware definition. Refer to the **firmware documentation** or **RT-XSG model**.

   Example: `{'Analog Inputs', 0, 32;2'SFP Inputs', 1, 16}`\
   In this example, the names **Analog Inputs** and **SFP Inputs** are displayed in the **Inputs** or **Gates** tab, while the values **0**, **1**, **32**, and **16** must correspond exactly to the firmware configuration.
3. **Apply** the changes. The custom enumerations will be used instead of the default firmware configuration.
   {% endstep %}
   {% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/ehs/3.7/model-in-sps-rt-lab-only/configure-the-ehs-circuit-interfaces.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
