> 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/efpgasim-library/simulink-sps-workflow/serial-to-parallel.md).

# Serial to Parallel

## Description

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2FhNN9rzvOlyxqgNWG14US%2Fimage.png?alt=media&amp;token=00fda544-2c2f-4d11-93c3-bfc68ef1ea59" alt="" width="320"><figcaption></figcaption></figure>

The **Serial to Parallel** block, located in the **efs\_cpugenericinterfaces\_lib** library, is used to generate and send configuration to the Serial to Parallel mapping feature within the firmware (S2P XSG block).

{% hint style="info" %}
This block **has to be placed inside the Master subsytem** of the RT-LAB model.
{% endhint %}

## Mask parameters

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2FqxVjf5Z2CrK6jCwz2MhD%2Fimage.png?alt=media&amp;token=b7670f48-f6af-44d7-89ef-6c931934998a" alt="" width="407"><figcaption></figcaption></figure>

| Parameter                                  | Description                                                                                                                                                                                                                                                                        |
| ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Mapping Array**                          | <p>Indexes of the S2P XSG block input signals that are going to be selected.<br><strong>Indexes are 1 based</strong>. <br>Length of array is equal to <strong>Maximum number of outputs</strong>, and each maximum index is equal to <strong>Maximum number of inputs</strong></p> |
| **Maximum number of inputs \[Read Only]**  | Defines the number maximum number of inputs. It defines the maximum input index.                                                                                                                                                                                                   |
| **Maximum number of outputs \[Read Only]** | Defines the number maximum number of outputs. It defines the **Mapping Array maximum size**.                                                                                                                                                                                       |
| **OpControl block name**                   | Links this block to an OpCtrl block by entering the same 'Controller Name' as specified in the OpCtrl block. The OpCtrl block controls initialization of the settings of one specific FPGA-based card in the system.                                                               |
| **LoadIn port number**                     | Enter the number of the LoadIn port used to communicate with the firmware, in the range \[1:32]. Port number is available inside the bitstream configuration file (.conf file).                                                                                                    |

## Inputs

This block has no input.

## Outputs

| Output         | Description                                                                                                                                                                       |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Status**     | This output is a scalar, which should be 0 in normal operation mode. For more information about other status code, please refer to the help of the OpFcnCommonLoadIn RT-LAB help. |
| **Monitoring** | This output is an array, which contains the configuration that is actually sent to the firmware. This port is used internally within OPAL-RT for debugging.                       |


---

# 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/efpgasim-library/simulink-sps-workflow/serial-to-parallel.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.
