Natural Language to Verilog: Design of a Recurrent Spiking Neural Network using Large Language Models and ChatGPT
Paola Vitolo, George Psaltakis, Michael Tomlinson, Gian Domenico Licciardo, Andreas G. Andreou
TL;DR
The paper addresses the time-consuming process of hardware design for neuromorphic RSNNs by prompting OpenAI's ChatGPT-4 to generate Verilog RTL and test benches for a $3$-layer RSNN with $3$ neurons per layer ($27$ weights). A modular, bottom-up workflow yields submodules and a top-level integration, validated through FPGA prototyping on Spartan-7 and an open-source SkyWater 130 nm ASIC flow leading to Tiny Tapeout 6. The RSNN and its LIF neurons are demonstrated across three ML benchmarks—XOR, IRIS, MNIST—with accuracies exceeding 96% in most cases, and the work includes comprehensive open-source artifacts (code, tests, transcripts). This illustrates a reproducible AI-assisted hardware design pipeline that leverages open-source EDA tools to rapidly prototype neuromorphic accelerators. The results suggest practical potential for LTspice-like design iterations accelerated by LLMs, enabling broader exploration of hardware-software co-design for spiking networks.
Abstract
This paper investigates the use of Large Language Models (LLMs) and natural language prompts to generate hardware description code, namely Verilog. Building on our prior work, we employ OpenAI's ChatGPT4 and natural language prompts to synthesize an RTL Verilog module of a programmable recurrent spiking neural network, while also generating test benches to assess the system's correctness. The resultant design was validated in three simple machine learning tasks, the exclusive OR, the IRIS flower classification and the MNIST hand-written digit classification. Furthermore, the design was validated on a Field-Programmable Gate Array (FPGA) and subsequently synthesized in the SkyWater 130 nm technology by using an open-source electronic design automation flow. The design was submitted to Efabless Tiny Tapeout 6.
