A rapid generation system for a verification environment

By designing a fast generation system for verification environments, automatically processing and modifying the code of verification environments, the problem of low manual modification efficiency is solved and the efficiency of rapid generation of verification environments is achieved.

CN119690760BActive Publication Date: 2025-06-13MUXI LINGZHI TECHNOLOGY (BEIJING) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510222493.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-06-13
Estimated Expiration
2045-02-27

AI Technical Summary

Technical Problem

In the chip verification scenario, the amount of code in the verification environment is huge, resulting in low manual modification efficiency, which in turn affects the efficiency of the entire chip design and verification stage.

Method used

Design a fast generation system for verification environments, execute computer programs through the processor, automatically obtain target files that need to be modified, determine the scope of modification code, and use preset scripts to generate replacement code segments and replace the original target files.

Benefits of technology

There is no need to manually modify the code, avoid error modification problems, improve code modification efficiency, simplify maintenance and modification processes, improve the efficiency of verification environment modification, and realize the rapid generation of verification environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690760B_ABST
    Figure CN119690760B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of chip verification, and particularly to a system for quickly generating a verification environment. The system determines the corresponding modified code range through a first identifier and a second identifier having a corresponding relationship in a target file to be modified. When a code segment belongs to the modified code range, a preset script is used to generate a corresponding replacement code segment and add it to a replacement file. When the code segment does not belong to the modified code range, the code segment is copied and added to the replacement file. Thereby, it is not necessary to manually modify the code, avoiding the problem of incorrect modification caused by human factors, improving the efficiency of code modification, and being able to be reused in different scenarios where code modification is required, improving the maintainability of various scenarios, thus improving the efficiency of modifying the verification environment and being able to quickly generate the verification environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of chip verification, and particularly to a system for quickly generating a verification environment. Background Art

[0002] In the scenario of chip verification, the modules included in a chip usually involve a large number of interfaces. Generally, for each group of interfaces, there is code corresponding to general verification components, instantiation, wiring, configuration, sequencer, checker, etc. Moreover, there is also code related to communication between different components. The amount of code corresponding to the verification environment of a module is quite huge.

[0003] When there is an update to the interfaces of a module, it is necessary to update the code corresponding to the above verification environment. The existing method usually modifies it manually. However, due to the large amount of code corresponding to the verification environment and the situation that the code in multiple files may need to be modified, the workload of modifying the code manually is obviously large, resulting in a long time-consuming for code modification, and further resulting in a low modification efficiency of the verification environment. Especially in the initial stage of chip design, the chip design often needs to frequently change the module configuration. After changing the configuration, it is necessary to verify the changed design. It can be seen that the low modification efficiency of the verification environment will also lead to a low efficiency in the entire chip design and verification stage.

[0004] Therefore, how to improve the modification efficiency of the verification environment and quickly generate the verification environment has become an urgent problem to be solved. Summary of the Invention

[0005] For the above technical problems, the technical solution adopted by the present invention is as follows:

[0006] A system for quickly generating a verification environment, the system includes: a processor and a memory storing a computer program, and the memory also stores a set of target files corresponding to the verification environment of a target module. Among them, the set of target files includes M target files, M is a positive integer, and the target module includes several groups of interfaces. When the computer program is executed by the processor, the following steps are implemented:

[0007] S101, according to the interface adjustment information corresponding to the target module, obtain several target files to be modified from the set of target files to form a modified file list.

[0008] S102, for any target file in the modified file list, query and obtain N first identifiers in the target file and second identifiers respectively corresponding to the N first identifiers, where N is a positive integer.

[0009] S103, according to N groups of first identifiers and second identifiers with corresponding relationships, determine N modified code ranges.

[0010] S104, generate a replacement file for the target file.

[0011] S105, traverse each code segment in the target file. If the current code segment does not belong to the N modified code ranges, copy the current code segment to the replacement file.

[0012] S106, if the current code segment belongs to the N modified code ranges, use a preset script to regenerate the replacement code segment corresponding to the current code segment, and add the replacement code segment to the replacement file.

[0013] S107, use the replacement file to replace the corresponding target file in the target file set.

[0014] Compared with the prior art, the present invention has obvious beneficial effects. By means of the above technical solutions, a rapid generation system for a verification environment provided by the present invention can achieve quite remarkable technical progressiveness and practicality, and has wide industrial utilization value. It has at least the following beneficial effects:

[0015] The present invention provides a rapid generation system for a verification environment. The system includes: a processor and a memory storing a computer program. The memory also stores a target file set corresponding to the verification environment of the target module. Among them, the target file set includes M target files, where M is a positive integer. The target module includes several groups of interfaces. When the computer program is executed by the processor, the following steps are implemented: S101, according to the interface adjustment information corresponding to the target module, obtain several target files to be modified from the target file set to form a modified file list; S102, for any target file in the modified file list, query N first identifiers in the target file and second identifiers respectively corresponding to the N first identifiers, where N is a positive integer; S103, determine N modified code ranges according to N groups of first identifiers and second identifiers with corresponding relationships; S104, generate a replacement file for the target file; S105, traverse each code segment in the target file. If the current code segment does not belong to the N modified code ranges, copy the current code segment to the replacement file; S106, if the current code segment belongs to the N modified code ranges, use a preset script to regenerate the replacement code segment corresponding to the current code segment, and add the replacement code segment to the replacement file; S107, use the replacement file to replace the corresponding target file in the target file set.

[0016] It can be seen that the corresponding modified code range is determined by the first identifier and the second identifier with a corresponding relationship in the target file to be modified. When the code segment belongs to the modified code range, a corresponding replacement code segment is generated using a preset script and added to the replacement file. When the code segment does not belong to the modified code range, the code segment is copied and added to the replacement file, thus eliminating the need for manual code modification, avoiding the problem of incorrect modification caused by human factors, improving the efficiency of code modification, and being able to be reused in different scenarios where code modification is required, improving the maintainability of various scenarios, thereby improving the efficiency of verifying environment modification and enabling the rapid generation of the verification environment. Brief Description of the Drawings

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0018] Figure 1 It is a schematic flowchart of a computer program executed by a processor in a rapid generation system of a verification environment provided by an embodiment of the present invention. Detailed Embodiments

[0019] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0020] This embodiment provides a rapid generation system for a verification environment. Refer to Figure 1 , which is a schematic flowchart of a computer program executed by a processor in a rapid generation system of a verification environment provided by an embodiment of the present invention. The system includes: a processor and a memory storing a computer program, and the memory also stores a set of target files corresponding to the verification environment of the target module. Among them, the set of target files includes M target files, M being a positive integer, and the target module includes several groups of interfaces. When the computer program is executed by the processor, the following steps are implemented:

[0021] S101, according to the interface adjustment information corresponding to the target module, obtain several target files to be modified from the set of target files to form a modified file list;

[0022] S102. For any target file in the modified file list, query N first identifiers in the target file and the second identifiers respectively corresponding to the N first identifiers, where N is a positive integer;

[0023] S103. Determine N modified code ranges according to the N groups of first identifiers and second identifiers with corresponding relationships;

[0024] S104. Generate a replacement file for the target file;

[0025] S105. Traverse each code segment in the target file. If the current code segment does not belong to the N modified code ranges, copy the current code segment to the replacement file;

[0026] S106. If the current code segment belongs to the N modified code ranges, regenerate the replacement code segment corresponding to the current code segment using a preset script, and add the replacement code segment to the replacement file;

[0027] S107. Use the replacement file to replace the corresponding target file in the target file set.

[0028] Among them, in the chip verification scenario, the target module may refer to an independent component with a specific function inside the chip. Dividing the chip into different modules for design and verification can ensure that each functional unit works correctly, thereby ensuring that the performance and functions of the entire chip meet the design requirements.

[0029] The verification environment may refer to an integrated test system built to ensure the correctness of the chip design, aiming to verify whether the chip can work according to the expected functional and performance requirements through various excitation and checking mechanisms. The verification environment of the target module may correspond to multiple target files.

[0030] The modified code range can be used to identify the code segments that need to be modified.

[0031] Specifically, the interface adjustment information may refer to the adjustment content made to the target module interface, such as the adjustment of the number of interfaces, the adjustment of the interface type, etc. When there is interface adjustment information, the codes corresponding to the general verification components, instantiations, wirings, configurations, sequencers, checkers, etc. corresponding to the interface may all need to be updated.

[0032] In the Linux environment, the modified file list can be generated through the ls command.

[0033] In a specific implementation manner, in the target file, the positions of the code segments corresponding to several groups of interfaces belonging to the same functional type are adjacent.

[0034] Among them, for the convenience of maintenance and modification, in this embodiment, the positions of the code segments corresponding to several groups of interfaces belonging to the same functional type are set adjacent to each other, so that when modifying the code according to the functional type, the code segments corresponding to several groups of interfaces belonging to the same functional type can belong to the same modified code range as much as possible, which is also convenient for generating the code segments corresponding to several groups of interfaces belonging to the same functional type subsequently.

[0035] In a specific implementation manner, the first identifier corresponds to a functional type.

[0036] Among them, there are distinctions between the contents of the first identifiers corresponding to different functional types. Correspondingly, there are also distinctions between the contents of the second identifiers corresponding to different first identifiers, so that the functional type corresponding to the corresponding modified code range can be determined according to the content of the first identifier.

[0037] In a specific implementation manner, the using the preset script to regenerate the replacement code segment corresponding to the current code segment includes:

[0038] According to the functional type corresponding to the first identifier of the modified code range to which the current code segment belongs, use the preset script corresponding to this functional type to regenerate the replacement code segment corresponding to the current code segment.

[0039] Among them, the preset script can be set according to the logic of manual code modification. In this embodiment, the preset scripts corresponding to different functional types can refer to different paragraphs in the preset script, or different preset scripts.

[0040] In a specific implementation manner, the interface adjustment information includes at least interface quantity adjustment information.

[0041] Among them, the interface quantity adjustment information can refer to the interface addition information, interface deletion information, etc.

[0042] In a specific implementation manner, in the target file, both the first identifier and the second identifier are represented in the form of comments.

[0043] Among them, both the first identifier and the second identifier are represented in the form of comments, so that the identifier can be quickly queried without affecting the normal operation of the code. The identifier can refer to the first identifier and the second identifier.

[0044] In a specific implementation manner, the determining N modified code ranges according to N groups of corresponding first identifiers and second identifiers includes:

[0045] For any group of corresponding first identifier and second identifier, use this first identifier as the starting segment of the corresponding modified code range;

[0046] Use the second identifier as the termination segment corresponding to the modified code range;

[0047] The code segments between the start segment and the termination segment belonging to the corresponding modified code range form the corresponding modified code range.

[0048] In this embodiment, if any code segment does not belong to the modified code range but belongs to the identifier, copy the code segment to the replacement file, thereby improving the reusability of the identifier and further improving the code modification efficiency when there are frequent code modification requirements.

[0049] In a specific implementation manner, the target file corresponds to a target file name;

[0050] Correspondingly, replacing the corresponding target file in the target file set with the replacement file includes:

[0051] Delete the target file from the target file set;

[0052] Modify the file name of the replacement file to the target file name corresponding to the target file;

[0053] Add the replacement file to the target file set.

[0054] Wherein, the replacement file corresponds to an initial file name. Modifying the file name of the replacement file to the target file name corresponding to the target file may mean modifying the initial file name of the replacement file to the target file name corresponding to the target file.

[0055] Specifically, in the Linux environment, modifying the initial file name of the replacement file to the target file name corresponding to the target file can be achieved through the mv command.

[0056] It can be seen that in this embodiment, the corresponding modified code range is determined by the first identifier and the second identifier with a corresponding relationship in the target file to be modified. When the code segment belongs to the modified code range, a preset script is used to generate the corresponding replacement code segment and add it to the replacement file. When the code segment does not belong to the modified code range, the code segment is copied and added to the replacement file, thereby eliminating the need for manual code modification, avoiding the problem of incorrect modification caused by human factors, improving the code modification efficiency, and being able to be reused in different scenarios requiring code modification, improving the maintainability of various scenarios, thus improving the verification environment modification efficiency and enabling the rapid generation of the verification environment.

[0057] Although some specific embodiments of the present invention have been described in detail by way of examples, those skilled in the art should understand that the above examples are for illustrative purposes only and not for limiting the scope of the present invention. Those skilled in the art should also understand that various modifications can be made to the embodiments without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.

Claims

1. A rapid generation system for a verification environment, characterized in that: The system comprises: a processor and a memory storing a computer program, wherein the memory further stores a target file set corresponding to a verification environment of a target module, wherein the target file set comprises M target files, M is a positive integer, the target module comprises a plurality of groups of interfaces, and in the target files, the positions of code segments corresponding to the plurality of groups of interfaces belonging to the same functional type are adjacent, and when the computer program is executed by the processor, the following steps are implemented: S101, according to the interface adjustment information corresponding to the target module, obtaining a number of target files that need to be modified from the target file set to form a modified file list; S102, for any target file in the modified file list, query and obtain N first identifiers in the target file and second identifiers respectively corresponding to the N first identifiers, where the first identifiers correspond to function types, and N is a positive integer; S103, determining N modification code ranges according to N groups of first identifiers and second identifiers that have a corresponding relationship; S104, generating a replacement file for the target file; S105, traversing each code segment in the target file, and if the current code segment does not belong to the N modified code ranges, copying the current code segment to the replacement file; S106, if the current code segment belongs to the N modified code ranges, regenerate a replacement code segment corresponding to the current code segment using a preset script, and add the replacement code segment to the replacement file, wherein regenerating the replacement code segment corresponding to the current code segment using a preset script includes: According to the function type corresponding to the first identifier of the modified code range to which the current code segment belongs, a replacement code segment corresponding to the current code segment is regenerated using a preset script corresponding to the function type; S107: Use the replacement file to replace the corresponding target file in the target file set.

2. The rapid generation system of the verification environment according to claim 1, characterized in that: The interface adjustment information at least includes interface quantity adjustment information.

3. The rapid generation system of the verification environment according to claim 1, characterized in that: In the target file, the first identifier and the second identifier are both represented in the form of comments.

4. The rapid generation system of the verification environment according to claim 1, characterized in that: The step of determining N modification code ranges according to N groups of first identifiers and second identifiers that have a corresponding relationship includes: For any set of first identifiers and second identifiers that have a corresponding relationship, the first identifier is used as the starting segment of the corresponding modified code range; Using the second identifier as the end segment of the corresponding modified code range; The corresponding modified code range is formed by the code segment between the start segment and the end segment belonging to the corresponding modified code range.

5. The rapid generation system of the verification environment according to claim 1, characterized in that: The target file corresponds to a target file name; Correspondingly, using the replacement file to replace the corresponding target file in the target file set includes: Deleting the target file from the target file set; Modify the file name of the replacement file to the target file name corresponding to the target file; The replacement file is added to the target file set.

Citation Information

Patent Citations

  • Tool suite for RTL-level reconfiguration and repartitioning

    US20130111423A1