Source-linked AI summary
The Power of Large Language Models for Wireless Communication System Development: A Case Study on FPGA Platforms
Yuyang Du, Hongyu Deng, Soung Chang Liew, Kexin Chen, Yulin Shao, He Chen
TL;DR
The paper investigates whether LLMs can support FPGA development for complex wireless signal processing, beyond prior simple HDL tasks. It applies prompting techniques to those challenges and reports a successful 64-point Verilog FFT alongside productivity benefits in HDL programming tasks.
Problem
Prior LLM-generated HDL focused on simple tasks, leaving open whether LLMs could assist with FPGA projects involving intricate wireless signal-processing algorithms.
Source: §I · p. 1Method
The paper studies LLM assistance in FPGA development and applies in-context learning and Chain-of-Thought prompting to address FFT subtask scheduling and multi-step reasoning.
Source: §I · pp. 1–2Results
LLMs generated a 64-point Verilog FFT, and the authors report reduced coding time and improved code quality across three volunteer HDL tasks.
Source: §I · p. 2, C. Results, Analysis, and Discussions · p. 15Takeaways & Limitations
The findings support the potential of LLMs to generalize and imitate problem-solving approaches for writing HDL code in wireless communication.
Source: §VII · p. 9Using prompts similar to prior work did not produce a workable FFT larger than four points.
Source: §I · p. 2
Abstract
from arXiv · showhide
Large language models (LLMs) have garnered significant attention across various research disciplines, including the wireless communication community. There have been several heated discussions on the intersection of LLMs and wireless technologies. While recent studies have demonstrated the ability of LLMs to generate hardware description language (HDL) code for simple computation tasks, developing wireless prototypes and products via HDL poses far greater challenges because of the more complex computation tasks involved. In this paper, we aim to address this challenge by investigating the role of LLMs in FPGA-based hardware development for advanced wireless signal processing. We begin by exploring LLM-assisted code refactoring, reuse, and validation, using an open-source software-defined radio (SDR) project as a case study. Through the case study, we find that an LLM assistant can potentially yield substantial productivity gains for researchers and developers. We then examine the feasibility of using LLMs to generate HDL code for advanced wireless signal processing, using the Fast Fourier Transform (FFT) algorithm as an example. This task presents two unique challenges: the scheduling of subtasks within the overall task and the multi-step thinking required to solve certain arithmetic problem within the task. To address these challenges, we employ in-context learning (ICL) and Chain-of-Thought (CoT) prompting techniques, culminating in the successful generation of a 64-point Verilog FFT module. Our results demonstrate the potential of LLMs for generalization and imitation, affirming their usefulness in writing HDL code for wireless communication systems. Overall, this work contributes to understanding the role of LLMs in wireless communication and motivates further exploration of their capabilities.
I. INTRODUCTION
The paper investigates whether LLMs can support FPGA development for complex wireless signal processing, beyond earlier demonstrations on simple HDL tasks. It combines an OpenWiFi case study with an FFT generation study, using prompting techniques to address challenges in producing complex HDL.
I. INTRODUCTION
- Prior LLM-generated HDL demonstrations focused on simple logic, leaving open whether LLMs could support FPGA projects with intricate wireless signal-processing algorithms.The paper notes that FPGA wireless projects involve complex signal processing and asks how LLMs could assist with their development.Source: §I · p. 1
- An OpenWiFi case study examines LLM assistance with code refactoring, reuse, and validation as ways to support FPGA-based wireless prototyping.The authors identify these uses as potential sources of productivity gains for researchers and developers.Source: §I · p. 1
- For FFT HDL generation, the authors address subtask scheduling with in-context examples and multi-step arithmetic reasoning with Chain-of-Thought prompting.The examples teach parallelism and precedence in small FFTs; CoT guides steps such as calculating and encoding twiddle factors.Source: §I · p. 2
- LLMs successfully generated a 64-point Verilog FFT using in-context learning and Chain-of-Thought prompting.The authors describe this as the first reported LLM-written complex HDL module in the field.Source: §I · p. 2
- In benchmark experiments, LLM assistance reduced coding time and enhanced code quality for both undergraduates and experienced postgraduate volunteers.The groups completed representative HDL programming tasks, with evaluation based on code quality and completion time.Source: §I · p. 2
B. FPGA-based SDR Development for Wireless Networking
The paper positions LLM assistance as extending beyond bug fixing to broader FPGA development, including work on a real-time communication system. It also targets more complex wireless signal-processing HDL, using ICL and CoT to address challenges not covered by earlier efforts.
C. LLM for Hardware Design
- The OpenWiFi study extends LLM assistance beyond bug fixing to validation and maintenance in a real-time communication system that had undergone prior validation and practical demonstrations.The authors characterize it as the first LLM study to further refine that system.Source: C. LLM for Hardware Design · p. 3
- Earlier LLM-written HDL work addressed simpler tasks than communication algorithms such as FFT, while this paper investigates more complex wireless signal processing.The authors identify subtask scheduling and multi-step thinking as challenges and apply ICL and CoT prompting to address them.Source: C. LLM for Hardware Design · p. 3
III. USING LLMS TO ASSIST FPGA DEVELOPMENT
- The OpenWiFi case study examines LLM support across code refactoring, code reuse, and code validation to improve FPGA development efficiency and productivity.The study presents practical experience with a well-known open-source FPGA-based SDR project.Source: §III · p. 3
A. Code Refactoring
The section explores LLM assistance with refactoring, reuse, and validation in FPGA development. Its examples show code improvements and parameterization, alongside generated testbenches and expected outputs that support validation.
A. Code Refactoring
- ChatGPT proposed readability improvements to OpenWiFi Verilog, including clearer names, shorter redundant code, and added comments.The refactoring example uses a signal-delay module and also considers hardware efficiency and reliability.Source: A. Code Refactoring · pp. 3–4
- ChatGPT identified a potentially wasteful shift-register implementation for long delays and suggested a read/write counter with block RAM, but the authors did not redesign the module.The alternative is presented as a hardware-efficiency suggestion for delays longer than about 10 clock periods.Source: A. Code Refactoring · p. 4
- ChatGPT flagged Verilog issues including explicit port data types and adding the active-low reset edge to the sensitivity list.The authors consider the reset change important for reliable hardware design.Source: A. Code Refactoring · p. 4
B. Code Reuse
- ChatGPT parameterized a fixed-width complex multiplier while maintaining correctness, allowing data widths and latency requirements to be changed through module parameters.The example addresses the work otherwise required to adapt a 16-bit design to higher precision.Source: B. Code Reuse · p. 4
C. Code Validation
- ChatGPT generated a structured testbench for the revised complex multiplier, and testing indicated that both the module and testbench were error-free.It can also generate additional test inputs with expected outputs to assist validation.Source: C. Code Validation · p. 5
IV. CHALLENGES IN IMPLEMENTING COMPLEX SIGNAL-PROCESSING ALGORITHM IN VERILOG
Generating advanced FFT hardware requires explicit scheduling of dependent subtasks, a responsibility HDL leaves to the designer. ChatGPT’s initial FFT code failed because it executed later computations before prior outputs were ready.
A. Verilog Code Generated by ChatGPT
- The authors report that ChatGPT could not generate a complete 64-point FFT and that its polished-looking eight-point code failed the FFT testbench.Its 64-point attempts returned a general framework needing manual completion or only a trivial two-point FFT.Source: A. Verilog Code Generated by ChatGPT · p. 5
IV. CHALLENGES IN IMPLEMENTING COMPLEX SIGNAL-PROCESSING ALGORITHM IN VERILOG
- FFT stages contain precedence dependencies: later-stage butterflies require earlier-stage outputs, so Verilog designers must schedule subtasks explicitly.Unlike high-level languages, HDL does not rely on compilers or operating systems to schedule those operations.Source: B. Challenges One: The Subtask… · pp. 5–6
B. Challenges One: The Subtask Scheduling Problem
- ChatGPT’s generated FFT code prematurely executed dependent subtasks, producing erroneous outputs and failing to yield a viable FFT module autonomously.The implementation lacked execution control such as enable/done signals or state machines.Source: B. Challenges One: The Subtask… · p. 6
C. Challenges Two: The Multi-step Thinking Problem
The second challenge is generating correct FFT twiddle factors: their conversion for hardware requires multiple intermediate steps, which ChatGPT struggled to decompose. The authors identify this as a multi-step thinking limitation.
C. Challenges Two: The Multi-step Thinking Problem
- ChatGPT failed to generate correct twiddle factors across repeated attempts and prompt variations, a task the authors attribute to difficulty decomposing multi-step problems.The paper connects this limitation to the sequence of operations needed to produce hardware-ready factors.Source: C. Challenges Two: The Multi-step… · p. 6
- For an eight-point FFT example, the real and imaginary parts of W^1_8 are calculated as 0.7071 and −0.7071 before being scaled for 16-bit representation.The paper describes scaling by a factor typically chosen as the maximum value representable in the allocated bits.Source: C. Challenges Two: The Multi-step… · p. 6
- The conversion continues by rounding the scaled parts, converting them to binary, and concatenating them into a 32-bit sequence with imaginary bits high and real bits low.When used for complex multiplication, the output must be shrunk appropriately to account for the earlier amplification.Source: C. Challenges Two: The Multi-step… · p. 6
V. SOLVING IMPLEMENTATION CHALLENGES VIA ICL AND COT PROMPTING
The authors use in-context learning (ICL) to teach ChatGPT FFT structure and execution dependencies through examples, then iteratively extend generated modules. This process produced a functionally accurate 64-point FFT module.
A. In-context Learning (ICL) for Challenge One
- ICL supplies question-answer examples so an LLM can infer a task and answer a new question without parameter optimization or adding model parameters.The paper describes ICL as learning from a few examples placed in the prompt.Source: A. In-context Learning (ICL) for… · p. 7
- The authors reshape the FFT flow graph into an iterative structure and assume ample FPGA resources, making the graph—not hardware limits—determine parallelism and precedence.Under this assumption, butterfly computations and complex multiplications within their respective stages can run in parallel, while stage transitions depend on completion of the preceding stage.Source: A. In-context Learning (ICL) for… · pp. 7–8
- They first prompt ChatGPT to generate butterfly and complex-multiplication IP cores, then provide a four-point FFT example built from those components.That example demonstrates connecting enable/done signals to represent precedence and parallel relationships.Source: A. In-context Learning (ICL) for… · p. 8
- A second example asks ChatGPT to build an eight-point FFT from the four-point module, reinforcing the iterative flow graph and enable/done connections.The example connects four butterflies, four complex multiplications, and two four-point FFTs.Source: A. In-context Learning (ICL) for… · p. 8
- Without further examples, ChatGPT generated a synthesizable 16-point FFT whose outputs matched a Xilinx IP core, though twiddle factors still had to be supplied.The benchmark used twiddle factors generated in the next subsection.Source: A. In-context Learning (ICL) for… · p. 8
- Iteratively extending each generated N/2-point module yielded a functionally accurate 64-point Verilog FFT when tested against a Xilinx 64-point FFT IP core.The authors continued the process until reaching 64 points and report accuracy after iterative generation.Source: A. In-context Learning (ICL) for… · p. 8
B. Chain-of-Thought (CoT) Prompting for Challenge Two
Chain-of-Thought (CoT) prompting adds a stepwise reasoning process to example answers, addressing the multi-step nature of twiddle-factor generation. The authors report that the same prompt generalized to larger FFT sizes.
B. Chain-of-Thought (CoT) Prompting for Challenge Two
- A CoT prompt extends an example answer with a chain of thought showing how to break down and solve the problem.The paper contrasts this with a baseline prompt containing only one question-answer example.Source: B. Chain-of-Thought (CoT) Prompting… · p. 8
- The authors apply CoT to twiddle-factor generation by showing eight-point factors as examples and then asking ChatGPT to generate factors for a 16-point FFT.The process converts factors into 32-bit sequences for digital circuitry.Source: B. Chain-of-Thought (CoT) Prompting… · p. 9
- The same CoT prompt generated factors for 32- or 64-point FFTs without first teaching the 32-point case, which the authors say indicates internalized knowledge rather than parroting.The paper does not present the larger-scale generation process due to page limitations.Source: B. Chain-of-Thought (CoT) Prompting… · p. 9
VI. EXPERIMENTAL INVESTIGATION OF THE PRODUCTIVITY GAIN
The benchmark experiments report productivity gains from LLM assistance in FPGA development. The conclusion highlights code refactoring, reuse, and validation, and reports successful generation of a 64-point Verilog FFT using ICL and CoT.
VI. EXPERIMENTAL INVESTIGATION OF THE PRODUCTIVITY GAIN
- The benchmark experiments indicate significant productivity gains from using LLMs to assist FPGA development.The paper refers readers to Appendix B for task descriptions, evaluation criteria, volunteer backgrounds, results, and analyses.Source: §VI · p. 9
VII. CONCLUSION
- The paper demonstrates LLM assistance with code refactoring, code reuse, and system validation in FPGA development.Source: §VII · p. 9
- Using ICL and CoT to address subtask scheduling and multi-step thinking, the authors generated a 64-point Verilog FFT module.The conclusion describes this as the first such module generated using LLMs.Source: §VII · p. 9
APPENDIX A PROMPTS AND SOURCE CODES
Appendix A presents prompts and code artifacts for improving an OpenWiFi signal-delay module and parameterizing a complex multiplier. Appendix B describes the volunteer benchmark setup and how submissions were assigned and graded.
APPENDIX A PROMPTS AND SOURCE CODES
- Figure A1 presents the original signal-delay module code from OpenWiFi.Source: Figure A1 · p. 10
- Figure A2 shows the prompt used to improve the signal-delay module, and Figure A3 shows the revised code generated by ChatGPT.Source: Figure A2 · p. 10, Figure A3 · p. 10
- Figures A4 and A5 present the original OpenWiFi complex-multiplier code and the prompt used to parameterize it.Source: Figure A4 · p. 11, Figure A5 · p. 11
APPENDIX B SUPPLEMENTARY EXPERIMENTS
- The benchmark involved undergraduate and postgraduate volunteers, including students with hardware-design and Verilog coursework and postgraduate students from an FPGA-and-ASIC-focused lab.Source: Appendix B · p. 11
- The undergraduate GPT-assisted group was smaller than its non-assisted counterpart, and the proportion of GPT users was lower among undergraduates than postgraduates.Source: Appendix B · p. 11
APPENDIX A PROMPTS AND SOURCE CODES
- Figure A6 presents the revised Verilog code for the complex multiplier, while Figure A7 shows the testbench-generation prompt.Source: Figure A6 · p. 11, Figure A7 · p. 11
APPENDIX B SUPPLEMENTARY EXPERIMENTS
- Undergraduate GPT users were harder to recruit; the paper attributes the different usage patterns to students’ differing academic focuses.Source: Appendix B · p. 11
- Volunteers completed three Verilog tasks, with ChatGPT allowed for two groups; submissions were graded for time consumption and code quality.Source: Appendix B · p. 11
A. Tested Questions
The tested questions span Verilog validation and signal-processing implementation, with undergraduate and graduate volunteers assigned different task sets. The appendix also shows a progression of generated FFT code, culminating in a functional 64-point example.
A. Tested Questions
- The benchmark tasks covered testbench validation, a second-order IIR filter, and a convolution encoder with a 2/3 code rate.Undergraduates received Tasks 1 and 2, while graduate volunteers received all three tasks.Source: A. Tested Questions · pp. 11, 15
- Appendix figures show a generated testbench and a prompt for generating additional testbench inputs.Source: Figure A8 · p. 12, Figure A9 · p. 12
- The appendix includes a functional 64-point FFT generated by ChatGPT and a prompt for generating a 64-point FFT.Source: Figure A10 · p. 12, A. Tested Questions · p. 14, Figure A19 · p. 15
- The four-point DIF-FFT prompt supplies a butterfly-computation IP core, and the example code connects butterfly and complex-multiplication modules across stages.Source: A. Tested Questions · p. 13
- The appendix presents functional ChatGPT-generated four-point and eight-point FFT examples, with the eight-point prompt building on a provided four-point core.Source: Figure A15 · p. 13, Figure A16 · p. 14, Figure A17 · p. 14
B. Grading Standard
Submissions are scored on reliability, efficiency, readability, and maintainability, then blindly reviewed by one Verilog expert.
B. Grading Standard
- The grading scheme weights reliability and efficiency at 30% each, and readability and maintainability at 20% each.Reliability includes testbench correctness and avoiding bugs such as register overflow; efficiency concerns calculation latency.Source: B. Grading Standard · p. 15
- Submissions receive 1-to-5 scores and are blindly reviewed by the same Verilog expert.Source: B. Grading Standard · p. 15
C. Results, Analysis, and Discussions
Across three FPGA Verilog tasks, LLM assistance reduced completion time and improved code quality. The comparisons also suggested that assisted undergraduates performed comparably to, or slightly better than, non-assisted postgraduates on Tasks 1 and 2.
- 65.16% lower undergraduate and 68.44% lower postgraduate time consumption, alongside 10.46% and 3.31% testbench-code quality improvements, respectively.These Task 1 results compare LLM-assisted with non-assisted volunteers.Source: C. Results, Analysis, and Discussions · p. 15, Table B1 · p. 16
- 49.47% lower undergraduate and 42.32% lower postgraduate coding time on Task 2, with quality scores increasing by 44.22% and 28.38%, respectively.These results compare LLM-assisted with non-assisted volunteers.Source: C. Results, Analysis, and Discussions · p. 15, Table B1 · p. 16
- 55.67% lower coding time and 31.31% higher code quality on Task 3, the most complex task, which was designed specifically for postgraduates.Source: C. Results, Analysis, and Discussions · p. 15, Table B1 · p. 16
- In Tasks 1 and 2, volunteers in Group 2 performed comparably to, or even slightly better than, volunteers in Group 3, which authors said highlighted LLMs’ disruptive force in task execution.Source: C. Results, Analysis, and Discussions · p. 15
- For Tasks 2 and 3, Group Four produced higher-quality code than Group Three; participants attributed this to prioritizing functional correctness and relying on later review and edits.LLM-assisted Group Two code had already addressed many quality issues during generation, whereas Group Three engineers needed additional manual review and editing.Source: C. Results, Analysis, and Discussions · pp. 15–16