bare-metal-bringup
Use when bringing up bare-metal or kernel code on a new architecture, SoC, or board (RISC-V, ARM, x86, ESP32) and it won't boot,…
Use when implementing a hardware block, protocol, peripheral, or ISA feature in ROHD and you should ground it in the authoritative spec, existing reference implementations, and reusable libraries you fetch first, instead of writing it from memory
Claude Code
$ npx -y skills add lilithsemi/claude-for-hardware --skill reference-driven-rohd --agent claude-code
Codex
$ npx skills add lilithsemi/claude-for-hardware --skill reference-driven-rohd -a codex -y
Cursor
$ npx skills add lilithsemi/claude-for-hardware --skill reference-driven-rohd -a cursor -y
Gemini CLI
$ npx skills add lilithsemi/claude-for-hardware --skill reference-driven-rohd -a gemini-cli -y
GitHub Copilot
$ npx skills add lilithsemi/claude-for-hardware --skill reference-driven-rohd -a github-copilot -y
OpenCode
$ npx skills add lilithsemi/claude-for-hardware --skill reference-driven-rohd -a opencode -y
Windsurf
$ npx skills add lilithsemi/claude-for-hardware --skill reference-driven-rohd -a windsurf -y
name: reference-driven-rohd description: Use when implementing a hardware block, protocol, peripheral, or ISA feature in ROHD and you should ground it in the authoritative spec, existing reference implementations, and reusable libraries you fetch first, instead of writing it from memory
Writing a protocol or peripheral from memory is how you ship a design that is subtly wrong: a reserved bit in the wrong place, a handshake that almost matches the spec, an edge case the standard calls out that you never saw. The fix is cheap and boring: get the real sources first, then implement against them.
**Core principle:** Before writing custom ROHD, fetch the authoritative spec, the existing reference implementations, and any reusable library that already solves part of the problem. Implement from primary sources, not from recall. The spec is the oracle, the references show the behavior, the library saves the parts you should not rewrite.
Skip for genuinely novel internal logic that has no external spec and no prior art.
Do this before writing a line of RTL. Three buckets, in order:
1. **The authoritative spec.** The actual standard, datasheet, or ISA manual, not a blog summary. RISC-V unprivileged/privileged manuals, the Wishbone B4 spec, a part's datasheet PDF, the protocol's RFC. Use WebFetch/WebSearch to pull it, and note the exact version and section numbers. A spec you cite by section is a spec you can be held to. 2. **Existing reference implementations.** Other HDL (Verilog/Chisel/SpinalHDL/migen), a C model, a vendor reference, an emulator. Clone or fetch them to read the behavior, especially the corner cases and reset values. These show you what the spec leaves ambiguous and how real implementations resolved it. 3. **Reusable libraries.** Check `rohd_hcl` and existing Midstall ROHD (River, Harbor) before writing anything new. A FIFO, ECC, ready/valid handshake, rotator, or arbiter is probably already there, tested. Compose it; do not reinvent it.
If you cannot find a source for something the block needs, that gap is the first thing to resolve, not to guess past.
Turn the fetched spec into a checklist before implementing:
You read references to understand behavior, then write your own clean ROHD.
The reference implementation or C model you fetched is not just documentation, it is a verification oracle.
| Smell | Do instead | |-------|------------| | "I know how SPI works, I'll just write it" | Fetch the datasheet and an existing controller first | | Implementing a CRC/ECC/FIFO from scratch | Check `rohd_hcl` and existing ROHD first | | Citing the protocol from memory | Cite the spec by version and section number | | Pasting GPL/incompatible RTL into a clean design | Read it, reimplement the behavior cleanly in ROHD | | Reserved bits left to "whatever the tools do" | Implement read-zero/preserve as the spec states | | No golden model when a reference exists | Diff the DUT against the reference as the oracle |
Claude Code skills for hardware design, validation, and bring-up. A plugin of focused skills that teach Claude how to do real hardware work: designing reusable HDL, integrating an SoC, bringing up FPGAs and bare-metal targets, building firmware boot chains,
Use when bringing up bare-metal or kernel code on a new architecture, SoC, or board (RISC-V, ARM, x86, ESP32) and it won't boot,…
Use when building or debugging a compiler backend, codegen, or assembler and you need to prove the generated machine code is…
Use when verifying a hardware DUT (a CPU core, FPGA, or netlist) against a golden reference model, building coverage-guided…
Use when building or debugging a firmware and boot chain (RISC-V SBI, UEFI, ACPI, a bootloader handoff like Limine to an OS) or…
Use when loading a bitstream onto a physical FPGA and driving or observing it over JTAG or GPIO, especially bit-banged JTAG from…
Use when synthesizing RTL to an FPGA with yosys/nextpnr (ECP5/Lattice and similar), fighting area or routing congestion,…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.