Automatic batch connection method for interfaces
Through parameterized macro definitions and automated scripts, automatic batch connection between interfaces and VIPs is achieved, solving the problem of time-consuming and error-prone interface connection and improving the efficiency and stability of digital integrated circuit design and verification.
Patent Information
- Application Number
- CN202510893107.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-06-30
AI Technical Summary
In the design and verification process of digital integrated circuits, connecting the interface to the verification IP (VIP) requires manual code writing, which is time-consuming and prone to human errors, with high repetitiveness and low efficiency.
By adopting the parameterized macro definition method, the interface code is automatically generated through scripts, and the interface information is managed using configuration files and databases to achieve automated batch connection between interfaces and VIPs. Combined with hierarchical verification strategies and automated scripts, the correctness and efficiency of interface connections are ensured.
It reduces the need for manual coding, lowers the risk of human error, improves the efficiency and flexibility of the verification process, simplifies maintenance work, and improves the adaptability of the design and the stability of the system.
Smart Images

Figure CN120803512A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of interface connection, in particular to an interface automatic batch connection method. BACKGROUND
[0002] In the field of digital integrated circuit design and verification, interface connection refers to the process of connecting the interfaces of different components (such as design modules, verification IPs (VIPs), bus controllers, etc.) through signal or protocol level interconnection to realize data transmission, control interaction or communication function.
[0003] With the increase in complexity of digital integrated circuits, the number of bus interfaces also increases, making it more and more difficult and time-consuming to connect these interfaces in the verification process. The process of connecting the interface to the VIP requires manual code writing, which is not only time-consuming but also prone to human error, and is highly repetitive and inefficient during verification. SUMMARY
[0004] The purpose of the present application is to provide an interface automatic batch connection method to solve the problem of the need for manual code writing in the process of connecting the interface to the VIP, which is not only time-consuming but also prone to human error, and is highly repetitive and inefficient during verification.
[0005] To achieve the above purpose, the present application provides the following technical solution: an interface automatic batch connection method, comprising the following steps:
[0006] S1, confirming the input / output port: clearly defining all data interaction interfaces required by the system to ensure that the interface type and signal list basic information are complete and accurate;
[0007] S2, parameterized macro definition: using the parameterized macro definition method, simplifying the interface configuration according to the preset rules and parameters, and automatically generating the corresponding interface code;
[0008] S3, connection code generation: reading the configuration file in S2 through a script, automatically calling the macro, and batch generating the connection code of the interface and the VIP;
[0009] S4, batch generation of interfaces: creating a large number of interfaces with similar structures but different parameters at one time;
[0010] S5, batch connection: automatically connecting the generated interfaces and VIPs through a script to realize correct communication and data exchange between interfaces and complete the construction and integration of the entire system.
[0011] Preferably, in S1, when the data interaction interface is defined, the design requirements are sorted out, all bus interfaces to be connected are listed, and the key attributes of each interface are recorded, including the interface name, number, signal type and data width.
[0012] Preferably, in S1, the interface information is centrally managed by a configuration file or a database, realizing the structured storage and quick retrieval of the interface information. When using a configuration file for management, the data structure design, storage format selection, quick retrieval implementation and data verification mechanism are included. When using a database for management, the database table structure design, data insertion, complex retrieval and data visualization and management are included.
[0013] Preferably, in the parameterized macro definition, the following steps are further included:
[0014] S21, defining a macro template setting: designing a macro containing parameters required for interface connection, including interface name, VIP type, signal mapping relationship and clock frequency;
[0015] S22, macro template confirmation: completing confirmation through static checking, expansion verification and function verification;
[0016] S23, configuring parameters: specifying macro parameters for each interface in the configuration file.
[0017] Preferably, in the macro template definition, the macro function boundary is explicitly defined, the variable parameters are extracted, and then the macro is created using the `define syntax. Finally, the macro parameters are documented.
[0018] Preferably, in the static confirmation, syntax verification and parameter integrity checking are included. In the expansion verification, the macro expansion result is viewed and compared with the expected result. In the function verification, unit testing and regression testing are respectively performed.
[0019] Preferably, in S23, when configuring parameters, the parameter list of the macro definition, the configuration file format and the script parsing logic are combined to realize the automatic mapping of "parameter definition-file configuration-code generation".
[0020] Preferably, in S4, multiple interface parameters are defined in the configuration file in batches, and the script iterates through the interface list in the configuration file to generate independent connection code for each interface.
[0021] Preferably, in S5, the script integrates all generated interface connection codes and inserts them into the verification platform or the RTL top-level file. By using the standardized interface of the VIP framework, the connection of the interface and the verification component is automatically completed. After the construction and integration of the system are completed, the automatic verification or simulation is performed to verify the correctness of the interface communication.
[0022] Preferably, in the execution of the automatic verification or simulation, the following contents are further included:
[0023] A1, establishing a hierarchical verification strategy: constructing a hierarchical verification strategy through system-level verification, interface-level verification, signal-level verification, protocol-level verification and function-level verification;
[0024] A2, verification implementation: build a test platform, design test cases, embed key timing assertions in the design, perform assertion verification, complete the construction of the coverage model through requirement analysis and planning, function point decomposition and coverage point definition, cross coverage and combination testing, coverage model implementation, and integration and verification;
[0025] A3, automatic script implementation: set up simulation control scripts and coverage analysis scripts, execute the simulation control scripts and coverage analysis scripts respectively, and integrate the generated reports and execution results of the two scripts;
[0026] A4, verification execution and result analysis: configure the automatic verification process in continuous integration, use tools to generate interactive reports, and output visual results.
[0027] Compared with the prior art, the beneficial effects of the present application are:
[0028] 1. In the present application, the batch interface connection automation generation realized by parameterized macro definition reduces the need for manual coding, reduces the risk of human error, improves the efficiency of the verification process, and designers only need to specify macro parameters in the configuration file to quickly configure a large number of different interface connections without writing complex connection code. Parameterized macro definition enhances code reusability, and the same macro definition can be reused in different projects or different verification platforms, reducing redundant work.
[0029] 2. In the present application, the configuration of the interface connection is concentrated in the configuration file, so when the interface or system changes, maintenance personnel only need to adjust the parameters in the configuration file without having to delve into the code itself, simplifying maintenance work. Parameterized macro definition provides high flexibility, supports quick modification and adaptation of interface connections, and helps adapt to various complex scenarios in large-scale integrated circuit design processes. The macro definition framework can be extended as needed to support new interface types or new verification IPs (VIPs), thereby improving design adaptability. BRIEF DESCRIPTION OF DRAWINGS
[0030] Figure 1 A flowchart of the interface automatic batch connection method of the present application;
[0031] Figure 2 A Python script automation flowchart of the interface automatic batch connection method of the present application. DETAILED DESCRIPTION
[0032] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0033] Embodiment 1: Reference Figure 1 and Figure 2 An interface automatic batch connection method is shown, which comprises the following steps:
[0034] Step 1: Confirm the input / output port: clearly define all data interaction interfaces required by the system, and ensure that the interface type and signal list basic information are complete and correct;
[0035] When the data interaction interface is defined, the design requirements are sorted out, all bus interfaces that need to be connected are listed, and the key attributes of each interface are recorded, including interface name, number, signal type and data width;
[0036] The interface information is managed centrally through a configuration file or a database to realize the structured storage and quick retrieval of interface information. When using a configuration file for management, it includes data structure design, storage format selection, quick retrieval implementation and data verification mechanism. When using a database for management, it includes database table structure design, data insertion, complex retrieval and data visualization and management;
[0037] The interface information is stored in a hierarchical structure, including interface basic attributes, signal list, VIP configuration parameters and other fields, the data structure design is completed, the storage format is rotated in JSON, YAML and CSV, the interface can be quickly retrieved through interface type filtering or signal name query, verification logic is added when parsing the configuration file to ensure the correct data format, and when the database is centrally managed, the database is connected through tools such as DBeaver or TablePlus, the interface information is added, deleted, modified and inquired through a graphical interface, multi-table association query and data export to a configuration file are realized;
[0038] A hybrid management scheme of configuration file + database can also be used:
[0039] In the configuration file, the runtime parameters that change frequently are stored, the static metadata and historical version information are stored in the database, the hierarchical storage is completed, the bidirectional synchronization of the configuration file and the database is realized through a script, and the synchronization mechanism is constructed.
[0040] When targeting small projects, prefer using JSON / YAML configuration files with scripts for lightweight management. For medium to large projects, use a hybrid approach of database + configuration files. The database manages metadata, and the configuration files manage instance parameters. Sensitive interface information should be stored encrypted. Set access permissions for the database, and avoid storing keys in plain text in the configuration files.
[0041] Step two, parameterized macro definition: Use parameterized macro definition to simplify interface configuration according to pre-set rules and parameters, and automatically generate corresponding interface code.
[0042] When parameterizing the macro definition, the following steps are included:
[0043] 21. Define macro template settings: Design a macro that contains the parameters required for interface connection, including interface name, VIP type, signal mapping relationship, and clock frequency.
[0044] Define the macro function boundary, and the defined macro needs to serve a specific scenario, such as interface connection, VIP configuration, assertion generation, etc.
[0045] Extract variable parameters: When identifying parameters, abstract the properties in the macro that may change with the interface into parameters, including but not limited to: interface name, instance name, VIP type, signal mapping list, configuration parameters (such as baud rate, data bit width), and clock / reset signal name.
[0046] Create a macro using the `define syntax. In complex scenarios, use `ifdef to implement conditional expansion of the macro, enhancing flexibility. Add parameter descriptions before macro definition to document macro parameters.
[0047] 22. Macro template confirmation: Complete confirmation through static checking, expansion verification, and functional verification.
[0048] In static confirmation, include syntax verification and parameter integrity checking. In expansion verification, include viewing macro expansion results and expected comparison. In functional verification, perform unit testing and regression testing.
[0049] In syntax verification, use simulation tools to compile files containing macros to check for syntax errors. In parameter integrity checking, confirm that macro parameters cover all possible variable factors to avoid hardcoding.
[0050] When viewing macro expansion results, use simulation tools' macro expansion functions (such as VCS' -E option) to generate expanded code, which is manually reviewed. In expected comparison, compare the expanded code with the standard code written manually to ensure logical consistency.
[0051] During unit testing, test cases are written to verify the behavior of the macro under different parameter combinations, including communication tests under different baud rate configurations, the impact of data bit width changes on data transmission, and regression tests that are run in a complete verification environment to ensure that the macro functions properly after integration.
[0052] 23. Configuration parameters: specify macro parameters for each interface in the configuration file, extract parameters based on the macro template, list all user-configurable parameters according to the defined macro template, specify mandatory and optional parameters, select the configuration file format, write the configuration file, establish parameter mapping relationships, and parse parameters through scripts to generate code.
[0053] Step three, connection code generation: read the configuration file in step two through a script, automatically call the macro, and batch generate connection code for interfaces and VIPs.
[0054] Step four, batch generation of interfaces: create a large number of interfaces with similar structures but different parameters at once.
[0055] Step five, batch connection: automatically connect the generated interfaces and VIPs through scripts to enable correct communication and data exchange between interfaces, complete the construction and integration of the entire system, integrate all generated interface connection code into the verification platform or RTL top-level file, use the standardized interface of the VIP framework to automatically complete the connection between interfaces and verification components, and perform automated verification or simulation after the construction and integration of the system are complete to verify the correctness of interface communication.
[0056] During automated verification or simulation, the following content is also included:
[0057] A1. Establish a hierarchical verification strategy: build a hierarchical verification strategy through system-level verification, interface-level verification, signal-level verification, protocol-level verification, and function-level verification.
[0058] A2. Verification implementation: build a test platform, design test cases, embed key timing assertions in the design, perform assertion verification, and finally build a coverage model.
[0059] When building a coverage model, complete requirement analysis and planning by clearly defining verification targets, defining coverage types, and setting coverage goals, use parameterized coverage points, state machines, and control flow coverage, and complete function point decomposition and coverage point definition for boundary conditions and error handling, complete cross-coverage and combination testing through parameter combination coverage, timing and sequence coverage, implement the coverage model, and integrate and verify it with the test platform.
[0060] A3. Automated script implementation: set up simulation control scripts and coverage analysis scripts. When the simulation control script is executed, the process is as follows:
[0061] Parameter parsing: Obtain test case name, simulation tool type, waveform options, etc.
[0062] Compilation phase: Call tools such as VCS / Xcelium to compile the design and verification environment.
[0063] Simulation phase: Set the UVM_TESTNAME environment variable and execute the specified test case.
[0064] Result judgment: Check if the log contains the "UVM_FINISHED" keyword.
[0065] Report generation: Summarize all test results and output the pass rate statistics.
[0066] When the coverage analysis script is executed, the process is as follows:
[0067] Data merging: Use the urg (Unified Report Generator) tool to merge.vdb files
[0068] Report generation: Generate HTML reports containing functional coverage and code coverage.
[0069] Indicator parsing: Extract overall coverage data from the coverage report.
[0070] Threshold check: Compare the actual coverage with the target value and output the check results.
[0071] Integrate the automatic stirring and coverage analysis script to generate reports and execute results.
[0072] A4, verification execution and result analysis: Configure the automated verification process in continuous integration (CI), use tools to generate interactive reports, and output visual results.
[0073] Continuous integration, automatically trigger simulation and coverage analysis when code is committed, send test result summary through email or Slack, notify the results, record the coverage rate change trend of each submission, and complete historical comparison.
[0074] During verification execution and result analysis, it also includes extended functions and exception handling mechanisms:
[0075] Multi-threaded execution of extended functions, concurrent.futures is used to implement parallel execution of test cases, test case execution priority is set based on historical defect data, un-covered scenarios are automatically identified and supplementary test cases are recommended, and coverage gaps are analyzed.
[0076] Abnormal processing mechanism: set the maximum running time for each test case, prevent infinite loop, perform timeout control, automatically delete temporary files after simulation, release disk space, complete resource cleaning, breakpoint recovery supports continuing execution from failed test cases without starting from the beginning.
[0077] The working principle of the application is as follows: firstly, the input / output port is confirmed to ensure that all necessary data interaction interfaces are clear; then, according to preset rules and parameters, the corresponding interface code is automatically generated by using the parameterized macro definition mode; by means of the define feature of the hardware description language, the general logic of the interface code is encapsulated into a reusable macro template according to the preset rules and parameters, which greatly improves the efficiency and accuracy of code writing; when defining the macro, strict static syntax checking, expansion verification (to ensure that the code logic is correct after macro instantiation) and function testing (to verify the macro function by using unit test cases) are required to ensure its reliability; then, by the strategy of batch generation of interfaces, a large number of interfaces with similar structure but different parameters are created at one time according to the parameterized macro template by using script loop to traverse the interface parameter list; when building a multi-serial port communication system, the parameters of different UART interfaces in the configuration file can be read by the script to automatically generate the corresponding interface instance code, avoiding the tediousness of writing interface codes one by one, and the development time can be shortened to 1 / 3 of the original time, and the code style and logic can be ensured to be highly consistent, which is convenient for later maintenance and expansion;
[0078] Finally, the batch connection of these interfaces is automatically realized by using the script; in this stage, the generated interface code needs to be integrated into the verification platform or the RTL top layer, and the automatic connection is realized by means of the verification IP (VIP) framework (such as UVM). The script will complete signal mapping and timing matching according to the interface protocol (such as AXI, SPI), to ensure that the interfaces can correctly and efficiently communicate and exchange data with each other; by automatic connection of the script, the handshake signals, address mapping and timing constraints of different interfaces can be accurately processed, avoiding timing conflicts or signal misplacement caused by manual connection. This process not only greatly improves the efficiency of system integration, but also fundamentally guarantees the stability of the entire system in data interaction and function cooperation, lays a solid foundation for subsequent verification and testing, and completes the construction and integration of the entire system.
[0079] Although the application has been described in detail with reference to the foregoing embodiments, those skilled in the art can modify the technical solutions described in the foregoing embodiments or make equivalent replacements to part of the technical features, and any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the application shall be included in the protection scope of the application.
Claims
1. A method for automatic batch connection of interfaces, characterized by: The following steps are involved: S1. Confirm input / output ports: Identify all data interaction interfaces required by the system and ensure that the basic information of the interface type and signal list is complete and correct; S2. Parameterized macro definition: Utilize parameterized macro definition to simplify interface configuration according to preset rules and parameters, and automatically generate corresponding interface code; S3, connection code generation: read the configuration file in S2 through the script, automatically call the macro, and batch generate the connection code between the interface and VIP; S4. Batch generation of interfaces: Create a large number of interfaces with similar structures but different parameters at one time; S5. Batch connection: Through script automation, the generated interfaces are automatically connected to VIP to achieve correct communication and data exchange between the interfaces, completing the construction and integration of the entire system.
2. The method for automatic batch connection of interfaces according to claim 1, characterized in that: In S1, when clarifying the data interaction interface, sort out the design requirements, list all bus interfaces that need to be connected, and record the key attributes of each interface, including interface name, number, signal type, and data width.
3. The method for automatic batch connection of interfaces according to claim 1, characterized in that: In S1, interface information is centrally managed through configuration files or databases to achieve structured storage and rapid retrieval of interface information. When using configuration file management, it includes data structure design, storage format selection, rapid retrieval implementation and data verification mechanism. When using database management, it includes database table structure design, data insertion, complex retrieval and data visualization and management.
4. The method for automatic batch connection of interfaces according to claim 1, characterized in that: When defining a parameterized macro, the following steps are also included: S21. Define macro template settings: Design a macro containing the parameters required for interface connection, including interface name, VIP type, signal mapping relationship and clock frequency; S22. Macro template confirmation: Complete confirmation through static inspection, expansion verification and functional verification; S23. Configuration parameters: Specify macro parameters for each interface in the configuration file.
5. The method for automatic batch connection of interfaces according to claim 4, characterized in that: When defining a macro template, define the macro function boundaries, extract variable parameters, create the macro using `define syntax, and finally document the macro parameters.
6. The method for automatic batch connection of interfaces according to claim 4, characterized in that: During static confirmation, it includes syntax verification and parameter integrity check. During expansion verification, it includes checking the macro expansion results and comparing them with expectations. During functional verification, unit testing and regression testing are performed separately.
7. The method for automatic batch connection of interfaces according to claim 4, characterized in that: In S23, when configuring parameters, the macro-defined parameter list, configuration file format, and script parsing logic are combined to achieve the automated mapping of "parameter definition-file configuration-code generation".
8. The method for automatic batch connection of interfaces according to claim 1, characterized in that: In S4, multiple interface parameters are defined in batches in the configuration file. The script loops through the interface list in the configuration file and generates independent connection code for each interface.
9. The method for automatic batch connection of interfaces according to claim 1, characterized in that: In S5, the script integrates all generated interface connection codes and inserts them into the verification platform or RTL top-level file. It uses the standardized interface of the VIP framework to automatically complete the connection between the interface and the verification component. After the system is built and integrated, automated verification or simulation is performed to verify the correctness of the interface communication.
10. The method for automatic batch connection of interfaces according to claim 9, characterized in that: In S5, when performing automated verification or simulation, the following are also included: A1. Establish a layered verification strategy: Build a layered verification strategy through system-level verification, interface-level verification, signal-level verification, protocol-level verification, and function-level verification; A2. Verification and Implementation: Build a test platform, design test cases, embed key timing assertions in the design, perform assertion verification, and complete the construction of the coverage model through requirements analysis and planning, function point decomposition and coverage point definition, cross-coverage and combination testing, coverage model implementation, integration, and verification. A3. Automated script implementation: Set up simulation control scripts and coverage analysis scripts, execute them separately, and generate reports and execution results after combining the two scripts. A4. Verification execution and result analysis: Configure automated verification processes in continuous integration, use tools to generate interactive reports, and output visual results.
Citation Information
Patent Citations
Method and apparatus for providing mixed-reality connectivity assistance
CN104509174A
Verification method and device of parameterized design, equipment and storage medium
CN117669438A
Digital IC verification environment multi-thread operation automation method
CN119150784A
Systems and methods for generating a higher level description of a circuit design based on connectivity strengths
US20140033155A1
Cited By
Method and system for docking logistics provider systems in batches
CN121365925A
Connection code generation method and device, electronic equipment, computer readable storage medium and computer program product
CN121787339A
A method, device, electronic device, computer readable storage medium and computer program product for generating a connection code
CN121787339B