A Deep Learning Framework for Verilog Autocompletion Towards Design and Verification Automation

Enrique Dehaerne,Bappaditya Dey,Sandip Halder,Stefan De Gendt
2023-06-07
Abstract:Innovative Electronic Design Automation (EDA) solutions are important to meet the design requirements for increasingly complex electronic devices. Verilog, a hardware description language, is widely used for the design and verification of digital circuits and is synthesized using specific EDA tools. However, writing code is a repetitive and time-intensive task. This paper proposes, primarily, a novel deep learning framework for training a Verilog autocompletion model and, secondarily, a Verilog dataset of files and snippets obtained from open-source repositories. The framework involves integrating models pretrained on general programming language data and finetuning them on a dataset curated to be similar to a target downstream task. This is validated by comparing different pretrained models trained on different subsets of the proposed Verilog dataset using multiple evaluation metrics. These experiments demonstrate that the proposed framework achieves better BLEU, ROUGE-L, and chrF scores by 9.5%, 6.7%, and 6.9%, respectively, compared to a model trained from scratch. Code and data are made available at: <a class="link-external link-https" href="https://github.com/99EnriqueD/verilog_autocompletion" rel="external noopener nofollow">this https URL</a> .
Machine Learning,Software Engineering
What problem does this paper attempt to address?
The problem that this paper attempts to solve is in electronic design automation (EDA), how to use the deep - learning framework to achieve automatic completion of Verilog code in order to improve the efficiency of digital circuit design and verification. Specifically, the author proposes a new deep - learning framework for training the Verilog auto - completion model and constructs a Verilog data set, which consists of files and code fragments obtained from open - source repositories. Through this framework, the author aims to reduce the repetition and time consumption of writing Verilog code and at the same time improve the work efficiency of electronic design engineers. In addition, this research also explores how to automate more complex downstream tasks such as layout generation and test - bench synthesis through automatic Verilog code generation. The main contributions of the paper include: 1. **Constructing the Verilog data set**: The author creates a high - quality Verilog data set, ensuring the quality of the data set by filtering abnormal files and removing approximately duplicate files. 2. **Deep - learning framework**: A deep - learning framework is proposed, which combines pre - trained models and fine - tuning techniques for specific tasks to improve the effect of automatic Verilog code generation. 3. **Experimental verification**: The effectiveness of the proposed framework is verified through multiple evaluation metrics (such as BLEU, ROUGE - L and chrF scores), and the results show that this framework is superior to models trained from scratch on multiple metrics. In conclusion, the goal of this paper is to improve the automatic generation of Verilog code through deep - learning techniques, thereby promoting innovation and development in the field of electronic design automation.