Interface automatic batch connection method

By using an automated batch connection method for interfaces, and leveraging parameterized macro definitions and script automation, the problem of time-consuming and error-prone interface connections in digital integrated circuit design is solved, achieving efficient and stable interface connections and system integration.

CN120803512BActive Publication Date: 2026-05-05浙江智行微电子有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
浙江智行微电子有限公司
Filing Date
2025-06-30
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

In the process of digital integrated circuit design and verification, connecting the interface to the VIP requires manual coding, which is time-consuming, prone to human error, highly repetitive, and inefficient.

Method used

An automated batch connection method is adopted, which automatically generates interface code and realizes batch connections through parameterized macro definitions and script automation. This includes steps such as confirming input/output ports, parameterized macro definitions, connection code generation, batch generation, and batch connection. Interface information is managed using configuration files and databases, a hierarchical verification strategy is established, and automated verification is executed.

Benefits of technology

It reduces the need for manual coding, lowers the risk of human error, improves the efficiency of the verification process and the adaptability of the design, simplifies maintenance, and enhances code reusability and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803512B_ABST
    Figure CN120803512B_ABST
Patent Text Reader

Abstract

The application discloses an interface automatic batch connection method, relates to the technical field of interface connection, and comprises the following steps: S1, confirming input / output ports; S2, parameterized macro definition; S3, connection code generation; S4, batch generation of interfaces; and S5, batch connection. In the application, the batch interface connection automation generation realized through the parameterized macro definition reduces the need for manual coding, reduces the risk of human errors, improves the efficiency of the verification process, and designers only need to specify macro parameters in a configuration file, so that a large number of different interface connections can be quickly configured without the need to write complex connection codes. The parameterized macro definition enhances the reusability of the codes, the same macro definition can be repeatedly used in different projects or different verification platforms, the parameterized macro definition provides high flexibility, supports quick modification and adaptation of the interface connection, and is helpful to adapt to various complex scenes in the large-scale integrated circuit design process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of interface connection technology, specifically to a method for automatic batch connection of interfaces. Background Technology

[0002] In the field of digital integrated circuit design and verification, interface connection refers to the process of interconnecting the interfaces of different components (such as design modules, verification IP (VIP), bus controllers, etc.) through signal or protocol layers to realize data transmission, control interaction or communication functions.

[0003] As the complexity of digital integrated circuits increases, the number of bus interfaces also increases, making it increasingly difficult and time-consuming to connect these interfaces during the verification process. Connecting interfaces to VIPs requires manual coding, which is not only time-consuming but also prone to introducing human error, resulting in high repetition and low efficiency during verification. Summary of the Invention

[0004] The purpose of this invention is to provide an automatic batch connection method for interfaces, in order to solve the problems mentioned in the background art, which require manual coding in the process of connecting interfaces to VIPs, which is not only time-consuming but also prone to human error, and has high repetition and low efficiency during verification.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for automatic batch connection of interfaces, comprising the following steps:

[0006] S1. Confirm Input / Output Ports: Identify all data interaction interfaces required by the system and ensure that the interface types and basic information of the signal list are complete and accurate.

[0007] S2. Parameterized macro definition: Using parameterized macro definition, the interface configuration is simplified according to preset rules and parameters, and the corresponding interface code is automatically generated.

[0008] S3. Connection Code Generation: The script reads the configuration file in S2, automatically calls macros, and generates connection codes for interfaces and VIPs in batches.

[0009] S4. Batch interface generation: Create a large number of interfaces with similar structures but different parameters at once;

[0010] S5. Batch Connection: Through script automation, the generated interfaces are automatically connected to the VIP, enabling correct communication and data exchange between the interfaces, and completing the construction and integration of the entire system.

[0011] Preferably, in S1, when defining the data interaction interface, 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.

[0012] Preferably, in S1, interface information is centrally managed through configuration files or databases to achieve structured storage and fast retrieval of interface information. When using configuration files for management, it includes data structure design, storage format selection, fast retrieval implementation, and data verification mechanism. When using databases for management, it includes database table structure design, data insertion, complex retrieval, and data visualization and management.

[0013] Preferably, when defining parameterized macros, the following steps are also included:

[0014] S21. Define macro template settings: Design a macro that includes the parameters required for interface connection. The parameters include interface name, VIP type, signal mapping relationship and clock frequency.

[0015] S22. Macro Template Confirmation: Confirmation is completed through static checks, expansion verification, and functional verification.

[0016] S23. Configuration parameters: Specify macro parameters for each interface in the configuration file.

[0017] Preferably, when defining a macro template, the macro function boundaries are clearly defined, variable parameters are extracted, then the macro is created using the define syntax, and finally the macro parameters are documented.

[0018] Preferably, static verification includes syntax verification and parameter integrity checks; expansion verification includes viewing macro expansion results and comparing them with expectations; and functional verification includes performing unit tests and regression tests respectively.

[0019] Preferably, in S23, when configuring parameters, the parameter list of macro definitions, configuration file format, and script parsing logic are combined to achieve automated mapping of "parameter definition - file configuration - code generation".

[0020] Preferably, in S4, multiple interface parameters are defined in batches in the configuration file, 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 code and inserts it into the verification platform or RTL top-level file. Using the standardized interface of the VIP framework, it automatically completes the connection between the interface and the verification component. After the system is built and integrated, it performs automated verification or simulation to verify the correctness of the interface communication.

[0022] Preferably, when performing automated verification or simulation, the following are also included:

[0023] A1. Establish a layered verification strategy: Construct a layered verification strategy through system-level verification, interface-level verification, signal-level verification, protocol-level verification, and functional-level verification;

[0024] A2. Verification and Implementation: Build a test platform, design test cases, embed key timing assertions in the design, verify the assertions, 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, and integration and verification.

[0025] A3. Automated script implementation: Set up simulation control script and coverage analysis script, execute the simulation control script and coverage analysis script respectively, and combine the generated report and execution results after the execution of the two scripts;

[0026] A4. Verification Execution and Result Analysis: Configure automated verification processes in continuous integration, use tools to generate interactive reports, and output visualized results.

[0027] Compared with the prior art, the beneficial effects of the present invention are:

[0028] 1. In this invention, the automated generation of batch interface connections through parameterized macro definitions reduces the need for manual coding, lowers the risk of human error, and improves the efficiency of the verification process. 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 definitions enhance code reusability, and the same macro definition can be reused in different projects or different verification platforms, reducing redundant work.

[0029] 2. In this invention, since the configuration of interface connections is centralized in the configuration file, 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, which simplifies the maintenance work. The parameterized macro definition provides high flexibility, supports rapid modification and adaptation of interface connections, and helps to adapt to various complex scenarios in the process of large-scale integrated circuit design. The macro definition framework can be extended as needed to support new interface types or new verification IPs (VIPs), thereby improving the adaptability of the design. Attached Figure Description

[0030] Figure 1 This is a flowchart of an automatic batch connection method for interfaces according to the present invention;

[0031] Figure 2 This is a Python script flowchart illustrating the automatic batch connection method for interfaces according to the present invention. Detailed Implementation

[0032] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0033] Example 1: Refer to Figure 1 and Figure 2 As shown: A method for automatically batch connecting interfaces includes the following steps:

[0034] Step 1: Confirm Input / Output Ports: Identify all data interaction interfaces required by the system, and ensure that the interface types and basic signal list information are complete and accurate;

[0035] When defining the data interaction interface, sort out the design requirements, list all the bus interfaces that need to be connected, and record the key attributes of each interface, including interface name, number, signal type and data width;

[0036] Interface information can be centrally managed through configuration files or databases, enabling structured storage and rapid retrieval of interface information. When using configuration files for management, it includes data structure design, storage format selection, rapid retrieval implementation, and data verification mechanisms. When using databases 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 fields such as basic interface attributes, signal list, and VIP configuration parameters. The data structure design is completed, and the storage format is rotated between JSON, YAML, and CSV. Interfaces can be quickly retrieved by filtering by interface type or querying by signal name. Validation logic is added when parsing the configuration file to ensure that the data format is correct. When the database is centrally managed, tools such as DBeaver or TablePlus are used to connect to the database, and the interface information can be added, deleted, modified, and queried, multi-table join queries and data can be exported to configuration files through a graphical interface.

[0038] Alternatively, a hybrid management solution combining configuration files and a database can be used.

[0039] In the configuration file, frequently changing runtime parameters are stored, while the database stores static metadata and historical version information, thus completing hierarchical storage. A synchronization mechanism is built by using scripts to achieve bidirectional synchronization between the configuration file and the database.

[0040] For small projects, prioritize using JSON / YAML configuration files in conjunction with scripts for lightweight management. For medium to large projects, adopt a hybrid approach of database + configuration files. The database manages metadata, the configuration files manage instance parameters, sensitive interface information must be stored in encrypted form, access permissions are set for the database, and the configuration files should avoid storing keys in plaintext.

[0041] Step 2, Parameterized Macro Definition: Using parameterized macro definition, the interface configuration is simplified according to preset rules and parameters, and the corresponding interface code is automatically generated;

[0042] When defining parameterized macros, the following steps are also included:

[0043] 21. Define macro template settings: Design a macro that includes the parameters required for interface connection, including interface name, VIP type, signal mapping relationship and clock frequency;

[0044] Define the boundaries of macro functions. Defined macros should serve specific scenarios, such as interface connection, VIP configuration, assertion generation, etc.

[0045] When extracting and identifying variable parameters, attributes in the macro that may change with the interface are abstracted as parameters, including but not limited to: interface name, instance name, VIP type, signal mapping list, configuration parameters (such as baud rate and data bit width), and clock / reset signal names.

[0046] Macros can be created using the `define` syntax. In complex scenarios, conditional expansion of macros can be achieved using `ifdef`, enhancing flexibility. Parameter descriptions can be added before the macro definition to document macro parameters.

[0047] 22. Macro Template Confirmation: Confirmation is completed through static checks, expansion verification, and functional verification;

[0048] During static validation, syntax verification and parameter integrity checks are performed. During expansion validation, macro expansion results are compared with expectations. During functional validation, unit tests and regression tests are performed respectively.

[0049] During syntax verification, a simulation tool is used to compile the file containing macros to check for syntax errors. During parameter integrity checks, it is confirmed that macro parameters cover all possible variable factors to avoid hard coding.

[0050] When reviewing the macro expansion results, use the macro expansion function of a simulation tool (such as the -E option of VCS) to generate the expanded code, review it manually, and compare it with the manually written standard code to ensure logical consistency.

[0051] During unit testing, test cases are written to verify the behavior of macros under different parameter combinations, including communication tests under different baud rate configurations and the impact of data bit width changes on data transmission. During regression testing, regression tests are run in a complete verification environment to ensure that the system functions normally after macro integration.

[0052] 23. Configuration Parameters: Specify macro parameters for each interface in the configuration file, extract parameters based on macro templates, list all parameters that need to be configured by the user according to the defined macro templates, clarify the required and optional parameters, select the configuration file format, write the configuration file, establish parameter mapping relationships, parse the parameters and generate code through scripts;

[0053] Step 3: Connection Code Generation: The script reads the configuration file from Step 2, automatically calls macros, and generates connection codes for the interfaces and VIPs in batches.

[0054] Step 4: Batch generation of interfaces: Create a large number of interfaces with similar structures but different parameters at once;

[0055] Step 5, Batch Connection: Through script automation, the generated interfaces are automatically connected to the VIP, enabling correct communication and data exchange between the interfaces, completing the construction and integration of the entire system. The script integrates all generated interface connection code and inserts it into the verification platform or RTL top-level file. Utilizing the standardized interfaces of the VIP framework, the connection between the interfaces and verification components is automatically completed. After the system construction and integration are completed, automated verification or simulation is performed to verify the correctness of interface communication.

[0056] When performing automated verification or simulation, the following are also included:

[0057] A1. Establish a layered verification strategy: Construct a layered verification strategy through system-level verification, interface-level verification, signal-level verification, protocol-level verification, and functional-level verification;

[0058] A2. Verification and Implementation: Build a test platform, design test cases, embed key timing assertions in the design, verify the assertions, and finally build a coverage model;

[0059] When building a coverage model, requirements analysis and planning are completed by clearly defining verification objectives, coverage types, and coverage targets, utilizing parameterized coverage points. Function point decomposition and coverage point definition are achieved through state machine and control flow coverage, as well as boundary conditions and error handling. Cross-coverage and combined testing are completed through parameter combination coverage, temporal and sequential coverage, implementing the coverage model, and integrating and verifying 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: Using tools such as VCS / Xcelium to compile, design, and verify the environment;

[0063] Simulation phase: Set the UVM_TESTNAME environment variable and execute the specified test cases;

[0064] Result determination: Check if the log contains the keyword "UVM_FINISHED";

[0065] Report generation: Summarizes all test results and outputs pass rate statistics;

[0066] The execution flow of the coverage analysis script is as follows:

[0067] Data merging: Use the urg (UnifiedReportGenerator) tool to merge .vdb files.

[0068] Report generation: Generates an HTML report that includes feature coverage and code coverage;

[0069] Metric Analysis: Extracting overall coverage data from the coverage report;

[0070] Threshold check: Compare the actual coverage with the target value and output the check results;

[0071] Generate reports and execution results from integrated automated mixing and coverage analysis scripts.

[0072] A4. Verification Execution and Result Analysis: Configure automated verification processes in continuous integration, use tools to generate interactive reports, and output visualized results;

[0073] Continuous Integration (CI) automatically triggers simulation and coverage analysis when code is committed, sends test result summaries via email or Slack, notifies users of the results, records the coverage trend of each commit, and completes historical comparisons.

[0074] The verification and result analysis also include extended functionality and exception handling mechanisms:

[0075] The extended functionality features multi-threaded execution, using concurrent.futures to achieve parallel execution of test cases, setting test case execution priorities based on historical defect data, automatically identifying uncovered scenarios and recommending supplementary test cases, and analyzing coverage gaps.

[0076] Exception handling mechanism: Set a maximum runtime for each test case to prevent infinite loops, implement timeout control, automatically delete temporary files after simulation ends, release disk space, complete resource cleanup, and support breakpoint recovery to continue execution from failed test cases without starting from scratch.

[0077] The working principle of this invention is as follows: First, it confirms the input / output ports to ensure all necessary data interaction interfaces are clearly defined. Then, using parameterized macro definitions, it automatically generates corresponding interface code based on preset rules and parameters. Leveraging the `define` feature of hardware description languages, it encapsulates the general logic of the interface code into reusable macro templates according to preset rules and parameters, greatly improving the efficiency and accuracy of code writing. When defining macros, strict static syntax checking, expansion verification (ensuring the correctness of the code logic after macro instantiation), and functional testing (verifying macro functionality through unit test cases) are required to guarantee reliability. Next, through a strategy of batch interface generation, a script iterates through the interface parameter list and creates a large number of interfaces with similar structures but different parameters at once, based on the parameterized macro templates. When building a multi-serial-port communication system, the script can read the parameters of different UART interfaces in the configuration file and automatically generate corresponding interface instance code, avoiding the tedious process of writing interface code one by one. Development time can be reduced to 1 / 3 of the original, while ensuring a high degree of consistency in code style and logic, facilitating later maintenance and expansion.

[0078] Finally, scripts are used to automate the batch connection of these interfaces. At this stage, the generated interface code needs to be integrated into the verification platform or RTL top layer, using a verification IP (VIP) framework (such as UVM) to achieve automated connection. The script will perform signal mapping and timing matching according to the interface protocol (such as AXI, SPI), ensuring correct and efficient communication and data exchange between interfaces. Automated connection via scripts can accurately handle handshake signals, address mappings, and timing constraints of different interfaces, avoiding timing conflicts or signal misalignments caused by manual connection. This process not only significantly improves the efficiency of system integration but also fundamentally guarantees the stability of the entire system in data interaction and functional collaboration, laying a solid foundation for subsequent verification and testing, and completing the construction and integration of the entire system.

[0079] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for automatic batch connection of interfaces, characterized in that: Includes the following steps: S1. Confirm Input / Output Ports: Identify all data interaction interfaces required by the system and ensure that the interface types and basic information of the signal list are complete and accurate. S2. Parameterized Macro Definition: Using parameterized macro definition, interface configuration is simplified according to preset rules and parameters, and corresponding interface code is automatically generated. Macro template settings are defined, macros containing parameters required for interface connection are designed, macro function boundaries are clarified, and attributes in the macro that may change with the interface are abstracted as parameters. Macros are created using the define syntax, parameter descriptions are added before the macro definition to achieve documented macro parameters, and the validity of the template is confirmed through static, expansion and functional verification. Macro parameters are specified for each interface in the configuration file, parameters are extracted based on the macro template, configuration files are written according to the defined macro template, and parameters are parsed to generate interface code. S3. Connection Code Generation: The script reads the configuration file in S2, automatically calls macros, and generates connection codes for interfaces and VIPs in batches. S4. Batch interface generation: Create a large number of interfaces with similar structures but different parameters at once; S5. Batch Connection: Through script automation, the generated interfaces are automatically connected to the VIP, enabling correct communication and data exchange between the interfaces, completing the construction and integration of the entire system. The script integrates and embeds the interface connection code, automatically completes the docking between the interface and the verification component based on the VIP standardized interface, and finally verifies the effectiveness of interface communication through automated verification and simulation.

2. The automatic batch connection method for interfaces according to claim 1, characterized in that: In S1, when defining the data interaction interface, 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.

3. The automatic batch connection method for interfaces according to claim 1, characterized in that: In S1, interface information is centrally managed through configuration files or databases, enabling structured storage and rapid retrieval of interface information. When using configuration files for management, it includes data structure design, storage format selection, rapid retrieval implementation, and data verification mechanisms. When using databases for management, it includes database table structure design, data insertion, complex retrieval, and data visualization and management.

4. The automatic batch connection method for interfaces according to claim 1, characterized in that: When defining parameterized macros, the following steps are also included: S21. Define macro template settings: Design a macro that includes the parameters required for interface connection. The parameters include interface name, VIP type, signal mapping relationship and clock frequency. S22. Macro Template Confirmation: Confirmation is completed through static checks, expansion verification, and functional verification. S23. Configuration parameters: Specify macro parameters for each interface in the configuration file.

5. The automatic batch connection method for interfaces according to claim 4, characterized in that: When defining a macro template, the macro function boundaries are clearly defined, variable parameters are extracted, macros are created using the `define syntax, and finally, the macro parameters are documented.

6. The automatic batch connection method for interfaces according to claim 4, characterized in that: Static validation includes syntax verification and parameter integrity checks; expansion validation includes viewing macro expansion results and comparing them with expectations; and functional validation involves performing unit tests and regression tests respectively.

7. The automatic batch connection method for interfaces according to claim 4, characterized in that: In S23, when configuring parameters, the parameter list defined by macros, the configuration file format, and the script parsing logic are combined to achieve an automated mapping of "parameter definition - file configuration - code generation".

8. The automatic batch connection method for interfaces according to claim 1, characterized in that: In S4, multiple interface parameters are defined in batches in the configuration file. The script iterates through the list of interfaces in the configuration file and generates independent connection code for each interface.

9. The automatic batch connection method for interfaces according to claim 1, characterized in that: In S5, the script integrates all generated interface connection code and inserts it into the verification platform or RTL top-level file. Utilizing the standardized interface of the VIP framework, it automatically completes the connection between the interface and the verification component. After the system is built and integrated, it performs automated verification or simulation to verify the correctness of the interface communication.

10. The automatic batch connection method for interfaces according to claim 9, characterized in that: In S5, the following are also included when performing automated verification or simulation: A1. Establish a layered verification strategy: Construct a layered verification strategy through system-level verification, interface-level verification, signal-level verification, protocol-level verification, and functional-level verification; A2. Verification and Implementation: Build a test platform and design test cases, embed key timing assertions in the design, verify the assertions, 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 and integration and verification. A3. Automated script implementation: Set up simulation control script and coverage analysis script, execute the simulation control script and coverage analysis script respectively, and combine the generated report and execution results after the execution of the two scripts; A4. Verification Execution and Result Analysis: Configure automated verification processes in continuous integration, use tools to generate interactive reports, and output visualized results.

Citation Information

Patent Citations

  • Method and apparatus for providing mixed-reality connectivity assistance

    CN104509174A

  • Digital IC verification environment multi-thread operation automation method

    CN119150784A