New ARTIQ compiler, third iteration
pca006132
84c5201243
Behavior of parallel and sequential: Each function call (indirectly, can be inside a sequential block) within a parallel block will update the end variable to the maximum now_mu in the block. Each function call directly inside a parallel block will reset the timeline after execution. A parallel block within a sequential block (or not within any block) will set the timeline to the max now_mu within the block (and the outer max now_mu will also be updated). Implementation: We track the start and end separately. - If there is a start variable, it indicates that we are directly inside a parallel block and we have to reset the timeline after every function call. - If there is a end variable, it indicates that we are (indirectly) inside a parallel block, and we should update the max end value. Note: requires testing, it is difficult to inspect the output IR |
||
---|---|---|
nac3artiq | ||
nac3core | ||
nac3standalone | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
flake.lock | ||
flake.nix | ||
README.md |
NAC3 compiler
This repository contains:
- nac3core: Core compiler library, containing type-checking and code generation.
- nac3artiq: Integration with ARTIQ and implementation of ARTIQ-specific extensions to the core language.
- nac3standalone: Standalone compiler tool (core language only).
The core compiler knows nothing about symbol resolution, host variables etc. nac3artiq and nac3standalone provide (implement) the symbol resolver to the core compiler for resolving the type and value for unknown symbols. The core compiler only type checks classes and functions requested by nac3artiq/nac3standalone (the API should allow the caller to specify which methods should be compiled). After type checking, the compiler analyses the set of functions/classes that are used and performs code generation.
value could be integer values, boolean values, bytes (for memcpy), function ID (full name + concrete type)