Crate calyx[][src]

Expand description

The Calyx Intermediate Language

Calyx is an intermediate language for transforming high-level programs into synthesizable hardware designs. Calyx’s key novelty is a split representation that captures the control-flow and the structural detail of a hardware design.

The control sub-language provides several high-level constructs: while (loops), if (conditionals), seq (sequencing), par (parallel execution), invoke (function calls). These contructs simplify the process of encoding the control-flow of a high-level program.

Calyx’s structural sub-language precisely capture details of the underlying hardware. Structural programs specify guarded assignments 1 using ports in structural components.

Take a look at the language tutorial for a complete overview.


  1. Calyx’s guarded assignments are different from Bluespec’s rules. Rules can be dynamically aborted if there are conflicts at runtime and the Bluespec compiler generates scheduling logic to detect such cases. In contract, Calyx’s schedule is defined using the control program and requires no additional scheduling logic to detect aborts. 

Modules

Analysis for Calyx programs.

Defines the default passes available to PassManager.

Errors generated by the compiler.

Frontend parsing and AST representation.

Internal representation for the Calyx compiler.

Define the PassManager structure that is used to construct and run pass passes.

Passes for the Calyx compiler.

Shared utilities.

Macros

Build guarded assignment statements and return a vector containing them.

Convinience macro to get a port and turn it into an ir::Guard.

Simple macro to register an alias with a pass manager.

Simple macro to register a pass with a pass manager.

Add primitives and constants to the component and let-bind the references.