A carbon nanotube device TCAD modeling method based on hybrid retrieval and agent iteration
By employing a hybrid retrieval and intelligent agent iteration approach, the problem of high-precision simulation of carbon nanotube devices in TCAD modeling was solved, achieving automated parameter adjustment and model convergence, thereby improving the R&D efficiency and performance consistency of carbon nanotube devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XI AN JIAOTONG UNIV
- Filing Date
- 2026-02-05
- Publication Date
- 2026-06-12
AI Technical Summary
Existing technologies for constructing high-precision carbon nanotube field-effect transistor (CNT-FET) TCAD simulation models suffer from problems such as strong dependence on material properties, low retrieval recall due to the complexity of TCAD script syntax, and lack of automated iterative correction mechanisms, which lead to distorted simulation results or non-convergence.
A hybrid retrieval and agent-based iterative approach is adopted, which uses a dual-path retrieval algorithm at the character and word levels to accurately recall TCAD composite commands. An agent-based adaptive iterative module is constructed to monitor simulation logs in real time and automatically adjust parameters to ensure model convergence and characteristic symmetry.
High-quality TCAD modeling was achieved, which lowered the technical threshold, shortened the R&D cycle, improved the accuracy and consistency of simulation results, reduced the debugging difficulty and cost for engineers, and ensured the performance consistency of carbon nanotube devices.
Smart Images

Figure CN122197783A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of semiconductor EDA and artificial intelligence technology, and more specifically, to a TCAD modeling method for carbon nanotube devices based on hybrid retrieval and intelligent agent iteration. Background Technology
[0002] Carbon nanotube field-effect transistors (CNT-FETs), with their ultra-thin profile and excellent ballistic transport mechanism, are considered important candidate devices for continuing the performance improvement of integrated circuits in the post-Moore's Law era. In the development of high-performance carbon-based integrated circuits, utilizing technology computer-aided design (TCAD) tools for device physical modeling, electrical characteristic simulation, and process parameter optimization is a key means to shorten the development cycle and reduce tape-out costs. However, constructing high-precision, high-convergence CNT device TCAD simulation models faces extremely high technical barriers.
[0003] First, carbon nanotubes (CNTs) possess unique physical properties. Their band structure and electrical characteristics are highly dependent on the chirality vector and diameter. Furthermore, constructing high-performance CNT complementary logic gates requires highly symmetrical current characteristics in both N-type and P-type devices. This typically necessitates matching precise but distinct contact metal work functions and chemical doping strategies for N / P-type devices. Existing generalized large language models (LLMs), lacking domain-specific semiconductor physics knowledge, often produce "illusions" when assisting in the generation of such scripts. For example, they may incorrectly apply parameters from traditional silicon-based materials, leading to a severe mismatch in electron and hole mobility in the generated simulation model. This fails to reflect the intrinsic physical advantages of CNTs, rendering the simulation results meaningless.
[0004] Secondly, TCAD simulation scripts have a highly specialized syntax structure, with the code filled with numerous compact physical symbols, long compound commands, and parameter abbreviations (e.g., HighFieldSaturation, Coupled(Iterations=100)). Existing collaborative methods for Electronic Design Automation (EDA) based on large language models typically employ conventional Natural Language Processing (NLP) segmentation techniques and word embedding retrieval mechanisms to match task instances. This semantic similarity-based retrieval method is relatively effective when processing general-purpose programming languages such as Python or Tcl, but when faced with the unique, space-free, long physical operators in TCAD scripts, the segmenter often fails to correctly segment the features, resulting in extremely low retrieval recall rates for key physical models. The generated scripts frequently report errors due to missing key physical definitions.
[0005] Furthermore, some existing EDA-assisted technologies focus on numerical prediction of design metrics (performance, power consumption, area) based on historical data, or only focus on the scheduling of the top-level design process. While these methods can provide a reference for design trends, they cannot generate low-level, executable physical device simulation scripts. In actual TCAD modeling, engineers face more difficulties due to "physical non-convergence" during script runtime or abnormal device characteristic curves. Existing technologies generally lack a closed-loop iterative mechanism that can deeply understand the simulator's runtime logs and automatically adjust microscopic physical parameters accordingly.
[0006] In summary, existing technologies still suffer from significant technical deficiencies in handling the unique physical symmetry modeling of carbon nanotubes, accurate retrieval of complex TCAD-specific syntax, and automated iterative correction based on physical error reporting. Therefore, this invention aims to provide a TCAD modeling method for carbon nanotube devices based on hybrid retrieval and intelligent agent iteration to address these problems. Summary of the Invention
[0007] The purpose of this invention is to provide a TCAD modeling method for carbon nanotube devices based on hybrid retrieval and intelligent agent iteration. This invention constructs a local secure sandbox based on the Model Context Protocol (MCP), and utilizes a dual-path hybrid retrieval algorithm that combines character-level N-gram features and word-level semantic features to accurately recall non-natural language TCAD composite commands. At the same time, it constructs an intelligent agent adaptive iteration module, which automatically identifies error features such as physical non-convergence or N / P device characteristic asymmetry by monitoring the simulator's running logs in real time, and triggers closed-loop feedback of parameter correction and script regeneration based on semiconductor physics rules.
[0008] The above-mentioned technical objective of this invention is achieved through the following technical solution: a TCAD modeling method for carbon nanotube devices based on hybrid retrieval and intelligent agent iteration, comprising the following steps:
[0009] S1. Parse the user-input modeling instructions and extract the key physical parameters of the carbon nanotube device;
[0010] S2. Use a dual-path hybrid retrieval algorithm to retrieve relevant TCAD modeling syntax and physical model fragments from the local knowledge base. The dual-path hybrid retrieval algorithm includes parallel character-level feature retrieval pathways and word-level semantic retrieval pathways.
[0011] S3. Construct prompt words based on the retrieved fragments, generate an initial TCAD simulation script using a large language model, and call the local simulation tool to execute the script;
[0012] S4. Monitor the simulation tool's running log in real time. When a physical non-convergence error is detected or the electrical characteristics of the device do not meet the preset physical symmetry requirements, automatically extract the error features and trigger the iterative correction process until the simulation converges and the characteristics meet the requirements.
[0013] The present invention is further configured such that, in step S2, the specific execution process of the dual-path hybrid retrieval algorithm includes:
[0014] In the character-level feature retrieval pathway, a sliding window mechanism with a window size n of 2 to 4 is used to segment the query text, generating a character-level N-gram feature set. The TF-IDF weight vector is calculated, and the character-level cosine similarity S is calculated with the knowledge base documents. c In the aforementioned word-level semantic retrieval pathway, a domain-specific word segmenter is used to generate semantic word vectors, and their semantic cosine similarity S with the knowledge base documents is calculated. w The final score is calculated using a weighted fusion formula:
[0015]
[0016] in, Character-level cosine similarity S c The weight, S represents the semantic-level cosine similarity. w The weight, with a value range of . ;
[0017] If a knowledge base document is detected to contain all the key physical entities in the user's query, a preset enhancement coefficient is added to the document's score.
[0018] The present invention is further configured such that, in step S4, the iterative correction process includes:
[0019] Parse the runtime logs and extract key error feature strings; construct debugging query statements based on the error feature strings, and use the dual-path hybrid retrieval algorithm to retrieve the corresponding solution documents;
[0020] Based on the retrieved solution documents, automatically locate the parameter definition positions in the initial TCAD simulation script and perform parameter correction operations;
[0021] The parameter correction operations include at least: mesh density refinement, damping coefficient adjustment, or contact electrode work function fine-tuning.
[0022] The present invention is further configured such that, for the modeling scenario of carbon nanotube complementary devices, the iterative correction process also includes an N / P symmetry verification step:
[0023] Extract the on-state current and threshold voltage of the N-type and P-type devices from the simulation output, and calculate the absolute value deviation of their threshold voltages. If the deviation exceeds a preset threshold, automatically calculate the required work function compensation value based on the band symmetry of carbon nanotubes, and adjust the gate metal work function parameters of the N-type and P-type devices respectively.
[0024] The present invention is further configured such that, in step S3, generating the initial TCAD simulation script using a large language model includes:
[0025] A structured prompt context window is constructed, comprising a system instruction layer, a search enhancement context layer, and a user question layer. In the search enhancement context layer, Top-K knowledge fragments retrieved and anonymized in step S2 are filled in. In the system instruction layer, constraint instructions are configured to enable the large language model to annotate the sources of referenced knowledge fragments in the comments when generating code, and to only call the retrieved physical model definitions.
[0026] The present invention also provides a TCAD modeling system for carbon nanotube devices based on hybrid retrieval and intelligent agent iteration, including a carbon nanotube knowledge processing module, a hybrid retrieval and rearrangement engine, an intelligent agent adaptive iteration module and a protocol communication module;
[0027] The carbon nanotube knowledge processing module is used to construct a local dual-path hybrid index library containing character-level N-gram sparse indexes and word-level semantic indexes.
[0028] The hybrid retrieval and rearrangement engine is configured as the dual-path hybrid retrieval algorithm to retrieve TCAD syntax fragments from the local dual-path hybrid index library;
[0029] The intelligent agent adaptive iteration module is configured to generate TCAD scripts and drive the simulation tool to run, and is also configured to monitor the simulation tool's running logs and iteration correction process.
[0030] The protocol communication module, built on the Model Context Protocol (MCP), is used to connect the large language model with the agent's adaptive iteration module and perform file read and write operations within a local secure sandbox.
[0031] The present invention is further configured such that: the intelligent agent adaptive iteration module is also configured to: respond to the instruction to establish a long-channel device, autonomously construct a script command to define the device geometry based on the retrieved syntax template; wherein the autonomous construction includes setting the coverage coordinate range of the gate dielectric layer to establish an effective physical channel length, and automatically matching a drift-diffusion model or a ballistic transport model according to the physical channel length.
[0032] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements a TCAD modeling method for carbon nanotube devices based on hybrid retrieval and intelligent agent iteration.
[0033] In summary, the present invention has the following beneficial effects:
[0034] 1. This invention effectively solves the physical illusion problem in TCAD script generation by using a structured prompt word construction mechanism and retrieval enhancement strategy. On the one hand, it accurately retrieves carbon nanotube-specific physical models and grammatical fragments from the local knowledge base through dual-path hybrid retrieval, providing authoritative knowledge support for script generation. On the other hand, the system instruction layer's constraint instructions force the large language model to generate scripts only based on the retrieved knowledge fragments, and mark the source in the annotations. This mechanism avoids problems such as incorrectly applying silicon-based material parameters and fabricating physical models, ensuring that the generated simulation model conforms to the intrinsic physical properties of carbon nanotubes, and guaranteeing the physical rationality and guiding value of the simulation results.
[0035] 2. This invention addresses the challenge of retrieving numerous non-natural language compound commands in TCAD scripts. It achieves precise recall through a designed dual-path hybrid retrieval algorithm. The character-level N-gram feature retrieval path effectively captures the features of long compound commands without space separation, avoiding feature loss caused by traditional word segmentation techniques. The word-level semantic retrieval path ensures understanding of the domain's natural language requirements. The weighted fusion of these two approaches, along with the superposition of a key physical entity enhancement mechanism, significantly improves retrieval recall and accuracy. This solves the problem of insufficient adaptability of existing NLP retrieval methods to TCAD-specific syntax processing, laying the foundation for high-quality script generation.
[0036] 3. The intelligent agent adaptive iteration module of this invention constructs a closed-loop feedback mechanism based on simulation log monitoring, which completely changes the current situation of relying on manual debugging in existing technologies. By analyzing the running log in real time, it can automatically identify problems such as physical non-convergence and syntax errors, and use hybrid retrieval to quickly match solutions to achieve automated correction of parameters such as mesh density encryption and damping coefficient adjustment. For carbon nanotube complementary device scenarios, the newly added N / P symmetry verification step can automatically calculate the threshold voltage deviation. Based on the principle of band symmetry, it adaptively adjusts the gate metal work function to ensure that the on-state current and threshold voltage of N-type and P-type devices meet the symmetry requirements, which significantly improves the success rate and performance consistency of complementary logic gate modeling, while greatly reducing the debugging difficulty and time cost for engineers.
[0037] 4. This invention constructs a local security sandbox based on the Model Context Protocol (MCP), keeping the core carbon nanotube knowledge base, process documents, and index library locally, and only transmitting anonymized knowledge fragments to the cloud-based large model. This achieves the security requirement that core process data "does not leave the domain." The protocol communication module ensures standardized and secure data interaction between the large language model and the local intelligent agent module, effectively avoiding the risk of process data leakage under the existing cloud collaboration model, and adapting to the semiconductor industry's strict protection requirements for core technology intellectual property rights.
[0038] 5. This invention automates the entire process of TCAD modeling for carbon nanotube devices, from parsing user natural language commands and extracting parameters to script generation, simulation execution, and iterative correction. It eliminates the need for engineers to have extensive experience in TCAD script writing and semiconductor physical modeling. The intelligent agent can autonomously construct device geometry definition scripts and automatically match the corresponding transport model (drift-diffusion model or ballistic transport model) based on the channel length, significantly lowering the technical threshold for modeling. Simultaneously, the automated iterative correction mechanism reduces the number of repetitive simulations and manual adjustments, significantly shortening the R&D cycle of carbon nanotube devices, reducing fabrication costs, and improving the utilization efficiency of R&D resources. Attached Figure Description
[0039] Figure 1 This is an overall architecture diagram of a semiconductor simulation-aided modeling system based on Model Context Protocol (MCP) and a local security sandbox, as shown in Embodiment 1 of the present invention.
[0040] Figure 2 This is a flowchart of an agent adaptive iterative modeling process that integrates dual-path hybrid retrieval and error log backtracking mechanism in Embodiment 2 of the present invention;
[0041] Figure 3 This is a schematic diagram of a hybrid retrieval algorithm in Embodiment 3 of the present invention;
[0042] Figure 4 This is a structural diagram of an anti-hallucination prompt word construction method in Embodiment 4 of the present invention;
[0043] Figure 5 This is a simulation comparison chart of the transfer characteristics (Id-Vg) of N-type and P-type CNT-FETs in Embodiment 5 of the present invention. Detailed Implementation
[0044] The following is in conjunction with the appendix Figures 1-5 The present invention will be described in further detail below.
[0045] Example 1: A system architecture based on MCP and security sandbox
[0046] like Figure 1As shown, this embodiment provides a semiconductor simulation-aided modeling system based on the Model Context Protocol (MCP) and a local security sandbox. The system mainly includes the following modules:
[0047] User interaction layer (Client): Users initiate natural language modeling requests through this layer (e.g., "build a P-type CNTFET device").
[0048] AI Agent master control end: As the "brain" of the system, it is responsible for receiving user requests and calling tools through the JSON-RPC standard.
[0049] MCP Standard Protocol Interface Layer: This layer serves as the core bridge connecting large models and local tools, ensuring standardized data transmission.
[0050] Local Modeling Assistance System (MCP Server): Deployed in the user's local environment (or a trusted private cloud), it includes a core security isolation sandbox.
[0051] Heterogeneous document parsing engine: used to read and clean TCAD raw process documents (such as PDF manuals and .cmd script files) and convert them into an indexable text stream.
[0052] Hybrid retrieval and reordering engine: This is the core retrieval unit of the system. It is responsible for finding the most relevant physical model fragments in the local feature index library and transmitting only the de-identified fragments to the large model in the cloud.
[0053] Local knowledge residency layer: includes "TCAD original process document library" and "local feature index library" to ensure that core process data does not leave the domain.
[0054] Simulation execution environment: Directly connects to the TCAD simulation tool, receives the generated scripts, and runs them.
[0055] Example 2: An Adaptive Iterative Modeling Process for Intelligent Agents
[0056] like Figure 2 As shown, this embodiment provides an agent adaptive iterative process that integrates dual-path hybrid retrieval and error log backtracking mechanism. This process describes how the system starts from user instructions and completes high-quality modeling through closed-loop feedback. The specific steps include:
[0057] Step S201: Intent Analysis and Script Generation. After the user starts the task, the AI Agent first analyzes the user's intent and calls the hybrid retrieval engine (the specific algorithm principle is shown in Example 3) to obtain Top-N knowledge fragments. Subsequently, after DeepSeek semantic rearrangement, the Top-K context is obtained, and a Prompt containing physical constraints is constructed to guide the LLM to generate the initial .cmd script file.
[0058] Step S202: Generating and Executing the Agent Execution Controller receives the generated script and calls the system terminal to drive the TCAD simulation environment to run the script.
[0059] Step S203: Execution result judgment and loop closure. The system receives the operation log (Log) returned by TCAD in real time and performs result judgment:
[0060] Path 1 (Success): If the simulation log shows that the task has ended normally (Job Done) and the extracted electrical characteristics (such as the Id-Vg curve) meet the physical expectations, then it is determined that "modeling is complete" and the final result is output;
[0061] Path 2 (Failure / Non-convergence): If the process fails (e.g., an Error appears in the Log or convergence divergence occurs), the process proceeds to... Figure 2 The error log backtracking path shown on the right is as follows:
[0062] Error log analysis: The system automatically parses the log file and extracts key error characteristics (such as Convergence failure in Poisson or Syntax error at line 45).
[0063] Constructing Debug Queries: The Agent transforms the extracted error features into new retrieval queries (e.g., "grid strategies for solving non-convergence of the Poisson equation").
[0064] Covering error message lookup: utilizing Figure 2 The feedback path shown by the dashed line calls the hybrid search engine again to specifically search for solutions to this error (such as searching for relevant documents on "mesh refinement" or "damping coefficient").
[0065] Code regeneration and retry: Based on the new search results, the Agent corrects the physical parameters or grid settings in the script, regenerates the script, and returns to step S202 for execution, forming an adaptive closed loop.
[0066] Example 3: Specific Implementation Process of a Hybrid Retrieval Algorithm
[0067] like Figure 3 As shown, in order to support the high-precision retrieval in Example 2, and especially to solve the problem of feature loss of non-natural language symbols (such as hyphen commands and physical parameter abbreviations) in TCAD scripts in traditional word segmentation retrieval, this example designs a dual-path hybrid retrieval algorithm. The specific processing flow of this algorithm is as follows:
[0068] Step S301: The query preprocessing system first receives the query input by the user and performs unified text normalization processing.
[0069] Step S302: Dual-path parallel feature extraction as follows Figure 3 As shown in the middle section, the system distributes the processed text to two parallel paths:
[0070] Path A: Character-level feature extraction;
[0071] To capture long compound commands in TCAD scripts, this approach abandons space-based word segmentation and adopts a sliding window mechanism. Let the sliding window size be n (e.g., ...). Figure 3 As shown, preferred For a text sequence T, its character-level N-gram feature mapping function Φchar(T) is defined as:
[0072]
[0073] in, Represents the generated first Each feature segment (gram); Representing text One of the characters; This indicates the index of the current character within the text. This represents the size of the sliding window, which is N in N-gram.
[0074] Subsequently, the generated N-gram features are vectorized using TF-IDF. For feature term g... i Its weight W char (g i The calculation formula is as follows:
[0075]
[0076] Where gi represents the i-th N-gram feature; The query statement (Query) entered by the user; f(gi,Q) represents the feature gi in the query. Frequency (number of times) it appears in; For query The total length; Let be the total number of documents in the database; D is the set of all documents. Let be a document in the set; {d∈D:gi∈d} is a set representing all documents containing feature gi; +1 is a smoothing term to avoid the denominator being zero when there are no query results; this formula indicates that if a feature appears more frequently in this query (high TF) and less frequently in other documents in the entire database (high IDF), then the feature weight is higher. The more important it is.
[0077] Finally, the cosine similarity between the query and the document in the character space is calculated and denoted as S. c (Right now Figure 3 S in c ).
[0078] Path B: Word-level feature extraction. The system uses a specialized terminology segmenter (integrating Jieba segmentation and the semiconductor domain dictionary Domain Dict) to process text and identify specialized semantic terms. After TF-IDF vectorization, the cosine similarity between the query and the document in the semantic space is calculated, denoted as S. w (Right now Figure 3 S in w ).
[0079] Step S303: Weighted fusion.
[0080] like Figure 3 As shown in the "Weighted Fusion Module" on the right, to balance the precise matching of physical symbols (path A) and the semantic understanding of natural language (path B), the system linearly weights the similarities of the two paths. The final hybrid retrieval score is calculated as follows:
[0081]
[0082] in, Character-level cosine similarity S c The weight, S represents the semantic-level cosine similarity. w The weight, with a value range of .
[0083] according to Figure 3 In the illustrated embodiment, weighting coefficients are set to enhance semantic understanding while also considering symbol matching. ,Right now:
[0084]
[0085] The system generates a preliminary ranking list (Top-N) based on the score S.
[0086] Step S304: Semantic rearrangement.
[0087] like Figure 3 As shown at the bottom, in order to further improve accuracy, the system introduces the DeepSeek semantic reordering model to perform deep semantic relevance scoring on the Top-N results, and finally outputs the Top-K results as the material for building the Prompt.
[0088] Example 4: A Prompt Construction Structure for Anti-Hallucination Prompts
[0089] like Figure 4 As shown, to prevent large language models from generating TCAD scripts and thus creating "illusions" (i.e., fabricating non-existent physical parameters or commands), this embodiment designs a structured Prompt context window construction method. This method strictly divides the input model's prompts into three logical levels:
[0090] System Prompt Layer: This layer, located at the beginning of the Prompt, defines the role, behavior, and boundary constraints of the AI Agent. In this embodiment, the system instruction is set as follows: "You are a rigorous semiconductor TCAD simulation expert. You must strictly generate code based on the 'retrieve enhanced context' provided below. If the context information is insufficient to support modeling, please directly answer 'insufficient data,' and fabricating physical parameters is strictly prohibited. All generated lines of code must indicate the source documents they reference in the comments..." Through the constraints of Prompt, the LLM is required to operate according to a pre-designed workflow, including calling the MCP tool to query the RAG database, subdividing the predetermined task into sub-tasks and proposing verification criteria, and creating a work log to ensure that the LLM model does not deviate from the original predetermined goal under long-term processes.
[0091] Retrieval Enhancement Context Layer (RAG Context Layer): This layer is the core of the Prompt. The system fills in the Top-K knowledge fragments (e.g., K=3) output after hybrid retrieval and rearrangement in Example 3, ranked from highest to lowest relevance score. Each knowledge fragment is encapsulated in a standard format, including Source (source file, such as sdevice_manual.pdf), Score (relevance score, such as 0.92), and Text (specific content, such as "carbon nanotube mobility model definition..."). During the construction of this layer, the MCP Server automatically filters out sensitive paths or confidential metadata in the original document, retaining only the physical model description.
[0092] The User Query Layer, located at the end of the Prompt, contains the user's specific modeling instructions. Through the constraints of this three-layer structure, the attention mechanism of the large language model is forced to focus on the middle "retrieval enhancement context layer" when generating code, thus significantly reducing the incidence of logical errors.
[0093] Example 5: A Device Simulation Verification and Physical Characteristic Analysis Experiment Based on Intelligent Construction Scripts
[0094] like Figure 5 As shown in the figure, this embodiment demonstrates how the system responds to a user's natural language modeling request, autonomously constructs an SDE model by querying the local knowledge base through hybrid retrieval, and drives the simulator to run the generated device performance parameters and physical characteristic analysis results. The specific process is as follows:
[0095] Intelligent Construction and Geometric Definition of Modeling Script: The system first receives the user's instruction to "construct a carbon nanotube complementary logic device" and searches for the SDE syntax template of the CNT device in the local feature index library through a dual-path hybrid search engine. Based on the search results, the agent autonomously constructs the SDE geometric definition command, setting the physical length of the carbon nanotube channel to 1.25 μm; and setting the gate dielectric coverage range to 0.15 μm to 1.1 μm on the X-axis, thereby establishing the effective channel length (L). g The diameter is 0.95 μm, and 0.15 μm of source / drain extension regions are automatically reserved on both sides. Based on the above-mentioned self-generated geometric parameters, the system determines that the structure belongs to the category of long-channel devices, and automatically configures the transport model of drift-diffusion and quantum correction coupling accordingly.
[0096] Simulation results: After running the script constructed above through TCAD simulation, the system outputs the key electrical parameters of the N-type and P-type devices as shown in Table 1:
[0097] Table 1. Results of Key Electrical Parameters in Field-Effect Transistor Simulation
[0098]
[0099] Analysis of Physical Rationality and Technical Effect: Based on the above simulation data, the simulation results show that the device switching ratio reaches 10. 12 The magnitude is extremely low, and the off-state current is very low (10). -10 (Level A). This result strongly demonstrates that the modeling and mesh generation of the 0.95 μm channel CNT-FET constructed by the system are physically correct, direct tunneling between the source and drain is effectively suppressed, and the excellent switching characteristics prove that the system's control over geometric parameters during the script construction stage is precise. Furthermore, comparative data shows that the on-state current ratio of N-type to P-type CNT-FETs is approximately 1.25:1, and the absolute value deviation of the threshold voltage is only 0.074V. This indicates that when constructing the script, the agent not only correctly generated the geometric commands but also accurately matched the work function parameters of 4.7eV and 5.3eV for N-type and P-type devices, respectively, by searching the database. This high degree of symmetry proves that the system has the ability to generate complex material physical constraints, solving the problem of device performance mismatch often caused by parameter confusion in traditional manually written scripts.
[0100] In conclusion, Figure 5The experimental data in this embodiment show that the present invention not only has powerful retrieval capabilities, but also can actively construct TCAD modeling code that conforms to the laws of semiconductor physics and has both high convergence and high performance indicators based on the retrieved knowledge.
[0101] Example 6: An electronic device for TCAD modeling of carbon nanotube devices based on hybrid retrieval and intelligent agent iteration, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the processes and systems in Examples 1 to 5, including parsing user-inputted modeling instructions and extracting key physical parameters of the carbon nanotube device; using a dual-path hybrid retrieval algorithm to retrieve relevant TCAD modeling syntax and physical model fragments from a local knowledge base, the dual-path hybrid retrieval algorithm including parallel character-level feature retrieval pathways and word-level semantic retrieval pathways; constructing prompt words based on the retrieved fragments, generating an initial TCAD simulation script using a large language model, and calling a local simulation tool to execute the script; monitoring the simulation tool's running log in real time, and automatically extracting error features and triggering an iterative correction process when a physical non-convergence error or a device electrical characteristic not meeting the preset physical symmetry requirements is detected, until the simulation converges and the characteristics meet the requirements.
[0102] This specific embodiment is merely an explanation of the present invention and is not intended to limit the invention. After reading this specification, those skilled in the art can make modifications to this embodiment without contributing any inventive step, but such modifications are protected by patent law as long as they are within the scope of the claims of the present invention.
Claims
1. A TCAD modeling method for carbon nanotube devices based on hybrid retrieval and intelligent agent iteration, characterized in that: Includes the following steps: S1. Parse the user-input modeling instructions and extract the key physical parameters of the carbon nanotube device; S2. Use a dual-path hybrid retrieval algorithm to retrieve relevant TCAD modeling syntax and physical model fragments from the local knowledge base. The dual-path hybrid retrieval algorithm includes parallel character-level feature retrieval pathways and word-level semantic retrieval pathways. S3. Construct prompt words based on the retrieved fragments, generate an initial TCAD simulation script using a large language model, and call the local simulation tool to execute the script; S4. Monitor the simulation tool's running log in real time. When a physical non-convergence error is detected or the electrical characteristics of the device do not meet the preset physical symmetry requirements, automatically extract the error features and trigger the iterative correction process until the simulation converges and the characteristics meet the requirements.
2. The TCAD modeling method for carbon nanotube devices based on hybrid retrieval and intelligent agent iteration according to claim 1, characterized in that: In step S2, the specific execution process of the dual-path hybrid retrieval algorithm includes: In the character-level feature retrieval pathway, a sliding window mechanism with a window size n of 2 to 4 is used to segment the query text, generating a character-level N-gram feature set. The TF-IDF weight vector is calculated, and the character-level cosine similarity S is calculated with the knowledge base documents. c In the aforementioned word-level semantic retrieval pathway, a domain-specific word segmenter is used to generate semantic word vectors, and their semantic cosine similarity S with the knowledge base documents is calculated. w The final score is calculated using a weighted fusion formula: in, Character-level cosine similarity S c The weight, S represents the semantic-level cosine similarity. w The weight, with a value range of . ; If a knowledge base document is detected to contain all the key physical entities in the user's query, a preset enhancement coefficient is added to the document's score.
3. The TCAD modeling method for carbon nanotube devices based on hybrid retrieval and intelligent agent iteration according to claim 1, characterized in that: In step S4, the iterative correction process includes: Parse the runtime logs and extract key error feature strings; construct debugging query statements based on the error feature strings, and use the dual-path hybrid retrieval algorithm to retrieve the corresponding solution documents; Based on the retrieved solution documents, automatically locate the parameter definition positions in the initial TCAD simulation script and perform parameter correction operations; The parameter correction operations include at least: mesh density refinement, damping coefficient adjustment, or contact electrode work function fine-tuning.
4. The TCAD modeling method for carbon nanotube devices based on hybrid retrieval and intelligent agent iteration according to claim 3, characterized in that: For the modeling scenario of carbon nanotube complementary devices, the iterative correction process also includes an N / P symmetry verification step: Extract the on-state current and threshold voltage of the N-type and P-type devices from the simulation output, and calculate the absolute value deviation of their threshold voltages. If the deviation exceeds a preset threshold, automatically calculate the required work function compensation value based on the band symmetry of carbon nanotubes, and adjust the gate metal work function parameters of the N-type and P-type devices respectively.
5. The TCAD modeling method for carbon nanotube devices based on hybrid retrieval and intelligent agent iteration according to claim 1, characterized in that: In step S3, generating the initial TCAD simulation script using the large language model includes: A structured prompt context window is constructed, comprising a system instruction layer, a search enhancement context layer, and a user question layer. In the search enhancement context layer, Top-K knowledge fragments retrieved and anonymized in step S2 are filled in. In the system instruction layer, constraint instructions are configured to enable the large language model to annotate the sources of referenced knowledge fragments in the comments when generating code, and to only call the retrieved physical model definitions.
6. A carbon nanotube device TCAD modeling system based on hybrid retrieval and intelligent agent iteration, applied to the carbon nanotube device TCAD modeling method based on hybrid retrieval and intelligent agent iteration as described in any one of claims 1-5, characterized in that: It includes a carbon nanotube knowledge processing module, a hybrid retrieval and rearrangement engine, an agent adaptive iteration module, and a protocol communication module; The carbon nanotube knowledge processing module is used to construct a local dual-path hybrid index library containing character-level N-gram sparse indexes and word-level semantic indexes. The hybrid retrieval and rearrangement engine is configured as the dual-path hybrid retrieval algorithm to retrieve TCAD syntax fragments from the local dual-path hybrid index library; The intelligent agent adaptive iteration module is configured to generate TCAD scripts and drive the simulation tool to run, and is also configured to monitor the simulation tool's running logs and iteration correction process. The protocol communication module, built on the Model Context Protocol (MCP), is used to connect the large language model with the agent's adaptive iteration module and perform file read and write operations within a local secure sandbox.
7. The TCAD modeling system for carbon nanotube devices based on hybrid retrieval and intelligent agent iteration according to claim 6, characterized in that: The intelligent agent adaptive iteration module is further configured to: respond to the instruction to establish a long-channel device, autonomously construct script commands that define the device geometry based on the retrieved syntax template; wherein the autonomous construction includes setting the coverage coordinate range of the gate dielectric layer to establish an effective physical channel length, and automatically matching a drift-diffusion model or a ballistic transport model according to the physical channel length.
8. An electronic device for TCAD modeling of carbon nanotube devices based on hybrid retrieval and intelligent agent iteration, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, it implements a TCAD modeling method for carbon nanotube devices based on hybrid retrieval and agent iteration as described in any one of claims 1-5.