SHDL – A Minimal Hardware Description Language Built from Logic Gates

Hi, everyone!

I built SHDL (Simple Hardware Description Language) as an experiment in stripping hardware description down to its absolute fundamentals.

In SHDL, there are no arithmetic operators, no implicit bit widths, and no high-level constructs. You build everything explicitly from logic gates and wires, and then compose larger components hierarchically. The goal is not synthesis or performance, but understanding: what digital systems actually look like when abstractions are removed.

SHDL is accompanied by PySHDL, a Python interface that lets you load circuits, poke inputs, step the simulation, and observe outputs. Under the hood, SHDL compiles circuits to C for fast execution, but the language itself remains intentionally small and transparent.

This is not meant to replace Verilog or VHDL. It’s aimed at:

- learning digital logic from first principles

- experimenting with HDL and language design

- teaching or visualizing how complex hardware emerges from simple gates

I would especially appreciate feedback on:

- the language design choices

- what feels unnecessarily restrictive vs. educationally valuable

- whether this kind of “anti-abstraction” HDL is useful to you

Repo: https://github.com/rafa-rrayes/SHDL

Python package: PySHDL on PyPI

Thanks for reading, and I’m very open to critique.

2 points | by rafa_rrayes 10 hours ago

1 comments

  • dang 4 hours ago
    Can you please email us at hn@ycombinator.com? There are a couple things we could change about your post that would make it more likely to get attention here. (And it sounds like a cool project!)