ANTONY AUSTIN

Engineer · Builder · Creator

Back to Projects
Compilers & ToolchainWorking — 9 of 9 compiler kernels verified on RTL

axelcc — C Subset Compiler for a Custom GPU ISA

A C-like compiler written in C that lowers kernel-oriented source to machine code for a custom 32-bit SIMT GPU ISA — full lexer, parser, AST, semantic analysis, register allocation and codegen, verified by running its output on the GPU's own RTL.

2026 - Present
Compilers /C /Code Generation /Register Allocation /SIMT /GPU Architecture /cocotb
axelcc — C Subset Compiler for a Custom GPU ISA

Project Overview

axelcc is a compiler for a restricted, kernel-oriented subset of C that targets the custom instruction set of the 32-Bit Tiny GPU. It is written in C and implements the full front-to-back pipeline: lexer, parser, AST construction, semantic checking, register allocation, and code generation. It emits two formats — .hex instruction files consumed directly by the cocotb RTL testbench, and .axelbin binary kernels in a custom AXLB container. The point of the project is that compiled output is not validated against a software emulator: every kernel is executed on the actual GPU RTL, so a codegen bug shows up as a hardware-level test failure. The compiler supports if/else across both branches under uniform and divergent data, for loops, and three builtins that lower to dedicated hardware: dot4() to the packed INT8x4 DOT4 opcode, fma() to the scalar fused multiply-add, and mmio_matmul() to a full launch-and-poll sequence against the GPU's memory-mapped matrix multiply accelerator. This is the compiler half of a three-part toolchain, sitting above the AXEL assembler and targeting the 32-Bit Tiny GPU.

Objectives

  • Write a complete compiler front end in C — lexer, parser, AST, semantic analysis — with no parser generator
  • Allocate registers and generate code for a custom SIMT ISA with a 6-bit opcode field
  • Lower high-level builtins onto dedicated hardware instructions rather than emulating them in software
  • Emit both simulator-consumable .hex and a binary .axelbin kernel container
  • Verify every compiler feature by executing its output on the GPU RTL, not on an emulator
  • Make the build reproducible so a stale compiler binary can never silently produce a passing test

Project Details

Status

Working — 9 of 9 compiler kernels verified on RTL

Duration

2026 - Present

Category

Compilers & Toolchain

Repositories