> 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/hypersim/library-blocks-reference/network-tools/fpga-based-circuit.md).

# FPGA Based Circuit

## Description

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-2f8ba145c7aaa4b063d9a90275eb755bc750b6b4%2Fimage%20(1003).png?alt=media" alt="" width="223"><figcaption></figcaption></figure>

The **FPGA-based circuit** block, located in the **Network Tools** library, allows creating, editing, configuring, and running an FPGA-based circuit. It provides access to the schematic editor designed to develop models for FPGA-based simulation. The model is an ehs3 file loaded into the component. Multiple eHS models are supported in the same HYPERSIM circuit.

Parameter sets can be predefined to switch test cases while the simulation is running.

In a single eHS model simulation, the chassisId in the Schematic Editor may be left to automatic. If only one OPAL-RT Board and one eHS model are present and have a consistent bitstream, they are assumed to work together.

In case of **multiple FPGA\_based circuit blocks**, during simulator startup, HYPERSIM associates each OPAL-RT Board with the correct eHS model using:

* the chassisId, set in both the OPAL-RT Board and the Schematic Editor’s Simulator Setup,
* and the bitstream type, set in both the OPAL-RT Board and the Schematic Editor firmware selection.

{% hint style="info" %}
For portability, keep the ehs3 file next to the ecf file of the model. The <mark style="background-color:yellow;">Project Import-Export tool</mark> automatically selects this file during export.
{% endhint %}

For more information on using the schematic editor, see [OPAL-RT Schematic Editor Documentation](https://opal-rt.atlassian.net/wiki/spaces/PSED).

## Mask parameters

This block does not rely on a Mask, it is configured from the schematic using the context menu (Ctrl + Right-click).

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-7ba1352e6cab41c4b6b05e9e4c2f3a1c6085717e%2Fimage%20(1004).png?alt=media" alt="" width="372"><figcaption></figcaption></figure>

* **Open in Schematic Editor**: Opens the currently assigned circuit in the Schematic Editor (same as double-click). If no circuit is assigned, you can create a new circuit or select an existing one.
* **New Circuit**: Creates a new ehs3 file at the chosen location, assigns it to the component, and opens it in the Schematic Editor.
* **Edit**: Selects an existing ehs3 file, assigns it to the component, and loads the circuit.
* **Load circuit**: Loads the selected circuit into the HYPERSIM model, redraws the block, and generates the I/O and FPGA configurations.

{% hint style="info" %}
When you select Load circuit, configuration files are created in the model’s \_hyp folder. To share a model that uses this component, copy the \_hyp folder along with the .ecf file.
{% endhint %}

* **Open build report**: Opens the report from the last "Load circuit" operation.
* **Show in explorer**: Opens the folder containing the ehs3 file associated with this component.
* **Open Documentation**: Opens the local documentation for this component.

Due to the 2025.1 file structure change, a model made in this version and higher is not supported in version 2024.4 and under

{% hint style="danger" %}
**Troubleshooting**

If circuit loading fails, a notification appears. Open the build report for details.
{% endhint %}

## Inputs

Inputs and outputs are generated dynamically based on the sources, switches, and measurements present in the FPGA-based circuit.

Additionally to these inputs/outputs a **parameter\_set\_id pin** allows controlling the parameter set selection from the CPU model, if any parameter sets are present in the circuit,

<table><thead><tr><th width="262.79998779296875">Input</th><th>Description</th></tr></thead><tbody><tr><td>Controlled sources inputs</td><td>Drive the controlled current and controlled voltage sources from the FPGA-based model.</td></tr><tr><td>Switches inputs</td><td>Control the switches from the FPGA-based model.</td></tr><tr><td>parameter_set_id</td><td>Parameter set ID. Used only if the parameter set source is set to "External." If the value is not valid, the previous valid value is used.</td></tr></tbody></table>

## Outputs

<table><thead><tr><th width="270.00006103515625">Output</th><th>Description</th></tr></thead><tbody><tr><td>Measurement outputs</td><td>All outputs represent measurement components placed in the FPGA-based circuit.</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/hypersim/library-blocks-reference/network-tools/fpga-based-circuit.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.
