> 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/raw-fpga-data-and-sfp-configuration.md).

# Raw FPGA Data & SFP Configuration

This page describes the **OPAL‑RT Board configuration data sections**, which define how raw data is directly exchanged between a model directly and the FPGA through DataIN, DataOUT and LoadIN ports. The available ports, data widths, and supported behaviors are determined entirely by the **supplied bitstream**.

Correct use of this functionality requires a clear understanding of the **bitstream logic** that processes the transmitted data. An incorrect data frame configuration may result in **invalid or undefined FPGA behavior**. Refer to the **System Description Document** for details on the bitstream implementation.

## Data to board section

Bitstreams allow a model **to send raw data** at every simulation time step **directly to the FPGA**, bypassing standard I/O unpacking blocks. Data is transferred through the FPGA **DataIN ports** and is intended for use cases where the bitstream logic directly consumes raw data words. Each DataIN port supports up to **250 32‑bit data words**, enabling high‑bandwidth data transmission from the model to the FPGA logic implemented on the board.

In the **Folders** list, click and expand **Data to board** to view the list of usable DataIN **ports**.

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

The list of available **DataIN ports** includes **all** DataIN ports defined in the bitstream. However, some of these ports are reserved for Analog and Digital output modules and are not intended for use cases where the bitstream logic directly consumes raw data words.

Signals from **SFP channels**, on the other hand, are specifically designed for scenarios where the bitstream logic directly processes raw data words. To identify which DataIN ports are associated with SFP channels, refer to your **System Description Document**.

Once the appropriate ports have been identified, click the corresponding **Ports** from the list to configure their data signals. Use:

* **+** icon to add data signals
* **–** icon to remove data signals
* **Arrow** icons to reorder data signals

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

Each configured data signal added to the frame is exposed as a separate connectable point, using the defined signal **Name**. Each connectable point can then be connected to the model and used to transmit signals **from the model** during execution.

<table data-header-hidden><thead><tr><th width="160">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>Specifies the name of the signal or signal vector. This name is used to expose the corresponding connectable point.</td></tr><tr><td><strong>Type</strong></td><td>Specifies the data encoding applied before transmission to the FPGA. Supported types are <strong>Bit</strong>, <strong>Unsigned</strong>, <strong>Signed</strong>, <strong>Float</strong>, and <strong>Double</strong>; when a vector is used, the selected type applies to all elements. Some types impose fixed constraints: <strong>Bit</strong> forces the signal size to <strong>1 bit</strong>, <strong>Float</strong> forces the size to <strong>32 bits</strong> with a <strong>Bit Offset of 0</strong>, and <strong>Double</strong> forces the size to <strong>64 bits</strong> with a <strong>Bit Offset of 0</strong>.</td></tr><tr><td><strong>Vector Size</strong></td><td>Specifies the number of consecutive elements written starting at the defined byte offset. A value of <code>1</code> defines a single signal, while values greater than <code>1</code> create a signal array. When a signal array is used, all elements share the same <strong>type</strong>, <strong>size</strong>, and <strong>minimum/maximum</strong> constraints. In this case, the <strong>Bit Offset</strong> must be <strong>0</strong>, the <strong>Size (bits)</strong> must be a standard width (<strong>1, 8, 16, 32, or 64</strong>), vector signals must be <strong>byte‑aligned</strong>, and the maximum vector size is <strong>8</strong> for <strong>Bit</strong> signals.</td></tr><tr><td><strong>Byte Offset</strong></td><td>Byte location within the DataIN port where the signal (or first vector element) is written.</td></tr><tr><td><strong>Bit Offset</strong></td><td>Bit position within the selected byte where the signal starts. This parameter is unavailable for <strong>Float</strong>, <strong>Double</strong>, and vector signals.</td></tr><tr><td><strong>Size (bits)</strong></td><td>Size of the signal in bits. Fixed for certain types and applied to each vector element if a vector is used.</td></tr><tr><td><strong>Min</strong></td><td>Minimum value transmitted to the FPGA. Values below this threshold are clamped. Not applicable to <strong>Float</strong> or <strong>Double</strong>.</td></tr><tr><td><strong>Max</strong></td><td>Maximum value transmitted to the FPGA. Values above this threshold are clamped. Not applicable to <strong>Float</strong> or <strong>Double</strong>.</td></tr></tbody></table>

## Data from board section

Bitstreams allow a model **to receive raw data** at every simulation time step **directly from the FPGA**, bypassing standard I/O unpacking blocks. Data is transferred through the FPGA **DataOUT ports** and is intended for use cases where the model directly consumes raw data words produced by the bitstream logic. Each DataOUT port supports up to **250 32‑bit data words**, enabling high‑bandwidth data transfer from the FPGA to the model.

In the **Folders** list, click and expand **Data from board** to view the list of usable DataOUT **ports**.

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

The list of available **DataOUT ports** includes **all** DataOUT ports defined in the bitstream. However, some of these ports are reserved for Analog and Digital input modules and are not intended for use cases where the bitstream logic directly consumes raw data words.

Signals from **SFP channels**, on the other hand, are specifically designed for scenarios where the bitstream logic directly processes raw data words. To identify which DataOUT ports are associated with SFP channels, refer to your **System Description Document**.

Once the appropriate ports have been identified, click the corresponding **Ports** from the list to configure their data signals. Use:

* **+** icon to add data signals
* **–** icon to remove data signals
* **Arrow** icons to reorder data signals

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

Each configured data signal added to the frame is exposed as a separate connectable point, using the defined signal **Name**. Each connectable point can then be connected to the model, enabling direct, real‑time monitoring **in the model** during execution.

<table data-header-hidden><thead><tr><th width="160">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>Specifies the name of the signal or signal vector. This name is used to expose the corresponding connectable point.</td></tr><tr><td><strong>Type</strong></td><td>Specifies the data encoding applied when receiving data from the FPGA. Supported types are <strong>Bit</strong>, <strong>Unsigned</strong>, <strong>Signed</strong>, <strong>Float</strong>, and <strong>Double</strong>; when a vector is used, the selected type applies to all elements in the array. Certain types impose fixed decoding constraints: <strong>Bit</strong> forces the signal size to <strong>1 bit</strong>, <strong>Float</strong> forces the size to <strong>32 bits</strong> with a <strong>Bit Offset of 0</strong>, and <strong>Double</strong> forces the size to <strong>64 bits</strong> with a <strong>Bit Offset of 0</strong>.</td></tr><tr><td><strong>Vector Size</strong></td><td>Specifies the number of consecutive elements expected starting at the defined byte offset. A value of <code>1</code> defines a single signal, while values greater than <code>1</code> create a signal array. When a signal array is used, all elements share the same <strong>type</strong>, <strong>size</strong>, and <strong>minimum/maximum</strong> constraints. In this case, the <strong>Bit Offset</strong> must be <strong>0</strong>, the <strong>Size (bits)</strong> must be a standard width (<strong>1, 8, 16, 32, or 64</strong>), vector signals must be <strong>byte‑aligned</strong>, and the maximum vector size is <strong>8</strong> for <strong>Bit</strong> signals.</td></tr><tr><td><strong>Byte Offset</strong></td><td>Byte location within the DataOUT port where the signal (or first vector element) is written.</td></tr><tr><td><strong>Bit Offset</strong></td><td>Bit position within the selected byte where the signal starts. This parameter is unavailable for <strong>Float</strong>, <strong>Double</strong>, and vector signals.</td></tr><tr><td><strong>Size (bits)</strong></td><td>Size of the signal in bits. Fixed for certain types and applied to each vector element if a vector is used.</td></tr><tr><td><strong>Min</strong></td><td>Minimum value transmitted to the FPGA. Values below this threshold are clamped. Not applicable to <strong>Float</strong> or <strong>Double</strong>.</td></tr><tr><td><strong>Max</strong></td><td>Maximum value transmitted to the FPGA. Values above this threshold are clamped. Not applicable to <strong>Float</strong> or <strong>Double</strong>.</td></tr></tbody></table>

## Load to board section

A bitstream may allow a model **to send raw data** **asynchronously** **directly to the FPGA**, bypassing standard I/O unpacking blocks. Data is transferred through the FPGA **LoadIN ports** and is intended for use cases where the bitstream logic consumes **configuration‑type** (non time‑step‑critical) raw data words. Unlike DataIN, LoadIN transfers rely on a **slower CPU-FPGA communication link** and are **not meant to be used at every simulation time step**; doing so can reduce simulation performance. Each LoadIN port supports up to **250 32‑bit data words**, enabling asynchronous exchange of raw data between the model and the FPGA logic implemented on the board.

In the **Folders** list, click and expand **Load to board** to view the list of usable LoadIN ports.

To identify which LoadIN ports to configure, refer to your **System Description Document**. Once the appropriate ports have been identified, click the corresponding **Ports** from the list to configure their data signals. Use:

* **+** icon to add data signals
* **–** icon to remove data signals
* **Arrow** icons to reorder data signals

Each configured data signal added to the frame is exposed as a separate connectable point, using the defined signal **Name**. Each connectable point can then be connected to the model.

<table data-header-hidden><thead><tr><th width="160">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>Specifies the name of the signal or signal vector. This name is used to expose the corresponding connectable point.</td></tr><tr><td><strong>Type</strong></td><td>Specifies the data encoding applied before transmission to the FPGA. Supported types are <strong>Bit</strong>, <strong>Unsigned</strong>, <strong>Signed</strong>, <strong>Float</strong>, and <strong>Double</strong>; when a vector is used, the selected type applies to all elements. Some types impose fixed constraints: <strong>Bit</strong> forces the signal size to <strong>1 bit</strong>, <strong>Float</strong> forces the size to <strong>32 bits</strong> with a <strong>Bit Offset of 0</strong>, and <strong>Double</strong> forces the size to <strong>64 bits</strong> with a <strong>Bit Offset of 0</strong>.</td></tr><tr><td><strong>Vector Size</strong></td><td>Specifies the number of consecutive elements written starting at the defined byte offset. A value of <code>1</code> defines a single signal, while values greater than <code>1</code> create a signal array. When a signal array is used, all elements share the same <strong>type</strong>, <strong>size</strong>, and <strong>minimum/maximum</strong> constraints. In this case, the <strong>Bit Offset</strong> must be <strong>0</strong>, the <strong>Size (bits)</strong> must be a standard width (<strong>1, 8, 16, 32, or 64</strong>), vector signals must be <strong>byte‑aligned</strong>, and the maximum vector size is <strong>8</strong> for <strong>Bit</strong> signals.</td></tr><tr><td><strong>Byte Offset</strong></td><td>Byte location within the DataIN port where the signal (or first vector element) is written.</td></tr><tr><td><strong>Bit Offset</strong></td><td>Bit position within the selected byte where the signal starts. This parameter is unavailable for <strong>Float</strong>, <strong>Double</strong>, and vector signals.</td></tr><tr><td><strong>Size (bits)</strong></td><td>Size of the signal in bits. Fixed for certain types and applied to each vector element if a vector is used.</td></tr><tr><td><strong>Initial value</strong></td><td>Value sent to the FPGA <strong>during model load</strong> (only). This parameter is relevant when data is sent <strong>during load</strong> (when load‑only, or load + run‑time). The value is constrained by the configured <strong>Min</strong> and <strong>Max</strong>.</td></tr><tr><td><strong>Min</strong></td><td>Minimum value transmitted to the FPGA. Values below this threshold are clamped. For run‑time transfers, not applicable to <strong>Float</strong> or <strong>Double</strong>.</td></tr><tr><td><strong>Max</strong></td><td>Maximum value transmitted to the FPGA. Values above this threshold are clamped. For run‑time transfers, not applicable to <strong>Float</strong> or <strong>Double</strong>.</td></tr></tbody></table>

By default, each signal’s **Initial Value** is sent to the FPGA once **during model load**. Optional parameters allow configuration data to be transferred from a `.mat` file or updated at run‑time through data and trigger connectable points.

<table><thead><tr><th width="150">Parameter</th><th>Value (Description)</th></tr></thead><tbody><tr><td><strong>Send .mat configuration file</strong></td><td><p><strong>Checked:</strong> The port transfers data from a specified <strong>.mat</strong> file to the FPGA. The supported MAT‑file format is <strong>version 4</strong>. The matrix must be stored as <strong>double</strong> values (as required by v4) and is converted to <strong>unsigned 32‑bit integers</strong> before being sent to the FPGA. Only <strong>one matrix</strong> is used; subsequent matrices are ignored. The matrix is sent <strong>line by line</strong>; a <strong>start‑of‑frame</strong> indication is sent before each line. The following parameter must be configured:</p><ul><li><strong>.mat file path</strong>: Path of the <strong>.mat</strong> file to transfer to the FPGA</li></ul><p><strong>Unchecked:</strong> Each signal’s <strong>Initial Value</strong> is sent once when the model is loaded.</p></td></tr><tr><td><strong>Send configuration data real-time</strong></td><td><p><strong>Checked:</strong> The port transfers the configured data frame <strong>during simulation execution</strong> using a <strong>trigger mechanism</strong>. Exposes the <strong>data</strong> and <strong>trigger</strong> connectable points. These connectable points can then be connected to the model, enabling direct, real‑time control <strong>from the model</strong> during execution. At run‑time, transfers occur only on a <strong>trigger rising edge (0 → 1)</strong>. The following parameter becomes available:</p><ul><li><strong>Also send configuration initial values:</strong> When enabled, each signal’s <strong>Initial Value</strong> are also sent during model load, and updates continue to be sent at run‑time on trigger rising edges.</li></ul><p><strong>Unchecked:</strong> Each signal’s <strong>Initial Value</strong> is sent once when the model is loaded.</p></td></tr></tbody></table>


---

# 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/raw-fpga-data-and-sfp-configuration.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.
