CoHDL
  1. Blog
  2. Introducing CoHDL

CoHDL: An AI-Native Programming Language
for Hardware

Software became AI-native so quickly because source code is text—and compilers can grade it. PCB design still forces agents to point at pixels and search through hundreds of pages of PDFs. CoHDL brings hardware into the write, check, and repair loop.

The most important programming language of the AI era may not be another language for software. It may be a language for the physical world.

Today, I’m launching CoHDL, an open-source, AI-native programming language for PCB schematics. An AI can describe a board as text, ask a compiler what is wrong, repair the source, and produce deterministic artifacts for the rest of the hardware toolchain.

The idea feels obvious only because software has already demonstrated the pattern. Code is compact, composable, diffable, and machine-checkable. An agent does not need to understand every consequence before making a change: compilers, tests, and CI turn the repository into a feedback system. Hardware has powerful tools too, but it has lacked the same substrate.

Software has crossed the AI-native threshold

AI assistance is now a standard part of software development. The 2025 DORA report, based on nearly 5,000 technology professionals, found that 90% use AI at work and more than 80% believe it has improved their productivity. The 2025 Stack Overflow survey found that 84% of respondents were using or planning to use AI tools in development, while 51% of professional developers used them every day.

The direction is clear in how industry leaders describe the work. Andrej Karpathy wrote, “The hottest new programming language is English.” Satya Nadella wrote that how we build, deploy, and maintain code for AI applications is “fundamentally changing and becoming agentic.”

We should still be precise. Autonomous agents do not yet ship most of the world’s software: the same Stack Overflow survey says agents are not yet mainstream, with 52% of developers either not using agents or sticking with simpler AI tools. But the threshold has been crossed. AI assistance is mainstream, and agents are beginning to take on complete units of work. GitHub reports that its Copilot coding agent contributed to more than one million merged pull requests in its first five months. People still reviewed, tested, and validated those changes—the agent operates within the engineering system rather than replacing it.

Software did not become AI-native because the model got a mouse. It became AI-native because code is text and the feedback loop is executable.

DORA’s most useful finding is also a warning: AI amplifies the system around it. The report found that AI adoption was still associated with lower software-delivery stability, arguing that faster change exposes weak automated tests, version control, and downstream feedback loops. The model matters; the oracle matters more.

Hardware is still pointing at pixels

Board-level schematic capture has not undergone the same transition. Modern EDA tools are deeply capable, but their primary authoring model would still be familiar to an engineer in the 1990s: place a symbol on a canvas, drag a wire to another symbol, pan, zoom, and repeat. The KiCad Schematic Editor manual describes exactly that graphical workspace. We moved the drawing board onto a computer; we did not transform the design into a programming environment.

Then there are component data sheets, reference designs, and application notes. Much of the knowledge required to build a board is buried in PDFs. An LLM can read a PDF, but that interface is expensive. Anthropic’s PDF documentation says each page typically consumes 1,500–3,000 text tokens, with additional image tokens because every page is also rendered as an image. A 100-page MCU data sheet can therefore cost 150,000–300,000 text tokens before the agent asks a single design question.

Combine these two interfaces, and the agent’s job becomes: read a large visual document, click through a graphical editor, inspect another image, and guess whether the result is electrically coherent. Screenshots are not semantic diffs. Mouse coordinates are not stable identifiers. A picture of a schematic is not a compact intermediate representation, and “it looks connected” is not a deterministic verdict.

This is not a criticism of KiCad, Altium, or the engineers who use them. They are excellent tools designed around human eyes and hands. The problem is that an interface optimized for a human working on a canvas makes a poor API for an agent.

A circuit is a graph before it is a drawing

At its core, a schematic is not an arrangement of symbols on a page. It is a graph: component instances and pins connected by named nets. The drawing is one projection of that graph. KiCad’s own documentation defines a netlist in those terms, and circuit simulators have accepted textual netlists for decades.

But topology is only the beginning. A useful language must also carry units, parameters, constraints, hierarchy, intent, and stable identity. That is what CoHDL adds. Here is a real excerpt from OpenMicroKbd:

hw/v1/src/main.cohdl excerpt
inst sw: [SW_KEY; 13]
inst d: [diode::D_1N4148W; 13]

// key matrix: rows drive, columns read through the diodes
net ROW1: mcu.PA10, sw[2..=5].A
net COL1: mcu.PB5, d[0, 3, 7, 10].Cathode

Arrays and slices express repeated hardware without copy-and-paste. Engineering values are unit-typed; nets can carry typed voltage annotations and checked, current-valued layout attributes. Device definitions specify which pins must be connected, and every intentional no-connect must be explicit. Traits describe the capabilities a generic circuit requires. The compiler resolves the graph, checks those obligations, and then runs the design rules that only make sense once the entire circuit is known.

This is what “AI-native” means in CoHDL. There is no chat box embedded in the language. The source is designed to be generated, graded, and repaired. An agent writes .cohdl; cohdl check --json returns stable diagnostic codes and exact source spans; the agent edits the source and checks again. The compiler becomes a deterministic oracle for the properties the language can actually model.

A compiler is a guardrail, not a physics oracle. CoHDL catches structural, type, and modeled design-rule errors. It cannot prove that an unmodeled analog effect will behave as intended, or that a fabricated board must work. Engineering review still matters.

The toolchain is part of the language

Syntax alone cannot make hardware AI-native. Agents need the same infrastructure software developers expect: canonical formatting, structured diagnostics, editor intelligence, reusable dependencies, and deterministic build artifacts. CoHDL delivers that loop through a single toolchain:

  • A compiler and formatter. cohdl fmt creates canonical source; cohdl check parses, resolves, type-checks, and runs the residual design-rule checks.
  • Machine-readable feedback. --json produces a structured diagnostic document for agents, CI, and editor integrations.
  • Editor support. A language server and VS Code extension provide diagnostics and language-aware authoring without making the IDE the source of truth.
  • A package registry. registry.cohdl.org publishes reusable component packages with exact semantic versions, immutable releases, and SHA-256 content hashes.
  • Downstream handoff formats. cohdl build produces a KiCad netlist, BOM CSV, and design.lock; it emits .kicad_mod footprints when pad geometry is present, layout JSON and Quilter constraint CSVs when the design declares that metadata, and an optional, placement-staged and unrouted IPC-2581B1 document with --emit ipc2581.
cohdl fmt .
cohdl check . --json
cohdl build . --emit ipc2581

That boundary is deliberate. CoHDL does not place or route the PCB, and it does not emit Gerbers. It produces inspectable, source-derived handoff artifacts for the tools that perform those jobs. This separation keeps the build honest—and every transition reviewable.

The proof is OpenMicroKbd

A language for hardware has to leave the screen. So I built OpenMicroKbd, an open-source 13-key macropad with a rotary encoder, an analog joystick, a capacitive touch pad, 21 addressable RGB LEDs, USB-C, and an STM32F072CBT6. Its schematic and board-specific part and footprint source total 823 lines of CoHDL across four files.

The finished OpenMicroKbd held in one hand: a black PCB in a white printed case with icon keycaps, a knob, a joystick and a yellow accent key
OpenMicroKbd: a 95 × 95 mm, four-layer board whose CoHDL hardware source totals 823 lines in four files.

CoHDL checked the schematic and generated the netlist, BOM, footprints, and layout constraints. Quilter handled placement and routing. A human reviewed the result, exported the fabrication package from the routed KiCad board, assembled it, and brought it up. The board came back—and it worked.

That division of labor is the point. The agent and the language do not need to replace every tool or every engineer. They need to turn the design’s logical core into text, make mistakes legible, and hand a deterministic result to the next stage. You can read the full OpenMicroKbd case study or inspect every source file and output in its repository.

Start with one command

CoHDL is MIT licensed. The compiler, standard and component libraries, registry service, VS Code extension, examples, and repair harness are all open source. Install the latest release on macOS or Linux:

curl -fsSL https://raw.githubusercontent.com/conol-ai/cohdl/main/install.sh | sh

Then follow Getting started, browse the package registry, and explore the source on GitHub. If you want to build a board, publish a component package, or help shape the language, join us on Discord.

Software became AI-native when code became something a model could write and a machine could grade. Hardware can do the same.