Verification method of second-level cache interface protocol

Through the detailed Level 2 cache interface protocol verification method, the time and energy required to trace errors in multi-core verification are solved, and rapid positioning and debugging are achieved, and the reliability and compatibility of the system are improved.

CN120045437APending Publication Date: 2025-05-27CHINA AEROSPACE STANDARDIZATION INST
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510034762.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

In multi-core verification, when errors occur in memory access instruction data, it is necessary to trace back to the initial error, which consumes a lot of time and energy, low debugging efficiency, and affects the project progress.

Method used

Provide a verification method for the secondary cache interface protocol, including verification of target settings, environment construction, function verification, performance verification, compatibility verification and abnormal situation verification. Through detailed testing steps and tools, ensure the correctness and performance of the secondary cache interface.

Benefits of technology

This method can quickly locate error codes, shorten debugging time, improve debugging efficiency, ensure system reliability and stability, improve system compatibility and scalability, and provide valuable reference for performance optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045437A_ABST
    Figure CN120045437A_ABST
Patent Text Reader

Abstract

The invention discloses a verification method for a second-level cache interface protocol, which belongs to the technical field of multi-core verification, and comprises the following steps of: setting verification targets, including function correctness, performance standard, compatibility and exception handling capacity; establishing a verification environment, wherein the verification environment comprises a hardware platform and a test tool; function verification, including read-write operation verification, cache line state transition verification and consistency verification; performance verification including delay testing and bandwidth testing; the compatibility verification comprises the compatibility with a first-level cache and the compatibility with a processor core; the abnormal condition verification comprises interrupt processing verification and error injection verification; and analyzing a test result. According to the verification method for the second-level cache interface protocol, the second-level cache interface protocol can be comprehensively and deeply verified, the function correctness, the performance standard reaching performance and the compatibility with other components of the second-level cache interface protocol are ensured, and a solid guarantee is provided for stable operation of a high-performance computer system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of multi-core verification, and in particular relates to a verification method for a secondary cache interface protocol. Background Art

[0002] In a multi-core system, the verification of the second-level cache is crucial. In multi-core verification, there is usually a global checker that reports an error when an error occurs in memory access instruction data. At this time, the data has passed through the third-level cache, the second-level cache, and the first-level cache. It takes a lot of time and effort to trace back to the original error location, which leads to low debugging efficiency and affects project progress. Summary of the invention

[0003] The purpose of the present invention is to provide a verification method for a secondary cache interface protocol to solve the problem raised in the above-mentioned background technology that in multi-core verification, there is usually a global checker that reports an error when an error occurs in memory access instruction data. At this time, the data has passed through the third-level cache, the second-level cache and the first-level cache. It takes a lot of time and effort to trace back to the original error location, resulting in low debugging efficiency and affecting the project progress.

[0004] To achieve the above object, the present invention provides the following technical solution: a method for verifying a secondary cache interface protocol, comprising the following steps:

[0005] Step 1: Verify goal setting: including functional correctness, performance compliance, compatibility, and exception handling capabilities;

[0006] Step 2: Verification environment construction: including hardware platform and testing tools;

[0007] Step 3: Functional verification: including read and write operation verification, cache line state transition verification and consistency verification;

[0008] Step 4: Performance verification: including delay test and bandwidth test;

[0009] Step 5: Compatibility verification: including compatibility with the first-level cache and compatibility with the processor core;

[0010] Step 6: Abnormal situation verification: including interrupt handling verification and error injection verification;

[0011] Step 7: Test result analysis: including data collection and organization and result analysis and evaluation.

[0012] In a further embodiment, functional correctness: verifying various functions of the L2 cache interface protocol, including reading and writing of data, state transition of cache lines, consistency maintenance, etc., to ensure that they can be correctly executed under various normal and boundary conditions;

[0013] Performance compliance: Test the read and write latency, bandwidth and other performance indicators of the L2 cache interface to ensure that it meets the system design requirements and can maintain stable performance under high load conditions;

[0014] Compatibility: Verify the interface compatibility between the L2 cache and L1 cache, processor core, and other related components to ensure the interoperability of the entire system;

[0015] Exception handling capability: Test the handling capability of the L2 cache interface in the face of various abnormal situations, such as interruption and error injection, to ensure the reliability and stability of the system.

[0016] In a further embodiment, the hardware platform: selects a target processor chip or development board with a secondary cache, equipped with sufficient memory and other peripheral devices to build a complete test environment;

[0017] Test tools: Use hardware debugging tools such as logic analyzers and oscilloscopes, as well as specially written test software or scripts. The test software can be written in C, C++ or other suitable programming languages ​​to generate various test stimuli and collect and analyze test results.

[0018] In a further embodiment, read and write operation verification: a series of read and write test cases are designed to perform random and sequential read and write operations on different address spaces of the cache, respectively, to verify that the read operation can correctly return the written data, and the integrity and accuracy of the data are guaranteed, and the write operation can correctly write the data to the specified cache location, and will not affect other irrelevant data;

[0019] Cache line state transition verification: Through a specific sequence of read and write operations, verify whether the transition of cache lines between different states (such as invalid, shared, exclusive, etc.) complies with the protocol requirements;

[0020] Consistency verification: Build multi-core or multi-threaded test scenarios to simulate concurrent access to shared cache data by different cores or threads, and verify that the cache consistency protocol can correctly maintain data consistency in various concurrent read and write situations to avoid data inconsistencies or errors.

[0021] In a further embodiment, delay test: write a test program to measure the delay time of a single read operation and a write operation respectively. During the test, use a high-precision timer to record the time interval from issuing an operation instruction to receiving an operation completion response. Repeat the test multiple times and perform statistical analysis on the results to obtain an accurate average delay value. At the same time, gradually increase the load of the system, observe the change in the delay time, and determine the delay performance under high load conditions;

[0022] Bandwidth test: Test the data transmission bandwidth of the L2 cache interface by initiating multiple read or write operations at the same time, gradually increase the number of concurrent operations, measure the bandwidth data under different loads, and draw a bandwidth load curve to ensure that the L2 cache interface can provide stable and not less than expected bandwidth performance within the maximum load range required by the system design.

[0023] In a further embodiment, compatibility with the first-level cache: in a test environment, in conjunction with the operation of the first-level cache, verify whether the data interaction between the second-level cache and the first-level cache is correct;

[0024] Compatibility with processor cores: For different types of processor cores (such as cores with different architectures and frequencies), the compatibility test of the L2 cache interface is performed to verify that under various core configurations, the L2 cache can correctly respond to the core's read and write requests and that there will be no compatibility issues due to differences in core characteristics. During the test, attention should be paid to aspects such as instruction interaction, data transmission, and state synchronization between the core and the cache to ensure stable operation of the entire system.

[0025] In a further embodiment, interrupt processing verification: write a test program to trigger an interrupt event, such as an external interrupt or a timer interrupt, during a cache operation, to verify that the secondary cache interface can correctly save the status information of the current operation when an interrupt occurs, suspend the current operation, and accurately restore to the state before the interrupt after the interrupt processing is completed, and continue to complete the unfinished cache operation, and ensure the effectiveness of the interrupt processing mechanism by checking the consistency of the cache data before and after the interruption and the correctness of the operation result;

[0026] Error injection verification: Use hardware debugging tools or test software to simulate error conditions, such as bit flips on data lines, address errors, etc., to observe the response of the L2 cache interface when faced with these errors, and verify whether it has sufficient error detection and correction capabilities, or whether it can take appropriate measures to prevent erroneous data from causing further impact on the system.

[0027] In a further embodiment, data collection and organization: at each test stage, detailed test data is collected, including operation results in functional verification, delay and bandwidth data in performance verification, system operation status information in compatibility verification, and error handling results in abnormal situation verification, etc. The collected data is classified and organized for subsequent analysis;

[0028] Result analysis and evaluation: Conduct in-depth analysis on the collated test data, compare the actual test results with the expected results, evaluate whether the various indicators of the secondary cache interface protocol meet the requirements, and conduct detailed cause analysis for those that do not meet the requirements to determine whether it is caused by design defects, test environment problems, or other factors.

[0029] Technical effects and advantages of the present invention:

[0030] The verification method of the secondary cache interface protocol can report error information in real time without waiting for the global checker to report an error, and can quickly locate the location of the error code, greatly shortening the debugging time and improving the debugging efficiency;

[0031] Ensure that the interaction between the L2 cache and other components complies with protocol specifications, avoiding data inconsistency and system crashes caused by interface protocol errors, thereby improving the reliability and stability of the entire system;

[0032] The verification process can discover potential incompatibility issues between different components in terms of interface protocols, allowing the L2 cache to work better with other hardware or software components, improving the compatibility and scalability of the system;

[0033] By verifying the interface protocol, we can find some problems that may affect performance, such as data transmission bottlenecks, unnecessary waiting time, etc., thereby providing valuable reference for performance optimization and helping to improve the overall performance of the system. The verification method of the second-level cache interface protocol can comprehensively and deeply verify the second-level cache interface protocol to ensure the correctness of its functions, the compliance of its performance, and its compatibility with other components, providing a solid guarantee for the stable operation of high-performance computer systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0035] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION

[0036] In the following description, a large number of specific details are provided to provide a more thorough understanding of the present invention. However, it is apparent to those skilled in the art that the present invention can be implemented without one or more of these details. In other examples, in order to avoid confusion with the present invention, some technical features well known in the art are not described.

[0037] Unless otherwise defined, the up, down, left, right, front, back, inside and outside directions involved in this document are based on the up, down, left, right, front, back, inside and outside directions in the figures shown in the present invention, and are explained here together.

[0038] The present invention provides a method for verifying a secondary cache interface protocol, the method comprising the following steps, please refer to Figure 1 Flowchart shown: Step 1, verification target setting: including functional correctness, performance compliance, compatibility and exception handling capabilities, functional correctness: verify the various functions of the secondary cache interface protocol, including data reading and writing, cache line state conversion, consistency maintenance, etc., to ensure that it can be correctly executed under various normal and boundary conditions;

[0039] Performance compliance: Test the read and write latency, bandwidth and other performance indicators of the L2 cache interface to ensure that it meets the system design requirements and can maintain stable performance under high load conditions;

[0040] Compatibility: Verify the interface compatibility between the L2 cache and L1 cache, processor core, and other related components to ensure the interoperability of the entire system;

[0041] Exception handling capability: Test the handling capability of the L2 cache interface in the face of various abnormal situations, such as interruption and error injection, to ensure the reliability and stability of the system;

[0042] Step 2, verification environment construction: including hardware platform and test tools, hardware platform: select a target processor chip or development board with a secondary cache, equipped with sufficient memory and other peripheral devices to build a complete test environment, and create a test platform (testbench) using a hardware description language (such as Verilog or VHDL). This test platform mainly includes a stimulus generator (stimulus generator), a device under test (DUT, i.e., the secondary cache interface) and an output monitor (output monitor). The stimulus generator is responsible for generating a signal sequence that simulates the processor or other main device operating on the secondary cache, such as randomly generating the address, data and corresponding control signals of the read and write operations. The output monitor is used to collect and observe the output signal of the DUT to prepare for the subsequent result inspection;

[0043] Test tools: Use hardware debugging tools such as logic analyzers and oscilloscopes, as well as specially written test software or scripts. The test software can be written in C, C++ or other suitable programming languages ​​to generate various test stimuli and collect and analyze test results. The output of the reference model will be compared with the actual output of the DUT to assist in verifying the correctness of the interface protocol.

[0044] Step 3: Functional verification: including read and write operation verification, cache line state transition verification and consistency verification. Read and write operation verification: design a series of read and write test cases to perform random and sequential read and write operations on different address spaces of the cache, verify that the read operation can correctly return the written data, and the integrity and accuracy of the data are guaranteed, and the write operation can correctly write the data to the specified cache location and will not affect other irrelevant data;

[0045] Cache line state transition verification: Through a specific sequence of read and write operations, verify whether the transition of cache lines between different states (such as invalid, shared, exclusive, etc.) complies with the protocol. For example, after a read operation is performed on a cache line that is initially invalid, it should be converted to a shared state, and after a write operation is performed on a cache line in an exclusive state, it should remain in the exclusive state and update the data correctly.

[0046] Consistency verification: Build multi-core or multi-threaded test scenarios to simulate concurrent access to shared cache data by different cores or threads, and verify that the cache consistency protocol can correctly maintain data consistency in various concurrent read and write situations to avoid data inconsistency or errors.

[0047] Step 4, performance verification: including delay test and bandwidth test, delay test: write a test program to measure the delay time of a single read operation and write operation respectively. During the test, use a high-precision timer to record the time interval from issuing an operation instruction to receiving an operation completion response. Repeat the test multiple times and perform statistical analysis on the results to obtain an accurate average delay value. At the same time, gradually increase the system load, observe the changes in the delay time, and determine the delay performance under high load conditions;

[0048] Bandwidth test: Test the data transmission bandwidth of the L2 cache interface by initiating multiple read or write operations at the same time, gradually increase the number of concurrent operations, measure the bandwidth data under different loads, and draw a bandwidth load curve to ensure that the L2 cache interface can provide stable and not less than expected bandwidth performance within the maximum load range required by the system design;

[0049] Step 5, compatibility verification: including compatibility with the first-level cache and compatibility with the processor core. Compatibility with the first-level cache: in the test environment, combined with the operation of the first-level cache, verify whether the data interaction between the second-level cache and the first-level cache is correct; for example, whether the write-back operation of the first-level cache can correctly update the data to the second-level cache, and whether the second-level cache can correctly provide the required data when the read of the first-level cache misses. By monitoring the data changes of the first-level cache and the second-level cache, as well as the overall operation status of the system, the compatibility between the two is ensured;

[0050] Compatibility with processor cores: For different types of processor cores (such as cores with different architectures and frequencies), the compatibility test of the L2 cache interface is carried out to verify that the L2 cache can correctly respond to the read and write requests of the core under various core configurations, and that there will be no compatibility issues caused by differences in core characteristics. During the test, attention should be paid to the instruction interaction, data transmission, and state synchronization between the core and the cache to ensure the stable operation of the entire system.

[0051] Step 6, abnormal situation verification: including interrupt handling verification and error injection verification. Interrupt handling verification: write a test program to trigger an interrupt event during the cache operation, such as an external interrupt or a timer interrupt, to verify that the secondary cache interface can correctly save the status information of the current operation when an interrupt occurs, suspend the current operation, and accurately restore to the state before the interrupt after the interrupt processing is completed, and continue to complete the unfinished cache operation. By checking the consistency of the cache data before and after the interruption and the correctness of the operation results, the effectiveness of the interrupt handling mechanism is ensured;

[0052] Error injection verification: Use hardware debugging tools or test software to simulate error conditions, such as bit flips and address errors on data lines, to observe the response of the L2 cache interface when faced with these errors, and verify whether it has sufficient error detection and correction capabilities, or whether it can take appropriate measures to prevent erroneous data from causing further impact on the system. For example, when a data error occurs, verify whether the cache can detect the error and trigger the corresponding error handling mechanism, such as data retransmission or system error reporting.

[0053] Step 7, test result analysis: including data collection and collation and result analysis and evaluation. Data collection and collation: in each test phase, collect detailed test data, including operation results in functional verification, delay and bandwidth data in performance verification, system operation status information in compatibility verification, and error handling results in abnormal situation verification, etc., and classify and organize the collected data for subsequent analysis;

[0054] Result analysis and evaluation: Conduct in-depth analysis on the collated test data, compare the actual test results with the expected results, evaluate whether the various indicators of the secondary cache interface protocol meet the requirements, and conduct detailed cause analysis for those that do not meet the requirements to determine whether it is caused by design defects, test environment problems, or other factors.

[0055] The standard parts used in the present invention can all be purchased from the market, and special-shaped parts can be customized according to the description in the specification and the drawings. The specific connection methods of each part adopt conventional means such as mature bolts, rivets, welding, etc. in the prior art. Machinery, parts and equipment all adopt conventional models in the prior art, and the circuit connection adopts the conventional connection method in the prior art, which will not be described in detail here. The control method of the present invention is controlled by a controller, and the control circuit of the controller can be realized by simple programming by technicians in this field. The contents not described in detail in this specification belong to the prior art known to professional and technical personnel in this field.

[0056] In the description of the present invention, it is necessary to understand that the indicated orientation or positional relationship is based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0057] In an application example of the present application, during the verification process, it is necessary to strictly follow the requirements of the solution to set up the test environment, design test cases, execute tests, and analyze and report results to ensure the accuracy and reliability of the verification work. At the same time, potential problems should be discovered and resolved in a timely manner based on the verification results, providing a solid guarantee for the stable operation of high-performance computer systems.

[0058] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for verifying a secondary cache interface protocol, characterized in that: The steps include: Step 1: Verify goal setting: including functional correctness, performance compliance, compatibility, and exception handling capabilities; Step 2: Verification environment construction: including hardware platform and testing tools; Step 3: Functional verification: including read and write operation verification, cache line state transition verification and consistency verification; Step 4: Performance verification: including delay test and bandwidth test; Step 5: Compatibility verification: including compatibility with the first-level cache and compatibility with the processor core; Step 6: Abnormal situation verification: including interrupt handling verification and error injection verification; Step 7: Test result analysis: including data collection and organization and result analysis and evaluation.

2. The method for verifying a secondary cache interface protocol according to claim 1, characterized in that: Functional correctness: Verify the various functions of the L2 cache interface protocol, including data reading and writing, cache line state transition, consistency maintenance, etc., to ensure that it can be correctly executed under various normal and boundary conditions; Performance compliance: Test the read and write latency, bandwidth and other performance indicators of the L2 cache interface to ensure that it meets the system design requirements and can maintain stable performance under high load conditions; Compatibility: Verify the interface compatibility between the L2 cache and L1 cache, processor core, and other related components to ensure the interoperability of the entire system; Exception handling capability: Test the handling capability of the L2 cache interface in the face of various abnormal situations, such as interruption and error injection, to ensure the reliability and stability of the system.

3. The method for verifying a secondary cache interface protocol according to claim 1, characterized in that: Hardware platform: Select a target processor chip or development board with a secondary cache, equipped with sufficient memory and other peripheral devices to build a complete test environment; Test tools: Use hardware debugging tools such as logic analyzers and oscilloscopes, as well as specially written test software or scripts. The test software can be written in C, C++ or other suitable programming languages ​​to generate various test stimuli and collect and analyze test results.

4. The method for verifying a secondary cache interface protocol according to claim 1, wherein: Read and write operation verification: Design a series of read and write test cases to perform random and sequential read and write operations on different address spaces of the cache, verify that the read operation can correctly return the written data, and the integrity and accuracy of the data are guaranteed, and the write operation can correctly write the data to the specified cache location without affecting other irrelevant data; Cache line state transition verification: Through a specific sequence of read and write operations, verify whether the transition of cache lines between different states (such as invalid, shared, exclusive, etc.) complies with the protocol requirements; Consistency verification: Build multi-core or multi-threaded test scenarios to simulate concurrent access to shared cache data by different cores or threads, and verify that the cache consistency protocol can correctly maintain data consistency in various concurrent read and write situations to avoid data inconsistencies or errors.

5. The method for verifying a secondary cache interface protocol according to claim 1, characterized in that: Delay test: Write a test program to measure the delay time of a single read operation and write operation respectively. During the test, use a high-precision timer to record the time interval from issuing an operation instruction to receiving a response to the completion of the operation. Repeat the test multiple times and perform statistical analysis on the results to obtain an accurate average delay value. At the same time, gradually increase the system load, observe the changes in the delay time, and determine the delay performance under high load conditions. Bandwidth test: Test the data transmission bandwidth of the L2 cache interface by initiating multiple read or write operations at the same time, gradually increase the number of concurrent operations, measure the bandwidth data under different loads, and draw a bandwidth load curve to ensure that the L2 cache interface can provide stable and not less than expected bandwidth performance within the maximum load range required by the system design.

6. The method for verifying a secondary cache interface protocol according to claim 1, characterized in that: Compatibility with the first-level cache: In the test environment, combined with the operation of the first-level cache, verify whether the data interaction between the second-level cache and the first-level cache is correct; Compatibility with processor cores: For different types of processor cores (such as cores with different architectures and frequencies), the compatibility test of the L2 cache interface is performed to verify that under various core configurations, the L2 cache can correctly respond to the core's read and write requests and that there will be no compatibility issues due to differences in core characteristics. During the test, attention should be paid to aspects such as instruction interaction, data transmission, and state synchronization between the core and the cache to ensure stable operation of the entire system.

7. A method for verifying a secondary cache interface protocol according to claim 1, characterized in that: Interrupt processing verification: Write a test program to trigger an interrupt event during the cache operation, such as an external interrupt or a timer interrupt, to verify that the secondary cache interface can correctly save the status information of the current operation when an interrupt occurs, suspend the current operation, and accurately restore to the state before the interrupt after the interrupt processing is completed, and continue to complete the unfinished cache operation. By checking the consistency of the cache data before and after the interruption and the correctness of the operation results, the effectiveness of the interrupt handling mechanism is ensured; Error injection verification: Use hardware debugging tools or test software to simulate error conditions, such as bit flips on data lines, address errors, etc., to observe the response of the L2 cache interface when faced with these errors, and verify whether it has sufficient error detection and correction capabilities, or whether it can take appropriate measures to prevent erroneous data from causing further impact on the system.

8. The method for verifying a secondary cache interface protocol according to claim 1, characterized in that: Data collection and organization: In each test phase, detailed test data is collected, including operation results in functional verification, delay and bandwidth data in performance verification, system operation status information in compatibility verification, and error handling results in abnormal situation verification, etc. The collected data is classified and organized for subsequent analysis; Result analysis and evaluation: Conduct in-depth analysis on the collated test data, compare the actual test results with the expected results, evaluate whether the various indicators of the secondary cache interface protocol meet the requirements, and conduct detailed cause analysis for those that do not meet the requirements to determine whether it is caused by design defects, test environment problems, or other factors.

Citation Information

Cited By

  • Test method, device, equipment, medium and product

    CN121658157A

  • Automatic test method and system for optical module management protocol

    CN122226666A