{"id":{"repo_id":"calgary","oai_identifier":"oai:ucalgary.scholaris.ca:1880/120458"},"canonical_url":"https://search.ndltd.org/etd/calgary/oai:ucalgary.scholaris.ca:1880/120458","repository":{"repo_id":"calgary","name":"University of Calgary","base_url":"https://ucalgary.scholaris.ca/server/oai/request"},"display":{"title":"Investigating Automatic Bug Repair Using Large Language Models for Digital Hardware Design","abstract":"Register-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.","abstract_html":"Register-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.","abstract_has_math":false,"creators":["Elnaggar, Abdelrahman"],"institution":"Graduate Studies","degree_name":"Master of Science (MSc)","degree_level":null,"degree_discipline":"Engineering – Electrical & Computer","degree_department":null,"school":null,"contributors":[],"advisors":["Tan, Benjamin"],"committee_chairs":[],"committee_members":["De Carli, Lorenzo","Ginde, Gouri"],"year":2025,"date_issued":"2025-01-13","date_published":"2025-01-13","updated_at":"2026-11-19T07:24:49Z","subjects":["Verilog","Large Language Model (LLM)","Hardware","Bug Repair"],"languages":["en"],"rights":["University 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."],"rights_urls":[],"identifier_entries":[{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://hdl.handle.net/1880/120458"],"render_values":[{"text":"https://hdl.handle.net/1880/120458","href":"https://hdl.handle.net/1880/120458","code":true}]},{"key":"dc:identifier.citation","label":"Dc Identifier Citation","values":["Elnaggar, 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."],"render_values":[{"text":"Elnaggar, 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.","href":null,"code":true}]}],"person_identifier_entries":[]},"links":{"outbound_url":"https://doi.org/10.11575/PRISM/48067","outbound_label":"DOI","outbound_source":"dc:identifier.doi","record_url":"https://doi.org/10.11575/PRISM/48067","record_label":"Repository record","record_kind":"doi","record_source":"dc:identifier.doi","access_status":null,"embargo_until":null,"access_note":null},"oai_pmh_record":{"url":"https://union.ndltd.org/oai-pmh/?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Aunion.ndltd.org%3Arepo%3Acalgary%3Aoai%3Aucalgary.scholaris.ca%3A1880%2F120458","prefix":"oai_dc"},"source_record":{"url":"https://ucalgary.scholaris.ca/server/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Aucalgary.scholaris.ca%3A1880%2F120458","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.advisor","label":"Advisor","values":["Tan, Benjamin"]},{"key":"dc:contributor.committeemember","label":"Committee Member","values":["De Carli, Lorenzo","Ginde, Gouri"]},{"key":"dc:creator","label":"Author","values":["Elnaggar, Abdelrahman"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date","label":"Dc Date","values":["2025-02"]},{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2025-01-16T15:36:56Z"]},{"key":"dc:date.available","label":"Dc Date Available","values":["2025-01-16T15:36:56Z"]},{"key":"dc:date.issued","label":"Date","values":["2025-01-13"]},{"key":"dc:publisher.faculty","label":"Dc Publisher Faculty","values":["Graduate Studies"]},{"key":"dc:publisher.institution","label":"Dc Publisher Institution","values":["University of Calgary"]},{"key":"dc:type","label":"Dc Type","values":["master thesis"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Engineering – Electrical & Computer"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Science (MSc)"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["University of Calgary"]},{"key":"thesis:release_request","label":"Thesis Release Request","values":["I do not require a thesis withhold – my thesis will have open access and can be viewed and downloaded publicly as soon as possible."]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Verilog","Large Language Model (LLM)","Hardware","Bug Repair"]},{"key":"dc:subject.classification","label":"Dc Subject Classification","values":["Engineering--Electronics and Electrical"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language.iso","label":"Language (ISO)","values":["en"]},{"key":"dc:rights","label":"Dc Rights","values":["University 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."]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.citation","label":"Dc Identifier Citation","values":["Elnaggar, 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."]},{"key":"dc:identifier.doi","label":"DOI","values":["https://dx.doi.org/10.11575/PRISM/48067"]},{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://hdl.handle.net/1880/120458"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["Register-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."]},{"key":"dc:title","label":"Title","values":["Investigating Automatic Bug Repair Using Large Language Models for Digital Hardware Design"]},{"key":"dspace:entity.type","label":"Dspace Entity Type","values":["Publication"]},{"key":"others:access_status","label":"Others Access Status","values":["open.access"]}]}],"canonical_facts":{"dc:contributor.advisor":["Tan, Benjamin"],"dc:contributor.committeemember":["De Carli, Lorenzo","Ginde, Gouri"],"dc:creator":["Elnaggar, Abdelrahman"],"dc:date":["2025-02"],"dc:date.accessioned":["2025-01-16T15:36:56Z"],"dc:date.available":["2025-01-16T15:36:56Z"],"dc:date.issued":["2025-01-13"],"dc:description.abstract":["Register-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.citation":["Elnaggar, 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.doi":["https://dx.doi.org/10.11575/PRISM/48067"],"dc:identifier.uri":["https://hdl.handle.net/1880/120458"],"dc:language.iso":["en"],"dc:publisher.faculty":["Graduate Studies"],"dc:publisher.institution":["University of Calgary"],"dc:rights":["University 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:subject":["Verilog","Large Language Model (LLM)","Hardware","Bug Repair"],"dc:subject.classification":["Engineering--Electronics and Electrical"],"dc:title":["Investigating Automatic Bug Repair Using Large Language Models for Digital Hardware Design"],"dc:type":["master thesis"],"dspace:entity.type":["Publication"],"others:access_status":["open.access"],"thesis:degree_discipline":["Engineering – Electrical & Computer"],"thesis:degree_name":["Master of Science (MSc)"],"thesis:institution_name":["University of Calgary"],"thesis:release_request":["I do not require a thesis withhold – my thesis will have open access and can be viewed and downloaded publicly as soon as possible."]},"updated_at":"2026-11-19T07:24:49Z"}