AI-Assisted Hardware Design with Large Language Models: Capability Limits and Verification Practices

    Large language models are entering multiple stages of electronic hardware design, helping engineers draft modules, generate test stimulus, and organize design documents. However, their current capabilities are concentrated at the module level, and completing a full chip design from scratch remains infeasible. This article walks through the design flow stage by stage, analyzing what AI can do, where it tends to fail, and what checks engineering teams should put in place, with Verilog code examples illustrating the gap between AI-generated snippets and production-ready RTL.

    Large language models are entering multiple stages of electronic hardware design. They can help engineers draft modules faster, generate test stimulus, and organize design documents. However, their current capabilities are concentrated mainly on module-level tasks. Having a model complete the full design flow of a chip from scratch is not feasible at this stage. This article analyzes, stage by stage along the design flow, what AI can do, where it is prone to errors, and how engineering teams should set up verification checkpoints.

    1. The Practical Role of AI in Each Design Stage

    Hardware design is typically divided into requirements analysis, architecture definition, RTL coding, functional verification, and back-end physical implementation. The depth of AI involvement varies greatly across these stages.

    In the requirements analysis and architecture definition stage, large models are well suited to organizing requirements documents, listing feature checklists, and proposing module partitioning and bus interface drafts. These outputs are primarily text and block diagrams. Engineers must review them item by item, because the model may omit constraints or write protocol features that do not exist into the document.

    In the RTL coding stage, a model can generate Verilog or VHDL code from a module description, and can also perform localized rewrites of existing code, such as splitting combinational logic or adding pipeline stages. The generated output must go through compilation, lint checks, and simulation; it must not enter the downstream flow directly.

    In the verification stage, a model can generate basic test stimulus, assertion drafts, and UVM component skeletons based on interface definitions. This kind of work is highly repetitive, so the time saved by AI is considerable. However, whether the test scenarios cover critical boundary conditions still requires the judgment of verification engineers.

    In the back-end physical implementation stage, AI currently plays a relatively small role. Timing closure, floorplanning and layout, and power analysis depend on process libraries and specialized tools, which models generally cannot replace.

    2. Code Example: The Gap Between a Pointer Control Snippet and a Complete FIFO

    Many AI-generated examples only show the update logic for read and write pointers. The following code illustrates how the pointers advance, but by itself it cannot form a usable FIFO, because it lacks the storage array, the full/empty flags, and the data path.

    1. // Pointer control snippet: shows pointer advancement only, not a complete FIFO
    2. always @(posedge clk or negedge rst_n) begin
    3. if (!rst_n) begin
    4. wr_ptr <= 0;
    5. rd_ptr <= 0;
    6. end else begin
    7. if (wr_en && !full) wr_ptr <= wr_ptr + 1;
    8. if (rd_en && !empty) rd_ptr <= rd_ptr + 1;
    9. end
    10. end

    A complete synchronous FIFO requires three additional parts: the storage array, the logic that compares the read and write pointers to derive the empty and full flags, and the write/read data path. The code below gives a simulatable version with a depth of 16 and a data width of 8. The pointers are one bit wider than the address width, and the most significant bit is used to distinguish the write-full case from the read-empty case.

    1. module sync_fifo #(
    2. parameter DATA_WIDTH = 8,
    3. parameter ADDR_WIDTH = 4 // Depth = 2^4 = 16
    4. )(
    5. input wire clk,
    6. input wire rst_n,
    7. input wire wr_en,
    8. input wire [DATA_WIDTH-1:0] wr_data,
    9. input wire rd_en,
    10. output reg [DATA_WIDTH-1:0] rd_data,
    11. output wire full,
    12. output wire empty
    13. );
    14. localparam DEPTH = 1 << ADDR_WIDTH;
    15. reg [DATA_WIDTH-1:0] mem [0:DEPTH-1];
    16. reg [ADDR_WIDTH:0] wr_ptr, rd_ptr;
    17. assign empty = (wr_ptr == rd_ptr);
    18. assign full = (wr_ptr[ADDR_WIDTH] != rd_ptr[ADDR_WIDTH]) &&
    19. (wr_ptr[ADDR_WIDTH-1:0] == rd_ptr[ADDR_WIDTH-1:0]);
    20. wire do_wr = wr_en && !full;
    21. wire do_rd = rd_en && !empty;
    22. always @(posedge clk or negedge rst_n) begin
    23. if (!rst_n) begin
    24. wr_ptr <= 0;
    25. rd_ptr <= 0;
    26. rd_data <= 0;
    27. end else begin
    28. if (do_wr) begin
    29. mem[wr_ptr[ADDR_WIDTH-1:0]] <= wr_data;
    30. wr_ptr <= wr_ptr + 1'b1;
    31. end
    32. if (do_rd) begin
    33. rd_data <= mem[rd_ptr[ADDR_WIDTH-1:0]];
    34. rd_ptr <= rd_ptr + 1'b1;
    35. end
    36. end
    37. end
    38. endmodule

    The empty flag holds when the read and write pointers are exactly equal. The full flag holds when the most significant bits differ while the lower bits are equal. Read data uses a registered output, so the read latency is one clock cycle. This version only works for FIFOs whose depth is a power of two. For other depths, the pointer wraparound logic must be designed separately.

    3. Common Errors in AI-Generated RTL

    1. Latches: In combinational logic, if an output is not assigned in some branch, the synthesis tool will infer a latch.
    1. always @(*) begin
    2. if (sel) y = a; // When sel is 0, y holds its previous value; synthesis infers a latch
    3. end

    The fix is to assign a default value to the output at the beginning of the always block, or to complete the else branch.

    1. Non-synthesizable statements: