Paper 2024/1905

OPL4GPT: An Application Space Exploration of Optimal Programming Language for Hardware Design by LLM

Kimia Tasnia, University of Central Florida
Sazadur Rahman, University of Central Florida
Abstract

Despite the emergence of Large Language Models (LLMs) as potential tools for automating hardware design, the optimal programming language to describe hardware functions remains unknown. Prior works extensively explored optimizing Verilog-based HDL design, which often overlooked the potential capabilities of alternative programming languages for hardware designs. This paper investigates the efficacy of C++ and Verilog as input languages in extensive application space exploration, tasking an LLM to generate implementations for various System-on-chip functional blocks. We proposed an automated Optimal Programming Language (OPL) framework that leverages OpenAI's GPT-4o LLM to translate natural language specifications into hardware descriptions using both high-level and low-level programming paradigms. The OPL4GPT demonstration initially employs a novel prompt engineering approach that decomposes design specifications into manageable submodules, presented to the LLM to generate code in both C++ and Verilog. A closed-loop feedback mechanism automatically incorporates error logs from the LLM's outputs, encompassing both syntax and functionality. Finally, functionally correct outputs are synthesized using either RTL (Register-Transfer Level) for Verilog or High-Level Synthesis for C++ to assess area, power, and performance. Our findings illuminate the strengths and weaknesses of each language across various application domains, empowering hardware designers to select the most effective approach.

Metadata
Available format(s)
PDF
Category
Implementation
Publication info
Published elsewhere. Asia and South Pacific Design Automation Conference
DOI
10.1145/3658617.3697621
Keywords
Large Language ModelsHigh Level SynthesisHardware Description LanguagePrompt Engineering
Contact author(s)
kimia tasnia @ ucf edu
mohammad rahman @ ucf edu
History
2024-11-25: approved
2024-11-23: received
See all versions
Short URL
https://ia.cr/2024/1905
License
No rights reserved
CC0

BibTeX

@misc{cryptoeprint:2024/1905,
      author = {Kimia Tasnia and Sazadur Rahman},
      title = {{OPL4GPT}: An Application Space Exploration of Optimal Programming Language for Hardware Design by {LLM}},
      howpublished = {Cryptology {ePrint} Archive, Paper 2024/1905},
      year = {2024},
      doi = {10.1145/3658617.3697621},
      url = {https://eprint.iacr.org/2024/1905}
}
Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content.