Hardware code submission method, electronic device and medium

By building a target test case collection covering all client data paths, ensuring that hardware code updates do not affect other clients, and the test cases are executed again after the server merges, the problem of inaccurate hardware code updates is solved and the efficiency of chip development is improved.

CN119621590BActive Publication Date: 2025-04-11METAX INTEGRATED CIRCUITS (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510154227.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-04-11
Estimated Expiration
2045-02-12

AI Technical Summary

Technical Problem

In the prior art, the accuracy of hardware code updates on the server cannot be guaranteed, resulting in the client downloading problematic code and needs to frequently fall back to the unproblematic version, which affects the progress and efficiency of chip development.

Method used

By building a target test case collection that can cover all client data paths, perform these test cases first when updating locally, ensuring that the update does not affect other clients. Then submit the updated code to the server. After the server is merged, the test cases are executed again to ensure the accuracy of the merged code.

Benefits of technology

It improves the accuracy of hardware code updates on the server, reduces client fallbacks, and improves chip development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621590B_ABST
    Figure CN119621590B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of chip technology, and in particular to a hardware code submission method, electronic device and medium, the method comprising: S1, constructing a target test case set; S2, C n Get the corresponding hardware code D to be developed n ; Step S3, C n Based on D n Perform local development and generate E n ; S4, D n and E n Merge to generate F n ; Step S5, based on F n Run the target test case set, and execute S6 after all of them pass; S6, set F n Submit to the server. If the latest version of the hardware code currently stored is not D n , then merge the latest version of the hardware code currently stored with F n Generate G n , execute S7, otherwise, execute S8; S7, based on G n Run the target test case set, and execute S8 after all of them pass; S8, set G n The invention improves the accuracy of hardware code update on the server, thereby improving chip development efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of chip technology, and in particular to a hardware code submission method, electronic equipment and medium. Background Art

[0002] During the chip development process, the hardware code version is managed based on the code manager set on the server. Multiple clients jointly use and maintain the hardware code on the server. The client downloads the code from the server to the local, updates it locally, and then merges the local update with the hardware code version on the current server and submits it to the server to form a new code version. In the prior art, the accuracy of the hardware code update on the server cannot be guaranteed, so the client will download problematic code. When a problem is found in the code, the relevant client also needs to roll back to a problem-free version for update. As time goes by, more and more problems need to be merged and conflicts resolved, which will cause a large number of clients to roll back to a problem-free version for update, seriously affecting the progress of chip development, thereby reducing chip development efficiency. Summary of the invention

[0003] The purpose of the present invention is to provide a hardware code submission method, electronic device and medium, which improves the accuracy of hardware code updates on a server and thereby improves chip development efficiency.

[0004] According to a first aspect of the present invention, a hardware code submission method is provided, comprising:

[0005] Step S1: construct a target test case set, where the test cases in the target test case set can cover the data paths passed by all clients;

[0006] Step S2: Client C n Get the latest version of the hardware code currently stored in the server as C n Corresponding hardware code to be developed D n ,The value range of n is from 1 to N, where N is the total number of clients;

[0007] Step S3: Client C n Based on D n Perform local development and generate C n Corresponding code update information E n ;

[0008] Step S4: D n and E n Merge to generate C n The corresponding first merge code F n ;

[0009] Step S5: Based on F nRun all test cases in the target test case set, and execute step S6 after all the test cases pass the run;

[0010] Step S6: n Submit to the server. If the latest version of the hardware code currently stored in the server is not D n , then merge the latest version of the hardware code currently stored in the server with F n Generate C n The corresponding second merge code G n , execute step S7, if the latest version of the hardware code currently stored in the server is D n , then execute step S8;

[0011] Step S7: Based on G n Run all test cases in the target test case set, and execute step S8 after all the test cases pass the run;

[0012] Step S8: G n The hardware code determined to be the latest version is updated to the server.

[0013] According to a second aspect of the present invention, there is provided an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being configured to execute the method described in the first aspect of the present invention.

[0014] According to a third aspect of the present invention, there is provided a computer-readable storage medium storing computer-executable instructions, wherein the computer instructions are used to execute the method described in the first aspect of the present invention.

[0015] Compared with the prior art, the present invention has obvious advantages and beneficial effects. By means of the above technical solution, the hardware code submission method, electronic device and medium provided by the present invention can achieve considerable technical advancement and practicality, and have wide industrial utilization value, and at least have the following beneficial effects:

[0016] The present invention constructs a target test case set that can cover the data paths passed by all clients. When the local update is completed, the target test case set is first executed based on the local update. If all the tests are passed, it can be ensured that the locally modified code has a high probability of not affecting other clients. After passing, it is submitted to the server for merging, and then the target test case set is executed based on the merged hardware code. If all the tests are passed, it can be ensured that the code of other clients does not conflict with the locally updated code as much as possible, thereby ensuring that the bottom hardware code updated to the server by each client is as accurate as possible, thereby avoiding the situation where a large number of clients roll back, improving the accuracy of hardware code updates on the server, and thus improving chip development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 A flowchart of a hardware code submission method provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0020] The embodiment of the present invention provides a hardware code submission method, such as Figure 1 As shown, including:

[0021] Step S1: construct a target test case set, where the test cases in the target test case set can cover the data paths passed by all clients.

[0022] Step S2: Client C n Get the latest version of the hardware code currently stored in the server as C n Corresponding hardware code to be developed D n ,The value range of n is from 1 to N, where N is the total number of clients.

[0023] It should be noted that when each client pulls the hardware code from the server, it is the latest version of the hardware code currently stored in the server corresponding to the pulling time. The hardware code can be specifically stored in the hardware code management warehouse of the server.

[0024] Step S3: Client C n Based on D n Perform local development and generate C n Corresponding code update information E n .

[0025] It should be noted that the local development requirements corresponding to each client may be different, so the generated code update information is usually also different.

[0026] Step S4: D n and En Merge to generate C n The corresponding first merge code F n .

[0027] It should be noted that step S4 is performed on the client C n Local D n and E n Merge to generate C n The corresponding first merge code F n .

[0028] Step S5: Based on F n Run all test cases in the target test case set, and execute step S6 after all the test cases pass the run.

[0029] It should be noted that based on F n Run all test cases in the target test case set to determine whether the code update is wrong and whether the updated code may affect the update of other clients. If all pass, it means that C n The corresponding update code is likely to be error-free and will not affect the updates of other clients.

[0030] Step S6: n Submit to the server. If the latest version of the hardware code currently stored in the server is not D n , then merge the latest version of the hardware code currently stored in the server with F n Generate C n The corresponding second merge code G n , execute step S7, if the latest version of the hardware code currently stored in the server is D n , then execute step S8.

[0031] It should be noted that in C n Get the latest version of the hardware code currently stored in the server to F n During the submission process to the server, it is possible that other clients update the hardware code, resulting in an update of the hardware code version. Therefore, it is necessary to first determine whether the latest version of the hardware code currently stored in the server is D n If it is not D n , further merging is required.

[0032] Step S7: Based on G n Run all test cases in the target test case set, and execute step S8 after all the test cases pass the run.

[0033] It should be noted that if based on G n All test cases in the target test case set are passed, indicating that in Cn Get the latest version of the hardware code currently stored in the server to F n During submission to the server, there is no conflict between hardware code updates made by different clients, which further improves the accuracy of hardware code updates.

[0034] Step S8: G n The hardware code determined to be the latest version is updated to the server.

[0035] As an embodiment, the step S1 includes:

[0036] Step S11: Get each client C n The submitted candidate test case set 1 n ,A 2 n ,...,A i n ,...,A f(n) n}, A i n C n The corresponding candidate test case is i, where the value of i ranges from 1 to f(n), and f(n) is C n The total number of candidate test cases submitted, C n The corresponding candidate test case is C n Corresponding and C n Test cases that are easily affected by other clients modifying the hardware code, each A i n Corresponding to a chip module.

[0037] It should be noted that when n takes different values, the size of f(n) may also be different, that is, the number of candidate test cases submitted by different clients may be different. Candidate test cases are test cases that are easily affected by other clients modifying the hardware code. By verifying candidate test cases in advance, problems can be discovered before submission, avoiding the situation where a large number of clients roll back.

[0038] Step S12: traverse all candidate test case sets. If A i n If the corresponding chip module already exists in the preset chip module set, skip A i n , otherwise A i n Add to the target test case set, and add A i n The corresponding chip module is added to the preset chip module set, and the target test case set and the preset chip module set are initially empty.

[0039] It should be noted that the larger the number of candidate test cases in the candidate test case set, the longer the running cycle will be. Therefore, it is necessary to reasonably control the number of candidate test cases on the basis of ensuring comprehensive testing. Each test case will correspond to a chip module on a data path, but the chip modules corresponding to different test cases may overlap. Therefore, the candidate test case set can be screened through step S12.

[0040] Step S13: When all candidate test case sets are traversed, the target test case set is generated.

[0041] It can be understood that when all candidate test case sets are traversed, the test cases in the current target test case set are a test case set that fully covers the data path device without overlapping corresponding chip modules.

[0042] As an embodiment, step S5 includes:

[0043] Step S51: If based on F n If all the test cases in the target test case set fail, the process returns to step S3.

[0044] Among them, all test cases in the target test case set fail, and each test case will have problems such as hanging up, no response, dead loop, code out of bounds, etc. This situation usually means that there is a problem with the code developed and updated locally by the client, so it is necessary to fall back to step S3 and update again.

[0045] As an embodiment, step S5 includes:

[0046] Step C51: If based on F n When some of the target test case set passes and some fail, step C52 is executed.

[0047] It should be noted that when some test cases in the target test case set pass and some fail, it may be that there is a problem with the code developed and updated locally by the client, or it may be that the code developed and updated locally by the client causes the test sequences of some target test cases in the target test case set to need to be updated. Therefore, further judgment is required.

[0048] Step C52: Based on F n Debugging, if C n If the corresponding code update is unreasonable, then return to step S3, otherwise, execute step C53.

[0049] Step C53: Based on C nThe corresponding code updates determine the first target test case in the target test case set whose test sequence needs to be updated.

[0050] Step C54: Based on C n The corresponding code update determines an update sequence corresponding to the first target test case.

[0051] As an embodiment, when a new functional module is added to the hardware code, the base addresses of other chip modules will change, so the corresponding test sequences also need to be updated synchronously. It should be noted that only the update sequence corresponding to the first target test case is generated and submitted synchronously with the update code, instead of directly updating the target test case set.

[0052] As an embodiment, step S6 includes:

[0053] Step S61: If F n If there is a corresponding first target test case, then F n , the first target test case, and the update sequence corresponding to the first target test case are submitted to the server. Otherwise, only F n Submit to the server.

[0054] Step S62: If the latest version of the hardware code currently stored in the server is not D n , then execute step S63, otherwise, execute step S8.

[0055] Step S63: Merge the latest version of the hardware code currently stored in the server with the F n Generate C n The corresponding second merge code G n .

[0056] As an embodiment, step S8 includes:

[0057] Step S81: If F n If there is a corresponding first target test case, execute step S82; otherwise, execute step S83.

[0058] Step S82: G n Determine the latest version of the hardware code and n and F n The corresponding first target test cases are grouped, and the update sequences corresponding to the first target test cases are updated to the server, and the process ends.

[0059] Step S83: G n The hardware code determined to be the latest version is updated to the server.

[0060] It should be noted that if F nThere is a corresponding first target test case, then G n There is also the same corresponding first target test case.

[0061] As an embodiment, step S2 includes:

[0062] Step S21: If the latest version of the hardware code currently stored in the server has a corresponding first target test case, then the corresponding first target test case and the update sequence corresponding to the first target test case are synchronously acquired.

[0063] It is understandable that the first target test case and the update sequence corresponding to the first target test case are used in conjunction with the corresponding version of the hardware code, that is, only when the obtained hardware code version has the corresponding first target test case and the update sequence corresponding to the first target test case, when running the target test case set, the update sequence corresponding to the first target test case needs to be replaced. As an embodiment, in the process of running all test cases in the target test case set, if the corresponding first target test case and the update sequence corresponding to the first target test case are obtained in step S21, the first target test case is run based on the update sequence corresponding to the first target test case.

[0064] As an embodiment, step S7 includes:

[0065] Step S71: Based on G n Run all test cases in the target test case set. If all of them pass, execute step S8; otherwise, execute step S72.

[0066] Step S72: Based on D n Corresponding version number to F n When submitting to the server, the update between the latest version numbers currently stored in the server determines the problem update code, and falls back to step S3 corresponding to the problem update code.

[0067] It should be noted that if G n If all the test cases in the target test case set are run and passed, it means that n Get the latest version of the hardware code currently stored in the server to F n During the submission to the server, there is no conflict between the hardware code updates of different clients. If not all of them pass, it may be C n There is a problem with the corresponding code update, or it may be in C n Get the latest version of the hardware code currently stored in the server to F nIf there are problems with updates from other clients during submission to the server, it is necessary to roll back to step S3 corresponding to the problem update code. It should be noted that based on the method described in this application, the probability of all test cases in the target test case set failing completely in step S7 is extremely low, which greatly reduces the number of clients that need to roll back and improves chip development efficiency.

[0068] It should be noted that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the steps as sequential processes, many of the steps can be implemented in parallel, concurrently or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0069] An embodiment of the present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are configured to execute the method described in the embodiment of the present invention.

[0070] The embodiment of the present invention further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer instructions are used to execute the method described in the embodiment of the present invention.

[0071] The embodiment of the present invention constructs a target test case set that can cover the data paths passed by all clients. When completing the local update, the target test case set is first executed based on the local update. If all the tests pass, it can ensure that the locally modified code will not affect other clients with a high probability. After passing, it is submitted to the server for merging, and then the target test case set is executed based on the merged hardware code. If all the tests pass, it can ensure that the code of other clients will not conflict with the locally updated code as much as possible, thereby ensuring that the bottom hardware code updated to the server by each client is as accurate as possible, thereby avoiding the situation where a large number of clients roll back, improving the accuracy of hardware code updates on the server, and thus improving chip development efficiency.

[0072] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with this profession can make some changes or modifications to equivalent embodiments of equivalent changes using the technical contents disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention still falls within the scope of the technical solution of the present invention.

Claims

1. A method for submitting hardware code, characterized in that: include: Step S1: construct a target test case set, where the test cases in the target test case set can cover the data paths passed by all clients; Step S2: Client C n Get the latest version of the hardware code currently stored in the server as C n Corresponding hardware code to be developed D n ,The value range of n is from 1 to N, where N is the total number of clients; Step S3: Client C n Based on D n Perform local development and generate C n Corresponding code update information E n ; Step S4: D n and E n Merge to generate C n The corresponding first merge code F n ; Step S5: Based on F n Run all test cases in the target test case set, and execute step S6 after all the test cases pass the run; Step S6: n Submit to the server. If the latest version of the hardware code currently stored in the server is not D n , then merge the latest version of the hardware code currently stored in the server with F n Generate C n The corresponding second merge code G n , execute step S7, if the latest version of the hardware code currently stored in the server is D n , then execute step S8; Step S7: Based on G n Run all test cases in the target test case set, and execute step S8 after all the test cases pass the run; Step S8: G n The hardware code determined to be the latest version is updated to the server.

2. The method according to claim 1, characterized in that The step S5 comprises: Step S51: If based on F n If all the test cases in the target test case set fail, the process returns to step S3.

3. The method according to claim 1, characterized in that The step S5 comprises: Step C51: If based on F n When some of the target test case set passes and some fail, step C52 is executed; Step C52: Based on F n Debugging, if C n If the corresponding code update is unreasonable, then return to step S3, otherwise, execute step C53; Step C53: Based on C n The corresponding code updates determine the first target test case in the target test case set that needs to update the test sequence; Step C54: Based on C n The corresponding code update determines an update sequence corresponding to the first target test case.

4. The method according to claim 3, characterized in that The step S6 comprises: Step S61: If F n If there is a corresponding first target test case, then F n , the first target test case, and the update sequence corresponding to the first target test case are submitted to the server. Otherwise, only F n Submit to the server; Step S62: If the latest version of the hardware code currently stored in the server is not D n , then execute step S63, otherwise, execute step S8; Step S63: Merge the latest version of the hardware code currently stored in the server with the F n Generate C n The corresponding second merge code G n .

5. The method according to claim 4, characterized in that The step S8 comprises: Step S81: If F n If there is a corresponding first target test case, execute step S82, otherwise, execute step S83; Step S82: G n Determine the latest version of the hardware code and n and F n The corresponding first target test cases are grouped, and the update sequences corresponding to the first target test cases are updated to the server, and the process ends; Step S83: G n The hardware code determined to be the latest version is updated to the server.

6. The method according to claim 5, characterized in that The step S2 comprises: Step S21: If the latest version of the hardware code currently stored in the server has a corresponding first target test case, then the corresponding first target test case and the update sequence corresponding to the first target test case are synchronously acquired.

7. The method according to claim 6, characterized in that In the process of running all the test cases in the target test case set in step S5 and step S7, if the corresponding first target test case and the update sequence corresponding to the first target test case are obtained in step S21, the first target test case is run based on the update sequence corresponding to the first target test case.

8. The method according to claim 1, characterized in that The step S7 comprises: Step S71: Based on G n Run all test cases in the target test case set. If all the test cases pass, execute step S8; otherwise, execute step S72; Step S72: Based on D n Corresponding version number to F n When submitting to the server, the update between the latest version numbers currently stored in the server determines the problem update code, and falls back to step S3 corresponding to the problem update code.

9. An electronic device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, wherein the instructions are configured to execute the method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: Computer executable instructions are stored, and the computer executable instructions are used to execute the method of any one of the preceding claims 1-8.

Citation Information

Patent Citations

  • Code detection method and device and storage medium

    CN113836001A

  • White box test method and device, storage medium and computer equipment

    CN119336641A