Skip to content
Affine types for predictable hardware generation
Scala Racket JavaScript Emacs Lisp Makefile CSS Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci try mozilla/sbt on circleci Jul 24, 2019
notes warning about notes Jun 29, 2019
project add project assembly dep Feb 6, 2019
tools else is a keyword for vim Aug 29, 2019
website expand on overview. Set it as default landing page Jun 29, 2019
.hook.yaml cleanup main makefile and remove seashell.js bundle Oct 12, 2018
LICENSE Add a license Oct 9, 2018
build.sbt upgrade to scala 2.13 Aug 29, 2019
fuse link to scala 2.13 jar for fuse executable Aug 29, 2019



Dahlia is a programming language for designing hardware accelerators. It provides abstractions that guarantee hardware realizability after type checking. For more details, see 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. On macOS with Homebrew, for example, you can use brew cask install adoptopenjdk.
  • Install Scala and sbt. On macOS, use brew install scala sbt.

Now you can compile the compiler by typing sbt compile. Use sbt test to run the tests. Type sbt assembly to generate a fat jar for command-line use and distribution.

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 src/test/resources/should-compile/matadd.sea

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


The documentation is hosted here. We use Docusaurus to generate our documentation.


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


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

You can’t perform that action at this time.