LLM-Based Optimization of FPGA Designs through Automated Verilog Refactoring

Authors

  • Samiah Halimah School of Computing, Clemson University, Clemson, SC, USA. Author
  • Bakianto Pranowo Department of Computer Science, University of North Texas, Denton, TX, USA. Author

Keywords:

large language models, Verilog refactoring, FPGA design, electronic design automation, architectural optimization, verification governance, sustainable infrastructure

Abstract

Field-programmable gate arrays remain central to domains that require low-latency computation, deterministic timing, and post-deployment adaptability, yet their design workflows are constrained by the complexity of hardware description languages and by the difficulty of exploring large architectural trade spaces. This paper examines how large language models can support automated Verilog refactoring as a system-level optimization strategy rather than merely as a code-generation convenience. The analysis situates LLM-driven refactoring within established traditions of compiler transformation, high-level synthesis, platform-based design, and electronic design automation. It argues that the most consequential benefits arise when refactoring is coupled with simulation, synthesis, timing analysis, power estimation, and formal or semi-formal verification in a closed governance loop. Such coupling transforms natural-language and code-oriented models into instruments for architectural exploration, technical-debt reduction, and infrastructure-aware optimization. The paper also considers structural trade-offs involving latency, resource utilization, throughput, clock frequency, energy efficiency, verification burden, and maintainability. It emphasizes that automation shifts rather than removes engineering responsibility, creating new needs for traceability, reproducible build environments, model documentation, access equity, and policy oversight. Deployment questions are examined across cloud, on-premises, and edge design environments, with attention to security, intellectual property, and supply-chain trust. The discussion concludes that LLM-based Verilog refactoring should be governed as a socio-technical infrastructure: valuable when it augments expert judgment, auditable when it modifies safety-critical or performance-critical logic, and sustainable when integrated with open benchmarks, toolchain transparency, and long-term maintenance practices.

References

1. Bacon, D. F., Graham, S. L., & Sharp, O. J. (1994). Compiler transformations for high-performance computing. ACM Computing Surveys, 26(4), 345–420. https://doi.org/10.1145/197405.197406

2. Cong, J., Liu, B., Neuendorffer, S., Noguera, J., Vissers, K., & Zhang, Z. (2011). High-level synthesis for FPGAs: From prototyping to deployment. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 30(4), 473–491. https://doi.org/10.1109/TCAD.2011.2110592

3. Wolf, W. (2004). FPGA-based system design. Prentice Hall.

4. Harris, D., & Harris, S. (2013). Digital design and computer architecture (2nd ed.). Morgan Kaufmann.

5. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., & Polosukhin, I. (2017). Attention is all you need. Advances in Neural Information Processing Systems, 30, 5998–6008.

6. Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., ... & Amodei, D. (2020). Language models are few-shot learners. Advances in Neural Information Processing Systems, 33, 1877–1901.

7. Chen, M., Tworek, J., Jun, H., Yuan, Q., Pinto, H. P. O., Kaplan, J., ... & Zaremba, W. (2021). Evaluating large language models trained on code. arXiv. https://arxiv.org/abs/2107.03374

8. Austin, J., Odena, A., Nye, M., Bosma, M., Michalewski, H., Dohan, D., ... & Sutton, C. (2021). Program synthesis with large language models. arXiv. https://arxiv.org/abs/2108.07732

9. Li, Y., Choi, D., Chung, J., Kushman, N., Schrittwieser, J., Leblond, R., ... & Vinyals, O. (2022). Competition-level code generation with AlphaCode. Science, 378(6624), 1092–1097. https://doi.org/10.1126/science.abq1158

10. Thorat, K., Zhao, J., Liu, Y., Hasan, A., Peng, H., Xie, X., ... & Ding, C. (2025, September). LLM-VeriPPA: Power, Performance, and Area Optimization aware Verilog Code Generation with Large Language Models. In 2025 ACM/IEEE 7th Symposium on Machine Learning for CAD (MLCAD) (pp. 1-7). IEEE.

11. Nijkamp, E., Pang, B., Hayashi, H., Tu, L., Wang, H., Zhou, Y., Savarese, S., & Xiong, C. (2023). CodeGen: An open large language model for code with multi-turn program synthesis. International Conference on Learning Representations.

12. Fried, D., Aghajanyan, A., Lin, J., Wang, S., Wallace, E., Shi, F., ... & Lewis, M. (2023). InCoder: A generative model for code infilling and synthesis. International Conference on Learning Representations.

13. Roziere, B., Gehring, J., Gloeckle, F., Sootla, S., Gat, I., Tan, X. E., ... & Synnaeve, G. (2023). Code Llama: Open foundation models for code. arXiv. https://arxiv.org/abs/2308.12950

14. Touvron, H., Martin, L., Stone, K., Albert, P., Almahairi, A., Babaei, Y., ... & Scialom, T. (2023). Llama 2: Open foundation and fine-tuned chat models. arXiv. https://arxiv.org/abs/2307.09288

15. Sculley, D., Holt, G., Golovin, D., Davydov, E., Phillips, T., Ebner, D., ... & Dennison, D. (2015). Hidden technical debt in machine learning systems. Advances in Neural Information Processing Systems, 28, 2503–2511.

16. Mitchell, M., Wu, S., Zaldivar, A., Barnes, P., Vasserman, L., Hutchinson, B., ... & Gebru, T. (2019). Model cards for model reporting. Proceedings of the Conference on Fairness, Accountability, and Transparency, 220–229. https://doi.org/10.1145/3287560.3287596

17. Gebru, T., Morgenstern, J., Vecchione, B., Vaughan, J. W., Wallach, H., Daumé III, H., & Crawford, K. (2021). Datasheets for datasets. Communications of the ACM, 64(12), 86–92. https://doi.org/10.1145/3458723

18. National Institute of Standards and Technology. (2023). Artificial intelligence risk management framework (AI RMF 1.0). U.S. Department of Commerce. https://doi.org/10.6028/NIST.AI.100-1

19. Leiserson, C. E., Thompson, N. C., Emer, J. S., Kuszmaul, B. C., Lampson, B. W., Sanchez, D., & Schardl, T. B. (2020). There's plenty of room at the Top: What will drive computer performance after Moore's law? Science, 368(6495), eaam9744. https://doi.org/10.1126/science.aam9744

20. Sangiovanni-Vincentelli, A., Carloni, L. P., De Bernardinis, F., & Sgroi, M. (2004). Benefits and challenges of platform-based design. Proceedings of the Design, Automation and Test in Europe Conference, 1, 1–6. https://doi.org/10.1109/DATE.2004.1268842

Downloads

Published

2026-09-07