• Stars
    star
    128
  • Rank 279,760 (Top 6 %)
  • Language
    Scala
  • License
    MIT License
  • Created over 6 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Time-sensitive affine types for predictable hardware generation

The Dahlia Programming Language

Dahlia is a programming language for designing hardware accelerators. It provides abstractions that guarantee predictable hardware generation after type checking. For more details, see the demo and the documentation.

Fuse is the reference compiler for compiling Dahlia programs to various HLS backends. Vivado HLS is the only currently supported backend.

Set It Up

The compiler is written in Scala. To get things running, you will need a Java runtime, Scala itself, and sbt. Here's what you need to do:

  • Get Java if you don't already have it.

    • For MAC OS: brew tap AdoptOpenJDK/openjdk && brew cask install adoptopenjdk8.
    • NOTE: The default adoptopenjdk (Java 13) version does not work with SBT.
  • Install Scala and sbt. On macOS, use brew install scala sbt.

  • Install Runt to run integration tests:

    cargo install runt \
      --version "$(grep ver runt.toml | awk '{print $3}' | tr -d "'")"
    
  • Now you can compile the compiler by typing sbt assembly.

  • Use sbt test to run the tests

  • Use runt to run the integration tests from the repository root.

Compiler development

If you're working on the compiler, you probably want to use the sbt console instead (it's faster for repeated builds). Run sbt alone to get the console, where you can type commands like compile, test, and run [args].

Adding the prefix ~ (such as ~compile) makes sbt go into watch mode, i.e., it will re-run the command every time a dependency changes. Use ~assembly to continously update ./fuse or ~test to continously test the changes.

If you want to execute a sequence of sbt commands without starting sbt console, you can type sbt "; cmd1; cm2 ...". For example, sbt "; test; assembly" will run sbt test followed by sbt assembly.

Use It

Type sbt assembly to package up a fat jar for command-line use. The short fuse shell script here invokes the built jar to run the compiler. To compile a simple test, for example, run:

$ ./fuse ./file-tests/should-compile/matadd.fuse

The compiler produces HLS C source code on its standard output.

Compiler Infrastructure

Source

Because of how Docusaurus is structured, the website is stored in the website/ directory and the documentation files are stored in docs/.

Building

We use github pages to deploy the page. Read the README under website/ for instructions.

More Repositories

1

calyx

Intermediate Language (IL) for Hardware Accelerator Generators
Rust
355
star
2

filament

Fearless hardware design
Verilog
140
star
3

turnt

simple snapshot-style integration testing for commands
Python
65
star
4

approx-vision

Designing image processing hardware and software for computer vision
C++
65
star
5

diospyros

Search-based compiler for high-performance DSP programming
Racket
57
star
6

EventQueue

EQueue Dialect
MLIR
38
star
7

lambdalab

interactive λ-calculus for learning
TypeScript
35
star
8

latte21

Languages, Tools, and Techniques for Accelerator Design
TeX
32
star
9

gator

Geometry types
OCaml
26
star
10

pollen

generating hardware accelerators for pangenomic graph queries
Python
24
star
11

styleguide

rules for writing and typesetting
SCSS
23
star
12

braid

a multi-stage heterogeneous programming language applied to real-time 3D graphics
TypeScript
21
star
13

fodlam

first-order deep learning accelerator model
Python
18
star
14

node-llvmc

JavaScript/TypeScript FFI bindings for the LLVM C API
TypeScript
12
star
15

gem5-mesh

Fork of gem5 with support for manycore architectures. Includes models and scripts to evaluate a software-defined-vector architecture.
C++
11
star
16

latte22

Second Workshop on Languages, Tools, and Techniques for Accelerator Design
TeX
6
star
17

polyphemus

A Cyclops managing FPGA execution in the clouds
Python
6
star
18

hyacinth

Synthesizing compiler for spatial computation
C++
6
star
19

aoc2022-calyx

Calyx code generators for the Advent of Code 2022
Python
5
star
20

calyx-evaluation

Jupyter Notebook
4
star
21

hbir

an intermediate representation for continuously reconfigurable hardware
OCaml
4
star
22

caiman

A language/compiler for the CPU/GPU interface that separates the what, when, and where of computation. Very unstable.
Rust
4
star
23

gator-game

Large graphics project implemented with the Gator language
JavaScript
3
star
24

cidr-evaluation

Python
3
star
25

dahlia-evaluation

Evaluation for Dahlia
Jupyter Notebook
3
star
26

JpegNN

Jpeg layer added to neural network
Python
2
star
27

chazz

convenient utilities for running HammerBlade in F1
Python
2
star
28

packet-scheduling

P4
2
star
29

patron

Hardware Bug Sniffer
Rust
2
star
30

ImageNetV2

ImageNetV2, where jpeg_eval is where code take place
Jupyter Notebook
1
star
31

capra-public

a research group site
Nunjucks
1
star
32

wax2019

The 2019 Workshop on Approximate Computing Across the Stack
JavaScript
1
star
33

CapraRawCamera

Android app for collecting raw photos for computer vision
Java
1
star
34

calyx-hypothesis-test

Python
1
star
35

xarg

The Accelerated Accelerators Reading Group
1
star
36

opal-bot

hyp { with { at { bot; } } }
TypeScript
1
star
37

latte23

TeX
1
star
38

futil-site

Web demo for the Calyx compiler
HTML
1
star
39

cslrg

schedule for a reading group in the Computer Systems Laboratory at Cornell
JavaScript
1
star
40

filament-evaluation

Filament for the best hype system
Verilog
1
star
41

hb-examples

self-contained, hackable, documented examples for HammerBlade on F1
LLVM
1
star
42

verilator-starter

A simple Verilator skeleton to help you get started with simulating Verilog
Shell
1
star
43

nttstuff

several implementations of the number theoretic transform (NTT)
Python
1
star