> 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/machines/machine-interface-parallel-to-parallel-and-serial-to-parallel-wrapper.md).

# Machine Interface Parallel to Parallel and Serial to Parallel Wrapper

## Description

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-7d91aad0690d88f07989eb521eeba376d11d0bbc%2Fehs-machine-interface-block.png?alt=media" alt=""><figcaption></figcaption></figure>

The **Machine Interface Parallel to Parallel and Serial to Parallel Wrappe**r block, located in the **eFPGAsim/External circuit editor workflow/Machines** library, provides an intuitive interface for mapping motor machine signals to parallel outputs. It supports both serial and parallel input formats and allows the user to reorder signals as required.

The available operating modes are:

* **Parallel Mode**: Reorders parallel input signals and outputs them as parallel signals.
* **Serial Mode**: Receives serial input signals, maps and reorders them, and outputs them as parallel signals.

For more information about the under mask blocks, the user can refer to the following documentation:

* <mark style="background-color:$primary;">For the parallel inputs to parallel outputs block :</mark> [<mark style="background-color:$primary;">P2P CPU block</mark>](https://opal-rt.atlassian.net/wiki/spaces/FPET/pages/22912005)
* <mark style="background-color:$primary;">For the serial inputs to parallel outputs block :</mark> [<mark style="background-color:$primary;">S2P CPU block</mark>](https://opal-rt.atlassian.net/wiki/spaces/FPET/pages/22911983)

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

This block can be configured in one of two operating modes: 4 PMSM, 4 IM, 2 SRM or 2 PMSM, 2 IM, 1 SRM.

### 4 PMSM, 4 IM, 2 SRM mode

This mode is intended for use **only on an OP5607** target with eHS Gen4 x128.

In this mode, the block can map signals from:

* **4 PMSMs**, configured in the **PMSM1**, **PMSM2**, **PMSM3**, and **PMSM4** tabs.
* **4 IMs**, configured in the **IM1**, **IM2**, **IM3**, and **IM4** tabs.
* **2 SRMs**, configured in the **SRM1** and **SRM2** tabs.

The 4 PMSM, 4 IM, 2 SRM mode supports up to **128 output values**. Therefore, the valid output selection range is **Y01 to Y128**.

### 2 PMSM, 2 IM, 1 SRM mode

This mode is intended for use **only on an OP4510** target with eHS Gen4 x64.

In this mode, the block can map signals from:

* **2 PMSMs**, configured in the **PMSM1** and **PMSM2** tabs. The **PMSM3** and **PMSM4** tabs are disabled in this mode.
* **2 IMs**, configured in the **IM1** and **IM2** tabs. The **IM3** and **IM4** tabs are disabled in this mode.
* **1 SRM**, configured in the **SRM1** tab. The **SRM2** tab is disabled in this mode.

The 2 PMSM, 2 IM, 1 SRM mode supports up to **64 output values**. Therefore, the valid output selection range is **Y01 to Y64**.

## Mask parameters

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

{% tabs %}
{% tab title="PMSM #, IM #, SRM #" %}
The block maps eHS outputs to the inputs of the PMSM machine models, providing **voltage measurement outputs**.

Each machines has its own dedicated configuration tab, allowing its voltage measurement signals to be mapped independently.

When the **2 PMSM, 2 IM, 1 SRM Mode** is selected, only the **PMSM1**, **PMSM2, IM1, IM2** and **SRM1** tabs are enabled.

Please refer to the machine package user guide, for instructions about eHS and machine mapping.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-b820fe68880ad89481d520ff74d69cda8800ee5f%2Fehs-machine-interface-example-mapping.png?alt=media" alt=""><figcaption><p>The following setting will map Va from PMSM 4 to output 11, Vb to output 103 and Vc to output 125</p></figcaption></figure>
{% endtab %}

{% tab title="Config" %}

| Parameter                | Description                                                                                                                                                                                                          |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **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).                                      |
| **Mode**                 | Select the mode that should be used by the block: 2 PMSM, 2 IM, 1 SRM Mode or 4 PMSM, 4 IM, 2 SRM Mode.                                                                                                              |
| {% endtab %}             |                                                                                                                                                                                                                      |
| {% endtabs %}            |                                                                                                                                                                                                                      |

## Inputs

This block has no inputs.

## Outputs

| Output     | Description |
| ---------- | ----------- |
| **Status** |             |
| **Signal** |             |


---

# 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/machines/machine-interface-parallel-to-parallel-and-serial-to-parallel-wrapper.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.
