PyHLS: Intermediate Representation for Versatile High-Level Synthesis
Abstract
High-Level Synthesis (HLS) has become an estab-
lished methodology to accelerate the development of FPGA-
based systems by allowing algorithms to be written in high-level
languages (HLLs) such as C/C++ or Python. Yet, for real-
time physics experiments—including fusion plasma diagnostics,
high-energy physics (HEP) detectors, and rare-event astro-
physical triggers—conventional HLS still falls short in three
essential aspects: determinism, portability, and auditability.
Pragmas embedded in HLL code blur the separation between
algorithmic intent and implementation details, coupling scien-
tific software to a particular device or compiler version. This
is particularly problematic in long-lived scientific projects such
as ITER or the Pierre Auger Observatory, where systems must
remain functional and maintainable over decades [4]–[6].
To address these challenges, we propose an Intermediate
Representation (IR)-centric HLS flow—PyHLS—that explic-
itly introduces an abstraction layer between algorithm and
Register-Transfer Level (RTL) design. The IR centralizes all
performance-critical aspects: timing contracts (initiation inter-
val, latency, jitter), concurrency (loop unrolling, pipelining),
memory layout (banking, tiling, port allocation), and resource
binding (DSPs, BRAMs, AI tiles). In this model, the algorithm
is expressed in clean, testable Python code [1], [2], while
device-specific optimizations are described in a structured
IR graph. This IR is then lowered into a reusable VHDL
microinstruction library [3], which serves as a portable middle
layer across devices. By versioning and auditing IR graphs
and instruction streams, PyHLS ensures reproducibility and
traceability—critical properties in scientific computing where
results must be verifiable years after deployment.
The methodology builds upon earlier work in Python-
based high-level synthesis, parameterizable metamodels, and
algorithmic synthesis with multi-level compilers [8], [9], [11].
It incorporates systematic design space exploration (DSE),
allowing parameter sweeps over IR attributes and early fea-
sibility checks. The flow is complemented by a cycle-accurate
microinstruction emulator, which validates both functionality
and timing contracts before vendor toolchains are invoked,
reducing iteration time and catching infeasible designs early.
We demonstrate the motivation and applicability of this
approach in two demanding domains. First, in plasma diagnos-
tics at JET/ITER, where spectrometer and data acquisition
systems must combine high bandwidth with deterministic
latency [6]. Second, in trigger pipelines for astroparticle physics,
where artificial neural networks (ANNs) and fuzzy-logic al-
gorithms have been implemented directly in FPGA logic to
discriminate rare events from large backgrounds [4], [5]. These
use-cases highlight the need for explicit IR-level contracts and
modularity: the same high-level algorithm must be portable
across device generations, yet adapted to exploit specialized
hardware resources such as DSP slices, systolic AI engines, or
high-bandwidth memories.
The contribution of this work is therefore threefold:
1) We formalize the role of an explicit IR in HLS, decoupling
algorithms from implementation decisions and introduc-
ing contract-driven determinism.
2) We present a reusable VHDL microinstruction library
and emulator that stabilize implementation and provide
auditable artifacts.
3) We show how PyHLS extends naturally to heterogeneous
FPGAs, mapping operators to emerging AI/ML blocks
while maintaining scientific reproducibility and portabil-
ity across decades.
By unifying algorithmic specification, IR-based parameter-
ization, and reusable microinstructions, PyHLS establishes a
sustainable methodology for real-time physics experiments and
beyond. In short: write the science once, retarget the hardware
many times.
Additional Files
Published
Issue
Section
License
Copyright (c) 2025 International Journal of Electronics and Telecommunication

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
1. License
The non-commercial use of the article will be governed by the Creative Commons Attribution license as currently displayed on https://creativecommons.org/licenses/by/4.0/.
2. Author’s Warranties
The author warrants that the article is original, written by stated author/s, has not been published before, contains no unlawful statements, does not infringe the rights of others, is subject to copyright that is vested exclusively in the author and free of any third party rights, and that any necessary written permissions to quote from other sources have been obtained by the author/s. The undersigned also warrants that the manuscript (or its essential substance) has not been published other than as an abstract or doctorate thesis and has not been submitted for consideration elsewhere, for print, electronic or digital publication.
3. User Rights
Under the Creative Commons Attribution license, the author(s) and users are free to share (copy, distribute and transmit the contribution) under the following conditions: 1. they must attribute the contribution in the manner specified by the author or licensor, 2. they may alter, transform, or build upon this work, 3. they may use this contribution for commercial purposes.
4. Rights of Authors
Authors retain the following rights:
- copyright, and other proprietary rights relating to the article, such as patent rights,
- the right to use the substance of the article in own future works, including lectures and books,
- the right to reproduce the article for own purposes, provided the copies are not offered for sale,
- the right to self-archive the article
- the right to supervision over the integrity of the content of the work and its fair use.
5. Co-Authorship
If the article was prepared jointly with other authors, the signatory of this form warrants that he/she has been authorized by all co-authors to sign this agreement on their behalf, and agrees to inform his/her co-authors of the terms of this agreement.
6. Termination
This agreement can be terminated by the author or the Journal Owner upon two months’ notice where the other party has materially breached this agreement and failed to remedy such breach within a month of being given the terminating party’s notice requesting such breach to be remedied. No breach or violation of this agreement will cause this agreement or any license granted in it to terminate automatically or affect the definition of the Journal Owner. The author and the Journal Owner may agree to terminate this agreement at any time. This agreement or any license granted in it cannot be terminated otherwise than in accordance with this section 6. This License shall remain in effect throughout the term of copyright in the Work and may not be revoked without the express written consent of both parties.
7. Royalties
This agreement entitles the author to no royalties or other fees. To such extent as legally permissible, the author waives his or her right to collect royalties relative to the article in respect of any use of the article by the Journal Owner or its sublicensee.
8. Miscellaneous
The Journal Owner will publish the article (or have it published) in the Journal if the article’s editorial process is successfully completed and the Journal Owner or its sublicensee has become obligated to have the article published. Where such obligation depends on the payment of a fee, it shall not be deemed to exist until such time as that fee is paid. The Journal Owner may conform the article to a style of punctuation, spelling, capitalization and usage that it deems appropriate. The Journal Owner will be allowed to sublicense the rights that are licensed to it under this agreement. This agreement will be governed by the laws of Poland.
By signing this License, Author(s) warrant(s) that they have the full power to enter into this agreement. This License shall remain in effect throughout the term of copyright in the Work and may not be revoked without the express written consent of both parties.