> 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/stubline-configuration.md).

# Stubline Configuration

## Description

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

The **Stubline Configuration** block, located in the **eFPGAsim/External circuit editor workflow** library, is used to configure up to 16 stubline segments, which can be defined as left, right, or both. Stubline segments are added to the eHS model using the **leftStubline** or **rightStubline** blocks. The stubline configuration specified in the eHS model must match the configuration defined in this block.

Stubline segments can be used to decouple two circuits by introducing an artificial propagation delay between them. For an inductive stubline, this delay is represented by two small shunt capacitors. For a capacitive stubline, it is represented by two small series inductors.

## Mask parameters

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

{% tabs %}
{% tab title="Stubline #1 to #15" %}

| Parameter                  | Description                                                                                                                                                                                                                                                                  |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **eHS sampling time**      | Sets to the same sampling time than eHS. In case of multirate simulation, the larger sampling time should be used.                                                                                                                                                           |
| **Back and forth latency** | This parameter defines the round-trip propagation time of a measurement between two stubline segments. The value should be determined experimentally, as it may vary depending on the circuit size, the selected simulation time step, and the use of one or two eHS models. |
| **Current measurement**    | This is used to choose which measurement from eHS is used. It can be found in the output list under leftStubline\Current or rightStubline\Current.                                                                                                                           |
| **Voltage measurement**    | This is used to choose which measurement from eHS is used. It can be found in the output list under leftStubline\Voltage or rightStubline\Voltage.                                                                                                                           |
| **Component type**         | This is used to choose if the stubline segment should be an inductor or a capacitor.                                                                                                                                                                                         |
| **Component value**        | This is component value in SI.                                                                                                                                                                                                                                               |
| {% endtab %}               |                                                                                                                                                                                                                                                                              |

{% tab title="Configuration" %}

{% endtab %}
{% endtabs %}

| Parameter              | Description                                                                                                                                                                                                          |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Controller 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** | This should reflect the LoadIn port used to configure the block on the FPGA.                                                                                                                                         |
| **Sampling time**      | This value is the sampling time of the simulation.                                                                                                                                                                   |

## Inputs

This block has no input

## Outputs

| Output status value | Description                                                                                                          |
| ------------------- | -------------------------------------------------------------------------------------------------------------------- |
| 0                   | No error.                                                                                                            |
| -1                  | Block could not be matched with an OpCtrl block (check the 'controller Name' value), or card initialization problem. |
| -2                  | Internal memory initialization problem.                                                                              |

## Characteristics and limitations

| Direct Feedthrough   | N/A |
| -------------------- | --- |
| 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/efpgasim-library/simulink-sps-workflow/stubline-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.
