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

...

Data Poisoning based on Adversarial Attacks using Non-Robust Features

Data Poisoning based on Adversarial Attacks using Non-Robust Features Usage python main.py [-h] [--gpu | -g GPU] [--eps |-e EPSILON] [--pert | -p PER

Jonathan E. 1 Nov 02, 2021
A tool that automatically creates fuzzing harnesses based on a library

AutoHarness is a tool that automatically generates fuzzing harnesses for you. This idea stems from a concurrent problem in fuzzing codebases today: large codebases have thousands of functions and pie

261 Jan 04, 2023
Speed up your typing by some exercises in the multi-platform(Windows/Ubuntu).

Introduction This project purpose is speed up your typing by some exercises in the multi-platform(Windows/Ubuntu). Build Environment Software Environm

lyfer233 1 Mar 24, 2022
Chat meetup

FLiP-Meetup-Chat Chat meetup create function bin/pulsar-admin functions create --auto-ack true --jar pulsardjlexample-1.0.jar --classname "dev.pulsarf

Timothy Spann 1 Dec 09, 2021
NASH 2021 project... this may or may not end up working 🤷‍♂️

wavespace synthesiser this is my NASH 2021 project, which may or may not end up working 🤷‍♂️ what is going on? imagine you have a big folder of audio

Ben Hayes 12 May 17, 2022
Import some key/value data to Prometheus custom-built Node Exporter in Python

About the app In one particilar project, i had to import some key/value data to Prometheus. So i have decided to create my custom-built Node Exporter

Hamid Hosseinzadeh 1 May 19, 2022
Get a link to the web version of a git-tracked file or directory

githyperlink Get a link to the web version of a git-tracked file or directory. Applies to GitHub and GitLab remotes (and maybe others but those are no

Tomas Fiers 2 Nov 08, 2022
A simple spyware in python.

Spyware-Python- Dependencies: Python 3.x OpenCV PyAutoGUI PyMongo (for mongodb connection) Flask (Web Server) Ngrok (helps us push our fla

Abubakar 3 Sep 07, 2022
Camera track the tip of a pen to use as a drawing tablet

cablet Camera track the tip of a pen to use as a drawing tablet Setup You will need: Writing utensil with a colored tip (preferably blue or green) Bac

14 Feb 20, 2022
Paxos in Python, tested with Jepsen

Python implementation of Multi-Paxos with a stable leader and reconfiguration, roughly following "Paxos Made Moderately Complex". Run python3 paxos/st

A. Jesse Jiryu Davis 25 Dec 15, 2022
This is a Blender 2.9 script for importing mixamo Models to Godot-3

Mixamo-To-Godot This is a Blender 2.9 script for importing mixamo Models to Godot-3 The script does the following things Imports the mixamo models fro

8 Sep 02, 2022
You will need to install a few python packages for this one.

Features Bait support Auto repair will repair every 10 catches Anti detection (still a work in progress) but using random times and click positions Pr

12 Sep 21, 2022
Coded in Python 3 - I make for education, easily clone simple website.

Simple Website Cloner - Single Page Coded in Python 3 - I make for education, easily clone simple website. How to use ? Install Python 3 first. Instal

Phạm Đức Thanh 2 Jan 13, 2022
A simple calculator made with tkinter.

Simple Calculator A simple calculator made with tkinter. Requirements None, only you need to have windows 😉 ...Enjoy! Installation Clone this reposit

Abhyush 2 Jan 11, 2022
A tool for checking if the external data used in Flatpak manifests is still up to date

Flatpak External Data Checker This is a tool for checking for outdated or broken links of external data in Flatpak manifests. Motivation Flatpak apps

Flathub 76 Dec 24, 2022
A simple bot that will help you in your learning and make it more fun.

hyperskill-SimpleChattyBot-python A simple bot that will help you in your learning and make it more fun. Syntax bot.py Stages Stage #1: Zuhura Bot we

1 Nov 09, 2021
API development made easy: a smart Python 3 API framework

appkernel - API development made easy What is Appkernel? A super-easy to use API framework, enabling API creation from zero to production within minut

156 Sep 28, 2022
List of Linux Tools I put on almost every linux / Debian host

Linux-Tools List of Linux Tools I put on almost every Linux / Debian host Installed: geany -- GUI editor/ notepad++ like chkservice -- TUI Linux ser

Stew Alexander 20 Jan 02, 2023
Project aims to map out common user behavior on the computer

User-Behavior-Mapping-Tool Project aims to map out common user behavior on the computer. Most of the code is based on the research by kacos2000 found

trustedsec 136 Dec 23, 2022
Attempt at a Windows version of the plotman Chia Plot Manager system

windows plotman: an attempt to get plotman to work on windows THIS IS A BETA. Not ready for production use just yet. Almost, but not quite there yet.

59 May 11, 2022