All Projects → UCLA-VAST → AutoSA

UCLA-VAST / AutoSA

Licence: MIT license
AutoSA: Polyhedral-Based Systolic Array Compiler

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language
shell
77523 projects
Makefile
30231 projects
tcl
693 projects

Projects that are alternatives of or similar to AutoSA

t2sp
Productive and portable performance programming across spatial architectures (FPGAs, etc.) and vector architectures (GPUs, etc.)
Stars: ✭ 24 (-80%)
Mutual labels:  fpga, systolic-arrays
TinyMIPS
The Project TinyMIPS is dedicated to enabling undergraduates to build a complete computer system from scratch.
Stars: ✭ 29 (-75.83%)
Mutual labels:  fpga
vivado-docker
Dockerfile with Vivado for CI
Stars: ✭ 22 (-81.67%)
Mutual labels:  fpga
Shuhai
Shuhai is a benchmarking-memory tool that allows FPGA programmers to demystify all the underlying details of memories, e.g., HBM and DDR4, on a Xilinx FPGA
Stars: ✭ 53 (-55.83%)
Mutual labels:  fpga
Home-Brew-Computer
SystemOT, yet another home brew cpu.
Stars: ✭ 21 (-82.5%)
Mutual labels:  fpga
clash-spaceinvaders
Intel 8080-based Space Invaders arcade machine implemented on an FPGA, written in CLaSH
Stars: ✭ 45 (-62.5%)
Mutual labels:  fpga
KiCad-Schematic-Symbol-Libraries
Schematic symbol libraries for FPGAs & microcontrollers.
Stars: ✭ 70 (-41.67%)
Mutual labels:  fpga
apollo
microcontroller-based FPGA / JTAG programmer
Stars: ✭ 32 (-73.33%)
Mutual labels:  fpga
Hard-JPEG-LS
FPGA-based JPEG-LS image compressor.
Stars: ✭ 52 (-56.67%)
Mutual labels:  fpga
FPGA-CNN
This repo is for ECE44x (Fall2015-Spring2016)
Stars: ✭ 17 (-85.83%)
Mutual labels:  fpga
spydrnet
A flexible framework for analyzing and transforming FPGA netlists. Official repository.
Stars: ✭ 49 (-59.17%)
Mutual labels:  fpga
SpinalCrypto
SpinalHDL - Cryptography libraries
Stars: ✭ 36 (-70%)
Mutual labels:  fpga
opencl-hls-cnn-accelerator
OpenCL HLS based CNN Accelerator on Intel DE10 Nano FPGA.
Stars: ✭ 49 (-59.17%)
Mutual labels:  fpga
MobileNet-in-FPGA
Generator of verilog description for FPGA MobileNet implementation
Stars: ✭ 107 (-10.83%)
Mutual labels:  fpga
Limago
Limago: an FPGA-based Open-source 100 GbE TCP/IP Stack
Stars: ✭ 95 (-20.83%)
Mutual labels:  fpga
async fifo
A dual clock asynchronous FIFO written in verilog, tested with Icarus Verilog
Stars: ✭ 117 (-2.5%)
Mutual labels:  fpga
no2muacm
Drop In USB CDC ACM core for iCE40 FPGA
Stars: ✭ 26 (-78.33%)
Mutual labels:  fpga
docker-fpga
Dockerized FPGA toolchain experiments
Stars: ✭ 18 (-85%)
Mutual labels:  fpga
pdp6
PDP-6 Emulator
Stars: ✭ 47 (-60.83%)
Mutual labels:  fpga
up5k
Upduino v2 with the ice40 up5k FPGA demos
Stars: ✭ 65 (-45.83%)
Mutual labels:  fpga

AutoSA: Polyhedral-Based Systolic Array Auto-Compilation

Documentation | Installation | Tutorials | Examples

This repository includes the code for AutoSA. AutoSA is an end-to-end systolic array compiler based on the polyhedral model. It takes algorithms in high-level programming languages (C) as inputs, performs polyhedral transformation and other architecture optimizations to map algorithms to systolic array architecture. The generated designs are in HLS C.

Quick Start

We offer a Docker image for quick start.

docker pull whbldhwj/autosa:latest

Let's try one small example. The input code can be found at ${AUTOSA_ROOT}/autosa_tests/mm/kernel.c. The code region to be transformed to systolic array is annotated using a pair of pragmas scop and endscop.

  1. Generating HLS C Code.

Run the following command to compile generate a systolic array.

./autosa ./autosa_tests/mm/kernel.c \
--config=./autosa_config/autosa_config.json \
--target=autosa_hls_c \
--output-dir=./autosa.tmp/output \
--sa-sizes="{kernel[]->space_time[3];kernel[]->array_part[16,16,16];kernel[]->latency[8,8];kernel[]->simd[2]}" \
--simd-info=./autosa_tests/mm/simd_info.json \
--host-serialize

The generated code can be found in ${AUTOSA_ROOT}/autosa.tmp/output/src/. For detailed explaination of each AutoSA compilation option, please run

./autosa --help

or refer to AutoSA Compilation Options.

  1. Generating FPGA Bitstream

To generate the final bitsteam, set up your local Vitis development kit first. Then execute the makefile to build the design.

cp ${AUTOSA_ROOT}/autosa_tests/mm/Makefile autosa.tmp/output/
cp ${AUTOSA_ROOT}/autosa_tests/mm/connectivity.cfg autosa.tmp/output/
cd ${AUTOSA_ROOT}/autosa.tmp/output
make all

Makefile Options Descriptions

  • MODE := hw_emu: Set the build configuration mode to HW Emulation, other modes: sw_emu|hw
  • PLATFORM := xilinx_u250_xdma_201830_2: Select the target platform
  • KERNEL_SRC := src/kernel_kernel.cpp: List the kernel source files
  • HOST_SRC := src/kernel_host.cpp: List the host source files

The connectivity.cfg describes the DRAM port mapping. For more details about how to change the DRAM port mapping, please refer to the Xilinx tutorials.

  1. Verifying Designs Using Xilinx HLS

AutoSA also supports generate HLS projects. Add the flag

--hls

to the command when compiling the program.

./autosa ./autosa_tests/mm/kernel.c \
--config=./autosa_config/autosa_config.json \
--target=autosa_hls_c \
--output-dir=./autosa.tmp/output \
--sa-sizes="{kernel[]->space_time[3];kernel[]->array_part[16,16,16];kernel[]->latency[8,8];kernel[]->simd[2]}" \
--simd-info=./autosa_tests/mm/simd_info.json \
--host-serialize \
--hls

AutoSA will generate an HLS host file ${AUTOSA_ROOT}/autosa.tmp/output/src/kernel_host.cpp instead of the OpenCL host file generated in the previous step. To build the HLS project, run the following commands.

cp ${AUTOSA_ROOT}/autosa_scripts/hls_scripts/hls_script.tcl autosa.tmp/output/
cd ${AUTOSA_ROOT}/autosa.tmp/output
vivado_hls -f hls_script.tcl

For more detailed instructions on using AutoSA, please refer to the AutoSA Documentation.

Send Us Failure Cases and Feedback!

AutoSA is open source for research purposes, and we would like to continously improve it! Please let us know if...

  1. you find any bug in the AutoSA code.
  2. you find any application that fails the compilation flow of AutoSA.
  3. you know how to further help improve any part of the compiler.
  4. etc.

Authors and Contributors

AutoSA is currently maintained by Jie Wang. Besides, we gratefully acknowledge the authors of PPCG for developing and actively maintaining PPCG as an open-source project.

Papers

More implementation details of AutoSA are covered in our paper. If you find this project useful in your research, please consider citing:

@inproceedings{wang2021autosa,
  title={AutoSA: A Polyhedral Compiler for High-Performance Systolic Arrays on FPGA},
  author={Wang, Jie and Guo, Licheng and Cong, Jason},
  booktitle={Proceedings of the 2021 ACM/SIGDA International Symposium on Field-Programmable Gate Arrays},
  year={2021}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].