Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

38 Commits

Repository files navigation

Prometheus: Automatic HLS Optimization and Code Generation Framework

Prometheus is a holistic toolchain for automatic code generation for FPGA accelerators. It focuses on High-Level Synthesis (HLS) from affine C/C++ kernels and leverages optimization techniques to generate efficient hardware implementations.

✨ Key Features

  • Support for affine C/C++ kernels with static loop bounds.
  • Automatic loop scheduling, pragmas insertion, and code generation.
  • Integration with AMPL for Nonlinear Programming (NLP)-based resource allocation.
  • Generation of optimized HLS-C++ and host code.
  • Simulation and synthesis with AMD Vitis HLS.

🚀 Quick Start

1. Requirements

  • Python 3.8+
  • AMPL (path configured in main.py)
  • Clang-format (for formatting the output code)
  • AMD Vitis HLS (for synthesis and CSIM)

To run PoCC and ISCC, please use the provided Docker container, as the Python code assumes these tools are executed from within the Docker environment. You can pull the latest image with:

docker pull ghcr.io/ucla-vast/pocc:latest

2. Example Usage

python main.py \
--file examples/gemm.c \
--vitis \
--csim \
--SLR 3 \
--DSP 1440 \
--MAX_BUFFER_SIZE 512 \
--ON_CHIP_MEM_SIZE 8192 \
--MAX_UF 32 \
--code_generation \
--folder output_dir

3. Evaluation

Please find the folder evaluation.

⚙️ Command-Line Arguments

ArgumentDescription
--filePath to the input C/C++ kernel
--folderOutput folder for generated code and reports
--name_functionKernel function name (default: kernel_nlp)
--SLRNumber of available Super Logic Regions
--DSPTotal number of DSP slices available
--BRAM, --FF, --LUTFPGA resource budgets (optional)
--MAX_BUFFER_SIZEMaximum allowed on-chip buffer size per array
--ON_CHIP_MEM_SIZETotal available on-chip memory
--MAX_UFMaximum loop unrolling factor
--reuse_nlpUse previously computed NLP results
--vitisEnable synthesis using AMD Vitis HLS
--csimEnable C simulation with Vitis HLS
--code_generationEnable output of HLS-C++ and host code
--graph_partitioningEnable graph partitioning across SLRs or compute units
--no_distributionDisable ISCC-based loop distribution
--update_shapeAutomatically update shape-related constraints
--ap_multiple_burstEnable multiple AXI burst access inference
--cyclic_bufferUse cyclic buffering strategy for data reuse
--verbosePrint detailed information during execution
--debugEnable debug mode

About

No description, website, or topics provided.

Resources

Stars

10 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages