CoHDL

Documentation

CoHDL treats a printed circuit board as a program: the schematic is text, the compiler is the reviewer that never gets tired, and the outputs are the files your EDA tool and your fab actually consume. These pages describe the language and the toolchain as they exist today.

Install it in one line The compiler is open source (github.com/conol-ai/cohdl, MIT) and v0.4.0 ships prebuilt binaries for macOS and Linux: curl -fsSL https://raw.githubusercontent.com/conol-ai/cohdl/main/install.sh | sh — then start with the getting-started guide.

Start here

  • Guide

    Getting started

    Your first design: declare instances, wire nets, run cohdl check, read a compile error that names the exact pin, and build a netlist KiCad will import.

  • Guide

    The language

    Units as types, devices and pin obligations, traits, designs, sub-circuit functions, generics, pattern matching, modules and annotations — the whole tour.

Reference

  • Reference

    CLI

    check, build, fmt, lsp, package/part search and registry management — flags, outputs, exit codes, and structured JSON formats.

  • Reference

    Packages & registry

    Manifests, exact-version dependencies, the content-hash lock file, and discovering and publishing packages on registry.cohdl.org.

  • Reference

    Layout & fabrication

    Footprints, pads and silkscreen; placement, rotation and back-side parts; layout.json, IPC-2581 and physics hints for the autorouter.

  • Reference

    Error codes

    The formal error-code registry: every diagnostic the compiler can emit, grouped by pipeline stage, with stable codes tools can rely on.

  • Reference

    Editor support

    The cohdl lsp language server and the VS Code extension: diagnostics as you type, hover, go to definition, find references and completion.

The design record

CoHDL is governed by a written constitution and an RFC process. Every language feature — from units-as-types to silkscreen graphics — exists because an RFC was accepted for it, and the compiler tracks the accepted text precisely (deviations are recorded in a compliance ledger). The normative record is published here verbatim.

  • Normative

    Language specification

    The compiled statement of what the language is — every Accepted RFC folded into one document.

  • Normative

    RFCs

    All 31 accepted proposals plus the GC-002 amendment, verbatim: the problem, the design, the rejected alternatives, the decision.