TWI898962B - Chip pin configuration system and method thereof - Google Patents
Chip pin configuration system and method thereofInfo
- Publication number
- TWI898962B TWI898962B TW113149472A TW113149472A TWI898962B TW I898962 B TWI898962 B TW I898962B TW 113149472 A TW113149472 A TW 113149472A TW 113149472 A TW113149472 A TW 113149472A TW I898962 B TWI898962 B TW I898962B
- Authority
- TW
- Taiwan
- Prior art keywords
- pin configuration
- chip
- artificial intelligence
- generative
- module
- Prior art date
Links
Landscapes
- Stored Programmes (AREA)
Abstract
Description
本發明是有關於晶片腳位配置系統及其方法,特別是有關於以生成式人工智慧自動化生成腳位配置的系統及其方法。The present invention relates to a chip pin configuration system and method, and more particularly to a system and method for automatically generating pin configurations using generative artificial intelligence.
系統單晶片(System on Chip, SoC),通常包含數百個腳位以及數十種周邊功能。目前,晶片之腳位多工器(Pinmux)的腳位配置仍需依賴工程師的專業知識與經驗來對晶片的每個腳位進行手動配置。然而,晶片的規格文件頁數甚多,詳述多種周邊功能的細節,工程師在理解與應用這些腳位配置規範時需耗費大量精力,導致系統開發週期可能長達數個月。此外,由於周邊功能多樣且需考慮多路復用限制等衝突因素,手動配置腳位容易出現錯誤,並且難以實現最佳化配置,恐影響開發效率與質量。A system on chip (SoC) typically contains hundreds of pins and dozens of peripheral functions. Currently, the pin configuration of the chip's pin multiplexer (Pinmux) still relies on the engineer's expertise and experience to manually configure each pin on the chip. However, the chip's specification documents are numerous pages long, detailing the details of various peripheral functions. Engineers need to spend a lot of effort to understand and apply these pin configuration specifications, causing the system development cycle to be as long as several months. In addition, due to the diversity of peripheral functions and the need to consider conflicting factors such as multiplexing restrictions, manual pin configuration is prone to errors and difficult to achieve optimal configuration, which may affect development efficiency and quality.
系統單晶片可應用於多種場景,而每個場景對腳位配置和周邊功能的需求都各不相同。然而,傳統的Pinmux配置方法主要依賴人工操作,儘管已有一些腳位多工器設計工具(例如,自動化Pinmux配置工具)能協助工程師進行腳位配置,但這些工具仍然無法完全滿足以同一晶片適用多個應用場景之多樣化晶片應用需求。因此,目前急需一種高效的自動化工具,能對不同的應用場景快速生成腳位配置方案,從而顯著提升系統開發效率和準確性。System-on-a-chip (SoC) applications can be applied in a variety of scenarios, each with distinct requirements for pin configuration and peripheral functionality. However, traditional Pinmux configuration methods rely primarily on manual operation. Although some pin multiplexer design tools (e.g., automated Pinmux configuration tools) exist to assist engineers with pin configuration, these tools still cannot fully meet the diverse chip application requirements of using the same chip in multiple application scenarios. Therefore, there is an urgent need for an efficient automated tool that can quickly generate pin configuration solutions for different application scenarios, thereby significantly improving system development efficiency and accuracy.
本發明之一實施例提供一種晶片腳位配置系統,包含:生成式人工智慧模組、人工智慧代理模組及工具程式模組。生成式人工智慧模組包含檢索增強生成模型及提示介面。提示介面用以引導使用者輸入晶片之應用場景或輸入晶片之腳位配置樣板。檢索增強生成模型用以生成晶片之腳位配置程式碼。另外,人工智慧代理模組包含人工智慧代理,人工智慧代理模組用以使用生成式人工智慧模組生成符合晶片之應用場景之任務規劃,以及由人工智慧代理執行任務規劃中之複數個任務。另外,工具程式模組用以提供複數個應用程式介面給人工智慧代理調用。其中,複數個任務對應複數個應用程式介面,人工智慧代理通過調用應用程式介面以執行對應之任務。One embodiment of the present invention provides a chip pin configuration system, comprising: a generative artificial intelligence module, an artificial intelligence agent module and a tool program module. The generative artificial intelligence module comprises a retrieval enhancement generation model and a prompt interface. The prompt interface is used to guide the user to input the application scenario of the chip or input the pin configuration template of the chip. The retrieval enhancement generation model is used to generate the pin configuration code of the chip. In addition, the artificial intelligence agent module comprises an artificial intelligence agent, the artificial intelligence agent module is used to use the generative artificial intelligence module to generate a task plan that meets the application scenario of the chip, and the artificial intelligence agent executes a plurality of tasks in the task plan. In addition, the tool program module is used to provide a plurality of application program interfaces for the artificial intelligence agent to call. Among them, a plurality of tasks correspond to a plurality of application program interfaces, and the artificial intelligence agent executes the corresponding tasks by calling the application program interface.
本發明之一實施例提供一種晶片腳位配置方法,包含:由生成式人工智慧模組提供提示介面來引導使用者輸入晶片之應用場景或輸入晶片之腳位配置樣板以由生成式人工智慧模組之檢索增強生成模型生成晶片之腳位配置程式碼;由人工智慧代理模組透過生成式人工智慧模組生成符合晶片之應用場景之任務規劃,以及由人工智慧代理模組之人工智慧代理執行任務規劃中之複數個任務;以及由工具程式模組提供複數個應用程式介面給人工智慧代理調用,其中,複數個任務對應複數個應用程式介面,人工智慧代理通過調用應用程式介面以執行對應之任務。One embodiment of the present invention provides a chip pin configuration method, comprising: a generative artificial intelligence module providing a prompt interface to guide a user to input a chip application scenario or a chip pin configuration template so that the retrieval-enhanced generation model of the generative artificial intelligence module generates a chip pin configuration code; an artificial intelligence agent module generates a task plan that conforms to the chip application scenario through the generative artificial intelligence module, and an artificial intelligence agent of the artificial intelligence agent module executes a plurality of tasks in the task plan; and a tool program module provides a plurality of application program interfaces for the artificial intelligence agent to call, wherein a plurality of tasks correspond to a plurality of application program interfaces, and the artificial intelligence agent executes the corresponding tasks by calling the application program interfaces.
本發明之一實施例提供一種晶片腳位配置方法,包含通過生成式人工智慧模組、人工智慧代理模組及/或工具程式模組協同處理之以下步驟:輸入應用場景;分析周邊資源;腳位配置;時脈配置;衝突分析;生成腳位配置程式碼;以及生成腳位配置檔案。One embodiment of the present invention provides a chip pin configuration method, comprising the following steps, which are collaboratively processed by a generative artificial intelligence module, an artificial intelligence agent module, and/or a tool module: inputting an application scenario; analyzing peripheral resources; pin configuration; clock configuration; conflict analysis; generating pin configuration code; and generating a pin configuration file.
本發明之一實施例提供一種晶片腳位配置方法,包含以下步驟:腳位配置標記化;生成式人工智慧模組和人工智慧代理模組協同運作;生成腳位配置;驗證腳位配置;評估最佳腳位配置;以及獲得腳位配置樣板。One embodiment of the present invention provides a chip pin configuration method, comprising the following steps: pin configuration labeling; collaborative operation of a generative artificial intelligence module and an artificial intelligence agent module; generating a pin configuration; verifying the pin configuration; evaluating an optimal pin configuration; and obtaining a pin configuration template.
請參考圖1,圖1繪示根據本發明一實施例之晶片腳位配置系統100之方塊圖。在圖1所示之實施例中,晶片腳位配置系統100包含生成式人工智慧模組110、人工智慧代理模組120、及工具程式模組130。1 , which illustrates a block diagram of a chip pin configuration system 100 according to an embodiment of the present invention. In the embodiment shown in FIG1 , the chip pin configuration system 100 includes a generative artificial intelligence module 110 , an artificial intelligence agent module 120 , and a tool module 130 .
在圖1所示之實施例中,晶片腳位配置系統100包含生成式人工智慧模組110。生成式人工智慧模組110包含大型語言模型(Large Language Model, LLM)和檢索增強生成模型(Retrieval-Augmented Generation Model, RAG)。而且,生成式人工智慧模組110包含提示介面,用以提供使用者輸入提示詞。在一實施例中,生成式人工智慧模組110之提示介面可以引導使用者輸入晶片之應用場景,例如,提供相關提示詞以輔助使用者選擇和自訂晶片之應用場景。在一實施例中,生成式人工智慧模組110之提示介面也可以輸入晶片之腳位配置樣板,不同的腳位配置樣板對應到晶片之不同的應用場景(例如,工業閘道器、無人機、協作機器人、自主移動機器人等)。另外,生成式人工智慧模組110之檢索增強生成模型可以檢索專家知識庫,以提高生成式人工智慧模組110生成結果的準確性。專家知識庫中包含與晶片有關的技術資訊。專家知識庫的資料來源包含:晶片設計文件(例如:資料表及技術手冊)、程式碼樣板(例如:.c及.dts等文件)、以及設計約束(例如:腳位電壓及時脈需求)等。這些資料來源經資料處理後可以轉化為結構化資料或向量資料,並儲存在關聯式資料庫或向量資料庫中。另外,生成式人工智慧模組110使用檢索增強生成模型來輔助大型語言模型生成晶片之腳位配置程式碼。這些程式碼包含C語言程式碼、以及裝置樹原始碼(Device Tree Source)等格式。In the embodiment shown in FIG1 , the chip pin configuration system 100 includes a generative artificial intelligence module 110. The generative artificial intelligence module 110 includes a large language model (LLM) and a retrieval-augmented generation model (RAG). Furthermore, the generative artificial intelligence module 110 includes a prompt interface for providing a user with prompt words to input. In one embodiment, the prompt interface of the generative artificial intelligence module 110 can guide the user to input the application scenario of the chip, for example, providing relevant prompt words to assist the user in selecting and customizing the application scenario of the chip. In one embodiment, the prompt interface of the generative artificial intelligence module 110 can also input a chip pin configuration template, with different pin configuration templates corresponding to different chip application scenarios (for example, industrial gateways, drones, collaborative robots, autonomous mobile robots, etc.). In addition, the retrieval-enhanced generation model of the generative artificial intelligence module 110 can search the expert knowledge base to improve the accuracy of the results generated by the generative artificial intelligence module 110. The expert knowledge base contains technical information related to the chip. The data sources of the expert knowledge base include: chip design documents (such as data sheets and technical manuals), code templates (such as .c and .dts files), and design constraints (such as pin voltage and clock requirements). After data processing, these data sources can be converted into structured data or vector data and stored in a relational database or a vector database. In addition, the generative artificial intelligence module 110 uses the retrieval-enhanced generation model to assist the large language model in generating the pin configuration code of the chip. These codes include C language code and device tree source code (Device Tree Source) formats.
在圖1所示之實施例中,晶片腳位配置系統100包含人工智慧代理模組120。人工智慧代理模組120包含人工智慧代理。人工智慧代理透過生成式人工智慧模組110之大型語言模型生成符合晶片之應用場景之任務規劃。現代晶片,例如:微控制器(Microcontroller)或系統單晶片(System on Chip, SoC),其可以設置不同的腳位配置以適用不同的應用場景(例如,工業閘道器、無人機、協作機器人、自主移動機器人等)。晶片的實體腳位數量往往是有限的,但這些腳位在設計時被定義為支持多種候選功能(例如:GPIO、UART、SPI、I2C等)。藉由腳位多工器(Pin Multiplexer, Pinmux),可在多種候選功能中為每個腳位指定一個具體的功能,藉以達成由同一顆晶片滿足不同應用場景之需求。舉例來說,當應用場景為四軸無人機時,則晶片需配置成包含四組脈衝寬度調變(PWM)之腳位配置,以能調節四個馬達轉速。當應用場景為六軸無人機時,則晶片需配置成包含六組脈衝寬度之腳位配置,以能調節六個馬達轉速。另外,人工智慧代理可以將大型語言模型生成之晶片之應用場景之任務規劃分解為複數個任務,並由人工智慧代理執行複數個任務。在一實施例中,複數個任務包括腳位配置、時脈配置、及衝突分析等。然後,人工智慧代理可以分別或依序執行複數個任務,以生成符合晶片之應用場景之腳位配置程式碼。In the embodiment shown in FIG1 , the chip pin configuration system 100 includes an artificial intelligence agent module 120. The artificial intelligence agent module 120 includes an artificial intelligence agent. The artificial intelligence agent generates a task plan that conforms to the chip's application scenario through the large language model of the generative artificial intelligence module 110. Modern chips, such as microcontrollers or system-on-chips (SoCs), can be set with different pin configurations to suit different application scenarios (e.g., industrial gateways, drones, collaborative robots, autonomous mobile robots, etc.). The number of physical pins on a chip is often limited, but these pins are defined during design to support a variety of candidate functions (e.g., GPIO, UART, SPI, I2C, etc.). By using a pin multiplexer (Pinmux), a specific function can be assigned to each pin from a variety of candidate functions, allowing the same chip to meet the needs of different application scenarios. For example, when the application scenario is a four-axis drone, the chip needs to be configured to include four sets of pulse width modulation (PWM) pin configurations to be able to adjust the speeds of four motors. When the application scenario is a six-axis drone, the chip needs to be configured to include six sets of pulse width pin configurations to be able to adjust the speeds of six motors. In addition, artificial intelligence agents can decompose the task planning of the chip application scenario generated by large language models into multiple tasks, and the artificial intelligence agent can execute multiple tasks. In one embodiment, the plurality of tasks include pin configuration, clock configuration, and conflict analysis, etc. Then, the artificial intelligence agent can execute the plurality of tasks separately or sequentially to generate pin configuration code that meets the application scenario of the chip.
在圖1所示之實施例中,晶片腳位配置系統100包含工具程式模組130。工具程式模組130包含有複數個應用程式介面,用以提供複數個應用程式介面給人工智慧代理調用。人工智慧代理透過功能調用(Function Calling)來調用複數個應用程式介面。複數個應用程式介面包含自動測試應用程式介面131、程式設計應用程式介面132及程式檢查應用程式介面133。自動測試應用程式介面131用以自動生成晶片之應用場景給生成式人工智慧模組110之提示介面。程式設計應用程式介面132用以生成腳位配置程式碼。程式檢查應用程式介面133用以檢查腳位配置程式碼之正確性。另外,程式檢查應用程式介面133包含解析器和編譯器,解析器和編譯器用以檢查腳位配置程式碼之正確性。另外,複數個任務對應複數個應用程式介面,人工智慧代理通過調用應用程式介面以執行對應之任務。In the embodiment shown in FIG1 , the chip pin configuration system 100 includes a tool module 130 . The tool module 130 includes a plurality of application programming interfaces (APIs) for providing a plurality of APIs for an artificial intelligence agent to call. The artificial intelligence agent calls the plurality of APIs through function calls. The plurality of APIs include an automatic test API 131, a programming API 132, and a program checking API 133. The automatic test API 131 is used to automatically generate chip application scenarios as a prompt interface for the generative artificial intelligence module 110. The programming API 132 is used to generate pin configuration code. The program checker API 133 is used to check the correctness of the script configuration code. Furthermore, the program checker API 133 includes a parser and a compiler, which are used to check the correctness of the script configuration code. Furthermore, multiple tasks correspond to multiple APIs, and the artificial intelligence agent executes the corresponding tasks by calling the APIs.
另外,工具程式模組130用以提供REST API服務。REST API是一種基於HTTP的通訊協定,適用於標準化的資料交換,人工智慧代理可以通過HTTP方法(例如:GET、POST)向應用程式介面發送請求,並接收結果。REST API可用於大型語言模型、檢索增強生成模型、人工智慧代理以及工具程式模組130中複數個應用程式介面之間的連接。In addition, the tool module 130 provides a REST API service. The REST API is an HTTP-based communication protocol for standardized data exchange. Artificial intelligence agents can send requests to an application programming interface (API) using HTTP methods (e.g., GET and POST) and receive responses. The REST API can be used to connect large language models, search-enhanced generative models, artificial intelligence agents, and multiple APIs within the tool module 130.
在一實施例中,工具程式模組130提供之REST API服務包含有:配置精靈(pinmux-wiz)、配置生成(pinmux-gen)、配置時脈 (pinmux-clock)、及配置驗證(pinmux-validate)。人工智慧代理透過功能調用來調用配置精靈(pinmux-wiz),可以引導使用者進行腳位配置。人工智慧代理透過功能調用來調用配置生成(pinmux-gen),可以基於腳位配置生成對應之程式碼或配置文件。人工智慧代理透過功能調用來調用配置時脈(pinmux-clock),可以處理腳位配置和周邊功能的時脈參數配置,以確保周邊資源(例如:UART或SPI)的時脈需求能正常運作。人工智慧代理透過功能調用來調用配置驗證(pinmux-validate),可以驗證腳位配置是否符合規範,並檢查資源衝突和不相容的問題。In one embodiment, the REST API services provided by the tool module 130 include: configuration wizard (pinmux-wiz), configuration generation (pinmux-gen), configuration clock (pinmux-clock), and configuration validation (pinmux-validate). The artificial intelligence agent calls the configuration wizard (pinmux-wiz) through a function call to guide the user to perform pin configuration. The artificial intelligence agent calls the configuration generation (pinmux-gen) through a function call to generate corresponding code or configuration files based on the pin configuration. The artificial intelligence agent calls the configuration clock (pinmux-clock) through a function call to process the pin configuration and the clock parameter configuration of peripheral functions to ensure that the clock requirements of peripheral resources (such as UART or SPI) can operate normally. The AI agent invokes configuration validation (pinmux-validate) through a function call to verify that the pin configuration complies with the specifications and check for resource conflicts and incompatibilities.
請參考圖2,圖2繪示根據本發明一實施例之晶片腳位配置方法200之第一實施例之流程圖。在圖2所示之實施例中,晶片腳位配置方法200包含以下步驟:輸入應用場景(步驟S201);分析周邊資源(步驟S202);腳位配置(步驟S203);時脈配置(步驟S204);衝突分析(步驟S205);生成腳位配置程式碼(步驟S206);以及生成腳位配置檔案(步驟S207)。Please refer to Figure 2, which illustrates a flow chart of a first embodiment of a chip pin configuration method 200 according to one embodiment of the present invention. In the embodiment shown in Figure 2, the chip pin configuration method 200 includes the following steps: inputting an application scenario (step S201); analyzing peripheral resources (step S202); pin configuration (step S203); clock configuration (step S204); conflict analysis (step S205); generating pin configuration code (step S206); and generating a pin configuration file (step S207).
在一實施例中,晶片腳位配置方法200,包含:由生成式人工智慧模組110之提示介面輸入晶片之應用場景或腳位配置樣板(步驟S201);生成式人工智慧模組110確定應用場景所需之晶片之周邊資源(步驟S202);根據應用場景所需之晶片之周邊資源,生成式人工智慧模組110進行腳位配置(步驟S203);在進行腳位配置後,生成式人工智慧模組110進行時脈配置(步驟S204);在進行時脈配置後,生成式人工智慧模組110進行衝突分析(步驟S205);在進行衝突分析後,生成式人工智慧模組110生成腳位配置程式碼(步驟S206);以及在生成腳位配置程式碼後,生成式人工智慧模組110生成腳位配置檔案(步驟S207)。In one embodiment, the chip pin configuration method 200 includes: inputting a chip application scenario or pin configuration template through a prompt interface of the generative artificial intelligence module 110 (step S201); the generative artificial intelligence module 110 determines the peripheral resources of the chip required for the application scenario (step S202); the generative artificial intelligence module 110 performs pin configuration based on the peripheral resources of the chip required for the application scenario (step S203); and performing pin configuration. After the pin configuration is completed, the generative artificial intelligence module 110 performs clock configuration (step S204). After the clock configuration is completed, the generative artificial intelligence module 110 performs conflict analysis (step S205). After the conflict analysis is completed, the generative artificial intelligence module 110 generates pin configuration code (step S206). After the pin configuration code is generated, the generative artificial intelligence module 110 generates a pin configuration file (step S207).
在步驟S201中,生成式人工智慧模組110之提示介面可以引導使用者輸入晶片之應用場景,例如,提供相關提示詞以輔助使用者選擇和自訂晶片之應用場景。另外,生成式人工智慧模組110之提示介面也可以輸入晶片之腳位配置樣板。由於晶片可以適用於多種應用場景,可以提供不同的腳位配置樣板作為生成式人工智慧模組110之提示介面之輸入內容,以減少對話數量。另外,人工智慧代理可以調用配置精靈(pinmux-wiz),以引導使用者進行腳位配置。In step S201, the prompt interface of the generative AI module 110 can guide the user to input the chip's application scenario. For example, relevant prompts can be provided to assist the user in selecting and customizing the chip's application scenario. Furthermore, the prompt interface of the generative AI module 110 can also input a pin configuration template for the chip. Because chips can be applied to a variety of application scenarios, different pin configuration templates can be provided as input content in the prompt interface of the generative AI module 110 to reduce the number of dialogues. Furthermore, the AI agent can call a configuration wizard (pinmux-wiz) to guide the user in pin configuration.
在步驟S202中,由於晶片包含有多種周邊資源,常見的周邊資源(或周邊功能)包含:通訊介面(例如:UART、SPI、I2C、USB等)、數位I/O介面(例如:GPIO)、控制模組(例如:PWM)等。晶片之應用場景以無人機為例,晶片所需之周邊資源可能包含:UART用於與GPS模組通信;SPI用於連接攝像頭模組;I2C用於從加速度計或陀螺儀等傳感器中讀取資料;USB用於連接外部儲存裝置;GPIO用於控制LED;以及PWM用於控制馬達轉速。根據晶片之應用場景,生成式人工智慧模組110之檢索增強生成模型可以基於專家知識庫分析周邊資源,以確定晶片之應用場景所需之周邊資源,為腳位配置奠定基礎。In step S202, since the chip contains a variety of peripheral resources, common peripheral resources (or peripheral functions) include: communication interfaces (such as UART, SPI, I2C, USB, etc.), digital I/O interfaces (such as GPIO), control modules (such as PWM), etc. Taking a drone as an example, the chip's required peripheral resources may include: UART for communicating with the GPS module; SPI for connecting to the camera module; I2C for reading data from sensors such as accelerometers and gyroscopes; USB for connecting to external storage devices; GPIO for controlling LEDs; and PWM for controlling motor speed. According to the application scenario of the chip, the retrieval-enhanced generation model of the generative artificial intelligence module 110 can analyze peripheral resources based on the expert knowledge base to determine the peripheral resources required for the application scenario of the chip, laying the foundation for the footprint configuration.
在步驟S203中,晶片的腳位可以配置給一個具體的周邊功能。現代晶片包含有多路復用的腳位,晶片中的某些腳位可以支持多種功能(例如GPIO、UART、I2C),但每次只能配置給其中一種周邊功能。在確定晶片之應用場景以及所需之周邊資源後,生成式人工智慧模組110之檢索增強生成模型可以基於專家知識庫進行腳位配置,以及根據一些腳位配置原則對腳位配置進行優化,以避免資源衝突。腳位配置原則,例如,高優先級的周邊可以優先配置;多路復用的腳位應避免同時配置給多個周邊功能;配置專用時脈源;或將相關功能配置到同一腳位群組以減少跨區域布線的複雜性等。In step S203, the chip's pins can be assigned to a specific peripheral function. Modern chips include multiplexed pins. Some pins in the chip can support multiple functions (e.g., GPIO, UART, I2C), but can only be assigned to one peripheral function at a time. After determining the chip's application scenario and the required peripheral resources, the retrieval-enhanced generation model of the generative artificial intelligence module 110 can perform pin configuration based on the expert knowledge base and optimize the pin configuration according to certain pin configuration principles to avoid resource conflicts. Pin configuration principles, for example, high-priority peripherals can be configured first; multiplexed pins should not be configured to multiple peripheral functions at the same time; dedicated clock sources should be configured; or related functions should be configured to the same pin group to reduce the complexity of cross-area wiring, etc.
在步驟S204中,在進行腳位配置後,生成式人工智慧模組110之檢索增強生成模型可以基於專家知識庫進行時脈配置,以及確保每個周邊資源在正確的時脈參數下運作。時脈配置,例如:UART通訊的波特率時脈、SPI傳輸的時鐘頻率或PWM控制信號的頻率和占空比(Duty Cycle)等。另外,人工智慧代理可以調用配置時脈(pinmux-clock),以確保周邊資源的時脈需求能正常運行。In step S204, after pin configuration, the search-enhanced generation model of the generative AI module 110 can perform clock configuration based on the expert knowledge base, ensuring that each peripheral resource operates under the correct clock parameters. Clock configurations include, for example, the baud rate of UART communication, the clock frequency of SPI transmission, or the frequency and duty cycle of PWM control signals. Furthermore, the AI agent can call the configured clock (pinmux-clock) to ensure that the peripheral resource's clock requirements are met.
在步驟S205中,在進行時脈配置後,生成式人工智慧模組110之檢索增強生成模型可以基於專家知識庫進行衝突分析,以檢查腳位配置是否符合規範或者有資源衝突。資源衝突,例如:多路復用腳位配置衝突、時脈參數衝突、電氣規格超出限制等。另外,人工智慧代理可以調用配置驗證(pinmux-validate),以驗證腳位配置是否符合規範或者有資源衝突。In step S205, after clock configuration, the search-enhanced generation model of the generative AI module 110 can perform conflict analysis based on the expert knowledge base to check whether the pin configuration complies with specifications or whether there are any resource conflicts. Resource conflicts include, for example, multiplex pin configuration conflicts, clock parameter conflicts, and electrical specification violations. Furthermore, the AI agent can call configuration validation (pinmux-validate) to verify whether the pin configuration complies with specifications or whether there are any resource conflicts.
在步驟S206中,在進行該衝突分析後,如果驗證腳位配置符合規範,生成式人工智慧模組110之檢索增強生成模型可以基於專家知識庫生成腳位配置程式碼。在一實施例中,如果腳位配置不符合規範或者有資源衝突,生成式人工智慧模組110會提示使用者,或者自動重新生成新的腳位配置。另外,人工智慧代理可以調用配置生成(pinmux-gen),以基於腳位配置生成對應之程式碼(例如:.c原始碼及.dts原始碼等),以供開發人員用於韌體或驅動開發。In step S206, after performing the conflict analysis, if the pin configuration is verified to be compliant with the specification, the search-enhanced generation model of the generative artificial intelligence module 110 can generate the pin configuration code based on the expert knowledge base. In one embodiment, if the pin configuration does not meet the specification or there is a resource conflict, the generative artificial intelligence module 110 will prompt the user or automatically regenerate a new pin configuration. In addition, the artificial intelligence agent can call configuration generation (pinmux-gen) to generate corresponding code (e.g., .c source code and .dts source code, etc.) based on the pin configuration for developers to use in firmware or driver development.
在步驟S207中,在生成該腳位配置程式碼後,生成式人工智慧模組110之檢索增強生成模型可以基於專家知識庫生成腳位配置檔案,這些腳位配置檔案包含: 1. C原始碼檔案(.c):包含腳位配置程式碼,用於整合到晶片的驅動程式或系統初始化程式碼中。 2. 標頭檔案(.h):提供.c程式碼中對硬體配置的參數和設定、結構定義和函式。 3. 裝置樹原始碼(.dts):描述晶片的硬體結構和資源配置,例如:時脈、電源、腳位功能映射等。裝置樹原始碼可編譯為成二進位格式,以供Linux在啟動時加載以初始化硬體設備。 4. 腳位摘要(.csv):以表格形式列出每個腳位的功能、狀態和用途,作為配置設計的參考文檔。 In step S207, after generating the pin configuration code, the search-enhanced generation model of the generative AI module 110 can generate pin configuration files based on the expert knowledge base. These pin configuration files include: 1. C source code file (.c): Contains the pin configuration code for integration into the chip driver or system initialization code. 2. Header file (.h): Provides hardware configuration parameters and settings, structure definitions, and functions in the .c code. 3. Device tree source code (.dts): Describes the chip's hardware structure and resource configuration, such as clock, power, and pin function mapping. The device tree source code can be compiled into a binary format for Linux to load at boot time to initialize the hardware. 4. Pin Summary (.csv): Lists the function, status, and usage of each pin in a table format, serving as a reference document for configuration design.
另外,這些腳位配置檔案可以作為腳位配置樣板,以適用於晶片之特定應用場景。在一實施例中,腳位配置樣板可以輸入到生成式人工智慧模組110之提示介面,由生成式人工智慧模組110進行解析,以減少對話數量以及減少錯誤。另外,生成式人工智慧模組110和人工智慧代理模組120協同運作可以達成晶片之腳位配置自動化以及自動生成腳位配置程式碼之目的,以縮減開發時程。Furthermore, these pin configuration files can be used as pin configuration templates to adapt to specific chip application scenarios. In one embodiment, the pin configuration templates can be input into the prompt interface of the generative AI module 110, which then interprets them to reduce the number of dialogues and errors. Furthermore, the collaborative operation of the generative AI module 110 and the AI agent module 120 can achieve the goal of automating the chip's pin configuration and automatically generating pin configuration code, thereby shortening development time.
請參考圖3,圖3繪示根據本發明一實施例之晶片腳位配置方法300之第二實施例之流程圖。在圖3所示之實施例中,晶片腳位配置方法300包含以下步驟:腳位配置標記化(步驟S301);生成式人工智慧模組110和人工智慧代理模組120協同運作(步驟S302);生成腳位配置(步驟S303);驗證腳位配置(步驟S304);評估最佳腳位配置?(步驟S305);以及獲得腳位配置樣板(步驟S306)。Please refer to Figure 3, which shows a flow chart of a second embodiment of a chip pin configuration method 300 according to one embodiment of the present invention. In the embodiment shown in Figure 3, the chip pin configuration method 300 includes the following steps: pin configuration labeling (step S301); collaborative operation of the generative artificial intelligence module 110 and the artificial intelligence agent module 120 (step S302); generating a pin configuration (step S303); verifying the pin configuration (step S304); evaluating the optimal pin configuration (step S305); and obtaining a pin configuration template (step S306).
在步驟S301中,腳位配置標記化。將晶片之腳位配置轉化為標記化的字符串表示,以便生成式人工智慧模組110之大型語言模型更容易地處理和生成腳位配置。例如,使用標準化的語法結構來表示腳位的配置。標準化的語法結構,例如:JSON、XML、YAML等。腳位配置,例如:PIN0:GPIO、PIN1:UART、PIN2:I2C等。在一實施例中,可以利用數位雙生定義語言(Digital Twins Definition Language, DTFL)來定義周邊設備、腳位布局及時脈配置。In step S301, the pin configuration is marked. The pin configuration of the chip is converted into a marked string representation so that the large language model of the generative artificial intelligence module 110 can more easily process and generate the pin configuration. For example, a standardized syntax structure is used to represent the pin configuration. Standardized syntax structures, such as JSON, XML, YAML, etc. Pin configuration, for example: PIN0: GPIO, PIN1: UART, PIN2: I2C, etc. In one embodiment, Digital Twins Definition Language (DTFL) can be used to define peripheral devices, pin layout and clock configuration.
在步驟S302中,生成式人工智慧模組110和人工智慧代理模組120協同運作。生成式人工智慧模組110包含大型語言模型及檢索增強生成模型,人工智慧代理模組120包含人工智慧代理。人工智慧代理透過生成式人工智慧模組110之大型語言模型生成符合晶片之應用場景之任務規劃。人工智慧代理將任務規劃拆解為複數個任務,並執行複數個任務。在一實施例中,複數個任務包括生成腳位配置以及驗證腳位配置。In step S302, the generative AI module 110 and the AI agent module 120 operate in collaboration. The generative AI module 110 includes a large language model and a retrieval-enhanced generative model, while the AI agent module 120 includes an AI agent. The AI agent uses the large language model of the generative AI module 110 to generate a task plan that matches the chip's application scenario. The AI agent breaks the task plan into a plurality of tasks and executes the plurality of tasks. In one embodiment, the plurality of tasks includes generating and verifying a footprint configuration.
在步驟S303中,生成腳位配置。生成式人工智慧模組110之檢索增強生成模型可以基於專家知識庫進行腳位配置。在一實施例中,步驟S303包含由生成式人工智慧模組110進行時脈配置以及生成腳位配置程式碼之步驟。另外,人工智慧代理可以調用配置精靈(pinmux-wiz)、配置生成(pinmux-gen)和配置時脈(pinmux-clock),以生成腳位配置。In step S303, the pin configuration is generated. The search-enhanced generative model of the generative AI module 110 can perform pin configuration based on the expert knowledge base. In one embodiment, step S303 includes the steps of the generative AI module 110 performing clock configuration and generating pin configuration code. In addition, the AI agent can call the configuration wizard (pinmux-wiz), configuration generation (pinmux-gen), and configuration clock (pinmux-clock) to generate the pin configuration.
在步驟S304中,驗證腳位配置。生成式人工智慧模組110之檢索增強生成模型可以基於專家知識庫驗證腳位配置以及腳位配置程式碼,以驗證腳位配置是否符合規範或是否有資源衝突。另外,人工智慧代理可以調用配置驗證(pinmux-validate),以驗證腳位配置是否有資源衝突。In step S304, the pin configuration is validated. The search-enhanced generation model of the generative AI module 110 can validate the pin configuration and the pin configuration code based on the expert knowledge base to verify whether the pin configuration complies with the specifications or whether there are any resource conflicts. Additionally, the AI agent can call the pinmux-validate function to verify whether the pin configuration has any resource conflicts.
在步驟S305中,評估最佳腳位配置?在一實施例中,可以生成多個腳位配置,並評估每個腳位配置之性能,以保留前三名的腳位配置。使用者可以調整腳位配置之排名,以決策最佳腳位配置。評估原則包含:布局/布線效率、信號完整性、功耗等。另外,生成式人工智慧模組110之檢索增強生成模型可以基於專家知識庫進行多輪的配置優化,以生成最佳腳位配置。在一實施例中,當評估非為最佳腳位配置時,則返回執行步驟S302,以重新生成一個腳位配置;當評估為最佳腳位配置時,則執行步驟S306。In step S305, the best pin configuration is evaluated. In one embodiment, multiple pin configurations can be generated, and the performance of each pin configuration can be evaluated to retain the top three pin configurations. The user can adjust the ranking of the pin configurations to determine the best pin configuration. The evaluation principles include: layout/routing efficiency, signal integrity, power consumption, etc. In addition, the retrieval-enhanced generation model of the generative artificial intelligence module 110 can perform multiple rounds of configuration optimization based on the expert knowledge base to generate the best pin configuration. In one embodiment, when the evaluation is not the best pin configuration, the process returns to step S302 to regenerate a pin configuration; when the evaluation is the best pin configuration, the process executes step S306.
在步驟S306中,獲得腳位配置樣板。在獲得最佳腳位配置後,生成式人工智慧模組110之檢索增強生成模型可以基於專家知識庫生成腳位配置檔案,包含:C原始碼檔案、標頭檔案、裝置樹原始碼及腳位摘要。這些腳位配置檔案可以作為晶片之腳位配置樣板。In step S306, a footprint template is obtained. After obtaining the optimal footprint, the search-enhanced generation model of the generative artificial intelligence module 110 can generate a footprint file based on the expert knowledge base, including: C source code files, header files, device tree source code, and footprint summary. These footprint files can be used as footprint templates for the chip.
請參考圖4,圖4繪示根據本發明一實施例之晶片腳位配置方法400之第三實施例之流程圖。在圖4所示之實施例中,晶片腳位配置方法400包含步驟S401~S403。Please refer to Figure 4, which shows a flow chart of a third embodiment of a chip pin configuration method 400 according to an embodiment of the present invention. In the embodiment shown in Figure 4, the chip pin configuration method 400 includes steps S401-S403.
在步驟S401中,由生成式人工智慧模組110提供提示介面來引導使用者輸入晶片之應用場景或輸入晶片之腳位配置樣板以由生成式人工智慧模組110之檢索增強生成模型生成晶片之腳位配置程式碼。In step S401 , the generative artificial intelligence module 110 provides a prompt interface to guide the user to input the application scenario of the chip or input the pin configuration template of the chip so that the retrieval-enhanced generation model of the generative artificial intelligence module 110 generates the pin configuration code of the chip.
在步驟S402中,由人工智慧代理模組120透過生成式人工智慧模組110生成符合晶片之應用場景之任務規劃,以及由人工智慧代理模組120之人工智慧代理執行任務規劃中之複數個任務。In step S402 , the artificial intelligence agent module 120 generates a task plan that meets the application scenario of the chip through the generative artificial intelligence module 110 , and the artificial intelligence agent of the artificial intelligence agent module 120 executes a plurality of tasks in the task plan.
在步驟S403中,由工具程式模組130提供複數個應用程式介面給人工智慧代理調用,其中,複數個任務對應複數個應用程式介面,人工智慧代理通過調用應用程式介面以執行對應之任務。In step S403, the tool module 130 provides a plurality of application programming interfaces (APIs) for the artificial intelligence agent to call, wherein a plurality of tasks correspond to a plurality of APIs, and the artificial intelligence agent executes the corresponding tasks by calling the APIs.
在一實施例中,人工智慧代理可以透過功能調用來調用複數個應用程式介面。複數個應用程式介面包含自動測試應用程式介面131、程式設計應用程式介面132及程式檢查應用程式介面133。自動測試應用程式介面131用以自動生成晶片之應用場景給生成式人工智慧模組110之提示介面。程式設計應用程式介面132用以生成腳位配置程式碼。程式檢查應用程式介面133用以檢查腳位配置程式碼之正確性。另外,程式檢查應用程式介面133包含解析器和編譯器,解析器和編譯器用以檢查腳位配置程式碼。In one embodiment, the artificial intelligence agent can call multiple application programming interfaces (APIs) through function calls. The multiple APIs include an automatic testing API 131, a programming API 132, and a program checking API 133. The automatic testing API 131 is used to automatically generate a chip application scenario as a prompt interface for the generative artificial intelligence module 110. The programming API 132 is used to generate the pin configuration code. The program checking API 133 is used to check the correctness of the pin configuration code. In addition, the program checking API 133 includes a parser and a compiler, which are used to check the pin configuration code.
在一實施例中,人工智慧代理可以透過功能調用來調用腳位配置工具,例如,Pinmux工具。Pinmux工具包含配置精靈(pinmux-wiz)、配置生成(pinmux-gen)、配置時脈(pinmux-clock)、及配置驗證(pinmux-validate)。在一實施例中,腳位配置工具可以是應用程式介面、程式模組或工具程式。In one embodiment, the AI agent can invoke a pin configuration tool, such as the Pinmux tool, through a function call. The Pinmux tool includes a configuration wizard (pinmux-wiz), configuration generation (pinmux-gen), configuration clock (pinmux-clock), and configuration validation (pinmux-validate). In one embodiment, the pin configuration tool can be an application programming interface, a program module, or a utility program.
在一實施例中,在生成腳位配置程式碼,生成式人工智慧模組110之檢索增強生成模型可以基於專家知識庫生成腳位配置檔案,包含:C原始碼檔案、標頭檔案、裝置樹原始碼及腳位摘要。這些腳位配置檔案可以作為晶片之腳位配置樣板。另外,這些腳位配置樣板可以輸入到生成式人工智慧模組110之提示介面,由生成式人工智慧模組110進行解析,以減少對話數量以及減少錯誤。In one embodiment, when generating footprint code, the search-enhanced generative model of the generative AI module 110 can generate footprint files based on an expert knowledge base, including C source code files, header files, device tree source code, and footprint summaries. These footprint files can serve as footprint templates for the chip. Furthermore, these footprint templates can be input into the prompt interface of the generative AI module 110 for parsing, thereby reducing the number of dialogues and errors.
雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed above by way of embodiments, they are not intended to limit the present invention. Any person having ordinary skill in the art may make slight modifications and improvements without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be determined by the scope of the attached patent application.
100:晶片腳位配置系統 110:生成式人工智慧模組 120:人工智慧代理模組 130:工具程式模組 131:自動測試應用程式介面 132:程式設計應用程式介面 133:程式檢查應用程式介面 200,300,400:晶片腳位配置方法 S201~S207,S301~S306,S401~S403:步驟100: Chip Pin Assignment System 110: Generative AI Module 120: Artificial Intelligence Agent Module 130: Tool Programming Module 131: Automatic Testing API 132: Programming API 133: Program Checking API 200, 300, 400: Chip Pin Assignment Method S201-S207, S301-S306, S401-S403: Steps
圖1繪示根據本發明一實施例之晶片腳位配置系統之方塊圖。 圖2繪示根據本發明一實施例之晶片腳位配置方法之第一實施例之流程圖。 圖3繪示根據本發明一實施例之晶片腳位配置方法之第二實施例之流程圖。 圖4繪示根據本發明一實施例之晶片腳位配置方法之第三實施例之流程圖。 Figure 1 is a block diagram of a chip pin allocation system according to an embodiment of the present invention. Figure 2 is a flow chart of a first embodiment of a chip pin allocation method according to an embodiment of the present invention. Figure 3 is a flow chart of a second embodiment of a chip pin allocation method according to an embodiment of the present invention. Figure 4 is a flow chart of a third embodiment of a chip pin allocation method according to an embodiment of the present invention.
100:晶片腳位配置系統 100: Chip pin configuration system
110:生成式人工智慧模組 110: Generative Artificial Intelligence Module
120:人工智慧代理模組 120: Artificial Intelligence Agent Module
130:工具程式模組 130: Utility Module
131:自動測試應用程式介面 131:Automatically test the application programming interface
132:程式設計應用程式介面 132: Programming Application Programming Interface
133:程式檢查應用程式介面 133: Program Check API
Claims (20)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW113149472A TWI898962B (en) | 2024-12-18 | 2024-12-18 | Chip pin configuration system and method thereof |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW113149472A TWI898962B (en) | 2024-12-18 | 2024-12-18 | Chip pin configuration system and method thereof |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| TWI898962B true TWI898962B (en) | 2025-09-21 |
Family
ID=97832279
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW113149472A TWI898962B (en) | 2024-12-18 | 2024-12-18 | Chip pin configuration system and method thereof |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TWI898962B (en) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TW202223721A (en) * | 2021-12-09 | 2022-06-16 | 大陸商訊牧信息科技(上海)有限公司 | Configuration method for multiple fpgas and multi-fpga system |
| US20220300437A1 (en) * | 2019-09-17 | 2022-09-22 | Micron Technology, Inc. | Memory chip connecting a system on a chip and an accelerator chip |
| CN115731966A (en) * | 2021-08-31 | 2023-03-03 | 美光科技公司 | Automatic adaptive signaling via pins of an integrated circuit device |
| CN116362175A (en) * | 2023-04-03 | 2023-06-30 | 昆腾微电子股份有限公司 | Method, device, equipment and storage medium for extracting pin constraint file |
| CN117422041A (en) * | 2023-09-04 | 2024-01-19 | 中国科学院自动化研究所 | Training method for automatic wiring model of analog chip and automatic wiring method |
-
2024
- 2024-12-18 TW TW113149472A patent/TWI898962B/en active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20220300437A1 (en) * | 2019-09-17 | 2022-09-22 | Micron Technology, Inc. | Memory chip connecting a system on a chip and an accelerator chip |
| CN115731966A (en) * | 2021-08-31 | 2023-03-03 | 美光科技公司 | Automatic adaptive signaling via pins of an integrated circuit device |
| TW202223721A (en) * | 2021-12-09 | 2022-06-16 | 大陸商訊牧信息科技(上海)有限公司 | Configuration method for multiple fpgas and multi-fpga system |
| CN116362175A (en) * | 2023-04-03 | 2023-06-30 | 昆腾微电子股份有限公司 | Method, device, equipment and storage medium for extracting pin constraint file |
| CN117422041A (en) * | 2023-09-04 | 2024-01-19 | 中国科学院自动化研究所 | Training method for automatic wiring model of analog chip and automatic wiring method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN103198009B (en) | A kind of universal testing method, system and related device | |
| CN101924656B (en) | Method and device for realizing network equipment CLI (Command Line Interface for batch scripti) based on dynamic configuration | |
| WO2021238006A1 (en) | Artificial intelligence chip verification | |
| CN111459821A (en) | Software automation unit testing method based on TestNG | |
| CN104778124A (en) | Automatic testing method for software application | |
| CN111881024A (en) | A method, device, device and storage medium for determining an interface test script | |
| CA2913884A1 (en) | Integrated automated test case generation for safety-critical software | |
| WO2012022065A1 (en) | Method and system for realizing automatic tests of digital signal processor (dsp) | |
| CN110362490B (en) | Automatic testing method and system for integrating iOS and Android mobile applications | |
| CN114818565A (en) | Simulation environment management platform, method, equipment and medium based on python | |
| CN111399828B (en) | Model-driven logic device modeling method and terminal | |
| CN115525436A (en) | Model deployment and operation method and device, offline analysis tool and electronic equipment | |
| CN119203893A (en) | Chip verification system based on code service layer | |
| CN102291274A (en) | System and method for realizing automatic adaptation of network testing instrument | |
| CN119556956A (en) | Software testing library updating method, electronic device and medium | |
| CN118760042A (en) | A method for automatically generating PLC control code based on SysML model | |
| TWI898962B (en) | Chip pin configuration system and method thereof | |
| CN113297080A (en) | Simple test method for Internet of things platform | |
| CN115809076A (en) | ECU software automation integration method and system | |
| CN119201097B (en) | A universal verification system for integrated circuit chip verification | |
| CN117873650B (en) | Real-time running environment generation system, method, computer device and storage medium | |
| CN113703339A (en) | Automatic driving simulation method, device, equipment and storage medium | |
| CN120030961A (en) | Chip verification method, device and system | |
| CN116992805B (en) | Chip verification system, method and verification equipment based on generation type constraint model | |
| CN117892665B (en) | Modeling simulation method, device, medium and equipment based on circuit system level model |