TinyTPU: SystemVerilog systolic array compiled to WASM, running live in browser - RTL golden-verified against numpy [P]
retained text
<table> <tr><td> <a href="https://www.reddit.com/r/MachineLearning/comments/1txvvo4/tinytpu_systemverilog_systolic_array_compiled_to/"> <img alt="TinyTPU: SystemVerilog systolic array compiled to WASM, running live in browser - RTL golden-verified against numpy [P]" src="https://preview.redd.it/uzyne2kbti5h1.gif?width=640&crop=smart&s=0685400fbb807fd398dbac56986eac1489384870" title="TinyTPU: SystemVerilog systolic array compiled to WASM, running live in browser - RTL golden-verified against numpy [P]" /> </a> </td><td> <!-- SC_OFF --><div class="md"><p>Most explanations of TPUs and systolic arrays are either hand-wavy diagrams or papers. I wanted to see the thing actually run, so I built it.</p> <p>TinyTPU is a 4×4 weight-stationary systolic array in real SystemVerilog, compiled to WebAssembly, with a step-by-step browser visualization. </p> <p>You enter two matrices, hit run, and watch the actual hardware execute: weights loading into PEs, matrix A streaming in diagonally (the "skew" that makes systolic arrays work), partial sums accumulating down the grid, results draining from the bottom.</p> <p>It has three levels:</p> <ul> <li><strong>L1</strong> - isolate a single MAC cell, watch one multiply-accumulate happen</li> <li><strong>L2</strong> - the full 4×4 array executing a real matmul</li> <li><strong>L3</strong> - tiling: what happens when your matrix is bigger than the hardware</li> </ul> <p>Nothing on screen is faked. The visualization reads state directly from compiled RTL.</p> <p>If you're trying to understand how matrix multiply maps to hardware why TPUs are efficient, what "weight-stationary" actually means, why the diagonal stagger exists this might click it for you in a way papers don't.</p> <p>Repo: <a href="https://github.com/deaneeth/tiny-tpu">tiny-tpu</a></p> <p>Live demo: <a href="https://tiny-tpu.vercel.app/">Live</a></p> <p>If this project interests you please do star the repo, if you find something needs improving open a PR, I hope ya'll check this out and give me some feedback 🙏</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/Horror-Flamingo-2150"> /u/Horror-Flamingo-2150 </a> <br /> <span><a href="https://i.redd.it/uzyne2kbti5h1.gif">[link]</a></span>   <span><a href="https://www.reddit.com/r/MachineLearning/comments/1txvvo4/tinytpu_systemverilog_systolic_array_compiled_to/">[comments]</a></span> </td></tr></table>
document fetched 2026-06-06 08:28