Investigating Automatic Bug Repair Using Large Language Models for Digital Hardware Design

dc.contributor.advisorTan, Benjamin
dc.contributor.authorElnaggar, Abdelrahman
dc.contributor.committeememberDe Carli, Lorenzo
dc.contributor.committeememberGinde, Gouri
dc.date2025-02
dc.date.accessioned2025-01-16T15:36:56Z
dc.date.available2025-01-16T15:36:56Z
dc.date.issued2025-01-13
dc.description.abstractRegister-transfer level ( RTL) bugs present critical challenges, impacting the functional correctness, security, and performance of System-on-Chip (SoC) designs. Detecting and repairing RTL bugs is traditionally a time-consuming process requiring skilled engineers, which significantly prolongs SoC development cycles and reduces vendor competitiveness. Given this complexity, there is a strong need for automated repair solutions capable of efficiently addressing RTL bugs to accelerate development timelines. In this thesis, we propose an automated framework leveraging a large language model (LLM) to repair RTL functional bugs. We explore various prompting techniques, including zero-shot, few-shot, and feedback approaches. Zero-shot relies solely on the LLM ’s pretrained knowledge, few-shot provides specific examples of RTL bug repairs, and feedback iteratively refines the LLM’s responses using outputs from prior iterations. Additionally, we investigate six prompting strategies, each incorporating varying levels of context to guide the LLM in the repair process. Our proposed framework operates on benchmarks without requiring prior knowledge of the bug’s type, location, or specific repair steps, better reflecting real-world scenarios than previous approaches. Results demonstrate the potential of LLM -driven automation, with the feedback approach achieving the highest repair success rate by fixing 26 out of 32 benchmarks (81.25%), while the best zero-shot and few-shot strategies repaired 23 out of 32 benchmarks (71.88%). These findings highlight the ability of current LLMs to consistently address RTL functional bugs, offering significant promise for streamlining SoC development by reducing the time and effort required for RTL bug detection and repair.
dc.identifier.citationElnaggar, A. (2025). Investigating automatic bug repair using large language models for digital hardware design (Master's thesis, University of Calgary, Calgary, Canada). Retrieved from https://prism.ucalgary.ca.
dc.identifier.urihttps://hdl.handle.net/1880/120458
dc.language.isoen
dc.publisher.facultyGraduate Studies
dc.publisher.institutionUniversity of Calgary
dc.rightsUniversity of Calgary graduate students retain copyright ownership and moral rights for their thesis. You may use this material in any way that is permitted by the Copyright Act or through licensing that has been assigned to the document. For uses that are not allowable under copyright legislation or licensing, you are required to seek permission.
dc.subjectVerilog
dc.subjectLarge Language Model (LLM)
dc.subjectHardware
dc.subjectBug Repair
dc.subject.classificationEngineering--Electronics and Electrical
dc.titleInvestigating Automatic Bug Repair Using Large Language Models for Digital Hardware Design
dc.typemaster thesis
thesis.degree.disciplineEngineering – Electrical & Computer
thesis.degree.grantorUniversity of Calgary
thesis.degree.nameMaster of Science (MSc)
ucalgary.thesis.accesssetbystudentI do not require a thesis withhold – my thesis will have open access and can be viewed and downloaded publicly as soon as possible.
Files
Original bundle
Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
ucalgary_2025_elnaggar_abdelrahman.pdf
Size:
1.28 MB
Format:
Adobe Portable Document Format
License bundle
Now showing 1 - 1 of 1
No Thumbnail Available
Name:
license.txt
Size:
2.62 KB
Format:
Item-specific license agreed upon to submission
Description: