Skip to content

Conversation

@vloncar
Copy link
Contributor

@vloncar vloncar commented Mar 21, 2025

Description

Initial (still a draft) implementation of a backend for MicroChip PolarFire line of FPGAs. The suite of tools is called "Libero" so that's used for the name of the backend too. The HLS compiler itself is "SmartHLS", based on the previously open-source LegUp HLS. The syntax is similar to Vivado/Vitis HLS, allowing for simple porting, however synthesis results are different and will need some fine-tuning to get working well.

The backend is currently not feature complete. Only Dense layers are supported. Given the nature of applications we likely won't aim to have full feature set of other backends. The initial goal to have both strategies in io_parallel, we'll explore streaming implementation if required.

Type of change

  • New feature (non-breaking change which adds functionality)

Tests

Currently no tests. Will be added prior to marking the PR ready for review.

Checklist

(still some left)

  • I have read the guidelines for contributing.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have installed and run pre-commit on the files I edited or added.
  • I have added tests that prove my fix is effective or that my feature works.

@jmitrevs
Copy link
Contributor

jmitrevs commented Sep 4, 2025

Do we want to try to merge this in it's more limited form?

@JanFSchulte JanFSchulte added this to the v1.3.0 milestone Nov 5, 2025
@vloncar
Copy link
Contributor Author

vloncar commented Nov 28, 2025

This is now ready for review/merge.

The latest feature is the support for compile() but this had to be implemented in a hacky way. The ap_fixpt types require the SmartHLS compiler (based on gcc 5) so we have to use the shls compiler for this. Problem is this compiler is controlled via a Makefile that isn't really menat for building shared libraries, rather for making binaries. Therefore we produce two makefiles, and switch the active one depending on if we do build() or compile(). Furthermore, the types are not header-only (i.e., stand-alone) and require linking with the libhls_x86 library that is shipped as part of the installation of Libero, so we need a path to it.

@vloncar vloncar marked this pull request as ready for review November 28, 2025 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants