Skip to content
Rota Nacional

Guides ·

A Bazel toolchain for a custom CPU

The article presents a Bazel build workflow for the Mrav CPU: one command prepares Go, compiles a simulator, assembles firmware, runs it, and compares CPU state with a reference file.

The article describes a Bazel-based software ecosystem for the custom Mrav CPU. A single command prepares Go, compiles a simulator, assembles firmware, runs the firmware, and compares CPU state with a reference file.

To adapt the idea, first list the steps needed to produce and validate your artifact. Define explicit inputs and outputs for each step, and record the tools and versions used.

Next, aim for a hermetic build: reduce implicit environmental dependencies and declare what each step requires. Automate comparison with the reference so discrepancies can be reproduced; this does not replace appropriate hardware testing.

If you use AI to study the article or apply these practices, avoid submitting proprietary firmware, confidential code, credentials, or personal data. Use synthetic or organization-approved examples, and follow internal data-classification policies.

Get new articles

Privacy, AI engineering and security in your inbox.

Rota Nacional

Bring privacy into your workflow.

30 days, no card, with a starting quota. After that, Pix credit from R$ 5,00.

Try free