A collection of repositories used to realise various end-to-end high-level synthesis (HLS) flows centering around the CIRCT project.

Overview

circt-hls

What is this?: A collection of repositories used to realise various end-to-end high-level synthesis (HLS) flows centering around the CIRCT project.

The fud driver within Calyx is used as a general driver for the entire flow.

HLS flows

These are the (intended) end-to-end flows that can be run from this directory:

  • C
    • Polygeist
      • CIRCT
        • Staticlogic (Statically scheduled HLS)
          • Calyx
            • Calyx native compiler (not circt)
              • Verilog
        • Handshake (dynamically scheduled HLS)
          • FIRRTL
            • HW
              • Verilog
    • Vivado ("Classical" HLS)
      • Verilog

Setup

Build CIRCT

If you don't already have a CIRCT/MLIR build locally, checkout https://github.com/llvm/circt and go follow the instructions.

Build Polygeist

We'll build Polygeist using our existing MLIR/LLVM/Clang build.
NOTE: modify these paths to point to your own CIRCT/MLIR builds.

cd Polygeist
mkdir build
cd build
cmake -G Ninja .. \
  -DMLIR_DIR=$PWD/../circt/llvm-project/build/lib/cmake/mlir \
  -DCLANG_DIR=$PWD/../circt/llvm-project/build/lib/cmake/clang \
  -DLLVM_TARGETS_TO_BUILD="host" \
  -DLLVM_ENABLE_ASSERTIONS=ON \
  -DCMAKE_BUILD_TYPE=DEBUG
ninja
ninja check-mlir-clang

Build Calyx

Note: skip this step if you already have a Calyx build available.

building the rust compiler:

cd calyx
cargo build

building the Calyx driver:

Install Flit:

pip3 install flit

Install fud:

cd calyx
flit -f fud/pyproject.toml install -s

Configure fud:

cd calyx
fud config global.futil_directory $(pwd)/target/debug/futil

Check the fud configuration:

fud check

If anything relevant is missing, make sure you have the corresponding application installed and available in your path.

Setting up the HLS fud stages

Setup Polygeist/MLIR/CIRCT stages:
NOTE: modify these paths to point to your own CIRCT/MLIR builds.

fud register polygeist -p $(pwd)/stages/Polygeist/stage.py
fud config external-stages.polygeist.exec $(pwd)/Polygeist/build/mlir-clang/mlir-clang

fud register circt -p $(pwd)/stages/CIRCT/stage.py
fud config external-stages.circt.bin_dir $(pwd)/../circt/build/bin

fud register mlir -p $(pwd)/stages/MLIR/stage.py
fud config external-stages.mlir.bin_dir $(pwd)/../circt/llvm/build/bin

We use the setting

fud config stages.circt_hls.toplevel ${toplevel}

to keep track of the top-level function to be compiled. This should match a function name in the input .c file. This will further be used as the top-level function when lowering SCFToCalyx.

To initialize this, please run:

fud config stages.circt_hls.toplevel ""

finally, run fud config to ensure that the variables were written correctly.

Usage

The following lists example commands for exercising the available flows. If you're interested about the specific passes that are getting executed through fud, add --verbose to the command line.

Statically scheduled

  • Polygeist to mlir (scf)
fud exec "Polygeist/mlir-clang/Test/aff.c"  \
  --from c                                  \
  --to mlir-scf                             \
  -s circt_hls.toplevel "kernel_deriche"
fud exec "Polygeist/mlir-clang/Test/aff.c"  \
  --from c                                  \
  --to mlir-calyx                           \
  -s circt_hls.toplevel "kernel_deriche"
  • Polygeist to calyx
    Error: invalid lowering of comb groups
fud exec "Polygeist/mlir-clang/Test/aff.c"  \
  --from c                                  \
  --to futil                                \
  -s circt_hls.toplevel "kernel_deriche"

Dynamically scheduled

  • Polygeist to mlir (handshake)
    Error: issues in lowering the memref.alloc ops in standard to handshake. I think this goes back to what https://github.com/llvm/circt/pull/1538 is trying to solve.
fud exec "examples/c/fir/fir.c" \
  --from c                      \
  --to mlir-handshake           \
  -s circt_hls.toplevel fir
  • Polygeist to mlir (FIRRTL)
    error: issues in FIRRTL with unbounded memories
fud exec "examples/c/fir/fir.c" \
  --from c                      \
  --to mlir-firrtl              \
  -s circt_hls.toplevel fir

Vivado

...

pvaPy provides Python bindings for EPICS pvAccess

PvaPy - PvAccess for Python The PvaPy package is a Python API for EPICS7. It supports both PVA and CA providers, all standard EPICS7 types (structures

EPICS Base 25 Dec 05, 2022
Adam with minor modifications which give significant improvement

BAdam Modification of Adam [1] optimizer with increased stability and better performance. Tricks used: Decoupled weight decay as in AdamW [2]. Such de

19 May 11, 2022
4Geeks Academy Full-Stack Developer program final project.

Final Project Chavi, Clara y Pablo 4Geeks Academy Full-Stack Developer program final project. Authors Javier Manteca - Coding - chavisam Clara Rojano

1 Feb 05, 2022
This collection is to provide an easier way to interact with Juniper

Ansible Collection - cremsburg.apstra Overview The goal of this collection is to provide an easier way to interact with Juniper's Apstra solution. Whi

Calvin Remsburg 1 Jan 18, 2022
This directory gathers the tools developed by the Data Sourcing Working Group

BigScience Data Sourcing Code This directory gathers the tools developed by the Data Sourcing Working Group First Sourcing Sprint: October 2021 The co

BigScience Workshop 27 Nov 04, 2022
Margin Calculator - Personally tailored investment tool

Margin Calculator - Personally tailored investment tool

1 Jul 19, 2022
Grade 8 Version of Space Invaders

Space-Invaders Grade 8 Version of Space Invaders Compatability This program is Python 3 Compatable, and not Python 2 Compatable because i haven't test

Space64 0 Feb 16, 2022
A 3D Slicer Extension to view data from the flywheel heirarchy

flywheel-connect A 3D Slicer Extension to view, select, and download images from a Flywheel instance to 3D Slicer and storing Slicer outputs back to F

4 Nov 05, 2022
Blender 3.1 Alpha (and later) PLY importer that correctly loads point clouds (and all PLY models as point clouds)

import-ply-as-verts Blender 3.1 Alpha (and later) PLY importer that correctly loads point clouds (and all PLY models as point clouds) Latest News Mand

Michael Prostka 82 Dec 20, 2022
urlwatch is intended to help you watch changes in webpages and get notified of any changes.

urlwatch is intended to help you watch changes in webpages and get notified (via e-mail, in your terminal or through various third party services) of any changes.

Thomas Perl 2.5k Jan 08, 2023
PREFS is a Python library to store and manage preferences and settings.

PREFS PREFS is a Python library to store and manage preferences and settings. PREFS stores a Python dictionary in a total human-readable file, the PRE

Pat 13 May 26, 2022
BlueBorne Dockerized

BlueBorne Dockerized This is the repo to reproduce the BlueBorne kill-chain on Dockerized Android as described here, to fully understand the code you

SecSI 5 Sep 14, 2022
B-Pkg is a simple tool in python for installing all basic package in termux

Basic-Pkg πŸ‘‰πŸ» Basic-Pkg πŸ‘ˆπŸ» B-Pkg is a simple tool in python for installing all basic package in termux This is my first tool, I hope you will like

Macgaiver 3 Oct 21, 2021
An example project which contains the Unity components necessary to complete Navigation2's SLAM tutorial with a Turtlebot3, using a custom Unity environment in place of Gazebo.

Navigation 2 SLAM Example This example provides a Unity Project and a colcon workspace that, when used together, allows a user to substitute Unity as

Unity Technologies 183 Jan 04, 2023
The Official interpreter for the Pix programming language.

The official interpreter for the Pix programming language. Pix Pix is a programming language dedicated to readable syntax and usability Q) Is Pix the

Pix 6 Sep 25, 2022
A web application (with multiple API project options) that uses MariaDB HTAP!

Bookings Bookings is a web application that, backed by the power of the MariaDB Connectors and the MariaDB X4 Platform, unleashes the power of smart t

MariaDB Corporation 4 Dec 28, 2022
Painel simples com consulta de cep,CNPJ,placa e ip

Painel mpm Um painel simples com consultas de IP, CNPJ, CEP e PLACA Início 🌐 apt update && apt upgrade -y pkg i python git pip install requests Insta

8 Feb 27, 2022
A web interface for a soft serve Git server.

Soft Serve monitor Soft Sevre is a very nice git server. It offers a really nice TUI to browse the repositories on the server. Unfortunately, it does

Maxime Bouillot 5 Apr 26, 2022
No more support server flooding with questions about unsupported hosting.

No more support server flooding with questions about unsupported hosting.

3 Aug 09, 2021
A Python Perforce package that doesn't bring in any other packages to work.

P4CMD 🌴 A Python Perforce package that doesn't bring in any other packages to work. Relies on p4cli installed on the system. p4cmd The p4cmd module h

Niels Vaes 13 Dec 19, 2022