Method and system for selecting a circuit model from a database of circuit models
Patent Information
- Application Number
- CN202610229958.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2026-02-23
- Filing Date
- 2026-02-26
- Publication Date
- 2026-08-28
AI Technical Summary
随着有经验的设计者走向新的机会,留下新的雇员来浏览数十年积累的知识,这种困难由于流失而加剧
[0009] RAG enhances knowledge-based recommender systems by integrating information retrieval and text generation. This method leverages external knowledge sources to provide accurate, context-relevant, and up-to-date recommendations. By combining retrieval mechanisms with generative models, RAG systems can offer more precise and customized suggestions, improving user satisfaction and decision-making in specialized domains.
Smart Images

Figure CN122655652A_ABST
Abstract
Description
Related applications
[0001] This application claims the benefit of U.S. Provisional Application No. 63 / 763,832, filed February 26, 2025. The entire teachings of the foregoing application are incorporated herein by reference. Technical Field
[0002] This application relates to computer-based methods. Specifically, it relates to methods for selecting basic building block models from a trained dataset of basic building blocks. Background Technology
[0003] Integrated circuit (IC) design is a complex and challenging process involving the collaborative efforts of hundreds of engineers over several years. Early design decisions, including architecture, microarchitecture, register-transfer-level (RTL) implementation, and physical design choices, can significantly impact the success or failure of a project. To mitigate potential problems later in the design cycle, design teams have developed methodologies and best practices for the IC design process.
[0004] Key aspects of this traditional knowledge are embedded in foundational RTL modules, such as, but not limited to, FIFOs, counters, and credit counters. Over the years, the team has created hundreds of such modules, each with varying complexity. The foundational RTL model incorporates traditional knowledge, providing a reliable starting point for new designs and ensuring consistency, reliability, and efficiency in the design process. Many IC design teams use Verilog as their primary language. ICs are constructed hierarchically, architected from top to bottom and implemented from bottom to top, with foundational components extensively reused across different paths and leaves of the hierarchical structure. Key physical design features, such as timing, area, and delay, are heavily dependent on the Verilog implementation. Each sub-component in the hierarchy affects these features and must be selected based on high-level requirements. Therefore, choosing the correct components at each level is crucial and time-consuming.
[0005] Even for senior engineers, identifying the best legacy RTL module from a vast array of options is a challenge. This difficulty is exacerbated by attrition as experienced designers move on to new opportunities, leaving new employees to navigate decades of accumulated knowledge. Consequently, many new engineers end up reinventing the wheel or opting for a suboptimal module. Summary of the Invention
[0006] The embodiments described herein relate to a computer-based method for selecting (alternatively, referred to herein as "recommendation") basic building block models from a trained dataset of basic building blocks. Such a system for recommending basic RTL modules from a large pool of basic RTL modules can save significant engineering study time and result in RTL module selection based on reliable component data. A good recommendation system is crucial for the success of the entire IC design process.
[0007] Knowledge-based recommender systems use domain-specific knowledge to provide customized suggestions, allowing for precise control over search criteria. Unlike traditional systems that rely on historical user data, these systems ensure that recommendations are closely aligned with user preferences. By balancing similarity and diversity, such systems enhance the user experience in specialized applications.
[0008] Retrieval-Enhanced Generation (RAG) is an advanced technique that combines information retrieval with text generation to enhance the capabilities of Large Language Models (LLMs). By integrating external knowledge sources, RAG systems can generate accurate, context-relevant, and up-to-date responses. This method optimizes the output of the LLM by referencing authoritative knowledge bases, ensuring that the generated content is both accurate and reliable. RAG is particularly useful in applications where maintaining the relevance and accuracy of information is critical, such as in chatbots, recommender systems, and other natural language processing tasks.
[0009] RAG enhances knowledge-based recommender systems by integrating information retrieval and text generation. This method leverages external knowledge sources to provide accurate, context-relevant, and up-to-date recommendations. By combining retrieval mechanisms with generative models, RAG systems can offer more precise and customized suggestions, improving user satisfaction and decision-making in specialized domains.
[0010] In one aspect, the present invention may be a computer method for selecting basic building block models from a trained dataset of basic building block models, including performing a semantic similarity search on the trained dataset based on user specifications to generate a candidate set of basic building block models. Specifications may be fed to the training dataset via initial prompts. The method may further include: combining the initial prompts from the user with the candidate set of basic building block models to generate enhanced prompts; submitting the enhanced prompts to a major large language model (LLM); and receiving, from the major LLM, a priority-ordered classification of the final set of basic building block candidates generated at least in part based on user specifications.
[0011] The method may also include performing multi-level reordering on the candidate set of underlying building block models. The method may also include performing a first level of multi-level reordering using an encoder (such as, but not limited to, a dual encoder) and a second level of multi-level reordering using a cross encoder. The method may also include iteratively prompting the user to the master LLM to further refine the selection of underlying building block models. The method may also include performing a semantic similarity search on a trained dataset using one or more encoders (such as, but not limited to, a dual encoder). In one embodiment, the dual encoder may also include a cascade of one or more consecutive dual encoders, and the cross encoder may also include a cascade of one or more consecutive cross encoders. The cascade of one or more consecutive dual encoders may include, but is not limited to, one or more of the following: (i) All-miniLM-L6, (ii) Baai-Bge-small, (iii) Baai-Bge-Large, (iv) Mpnet, (v) Roberta-base, or (vi) Spector. The cascading of one or more consecutive cross encoders may include, but is not limited to, one or more of the following: (i) Electra-base, (ii) MiniLM-L-12, (iii) MiniLM-L-6, (iv) MiniLM-L-4 or (v) TinyBERT-L-4.
[0012] The method may also include training the trained dataset through the following steps: (i) cleaning the initial dataset of the basic building block model to eliminate duplicate versions of the basic building block model; (ii) summarizing each cleaned entry of the dataset of the basic building block model using the trained LLM; (iii) converting each cleaned, summarized entry of the dataset of the basic building block model into a structured format; and (iv) encoding the cleaned, summarized, and formatted basic building block model into a vector using a dual encoder. The priority-ordered classification of the final set of basic building block candidates also includes a description of one or more features of the final set of basic building block candidates related to the user specification.
[0013] In another aspect, the present invention may be a system for selecting basic building block models from a trained dataset of basic building block models, comprising a processor and a memory thereon storing computer code instructions. The memory may be operatively coupled to the processor such that, when executed by the processor, the computer code instructions cause the system to perform a semantic similarity search of the trained dataset based on user specifications to generate a candidate set of basic building block models, the specifications being fed to the trained dataset via initial prompts, combining the initial prompts from the user with the final set of basic building block model candidates to generate enhanced prompts, submitting the enhanced prompts to a primary large language model (LLM), and receiving, from the primary LLM, a priority-ordered classification of the final set of basic building block candidates generated at least in part based on user specifications.
[0014] The computer code instructions can also enable the system to perform multi-level reordering of the candidate set of the basic building block model. The computer code instructions can also enable the system to perform a first level of multi-level reordering using a first encoder and a second level of multi-level reordering using a second encoder, wherein the first encoder and the second encoder may be of the same type or different types. The computer code instructions can also enable the system to perform the first level of multi-level reordering using dual encoders. The computer code instructions can also enable the system to perform the second level of multi-level reordering using a cross encoder.
[0015] The computer code instructions can also enable the system to perform the first level of multi-level reordering using a dual encoder and the second level of multi-level reordering using a cross encoder. The system can iteratively prompt the main LLM in response to the user to further refine the selection of the underlying building block models. The computer code instructions can also enable the system to perform a semantic similarity search of the training database using one or more dual encoders. The dual encoders can also include a cascade of one or more consecutive dual encoders, and the cross encoders can also include a cascade of one or more consecutive cross encoders. The cascade of one or more consecutive dual encoders can include, but is not limited to, one or more of the following: (i) All-miniLM-L6, (ii) Baai-Bge-small, (iii) Baai-Bge-Large, (iv) Mpnet, (v) Roberta-base, or (vi) Spector. The cascade of one or more consecutive cross encoders can include, but is not limited to, one or more of the following: (i) Electra-base, (ii) MiniLM-L-12, (iii) MiniLM-L-6, (iv) MiniLM-L-4, or (v) TinyBERT-L-4. To train the training dataset, (i) the initial dataset of the basic building block model can be cleaned to eliminate duplicate versions of the basic building block model, (ii) each cleaned entry in the dataset of the basic building block model can be trained using a training LLM, (iii) each cleaned, generalized entry in the dataset of the basic building block model can be converted into a structured format, and (iv) the cleaned, generalized, and formatted basic building block model can be encoded into vectors using a dual encoder. The priority-ordered classification of the final set of basic building block candidates may also include a description of one or more features of the final set of basic building block candidates related to the user specification. Attached Figure Description
[0016] The patent or application document contains at least one color drawing.
[0017] As illustrated in the accompanying drawings, the above will become apparent from the following more detailed description of exemplary embodiments, in which the same reference numerals denote the same parts in different views. The drawings are not necessarily drawn to scale, but rather focus on illustrating the embodiments.
[0018] Figure 1 An example embodiment of the process used for training a dataset is illustrated.
[0019] Figure 2 An exemplary architecture for evaluating the effectiveness of reordering is shown.
[0020] Figure 3 It shows that it can be used based on Figure 2The architecture shown is an example interface for selecting multiple combinations of dual encoder and cross encoder models.
[0021] Figure 4 An example workflow of the recommendation system of the described embodiment is illustrated.
[0022] Figure 5 The user interface of an example recommendation system is shown.
[0023] Figure 6 The results obtained by evaluating the cue using each candidate dual encoder model are shown.
[0024] Figure 7 and Figure 8 A comparison of each dual encoder model with different cross encoder combinations is provided. Detailed Implementation
[0025] The example embodiment is described below.
[0026] The embodiments described herein relate to a computer-based method for selecting (also referred to herein as a recommendation) basic building block models from a trained dataset of basic building blocks.
[0027] The dataset was initially generated by extracting information from two sources. The first source was an existing library of register-transfer level (RTL) underlying models implemented in hardware description languages such as Verilog or VHDL. The second source was the microarchitecture documentation associated with each RTL model (available, for example, on team collaboration tools like Confluence). While the example embodiments described herein utilize RTL models associated with an integrated circuit design environment, any family of underlying models may optionally be used.
[0028] This example dataset can include comprehensive details from two sources to provide a combined view of relevant information for each base model. Those comprehensive details could include: clan The RTL model implements its own family (e.g., FIFO, arbitrator, counter, etc.). Input / Output List of inputs and outputs for the RTL model. parameter Parameters associated with the model. describe A summary of the model. Operational Theory Microstructural insights, including finite state machines (FSMs), timing diagrams, and logic design details. Physical implementation details Details regarding aspects such as area, logic levels, combinational cell count, sequential cell count, and power consumption.
[0029] Figure 1 The illustration shows an example embodiment of the process used for training the dataset. Training begins with cleaning the dataset (102) to eliminate duplicate versions of the RTL model. Long descriptions are transformed (104) into concise summaries using the generalization capabilities of a Large Language Model (LLM), preserving key aspects of the RTL model. The processed text is first converted (106) to JavaScript Object Notation (JSON) format, and then passed through one or more dual encoders (108), which encode the dataset into vectors. These vectors are stored and managed in a vector database (110) using, for example, ChromaDB.
[0030] To ensure optimal performance, multiple dual encoders are used in the process, such as, but not limited to, All-miniLM-L6, Baai-Bge-small, Baai-Bge-Large, Mpnet, Roberta-base, and Spector, to facilitate the selection of the best encoder.
[0031] In such matters Figure 1 After creating the vector database as described, a cross-encoder is integrated to reorder the search results generated by the dual encoders based on their relevance to a given query, as shown in the figure. The cross-encoder used for pattern selection can be, but is not limited to, Electra-base, MiniLM-L-12, MiniLM-L-6, MiniLM-L-4, and TinyBERT-L-4.
[0032] To evaluate the effectiveness of the reordering, results are extracted at two levels: such as Figure 2 As shown, one set of results from the dual encoder 202 is referred to as Retrieval JSON 204, while another set of results from the cross encoder 206 is referred to as Reordered JSON 208. Furthermore, we preserve the baseline JSON, which includes the best results from various hints used during model selection. Scores are calculated to select the most suitable model by comparing Retrieval JSON 204 and Reordered JSON 208 with the baseline JSON.
[0033] Figure 3 It shows that it can be used based on Figure 2 The example interface shown illustrates the architecture for selecting multiple combinations of dual encoder and cross encoder models and displaying the results. In this example, Specter is selected for dual encoder model 302, MiniLM-L-6 is selected for cross encoder model 304, and Claude-3-Sonnet is selected for LLM model 306 for summarization.
[0034] Once appropriate dual encoders and cross-encoders are determined, a multi-level reordering approach is employed to enhance reordering performance. This approach uses fast reordering in the first level, followed by precise reordering in the second. Fast reordering models (e.g., dual-encoder models) are simple and fast, quickly reducing large datasets of vectors to smaller sets. Precise reordering models (e.g., cross-encoder models) aim to improve fast ordering by ensuring the results are as relevant and accurate as possible. Precise reordering models take a smaller subset of the results generated in the fast reordering stages and apply a more advanced, computationally intensive model to precisely evaluate their relevance.
[0035] The workflow of a recommendation system is as follows: Figure 4 As shown, the dual encoder performs semantic search 402 by measuring the semantic similarity between the user query 404 and the text embeddings stored in the vector database 406. This yields an initial set of recommendations 408, which are passed to a multi-level re-ranking 410 to improve RTL module selection. The retrieved information 412 is integrated into the original prompts for prompt enhancement 414. This enhanced prompt 416 is then passed to a large language model (LLM) 418 to produce a more informative and context-accurate response for RTL recommendations 420.
[0036] Figure 5 The user interface of a sample recommender system is shown, which allows the user to select an LLM and enter a query describing the RTL module the user is searching for. The sample recommender system then provides recommendations for the top five most relevant RTL modules.
[0037] To evaluate the effectiveness of the example recommendation system, a series of assessments were conducted using a variety of prompts covering diverse user needs. These tests aimed to examine the system's ability to generate basic module suggestions based on the output generated in response to different user prompts.
[0038] To evaluate performance, a baseline dataset was built that included user queries and the corresponding correct model selection. Scores for re-ranking and non-re-ranking tests were calculated by comparing model recommendations to the baseline data.
[0039] The performance of the example recommender system is evaluated by comparing ranking-based methods (single-level ranking) with re-ranking-based methods (multi-level ranking). Initially, user queries using a dual encoder are evaluated to obtain baseline results (i.e., without re-ranking). Subsequently, the dual-encoder recommendations are re-ranked using a cross-encoder for multi-level ranking. Test results show that re-ranking significantly improves the quality of recommendations.
[0040] These tests were designed to determine the optimal recommendation for basic modules, and to determine the top five recommendations for basic modules. Without reordering, in Figure 6The results obtained by evaluating the prompts using all dual encoder models are shown. As shown, the optimal models for this case are, but not limited to, Baai-Bge-Small 602, Baai-Bge-Large 604, and Mpnet 606.
[0041] To further improve the system's accuracy, a cross-encoder was implemented after the dual encoders to better meet user needs and preferences. Testing involved running the data through each dual encoder and then using each cross-encoder to refine the results. Based on the test results, the most effective cross-encoder was the MiniLM-L6, which achieved the highest score among all dual encoder models. Figure 7 and Figure 8 The charts in the diagram show a comparison of each dual-encoder model with different combinations of cross-encoders. The top combinations of dual encoders and cross-encoders are Baai-Bge-Large, Baai-Bge-Small, All-MiniLM-L6, and Mpnet. Therefore, the tests show that the re-ranking method significantly improves the quality of the recommendations.
[0042] Table I shows the results of single-level sorting compared to the multi-level sorting scores of all dual encoder models with the cross-encoder model All-MiniLM-L6. Table I
[0043] A score is calculated by comparing the predicted recommendations to a baseline record. For each prompt, a correct match is considered to be made if at least one of the five predicted results matches any value in the baseline. The final score is determined as the percentage of correct matches relative to the total number of prompts.
[0044] The embodiments described herein relate to an AI-driven recommendation system designed to assist RTL engineers in selecting the most suitable base RTL modules. By integrating Retrieval Augmentation Generation (RAG) with dual encoders and cross encoders, we develop an efficient framework for automating the retrieval, ranking, and recommendation of RTL components based on user-defined specifications. Our approach significantly reduces the manual effort involved in module selection while improving accuracy and consistency in the design process.
[0045] The results demonstrate that utilizing dual encoders, such as but not limited to All-MiniLM-L6, Baai-Bge-Large, and MPNet, followed by re-ranking based on cross-encoders improves recommendation accuracy. As shown in our analysis, models incorporating re-ranking outperform those relying solely on dual encoder retrieval, resulting in finer selection of RTL modules. This evaluation further demonstrates that the All-MiniLM-L6 model combined with a cross-encoder achieves the highest level of performance.
[0046] Furthermore, integrating multimodal learning techniques, including schematic and waveform-based embeddings, improves the contextual understanding of RTL components and further enhances recommendation accuracy. Expanding the dataset to include more diverse RTL libraries and real-world user feedback also enhances the system's adaptability.
[0047] AI-driven design can be extended to the automation of semiconductor development. As AI models continue to evolve, integrating generative AI with hardware design tools is becoming increasingly critical in optimizing chip design. This research lays the foundation for future AI-assisted RTL automation frameworks, aiming to simplify verification processes, reduce development costs, and accelerate chip design innovation.
[0048] While exemplary embodiments have been specifically shown and described, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of the embodiments covered by the appended claims.
Claims
1. A computer method for selecting a basic building block model from a trained dataset of basic building block models, comprising: Semantic similarity search is performed on the trained dataset based on user specifications to generate a candidate set of basic building block models, the specifications being conveyed to the trained dataset through initial prompts; The initial prompt from the user is combined with the candidate set of the basic building block model to generate an enhanced prompt; The enhanced suggestion is submitted to the main large language model LLM; as well as The primary LLM receives a priority-ordered classification of the final set of candidates for the basic building blocks, generated at least in part based on the specifications from the user.
2. The method according to claim 1 further includes performing a multi-level reordering of the candidate set of the basic building block model.
3. The method of claim 2, further comprising performing a first level of the multi-level reordering using a first encoder and performing a second level of the multi-level reordering using a second encoder, wherein the first encoder and the second encoder may be of the same type or different types.
4. The method of claim 3, wherein the first encoder is a dual encoder.
5. The method of claim 3, wherein the second encoder is a cross encoder.
6. The method of claim 3, wherein the first encoder is a dual encoder and the second encoder is a cross encoder.
7. The method of claim 1, further comprising the user iteratively prompting the primary LLM to further refine the selection of the underlying building block model.
8. The method of claim 1, further comprising performing the semantic similarity search of the trained dataset using one or more dual encoders.
9. The method of claim 6, wherein the dual encoder further comprises a cascade of one or more consecutive dual encoders, and the cross encoder further comprises a cascade of one or more consecutive cross encoders.
10. The method of claim 9, wherein the cascading of the one or more consecutive dual encoders comprises one or more of the following: (i) All-miniLM-L6, (ii) Baai-Bge-small, (iii) Baai-Bge-Large, (iv) Mpnet, (v) Roberta-base, or (vi) Spector.
11. The method of claim 9, wherein the cascading of the one or more consecutive cross encoders comprises one or more of the following: (i) Electra-base, (ii) MiniLM-L-12, (iii) MiniLM-L-6, (iv) MiniLM-L-4, or (v) TinyBERT-L-4.
12. The method of claim 1, further comprising training the trained dataset by: (i) cleaning the initial dataset of the basic building block model to eliminate duplicate versions of the basic building block model; (ii) summarizing each cleaned entry of the dataset of the basic building block model using a trained LLM; (iii) converting each cleaned, summarized entry of the dataset of the basic building block model into a structured format; and (iv) encoding the cleaned, summarized, and formatted basic building block model into a vector using a dual encoder.
13. The method of claim 1, wherein the priority-ordered classification of the final set of basic building block candidates further comprises: A description of one or more features of the final set of the basic building block candidates associated with the user specification.
14. A system for selecting a base building block model from a trained dataset of base building block models, comprising: processor; as well as A memory having stored computer code instructions, the memory being operatively coupled to the processor such that, when executed by the processor, the computer code instructions cause the system to: The trained dataset is subjected to semantic similarity search based on user specifications to generate a candidate set of basic building block models. The specifications are conveyed to the trained dataset through initial prompts. The initial hints from the user are combined with the final set of candidates for the basic building block model to produce enhanced hints; The enhanced prompts are submitted to the main large language model, LLM. as well as The primary LLM receives a priority-ordered classification of the final set of candidates for the basic building blocks, generated at least in part based on specifications from the user.
15. The system of claim 14, wherein, when executed by the processor, the computer code instructions further cause the system to perform a multi-level reordering of the candidate set of basic building block models.
16. The system of claim 15, wherein when executed by the processor, the computer code instructions further cause the system to perform a first level of the multilevel reordering using a first encoder and a second level of the multilevel reordering using a second encoder, wherein the first encoder and the second encoder may be of the same type or different types.
17. The system of claim 15, wherein when executed by the processor, the computer code instructions further cause the system to use a dual encoder to perform the first level of the multi-level reordering.
18. The system of claim 15, wherein when executed by the processor, the computer code instructions further cause the system to perform a second level of the multi-level reordering using a cross encoder.
19. The system of claim 15, wherein when executed by the processor, the computer code instructions further cause the system to perform the first level of the multi-level reordering using a dual encoder, and to perform the second level of the multi-level reordering using a cross encoder.
20. The system of claim 14, wherein the system responds to the user by iteratively prompting the primary LLM to further refine the selection of the underlying building block model.
21. The system of claim 14, wherein, when executed by the processor, the computer code instructions further cause the system to use one or more dual encoders to perform the semantic similarity search of the trained database.
22. The system of claim 21, wherein the dual encoder further comprises a cascade of one or more consecutive dual encoders, and the cross encoder further comprises a cascade of one or more consecutive cross encoders.
23. The system of claim 22, wherein the cascading of the one or more consecutive dual encoders comprises one or more of the following: (i) All-miniLM-L6, (ii) Baai-Bge-small, (iii) Baai-Bge-Large, (iv) Mpnet, (v) Roberta-base, or (vi) Spector.
24. The system of claim 22, wherein the cascading of the one or more consecutive cross encoders comprises one or more of the following: (i) Electra-base, (ii) MiniLM-L-12, (iii) MiniLM-L-6, (iv) MiniLM-L-4, or (v) TinyBERT-L-4.
25. The system of claim 14, wherein, in order to train the trained dataset, (i) the initial dataset of the basic building block model is cleaned to eliminate duplicate versions of the basic building block model, (ii) each cleaned entry of the dataset of the basic building block model is trained using a training LLM, (iii) each cleaned, generalized entry of the dataset of the basic building block model is converted into a structured format, and (iv) the cleaned, generalized, and formatted basic building block model is encoded into a vector using a dual encoder.
26. The system of claim 11, wherein the priority-ordered classification of the final set of basic building block candidates further includes a description of one or more features of the final set of basic building block candidates in relation to the user specification.
27. A system for selecting a base building block model from a trained dataset of base building block models, comprising: A component for performing semantic similarity search on the trained dataset based on user specifications to generate a candidate set of basic building block models, the specifications being communicated to the trained dataset via initial prompts; A component for combining the initial prompts from the user with the final set of candidates for the basic building block model to produce enhanced prompts; A component for submitting the enhanced suggestions to the main large language model LLM; as well as A component for receiving, by priority sorting, a final set of candidates for the basic building blocks generated from the primary LLM, at least in part based on the specifications from the user.