> 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/rt-lab/configure-ios/analog-digital-and-sfp-ios/opal-rt-board-workflow/multi-fpga-model-ios.md).

# Multi-FPGA Model I/Os

When a model includes electrical I/O distributed across multiple FPGAs (e.g. one simulator with one expansion unit), the configuration process is similar to the standard **OPAL-RT Board Workflow**. The key difference is that **each additional unit** must have its own **OPAL-RT Board** configuration in <code class="expression">space.vars.Software</code>. This workflow is mandatory when using one or more I/O expansion units connected via **MuSE**, and supported when connected via **PCIe**.

{% stepper %}
{% step %}

### Configure the OPAL-RT Board for the simulator

1. In RT-LAB Project Explorer, right-click **I/O Interfaces**, select **New I/O Interface**, and choose **OPAL-RT Board**. Double-click the newly created interface to begin configuration.
2. Locate the **OPAL-RT Board Configuration section** in your **System Description Document** and follow the instructions to configure the interface accordingly.
3. Click **Bitstream configuration file** and browse for your bitstream configuration file (`.opal` or `.opbin`).
4. Select the channels you want to enable, configure settings, and save.
   {% endstep %}

{% step %}

### Configure the OPAL-RT Board for additional units (MuSE)

In a MuSE setup, the simulator acts as the **central** unit and the expansion units as **remotes.** The simulator must be configured with a **central** bitstream, identified by ‘**EX**’ in the name after the FPGA board (e.g., `TE0741_4-`**`EX`**`-0001-3_3_2_804-16Aio_32sDio-27-03`).

When you select a **central** bitstream in the simulator’s **OPAL-RT Board** configuration, a new folder called **Remote Boards Configuration** appears. Click this folder to add, remove, or rename remote units, and use the arrows to adjust their order.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-2c6190eac22f0873d57a78cda8830b15ee848dbf%2FDR-rtlab-muse.png?alt=media" alt=""><figcaption></figcaption></figure>

Click a unit to configure its **OPAL-RT Board**. Remote units must be configured with a **remote** bitstream, identified by ‘**MX**’ in the name after the FPGA board (e.g., `TE0741_4-`**`MX`**`-0001-3_3_2_804-16Aio_32sDio-03-28`). Select the channels you want to enable, configure settings, and save. Repeat for each additional remote unit.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-0e82349bda0d62ca6a66b32639afab3115bc9d5c%2FDR-rtlab-muse2.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Configure the OPAL-RT Board for additional units (PCIe)

In a PCIe setup, each additional unit requires its own distinct **OPAL-RT Board** configuration in RT-LAB. For each unit, right-click **I/O Interfaces**, select **New I/O Interface**, and choose **OPAL-RT Board**. By default, the **I/O interface name** is **OPAL-RT Board**, but you must rename it because all interfaces require unique names. You may also choose to rename the simulator’s OPAL-RT Board interface if needed.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-e97abbe081470c15dc524599f24faf7159dc6654%2FDR-rtlab-2-opal-board.png?alt=media" alt=""><figcaption></figcaption></figure>

Double-click the new interface to start configuration.

In the **simulator**’s OPAL-RT Board configuration, the **Use external synchronization source** box is **unchecked**. In this mode, the FPGA provides the clock to the CPU and outputs a synchronization pulse through the unit’s TX connector.\
For **expansion units**, the **Use external synchronization source** box must be **checked**, meaning the FPGA expects a synchronization pulse.

Finally, select the channels to enable, adjust settings, and save. Repeat for each additional unit.
{% endstep %}

{% step %}

### Add OpInput and OpOutput blocks to the Simulink model

From the [RT-LAB](https://www.opal-rt.com/docs/rt-lab/simulink-blocks-reference/rt-lab-library.md) library, add **OpInput** and/or **OpOutput** blocks to the real-time subsystem (**SM\_** or **SS\_**). Use one block per I/O module and assign clear, descriptive names to simplify mapping and maintenance.
{% endstep %}

{% step %}

### Connect the OpInput and OpOutput blocks

To configure multiple channels for **OpInput** blocks, set the **Default Value** parameter to a vector (e.g. `zeros(1,8)` for an 8-element vector) and use a **Demux** block to split the vector into individual signals for easier processing.

For **OpOutput** blocks, use a **Mux** block to combine individual signals into a single input vector.
{% endstep %}

{% step %}

### Save and build the model

Save and run the Simulink model to confirm that everything works as expected. In RT-LAB, build the model, then ensure that the **Real-time simulation mode** is set to **Hardware synchronized** and that **XHP** is enabled.
{% endstep %}

{% step %}

### Review all enabled I/O modules channels in Dashboards

In the RT-LAB Project Explorer, double-click **Dashboards** within your current project. In **Dashboards**, navigate to **Interfaces → OPAL-RT Board** to view all enabled I/O modules channels.

**MuSE setup:** All enabled I/O module channels appear under the same interface.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-5678cc8e9e72f4d5f49ce17c4653c061892313ce%2FDR-rtlab-muse-dashboards.png?alt=media" alt=""><figcaption></figcaption></figure>

\
**PCIe setup:** Enabled I/O module channels are divided into separate interfaces, each corresponding to a different simulator or expansion unit.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-8bf830ed1e3fd1a78edd2ba17f35f4125904c2dc%2FDR-rtlab-pcie-dashboards.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Connect model signals to channels

Click the **+** icon next to the desired channel and double-click the model signal to connect. To connect a signal vector, click the **\[+]** icon next to the channel group, then double-click the model’s signal vector. Use the search function to quickly find and select the desired signals. Repeat for all desired connections.
{% endstep %}

{% step %}

### Load and execute the model

You can load and execute the model directly from **Dashboards** or return to RT-LAB to perform these actions.
{% 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/rt-lab/configure-ios/analog-digital-and-sfp-ios/opal-rt-board-workflow/multi-fpga-model-ios.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.
