> 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/simulink-blocks-reference/rt-lab-i-o-library/loadout.md).

# LoadOut

## Description

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-3b66d90d6c87a2fd4f9f81853044070dd6f1cbd0%2F53185bbd-f911-4467-9433-072f86e128b7.jpg?alt=media" alt=""><figcaption></figcaption></figure>

The **LoadOut** block, located in the **RT-LAB I/O/Opal-RT/Common** library, receives raw data **asynchronously** **directly from the FPGA**, bypassing standard I/O unpacking blocks. Data is transferred through the FPGA **LoadOut ports** and is intended for use cases where the bitstream logic consumes **configuration‑type** (non time‑step‑critical) raw data words. Unlike DataOUT, LoadOUT 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 LoadOUT 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.

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.

## Mask parameters

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-282cea2cfc9b2e0dc4585afe7a13e713d34845b3%2F49dae023-8758-428b-b3c3-c22eac6011f0.jpg?alt=media" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="211">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Controller Name</strong></td><td>Specifies the <strong>OpCtrl</strong> block this block is bound to. Enter the same <strong>Controller Name</strong> as defined in the corresponding <strong>OpCtrl</strong> block.</td></tr><tr><td><strong>LoadOut port number</strong></td><td>Specifies which LoadOut port this block uses to receive raw data words. Configure the <strong>LoadOut port number</strong> according to your <strong>System Description Document</strong> or <code>.conf</code> file.</td></tr><tr><td><strong>LoadOut port width</strong></td><td>Specifies the maximum number of data words that will be received from the FPGA at each calculation step.</td></tr><tr><td><strong>LoadOut port type</strong></td><td><p>Selects the data type of the LoadOut output port. Available options are <strong>uint32</strong> and <strong>double</strong>.</p><p>When <strong>double</strong> is selected, the driver <strong>typecasts values from double to uint32</strong>. As a result, output values are limited to the valid range <strong>0 ≤ x ≤ 2³² − 1</strong>.</p><p>Selecting <strong>uint32</strong> avoids typecasting and provides <strong>optimal performance</strong>.</p></td></tr><tr><td><strong>Sample Time (s)</strong></td><td><p>Specifies the block sample time, in seconds. A value of <code>0</code> sets a continuous sample time, inherited from the parent subsystem. A value of <code>−1</code> specifies an inherited sample time from the model.</p><p>The functionality block and its associated <strong>OpCtrl</strong> block must execute at the same <strong>sample time</strong>.</p></td></tr></tbody></table>

## Inputs

<table><thead><tr><th width="137.5">Input</th><th>Description</th></tr></thead><tbody><tr><td><strong>Enable</strong></td><td>Controls when data is received from the FPGA. When this input is <code>1</code>, the <strong>Data</strong> output updates with data from the FPGA; otherwise, no data is received.</td></tr></tbody></table>

## Outputs

<table><thead><tr><th width="102">Output</th><th>Description</th></tr></thead><tbody><tr><td><strong>Data</strong></td><td>Outputs acquisition data received from the FPGA. No scaling or formatting is applied. If the <strong>LoadOut port type</strong> parameter is set to <strong>double</strong>, values are <strong>typecast from double to uint32</strong>.</td></tr><tr><td><strong>Status</strong></td><td><p>Outputs the block status:</p><ul><li><code>0</code>: No error.</li><li><code>-1</code>: Block not associated with an <strong>OpCtrl</strong> block (check the <strong>Controller Name</strong> parameter), or FPGA initialization failure.</li><li><code>-2</code>: Data reception timeout, typically caused by model synchronization issues.</li><li><code>-3</code>: Data reception error: fewer data received than expected. Missing values are replaced with <code>0</code>.</li><li><code>-4</code>: Data reception error: more data received than expected. Extra values are discarded.</li></ul></td></tr></tbody></table>

## Characteristics and limitations

| Characteristic           | Value |
| ------------------------ | ----- |
| **Direct Feedthrough**   | No    |
| **Discrete sample time** | Yes   |
| **XHP support**          | Yes   |
| **Work offline**         | No    |


---

# 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/simulink-blocks-reference/rt-lab-i-o-library/loadout.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.
