SHDL
A minimal hardware description language built from logic gates
Get picks like this daily. Today's launch numbers, the top launches, AI and tech news, and a daily opportunity pick, straight to your inbox.
Want to reach these readers? Sponsor an issue.
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/SHDLPython package: PySHDL on PyPITo make this concrete, here are a few small working examples written in SHDL:1. Full Addercomponent FullAdder(A, B, Cin) -> (Sum, Cout) { x1: XOR; a1: AND; x2: XOR; a2: AND; o1: OR; connect { A -> x1.A; B -> x1.B; A -> a1.A; B -> a1.B; x1.O -> x2.A; Cin -> x2.B; x1.O -> a2.A; Cin -> a2.B; a1.O -> o1.A; a2.O -> o1.B; x2.O -> Sum; o1.O -> Cout; } }2. 16 bit register# clk must be high for two cycles to store a valuecomponent Register16(In[16], clk) -> (Out[16]) { >i[16]{ a1{i}: AND; a2{i}: AND; not1{i}: NOT; nor1{i}: NOR; nor2{i}: NOR; } connect { >i[16]{ # Capture on clk In[{i}] -> a1{i}.A; In[{i}] -> not1{i}.A; not1{i}.O -> a2{i}.A; clk -> a1{i}.B; clk -> a2{i}.B; a1{i}.O -> nor1{i}.A; a2{i}.O -> nor2{i}.A; nor1{i}.O -> nor2{i}.B; nor2{i}.O -> nor1{i}.B; nor2{i}.O -> Out[{i}]; } } }3. 16-bit Ripple-Carry Adderuse fullAdder::{FullAdder};component Adder16(A[16], B[16], Cin) -> (Sum[16], Cout) { >i[16]{ fa{i}: FullAdder; } connect { A[1] -> fa1.A; B[1] -> fa1.B; Cin -> fa1.Cin; fa1.Sum -> Sum[1]; >i[2,16]{ A[{i}] -> fa{i}.A; B[{i}] -> fa{i}.B; fa{i-1}.Cout -> fa{i}.Cin; fa{i}.Sum -> Sum[{i}]; } fa16.Cout -> Cout; } }
HN · launched Jan 28, 2026 · 48 upvotes (top 21%) · 0 views
Niche: programming languages and interpreters · 161 launches, 2 in the last 7 days ▼ -75% · Explore this niche →
Category and tags
- Horizontal
- Dev tools
- Developer
- Not AI
- Hobby / open-source project
Visit website ↗ Source listing ↗
More like this: all 161 launches in programming languages and interpreters →
Could you build this?
Partial Creating a small toy logic gate parser is simple, but a correct hardware description language compiler and digital logic simulator requires formal compiler and EDA domain knowledge.
What it would actually take: Requires an AST parser/compiler (using Lex/Yacc, ANTLR, or Rust/C++) connected to an event-driven or cycle-accurate digital logic simulation engine. The core difficulty lies in netlist generation, cycle detection, propagating race conditions/glitches accurately, and synthesis/export to formats like Verilog or FPGA bitstreams.
Discussion
20 comments analyzed.
Competitors mentioned: Chisel (Python HDLs), Nand2Tetris HDL, Verilog, EDIF (netlist standard), MHRD
Concerns raised: No way to name signals/wires, only gate instances, Requires explicit gate declaration and separate wiring step (boilerplate), Limited for real-world HDL work, better for education/learning, No support for time delay simulation, Cannot synthesize to FPGA directly without Verilog translation
Feature requests: Visual circuit diagram generation and interactive playground, Step-by-step visual examples in documentation for beginners, Better documentation linking compilation mechanics to main docs, Wire-oriented interface abstractions (like AXI bus definitions), Time delay specification and simulation support
Competitors
Other products that read as similar to this one : 323 launches clear the similarity bar, closest 8 shown.
Attention rank: #81 of 324 (itself plus its competitors, highest first, normalized so YC and Product Hunt are compared fairly).
Launched 84 days after the earliest competitor.
- E80: an 8-bit CPU in structural VHDL · hn · 2026-01-17 · 34 upvotes · similarity 0.51
- Built a tiny interpreter from scratch in C to understand how they work · hn · 2025-11-12 · 5 upvotes · similarity 0.49
- MOL · hn · 2026-02-11 · 38 upvotes · similarity 0.48
- rul · github · 2026-10-28 · 45 upvotes · similarity 0.48
- Symbolic Circuit Distillation: prove program to LLM circuit equivalence · hn · 2026-01-06 · 16 upvotes · similarity 0.46
- btrc · hn · 2026-03-02 · 5 upvotes · similarity 0.46
- Reverse-engineered the FPGA bitstream using Claude Code · hn · 2026-04-06 · 6 upvotes · similarity 0.45
- Fuse · hn · 2026-08-02 · 121 upvotes · similarity 0.45
The niche, labels, vibe code rating and competitor comparison on this page are analysis by Nicheloom. If you use them, please credit nicheloom.com. How you may use our data.