{"id":5435,"date":"2026-11-11T01:51:29","date_gmt":"2026-11-11T01:51:29","guid":{"rendered":"https:\/\/www.takshila-vlsi.com\/blog\/?p=5435"},"modified":"2026-11-02T04:51:48","modified_gmt":"2026-11-02T04:51:48","slug":"generative-ai-for-rtl-design-verilog-systemverilog","status":"publish","type":"post","link":"https:\/\/www.takshila-vlsi.com\/blog\/generative-ai-for-rtl-design-verilog-systemverilog\/","title":{"rendered":"Generative AI for RTL Design: Can AI Write Verilog and SystemVerilog Code?"},"content":{"rendered":"<p>Ask an AI assistant for a Verilog module and you will get one in seconds. It will have sensible names, tidy formatting and a confident explanation. The real question for an engineer is different: will it simulate correctly, will it synthesize into what you intended, and will it survive a design review?<\/p>\n<p>This article looks honestly at <a href=\"https:\/\/www.takshila-vlsi.com\/rtl-coding-fpga-design\/\"><strong>AI for RTL design<\/strong><\/a><a href=\"https:\/\/www.takshila-vlsi.com\/rtl-coding-fpga-design\/\">.<\/a> You will see what generative AI does well, where it fails, a few sample prompts and code, and a validation workflow you can use on any AI-generated RTL.<\/p>\n<h2>What Generative AI Can Do for RTL<\/h2>\n<ul>\n<li><strong>Turn a specification into a first draft<\/strong> of a module, such as a counter, FIFO, arbiter or simple FSM.<\/li>\n<li><strong>Convert styles:<\/strong> rewrite old Verilog-2001 code into cleaner SystemVerilog with always_ff and always_comb.<\/li>\n<li><strong>Explain unfamiliar code<\/strong> line by line, which helps when inheriting a legacy block.<\/li>\n<li><strong>Suggest optimisations<\/strong> such as pipelining a long path or sharing resources.<\/li>\n<li><strong>Help with debugging<\/strong> by reading an error message or a failing waveform description and suggesting causes.<\/li>\n<li><strong>Create supporting material<\/strong> such as testbenches, assertions, comments and documentation.<\/li>\n<\/ul>\n<p>The industry is moving in this direction too. In 2026, major EDA vendors announced agent-style tools that take a specification, produce RTL, run simulations and iterate. Availability and maturity differ between products, so check the vendor for current status.<\/p>\n<h2>Writing a Good Prompt<\/h2>\n<p>The quality of generated RTL depends heavily on the prompt. Vague requests produce vague hardware. A strong prompt states the interface, the behaviour, the reset style and the coding rules.<\/p>\n<h3>Weak prompt<\/h3>\n<p>Write a Verilog counter.<\/p>\n<h3>Stronger prompt<\/h3>\n<p>Write synthesizable SystemVerilog for a parameterized up\/down counter.<\/p>\n<p>&#8211; Parameter WIDTH, default 4<\/p>\n<p>&#8211; Inputs: clk, rst_n (active-low asynchronous reset), en, up<\/p>\n<p>&#8211; Output: count [WIDTH-1:0]<\/p>\n<p>&#8211; When en is high, count increments if up is 1, decrements if 0<\/p>\n<p>&#8211; When en is low, count holds its value<\/p>\n<p>&#8211; Use always_ff and non-blocking assignments<\/p>\n<p>&#8211; No latches, no initial blocks, no delays<\/p>\n<p>&#8211; Add a short comment above each block<\/p>\n<p>The second prompt removes the guesswork. It also gives you a checklist to review the answer against.<\/p>\n<h2>What the Output Might Look Like<\/h2>\n<p>module updown_counter #(<\/p>\n<p>parameter int WIDTH = 4<\/p>\n<p>)(<\/p>\n<p>input\u00a0 logic\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 clk,<\/p>\n<p>input\u00a0 logic\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rst_n,<\/p>\n<p>input\u00a0 logic\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 en,<\/p>\n<p>input\u00a0 logic\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 up,<\/p>\n<p>output logic [WIDTH-1:0] count<\/p>\n<p>);<\/p>\n<p>&nbsp;<\/p>\n<p>\/\/ Sequential logic with asynchronous active-low reset<\/p>\n<p>always_ff @(posedge clk or negedge rst_n) begin<\/p>\n<p>if (!rst_n)<\/p>\n<p>count &lt;= &#8216;0;<\/p>\n<p>else if (en)<\/p>\n<p>count &lt;= up ? count + 1&#8217;b1 : count &#8211; 1&#8217;b1;<\/p>\n<p>end<\/p>\n<p>&nbsp;<\/p>\n<p>endmodule<\/p>\n<p>This is a straightforward case and a capable model will usually get it right. Notice that you still must check the reset style, the hold behaviour and the wrap-around at the maximum and minimum values.<\/p>\n<h2>Where AI-Generated RTL Goes Wrong<\/h2>\n<h3>Accidental latches<\/h3>\n<p>A model may write combinational logic that does not assign an output in every branch, which creates a latch.<\/p>\n<p>\/\/ Risky: y holds its old value when sel is 0, so a latch is inferred<\/p>\n<p>always @(*) begin<\/p>\n<p>if (sel) y = a;<\/p>\n<p>end<\/p>\n<p>&nbsp;<\/p>\n<p>\/\/ Safer: assign a default first<\/p>\n<p>always_comb begin<\/p>\n<p>y = &#8216;0;<\/p>\n<p>if (sel) y = a;<\/p>\n<p>end<\/p>\n<h3>Mixed or incorrect assignments<\/h3>\n<p>Using blocking assignments in sequential logic, or non-blocking in combinational logic, can create simulation and synthesis mismatches.<\/p>\n<h3>Weak reset and clock-domain handling<\/h3>\n<p>AI often ignores reset recovery, asynchronous reset release and signals that cross clock domains, because a short prompt rarely mentions them.<\/p>\n<h3>Non-synthesizable constructs<\/h3>\n<p>Delays, certain initial-block uses and some testbench-style constructs may appear in code that was supposed to be synthesizable.<\/p>\n<h3>Misread specifications<\/h3>\n<p>If the specification is ambiguous, the model silently picks an interpretation. That may differ from what the architect intended, and nothing will warn you.<\/p>\n<h3>Invented details<\/h3>\n<p>Models sometimes refer to signals, libraries or tool commands that do not exist. Always run the code instead of trusting the explanation.<\/p>\n<h2>A Workflow to Validate AI-Generated RTL<\/h2>\n<ol>\n<li><strong>Read it first.<\/strong> Review the code against your specification as if a junior colleague wrote it. Check the interface, reset and every branch.<\/li>\n<li><strong>Lint it.<\/strong> Run a linting tool to catch width mismatches, latches, unconnected ports and style problems.<\/li>\n<li><strong>Simulate it.<\/strong> Write your own testbench, with self-checking, directed corner cases and random tests. Do not rely only on a testbench written by the same AI.<\/li>\n<li><strong>Add assertions.<\/strong> Encode the rules the design must always follow and let simulation check them.<\/li>\n<li><strong>Synthesize it.<\/strong> Confirm the design maps to the hardware you expected and review area, timing and warnings.<\/li>\n<li><strong>Compare with a reference.<\/strong> Where possible, check against a golden model or equivalent behaviour from another implementation.<\/li>\n<li><strong>Review and record.<\/strong> Keep the prompt, the changes you made and the problems you found.<\/li>\n<\/ol>\n<p>For the counter above, a simple assertion could check increment behaviour:<\/p>\n<p>assert property (@(posedge clk) disable iff (!rst_n)<\/p>\n<p>(en &amp;&amp; up &amp;&amp; count != &#8216;1) |=&gt; count == $past(count) + 1);<\/p>\n<p>An independent check like this is valuable because it does not depend on the generated code being correct.<\/p>\n<h2>Good Uses and Poor Uses<\/h2>\n<table width=\"602\">\n<thead>\n<tr>\n<td width=\"300\"><strong>Good uses<\/strong><\/td>\n<td width=\"302\"><strong>Poor uses<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td width=\"300\">First drafts of small, well-specified blocks<\/td>\n<td width=\"302\">Unreviewed code for a critical block<\/td>\n<\/tr>\n<tr>\n<td width=\"300\">Refactoring and style conversion<\/td>\n<td width=\"302\">Clock-domain crossing or reset architecture without expert review<\/td>\n<\/tr>\n<tr>\n<td width=\"300\">Explaining legacy code<\/td>\n<td width=\"302\">Learning Verilog by only copying output<\/td>\n<\/tr>\n<tr>\n<td width=\"300\">Generating test ideas and documentation<\/td>\n<td width=\"302\">Replacing simulation and synthesis checks<\/td>\n<\/tr>\n<tr>\n<td width=\"300\">Speeding up repetitive scripts<\/td>\n<td width=\"302\">Pasting confidential design data into public tools<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>What This Means for Learners<\/h2>\n<p>A beginner who uses AI to avoid learning will struggle, because they cannot tell good RTL from bad. A beginner who first learns the fundamentals and then uses AI as an assistant will move faster than before. The difference is the ability to judge.<\/p>\n<ul>\n<li>Write your first modules by hand so you build a feel for hardware thinking.<\/li>\n<li>Use AI for second opinions: ask it to find bugs in your code, then verify its claims.<\/li>\n<li>Compare its solution with yours and study the differences.<\/li>\n<li>Keep a list of errors you catch. It will sharpen your review skills quickly.<\/li>\n<\/ul>\n<h2>Confidentiality Reminder<\/h2>\n<p>Company designs are valuable intellectual property. Follow your organisation&#8217;s policy and use approved or private deployments for any real design work. For practice and learning, use your own small projects.<\/p>\n<h2>\u00a0Conclusion<\/h2>\n<p>Can AI write Verilog and SystemVerilog? Yes, often reasonably well for small blocks. Can you trust it without checking? No. The winning approach is to combine AI speed with your own understanding, solid verification and disciplined review.<\/p>\n<p>To build the foundation that makes AI useful rather than risky, explore the <strong>Verilog, <\/strong><a href=\"https:\/\/www.takshila-vlsi.com\/rtl-coding-fpga-design\/\"><strong>SystemVerilog and RTL design courses at Takshila Institute of VLSI Technologies<\/strong><\/a> and try the digital design projects in our resources.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ask an AI assistant for a Verilog module and you will get one in seconds. It will have sensible names, tidy formatting and a confident explanation. The real question for an engineer is different: will it simulate correctly, will it synthesize into what you intended, and will it survive a design review? This article looks [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5436,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-5435","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Generative AI for RTL Design: Can AI Write Verilog Code?<\/title>\n<meta name=\"description\" content=\"Learn how generative AI can write Verilog and SystemVerilog, with sample prompts, code examples, limitations and a workflow to validate AI-generated RTL.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.takshila-vlsi.com\/blog\/generative-ai-for-rtl-design-verilog-systemverilog\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Generative AI for RTL Design: Can AI Write Verilog Code?\" \/>\n<meta property=\"og:description\" content=\"Learn how generative AI can write Verilog and SystemVerilog, with sample prompts, code examples, limitations and a workflow to validate AI-generated RTL.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.takshila-vlsi.com\/blog\/generative-ai-for-rtl-design-verilog-systemverilog\/\" \/>\n<meta property=\"og:site_name\" content=\"Takshila VLSI\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-11T01:51:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.takshila-vlsi.com\/blog\/wp-content\/uploads\/2026\/11\/Generative-AI-for-RTL-Design.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1419\" \/>\n\t<meta property=\"og:image:height\" content=\"712\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Generative AI for RTL Design: Can AI Write Verilog Code?","description":"Learn how generative AI can write Verilog and SystemVerilog, with sample prompts, code examples, limitations and a workflow to validate AI-generated RTL.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.takshila-vlsi.com\/blog\/generative-ai-for-rtl-design-verilog-systemverilog\/","og_locale":"en_US","og_type":"article","og_title":"Generative AI for RTL Design: Can AI Write Verilog Code?","og_description":"Learn how generative AI can write Verilog and SystemVerilog, with sample prompts, code examples, limitations and a workflow to validate AI-generated RTL.","og_url":"https:\/\/www.takshila-vlsi.com\/blog\/generative-ai-for-rtl-design-verilog-systemverilog\/","og_site_name":"Takshila VLSI","article_published_time":"2026-11-11T01:51:29+00:00","og_image":[{"width":1419,"height":712,"url":"https:\/\/www.takshila-vlsi.com\/blog\/wp-content\/uploads\/2026\/11\/Generative-AI-for-RTL-Design.png","type":"image\/png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.takshila-vlsi.com\/blog\/generative-ai-for-rtl-design-verilog-systemverilog\/#article","isPartOf":{"@id":"https:\/\/www.takshila-vlsi.com\/blog\/generative-ai-for-rtl-design-verilog-systemverilog\/"},"author":{"name":"admin","@id":"https:\/\/www.takshila-vlsi.com\/blog\/#\/schema\/person\/835691ab01ef33e0780d4f78373302b6"},"headline":"Generative AI for RTL Design: Can AI Write Verilog and SystemVerilog Code?","datePublished":"2026-11-11T01:51:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.takshila-vlsi.com\/blog\/generative-ai-for-rtl-design-verilog-systemverilog\/"},"wordCount":1092,"commentCount":0,"publisher":{"@id":"https:\/\/www.takshila-vlsi.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.takshila-vlsi.com\/blog\/generative-ai-for-rtl-design-verilog-systemverilog\/#primaryimage"},"thumbnailUrl":"https:\/\/www.takshila-vlsi.com\/blog\/wp-content\/uploads\/2026\/11\/Generative-AI-for-RTL-Design.png","articleSection":["blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.takshila-vlsi.com\/blog\/generative-ai-for-rtl-design-verilog-systemverilog\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.takshila-vlsi.com\/blog\/generative-ai-for-rtl-design-verilog-systemverilog\/","url":"https:\/\/www.takshila-vlsi.com\/blog\/generative-ai-for-rtl-design-verilog-systemverilog\/","name":"Generative AI for RTL Design: Can AI Write Verilog Code?","isPartOf":{"@id":"https:\/\/www.takshila-vlsi.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.takshila-vlsi.com\/blog\/generative-ai-for-rtl-design-verilog-systemverilog\/#primaryimage"},"image":{"@id":"https:\/\/www.takshila-vlsi.com\/blog\/generative-ai-for-rtl-design-verilog-systemverilog\/#primaryimage"},"thumbnailUrl":"https:\/\/www.takshila-vlsi.com\/blog\/wp-content\/uploads\/2026\/11\/Generative-AI-for-RTL-Design.png","datePublished":"2026-11-11T01:51:29+00:00","description":"Learn how generative AI can write Verilog and SystemVerilog, with sample prompts, code examples, limitations and a workflow to validate AI-generated RTL.","breadcrumb":{"@id":"https:\/\/www.takshila-vlsi.com\/blog\/generative-ai-for-rtl-design-verilog-systemverilog\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.takshila-vlsi.com\/blog\/generative-ai-for-rtl-design-verilog-systemverilog\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.takshila-vlsi.com\/blog\/generative-ai-for-rtl-design-verilog-systemverilog\/#primaryimage","url":"https:\/\/www.takshila-vlsi.com\/blog\/wp-content\/uploads\/2026\/11\/Generative-AI-for-RTL-Design.png","contentUrl":"https:\/\/www.takshila-vlsi.com\/blog\/wp-content\/uploads\/2026\/11\/Generative-AI-for-RTL-Design.png","width":1419,"height":712,"caption":"Generative AI for RTL Design"},{"@type":"BreadcrumbList","@id":"https:\/\/www.takshila-vlsi.com\/blog\/generative-ai-for-rtl-design-verilog-systemverilog\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.takshila-vlsi.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Generative AI for RTL Design: Can AI Write Verilog and SystemVerilog Code?"}]},{"@type":"WebSite","@id":"https:\/\/www.takshila-vlsi.com\/blog\/#website","url":"https:\/\/www.takshila-vlsi.com\/blog\/","name":"Takshila VLSI","description":"Takshila Institute of VLSI Technologies.","publisher":{"@id":"https:\/\/www.takshila-vlsi.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.takshila-vlsi.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.takshila-vlsi.com\/blog\/#organization","name":"Blog","url":"https:\/\/www.takshila-vlsi.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.takshila-vlsi.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.takshila-vlsi.com\/blog\/wp-content\/uploads\/2025\/03\/Logo-With-white-background-scaled.jpg","contentUrl":"https:\/\/www.takshila-vlsi.com\/blog\/wp-content\/uploads\/2025\/03\/Logo-With-white-background-scaled.jpg","width":2560,"height":699,"caption":"Blog"},"image":{"@id":"https:\/\/www.takshila-vlsi.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.takshila-vlsi.com\/blog\/#\/schema\/person\/835691ab01ef33e0780d4f78373302b6","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.takshila-vlsi.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ddc93bfb7db066e804a09a010f7a46d7e76fe4200a523cd0aa72b2ffda07d959?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ddc93bfb7db066e804a09a010f7a46d7e76fe4200a523cd0aa72b2ffda07d959?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/www.takshila-vlsi.com\/blog"],"url":"https:\/\/www.takshila-vlsi.com\/blog\/author\/tkshlvsadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.takshila-vlsi.com\/blog\/wp-json\/wp\/v2\/posts\/5435","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.takshila-vlsi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.takshila-vlsi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.takshila-vlsi.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.takshila-vlsi.com\/blog\/wp-json\/wp\/v2\/comments?post=5435"}],"version-history":[{"count":1,"href":"https:\/\/www.takshila-vlsi.com\/blog\/wp-json\/wp\/v2\/posts\/5435\/revisions"}],"predecessor-version":[{"id":5437,"href":"https:\/\/www.takshila-vlsi.com\/blog\/wp-json\/wp\/v2\/posts\/5435\/revisions\/5437"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.takshila-vlsi.com\/blog\/wp-json\/wp\/v2\/media\/5436"}],"wp:attachment":[{"href":"https:\/\/www.takshila-vlsi.com\/blog\/wp-json\/wp\/v2\/media?parent=5435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.takshila-vlsi.com\/blog\/wp-json\/wp\/v2\/categories?post=5435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.takshila-vlsi.com\/blog\/wp-json\/wp\/v2\/tags?post=5435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}