Bandwidth verification device and method, equipment and storage medium
By introducing a bandwidth verification device into the chip function verification environment and using the bandwidth monitoring component to update and calculate bandwidth in real time, the problem that chip bandwidth verification and function verification cannot be performed at the same time is solved and the chip verification efficiency is improved.
Patent Information
- Application Number
- CN202410641125.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2024-08-30
Smart Images

Figure CN118569152A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of chip logic verification, and in particular to a bandwidth verification method, device, equipment and storage medium. Background Art
[0002] Chip verification is a crucial link in the chip design process. It uses corresponding verification languages, verification tools and verification methods to verify whether the chip design meets the requirements and specifications of the chip definition before the chip is produced, whether the risks have been completely released, and whether all defects have been discovered and corrected. The importance of chip verification is to ensure that the chip can work properly before it is put on the market and meet the design requirements, while reducing development costs and time to market. Chip verification includes chip function verification and chip bandwidth verification. Chip function verification requires the establishment of a corresponding verification environment in the chip verification system to simulate the behavior of the chip and test its functions, while chip bandwidth verification is a key step to ensure that the chip can support the required data transmission rate during design, and it also requires the establishment of a corresponding verification environment in the chip verification system to achieve this.
[0003] Since bandwidth verification cannot directly reuse the chip function verification environment, the existing chip bandwidth verification usually needs to be conducted separately from the chip function verification, and the corresponding bandwidth verification environment needs to be designed separately, resulting in the inability to conduct chip function verification and bandwidth verification at the same time. As a result, chip verification personnel will prioritize debugging chip function use cases and pay attention to chip bandwidth later. When the chip functions become stable, if bandwidth problems are discovered, the chip design architecture may need to be readjusted, thus affecting the project development progress. Summary of the invention
[0004] The main purpose of the present invention is to solve the technical problem of how to perform chip bandwidth verification in a chip function verification environment.
[0005] A first aspect of the present invention provides a bandwidth verification device, which is applied to a chip verification system. The chip verification system is constructed with a test component and a chip to be tested. The test component and the chip to be tested perform data interaction to realize chip function verification. The bandwidth verification device includes several bandwidth monitoring components;
[0006] The test component is used to instantiate a plurality of the bandwidth monitoring components, and bind each of the bandwidth monitoring components to each monitoring interface of the chip to be tested in a one-to-one correspondence;
[0007] The bandwidth monitoring component is used to update the value of its own bandwidth monitoring parameter in real time during the chip function verification process when monitoring the data packet sent by the corresponding binding interface of the chip to be tested; at the end of the chip function verification, based on the latest updated value of its own bandwidth monitoring parameter, calculate the final bandwidth and perform bandwidth verification, and output the bandwidth verification result.
[0008] Optionally, in a first implementation of the first aspect of the present invention, the bandwidth monitoring component includes:
[0009] The initialization module is used to initialize its own bandwidth monitoring parameters when receiving a call request from the test component to the first built-in function of the bandwidth monitoring component.
[0010] Optionally, in a second implementation of the first aspect of the present invention, the bandwidth monitoring component includes:
[0011] A parameter updating module is used to call the second built-in function of the bandwidth monitoring component to update the value of its own bandwidth monitoring parameter in real time when monitoring a data packet sent by the corresponding binding interface of the chip under test during the chip function verification process;
[0012] The first bandwidth verification module is used to calculate the final bandwidth and perform final bandwidth verification based on the most recently updated value of its own bandwidth monitoring parameter when receiving a call request from the test component to the third built-in function of the bandwidth monitoring component at the end of the chip function verification, and output a final bandwidth verification result.
[0013] Optionally, in a third implementation of the first aspect of the present invention, the bandwidth monitoring component further includes:
[0014] The second bandwidth verification module is used to call the second built-in function of the bandwidth monitoring component to calculate the process bandwidth and perform process bandwidth verification when there is an updated value of the own bandwidth monitoring parameter during the chip function verification process, and output the process bandwidth verification result.
[0015] Optionally, in a fourth implementation of the first aspect of the present invention, the parameter updating module includes:
[0016] A monitoring unit, used to monitor whether there is a data packet sent by the corresponding binding interface of the chip under test during the chip function verification process;
[0017] A first calling unit is used to call the second built-in function execution parameter updating unit of the bandwidth monitoring component when monitoring a data packet sent by the binding interface corresponding to the chip under test;
[0018] The parameter updating unit is used to determine whether to perform bandwidth monitoring. If bandwidth monitoring is performed, the current total data packet volume is updated and it is determined whether to start counting bandwidth data. If bandwidth monitoring is not performed, the first frame data time point is updated. If bandwidth data statistics are started, the current total data volume, the current process total data volume, the current process total data packet volume, the last frame data time point and the process last frame data time point are updated. If bandwidth data statistics are not started, the first frame data time point and the process first frame data time point are updated.
[0019] Optionally, in a fifth implementation manner of the first aspect of the present invention, the first bandwidth verification module includes:
[0020] A second calling unit is configured to execute the first bandwidth verification unit based on the value of the latest updated own bandwidth monitoring parameter when receiving a calling request of the test component to the third built-in function of the bandwidth monitoring component at the end of the chip function verification;
[0021] The first bandwidth verification unit is used to determine whether to perform bandwidth monitoring. If bandwidth monitoring is performed, the final bandwidth is calculated based on the latest updated total data volume, the first frame data time point and the last frame data time point; the calculated final bandwidth is compared with the initialized expected bandwidth to see whether they meet the initialized bandwidth mode, and if not, the final bandwidth verification result is printed.
[0022] Optionally, in a sixth implementation of the first aspect of the present invention, the second bandwidth verification module includes:
[0023] A third calling unit is used to call the second built-in function of the bandwidth monitoring component to execute the second bandwidth verification unit when there is an updated value of the own bandwidth monitoring parameter during the chip function verification process;
[0024] The second bandwidth verification unit is used to determine whether the process bandwidth is currently being compared based on the latest total process data packet volume and the initialized data packet volume. If the process bandwidth is being compared, the process bandwidth is calculated based on the latest updated total process data volume, the time point of the first frame data of the process, and the time point of the last frame data of the process; the calculated process bandwidth is compared with the initialized expected bandwidth to see whether they meet the initialized bandwidth mode; if not, the process bandwidth verification result is printed.
[0025] A second aspect of the present invention provides a bandwidth verification method, which is applied to any of the bandwidth verification devices described above, and the bandwidth verification method includes:
[0026] Instantiating a plurality of the bandwidth monitoring components through the test component, and binding each of the bandwidth monitoring components to each monitoring interface of the chip to be tested in a one-to-one correspondence;
[0027] During the chip function verification process, when a data packet sent by the corresponding binding interface of the chip under test is monitored, the bandwidth monitoring component updates the value of its own bandwidth monitoring parameter in real time;
[0028] When the chip function verification is finished, based on the latest updated value of the own bandwidth monitoring parameter, the bandwidth monitoring component calculates the final bandwidth and performs bandwidth verification, and outputs the bandwidth verification result.
[0029] Optionally, in a first implementation manner of the second aspect of the present invention, the bandwidth verification method further includes:
[0030] Before the chip function verification starts, the test component calls the first built-in function of each bandwidth monitoring component to initialize its own bandwidth monitoring parameters.
[0031] Optionally, in a second implementation of the second aspect of the present invention, during the chip function verification process, when a data packet sent by a binding interface corresponding to the chip under test is monitored, updating the value of its own bandwidth monitoring parameter in real time by the bandwidth monitoring component includes:
[0032] During the chip function verification process, when a data packet sent by the corresponding binding interface of the chip under test is monitored, the second built-in function of the bandwidth monitoring component is called to update the value of its own bandwidth monitoring parameter in real time;
[0033] At the end of the chip function verification, based on the latest updated value of the own bandwidth monitoring parameter, the bandwidth monitoring component calculates the final bandwidth and performs bandwidth verification, and the output bandwidth verification result includes:
[0034] At the end of the chip function verification, when the test component receives a call request for the third built-in function of the bandwidth monitoring component, the final bandwidth is calculated and the final bandwidth verification is performed based on the latest updated value of its own bandwidth monitoring parameter, and the final bandwidth verification result is output.
[0035] Optionally, in a third implementation of the second aspect of the present invention, during the chip function verification process, when a data packet sent by the binding interface corresponding to the chip under test is monitored, after the bandwidth monitoring component updates the value of its own bandwidth monitoring parameter in real time, it also includes:
[0036] During the chip function verification process, when there is an updated value of the own bandwidth monitoring parameter, the second built-in function of the bandwidth monitoring component is called to calculate the process bandwidth and perform process bandwidth verification, and the process bandwidth verification result is output.
[0037] Optionally, in a fourth implementation of the second aspect of the present invention, during the chip function verification process, when a data packet sent by the binding interface corresponding to the chip under test is monitored, calling the second built-in function of the bandwidth monitoring component to update the value of its own bandwidth monitoring parameter in real time includes:
[0038] During the chip function verification process, monitoring whether there is a data packet sent by the binding interface corresponding to the chip under test; when monitoring the data packet sent by the binding interface corresponding to the chip under test, calling the second built-in function of the bandwidth monitoring component to perform the following operations, including:
[0039] Determine whether to perform bandwidth monitoring. If bandwidth monitoring is performed, update the current total data packet volume and determine whether to start counting bandwidth data. If bandwidth monitoring is not performed, update the first frame data time point. If bandwidth data statistics are started, update the current total data volume, the current process total data volume, the current process total data packet volume, the last frame data time point and the process last frame data time point. If bandwidth data statistics are not started, update the first frame data time point and the process first frame data time point.
[0040] Optionally, in a fifth implementation of the second aspect of the present invention, at the end of the chip function verification, when receiving a call request from the test component to the third built-in function of the bandwidth monitoring component, the final bandwidth is calculated and the final bandwidth verification is performed based on the value of the latest updated own bandwidth monitoring parameter, and the output of the final bandwidth verification result includes:
[0041] At the end of the chip function verification, when a call request of the test component to the third built-in function of the bandwidth monitoring component is received, the third built-in function of the bandwidth monitoring component is called to perform the following operations, including:
[0042] Determine whether to perform bandwidth monitoring. If bandwidth monitoring is performed, calculate the final bandwidth based on the total data volume, first frame data time point, and last frame data time point of the latest update; compare the calculated final bandwidth with the initialized expected bandwidth to see if they meet the initialized bandwidth mode. If not, print the final bandwidth verification result.
[0043] Optionally, in a sixth implementation of the second aspect of the present invention, during the chip function verification process, when there is an updated value of its own bandwidth monitoring parameter, calling the second built-in function of the bandwidth monitoring component to calculate the process bandwidth and perform process bandwidth verification, the output process bandwidth verification result includes:
[0044] During the chip function verification process, when there is an updated value of the own bandwidth monitoring parameter, the second built-in function of the bandwidth monitoring component is called to perform the following operations, including:
[0045] Based on the latest total process data packet volume and the initialized data packet volume, determine whether the current process bandwidth is being compared. If the process bandwidth is being compared, calculate the process bandwidth based on the latest updated total process data volume, the time point of the first frame data of the process, and the time point of the last frame data of the process; compare the calculated process bandwidth with the initialized expected bandwidth to see if they meet the initialized bandwidth mode; if not, print the process bandwidth verification result.
[0046] A third aspect of the present invention provides a computer device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory to enable the computer device to execute the above-mentioned bandwidth verification method.
[0047] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned bandwidth verification method.
[0048] In the technical solution provided by the present invention, in order to realize the chip bandwidth verification by reusing the chip function verification environment in the chip function verification environment built by the chip verification system, a bandwidth verification device is introduced, and the bandwidth verification device is applied to the chip function verification environment in the form of a component. The chip verification system is built with a test component and a chip to be tested. The test component and the chip to be tested perform data interaction in the chip function verification environment to realize chip verification, and continuously generate data packets during the chip function verification process, and the data packets can be used to verify the chip bandwidth. The bandwidth verification device of the present invention includes several bandwidth monitoring components, each of which has a bandwidth monitoring function and can realize bandwidth verification. Each bandwidth monitoring component is instantiated by the test component based on the chip bandwidth test needs, and the number of bandwidth monitoring components instantiated is the same as the number of interfaces that the chip to be tested needs to monitor. At the same time, the test component will further bind each bandwidth monitoring component to each monitoring interface of the chip to be tested one by one during the instantiation process, ensuring that the bandwidth monitoring component can obtain the data packets of each monitoring interface in the chip to be tested in real time, thereby quickly completing the bandwidth monitoring deployment of multiple interfaces of the chip. The data packets generated during the chip function verification process will be sent by the monitoring interface of the chip to be tested to the corresponding bound bandwidth monitoring component, and then the bandwidth monitoring component will update the value of its own bandwidth monitoring parameter in real time; at the end of the chip function verification, the bandwidth monitoring component will further calculate the final bandwidth based on the value of its own bandwidth monitoring parameter updated most recently, perform bandwidth verification, and output the bandwidth verification result. The present invention reuses the chip function verification environment to verify the chip bandwidth, and can simultaneously perform bandwidth verification while performing chip function verification in the chip verification environment, thereby improving the chip verification efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 A schematic diagram of an embodiment of a chip verification environment built based on a UVM verification system in an embodiment of the present invention;
[0050] Figure 2 A schematic diagram of an embodiment of a bandwidth verification device in an embodiment of the present invention;
[0051] Figure 3 A schematic diagram of an embodiment of a bandwidth monitoring component in an embodiment of the present invention;
[0052] Figure 4 A schematic diagram of an embodiment of updating parameters of a bandwidth monitoring component in an embodiment of the present invention;
[0053] Figure 5 A schematic diagram of an embodiment of the bandwidth monitoring component performing final bandwidth calculation and verification in an embodiment of the present invention;
[0054] Figure 6 A schematic diagram of an embodiment of a bandwidth verification method in an embodiment of the present invention;
[0055] Figure 7 FIG. 1 is a schematic diagram of an embodiment of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION
[0056] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0057] To facilitate understanding of the present invention, the proprietary technical names appearing in this embodiment are explained below.
[0058] UVM (Universal Verification Methodology) is a widely used hardware verification methodology, especially in the verification of system-on-chip (SoC) and digital signal processor (DSP). It provides a set of standardized classes and function libraries, and verification engineers can use its reusable components to build a functional verification environment with standardized hierarchy and interface.
[0059] Test components belong to the component class in the UVM verification system. They are used to form a chip function verification environment and simulate data interaction with the chip under test to achieve chip function verification. Common component classes include: uvm_driver, uvm_monitor, uvm_sequencer, uvm_agent, uvm_scoreboard, uvm_env, uvm_test, etc.
[0060] The bandwidth monitoring component is a self-developed component of this embodiment, which can be applied to the established chip function verification environment. In order to detect and verify the bandwidth of any interface of any chip, the bandwidth monitoring component of this embodiment contains multiple parameters, which can be further adjusted according to actual needs. The names and meanings of the parameters are as follows:
[0061] perf_en: used to control whether bandwidth monitoring is enabled. For example, if the parameter value is 1, bandwidth monitoring is required, and if the parameter value is 0, bandwidth monitoring is not required.
[0062] Start time: used to record the start time of bandwidth monitoring.
[0063] end_time: used to record the end time of bandwidth monitoring.
[0064] step_start_time: used to record the start time of process bandwidth monitoring.
[0065] step_end_time: used to record the end time of process bandwidth monitoring.
[0066] total_pld_size: used to record the total payload size of the currently received data packet, in bytes.
[0067] total_bus_size: used to record the bus data size of the currently received data packet, in bytes.
[0068] step_pld_size: used to record the total payload size of the data packets received during the process bandwidth monitoring, in bytes.
[0069] step_bus_size: used to record the bus data volume of the data packet received during process bandwidth monitoring, in bytes.
[0070] total_pkg_num: used to record the total number of data packets currently received;
[0071] step_pkg_num: used to record the total number of packets received during process bandwidth monitoring;
[0072] mode: used to control the bandwidth monitoring mode. For example, if the parameter value is 1, it means that the interface needs to meet the minimum bandwidth requirement. If the parameter value is 0, it means that the interface needs to meet the maximum bandwidth requirement.
[0073] start_num: indicates the number of packets from which bandwidth monitoring starts.
[0074] step_num: indicates that after bandwidth monitoring starts, a comparison check is performed between the bandwidth value and the expected value every few packets.
[0075] exp_pld_bw: indicates the expected payload bandwidth value, that is, the effective load bandwidth value.
[0076] exp_bus_bw: indicates the expected bus bandwidth value.
[0077] like Figure 1 As shown, Figure 1 It is a chip verification environment built based on the UVM verification system in an embodiment of the present invention, and the chip verification environment can verify the functions of each chip and the chip bandwidth at the same time.
[0078] tb-top: The top-level module of the chip verification environment. The test module and the rtl module to be tested are further built in tb_top.
[0079] v_sequence: Object handle generated for the test data packet, which generates the data packet for testing.
[0080] SQR: It is the sequencer component, used to receive the test data packets generated by v_sequence and forward them to the DRV component.
[0081] DRV: It is a driver component used to drive the chip interface, drive the corresponding actual interface to be tested according to the actual timing, and send test stimulus to RTL.
[0082] rtl module: the chip to be tested.
[0083] RM (Reference Model): A reference model is a model used to generate an expected response, such as using C model encoding to achieve the following functions: Based on the original data packet, generate the output data packet expected by the RTL module.
[0084] MON: is the monitor component, which monitors the actual output data packets of the interface of the rtl module.
[0085] SCB: scoreboard component, which compares the actual output data packet of the rtl module with the expected data packet generated by RM and determines whether the result is correct.
[0086] test: It is the test case module of the chip verification environment. In the test module, the v_sequence is started to send a data packet to the corresponding SQR component. The SQR component forwards the data packet to the DRV component. In the DRV component, the corresponding actual interface to be tested is driven according to the actual timing to send test stimulus to the rtl module.
[0087] agt: agent component, which is the agent component in the UVM system. In this component, SQR, DRV, RM, MON, SCB and other components can be instantiated. The DRV component drives the interface, the MON component monitors the actual output data packet of the rtl interface, and the RM component generates the output data packet expected by the rtl module based on the original data packet. The SCB component compares the actual output data packet of the rtl module with the expected data packet generated by the RM and determines whether the result is correct.
[0088] Figure 1 The steps corresponding to numbers 1-7 are a complete process of chip function verification, as follows:
[0089] Step 1-2: The v_sequence component is used to generate test stimulus, which is forwarded to the DRV component via the SQR component.
[0090] Step 3-4: In the DRV component, the rtl module is driven through the virtual interface, and the test data is sent to the RM component to generate the expected data.
[0091] Step 5: After receiving the test data from the input port, Rtl sends the actual output results to the MON component through the virtual interface.
[0092] Step 6: After generating the expected data packet, the RM module will send the expected data packet to the SCB so that the SCB can perform data comparison when receiving the actual data packet.
[0093] Step 7: After receiving the actual data packet from the rtl module, MON converts the packet format and sends the actual packet data to the SCB component for comparison. The SCB component compares the actual data packet received with the expected data packet to see if they are consistent. If they are inconsistent, an ERROR message is printed.
[0094] Figure 1 The steps corresponding to number 8 are the chip bandwidth verification process, which are as follows:
[0095] Step 8: calc_perf_info[n] represents the n bandwidth monitoring components bound to the n interfaces of the chip under test. Since the n interfaces of the chip under test are bound to the n bandwidth monitoring components one by one, when the interface of the chip under test receives or sends a data packet, the corresponding bound bandwidth monitoring component can also receive the data packet and complete the bandwidth data update and bandwidth calculation (including the final bandwidth and process bandwidth) of the interface corresponding to the chip bandwidth.
[0096] Reference Figure 2 , Figure 2This is an embodiment of the bandwidth verification device in the embodiment of the present invention. In this embodiment, the bandwidth verification device is applied to a chip verification system, which can be a UVM verification system or other simulation system that can realize chip verification, such as an EDA verification system, an FPGA verification system, and an Emulator verification system.
[0097] In this embodiment, a chip function verification environment including a test component and a chip to be tested is pre-built in the chip verification system. The test component and the chip to be tested perform data exchange to implement chip function verification. The specific types of the test components and the chip function verification implementation process are as follows: Figure 1 shown.
[0098] In this embodiment, the bandwidth verification device includes several bandwidth monitoring components, and the test component is used to instantiate several bandwidth monitoring components and bind each bandwidth monitoring component to each monitoring interface of the chip to be tested one by one. The detailed implementation method of the instantiation of the bandwidth monitoring component and the interface binding is described in the following embodiment.
[0099] (I) Instantiation of bandwidth monitoring component
[0100] In this embodiment, the bandwidth verification device includes several bandwidth monitoring components, which are similar to plug-ins encapsulating multiple functional functions and can be directly called in the chip function verification environment to achieve chip bandwidth verification. The bandwidth monitoring component needs to be instantiated first and bound to each monitoring interface of the chip to be tested one by one before it can be called.
[0101] In this embodiment, the bandwidth monitoring component is specifically instantiated through the test component. The test component of this embodiment is a collection concept, which includes a variety of different components, such as SQR component, DRV component, RM component, MON component, SCB component, each component is used to interact with the chip to be tested to achieve chip function verification. The test component does not specifically refer to a specific component in the chip function verification environment. The bandwidth monitoring component can be instantiated by any of the above components, or all other components (including the bandwidth monitoring component) can be instantiated by a certain component. The specific setting is based on actual needs. For example, the agt component is a proxy component, which can be used to instantiate the SQR component, DRV component, RM component, MON component, SCB component and bandwidth monitoring component.
[0102] When it is necessary to monitor the bandwidth of n groups of interfaces of the RTL module (chip under test), the AGT component can instantiate n bandwidth monitoring components calc_perf_info[n], regardless of the input interface bandwidth, output interface bandwidth, or internal interface bandwidth of the RTL module. After completing the one-to-one binding of the bandwidth monitoring component and each monitoring interface of the chip under test, the RTL module can send its data packet to the corresponding bandwidth monitoring component for bandwidth monitoring, and each monitoring point corresponds to an instantiation of a bandwidth component. Among them, each bandwidth monitoring component uses a virtual interface to bind one-to-one with each monitoring interface of the corresponding chip under test.
[0103] For example, if the chip under test has n interface bandwidths that need to be monitored, n bandwidth monitoring components are instantiated, and bandwidth monitoring is performed in the chip function verification environment. The connection of the virtual interfaces of the calc_perf_info[n] components can be performed in the tb_top module. Preferably, the rtl module interface to be monitored (which can be any internal interface of the rtl module or external input interface, output interface) is assigned to the virtual interface of each calc_perf_info[n] through an assign statement, and then the instantiation handle of the virtual interface is passed to the corresponding calc_perf_info[n] component through a built-in function.
[0104] In one embodiment, the virtual interface may only include four groups of signals: data, len, vld, and rdy. Taking the data signal bit width of 512 bits as an example, when vld and rdy are effective at the same time, data and len data are effective, wherein each transmission effective len value is less than or equal to 64B, and the bus bandwidth is fixed to 64B.
[0105] (II) Encapsulation function of bandwidth monitoring component
[0106] In this embodiment, the bandwidth monitoring component is used to update the value of its own bandwidth monitoring parameter in real time during the chip function verification process when monitoring the data packet sent by the corresponding binding interface of the chip to be tested; at the end of the chip function verification, based on the latest updated value of its own bandwidth monitoring parameter, calculate the final bandwidth and perform bandwidth verification, and output the bandwidth verification result. The implementation method of bandwidth parameter initialization, parameter update, bandwidth calculation and verification is described in the following embodiment.
[0107] In this embodiment, in order to realize bandwidth parameter initialization, parameter update, bandwidth calculation and verification, multiple functional functions are encapsulated in the bandwidth monitoring component, including:
[0108] (1) The first built-in function set_perf_info
[0109] This function is used to set parameters related to bandwidth monitoring. The specific parameters that need to be set include: perf_en, mode, start_num, step_num, exp_pld_bw, exp_bus_bw. The specific meaning of each parameter is as described in the above embodiment, so it will not be repeated here.
[0110] Among them, the perf_en parameter is used to control whether to enable bandwidth monitoring. The mode parameter is used to control the bandwidth monitoring mode. If mode is 1, it indicates that the interface needs to meet the minimum bandwidth requirement and monitor the real-time bandwidth value. If it is less than the minimum bandwidth value (exp_pld_bw, exp_bus_bw), an error message is printed. If mode is 0, it indicates that the interface needs to meet the maximum bandwidth requirement and monitor the real-time bandwidth value. If it is greater than the maximum bandwidth value (exp_pld_bw, exp_bus_bw), an error message is printed. start_num indicates from which data packet the bandwidth monitoring starts. step_num indicates that after the bandwidth monitoring starts, a comparison check is performed between the bandwidth value and the expected value after every few data packets. exp_pld_bw is the expected payload bandwidth value, that is, the effective load bandwidth value, and exp_bus_bw is the expected bus bandwidth value.
[0111] In one embodiment, after instantiation is completed, the test component further calls the first built-in function of each bandwidth monitoring component to initialize each bandwidth monitoring parameter of the bandwidth monitoring component.
[0112] For example, before starting chip function verification, in the agt component, through its built-in function, each calc_perf_info[n] is initialized by calling the set_perf_info function, including initializing the following parameters: perf_en, mode, start_num, step_num, exp_pld_bw, exp_bus_bw. Among them, perf_en indicates whether to perform bandwidth monitoring, mode is used to control whether to use the minimum bandwidth mode or the maximum bandwidth mode, start_num indicates the number of packets of data received from which bandwidth monitoring starts, step_num indicates how many packets of data are received during the test to perform a bandwidth comparison, exp_pld_bw indicates the expected payload bandwidth value, and exp_bus_bw indicates the expected bus bandwidth value.
[0113] (2) The second built-in function update_perf_info
[0114] This function is used to update the bandwidth-related data volume and time points in real time, including the following parameters: start_time, step_start_time, end_time, step_end_time, total_pld_size, total_bus_size, step_pld_size, step_bus_size, total_pkg_num, step_pkg_num. The update_perf_info function contains two input parameters, including pld_size and bus_size. pld_size indicates the amount of payload data updated each time the update_perf_info function is called, in bytes. bus_size indicates the amount of transmission data updated each time the update_perf_info function is called, in bytes.
[0115] In one embodiment, the bandwidth monitoring component also supports real-time checking of bandwidth data during chip function verification and printing of bandwidth results during the process, which specifically includes the following parameters: step_pld_bw, step_bus_bw.
[0116] step_pld_bw=step_pld_size / (step_end_time-step_start_time);
[0117] step_bus_bw=step_bus_size / (step_end_time-step_start_time);
[0118] (3) The third built-in function report_perf_info
[0119] This function is used to calculate the final bandwidth data of the corresponding interface of the chip under test and print the final bandwidth verification result. It specifically includes the following parameters: end_pld_bw, end_bus_bw. Among them:
[0120] end_pld_bw=total_pld_size / (end_time-start_time);
[0121] end_bus_bw=total_bus_size / (end_time-start_time).
[0122] In this embodiment, the bandwidth monitoring and bandwidth calculation of the corresponding interface of the chip are realized by calling the corresponding built-in function of the bandwidth monitoring component during the chip function verification process. Among them, the specific calling time can be realized through each event node of the chip function test process. For example, before the chip function test, each component is instantiated uniformly by the agt component. At this time, the set_perf_info function of each bandwidth monitoring component can be called to initialize the parameters. During the chip function test, the data packet generated by the chip interface will be actively sent to the bound corresponding bandwidth monitoring component, thereby triggering the call to execute the update_perf_info of the bandwidth monitoring component to update the bandwidth related parameters. The MON component is the last event node before the end of the chip function test, and the MON component can trigger the call of the report_perf_info of the bandwidth monitoring component to perform the final bandwidth calculation and print the bandwidth results.
[0123] Reference Figure 3 , Figure 3 Schematic diagram of an embodiment of a bandwidth monitoring component in an embodiment of the present invention. In this embodiment, the bandwidth monitoring component includes:
[0124] The initialization module 301 is used to initialize its own bandwidth monitoring parameters when receiving a call request from the test component to the first built-in function of the bandwidth monitoring component;
[0125] In this embodiment, the bandwidth monitoring component encapsulates multiple built-in functions, each function corresponds to multiple bandwidth monitoring parameters, and each parameter needs to be initialized before use. Specifically, the parameters of each bandwidth monitoring component are initialized by the relevant test component, thereby ensuring that the chip function verification process and the chip bandwidth verification process are carried out synchronously. For example, the agt component further initializes the parameters of the bandwidth monitoring component during the process of instantiating the bandwidth monitoring component and other components to ensure that the chip bandwidth verification is carried out simultaneously with the chip function verification.
[0126] The parameter updating module 302 is used to call the second built-in function of the bandwidth monitoring component to update the value of its own bandwidth monitoring parameter in real time when monitoring the data packet sent by the corresponding binding interface of the chip under test during the chip function verification process;
[0127] In this embodiment, the second built-in function encapsulated in the bandwidth monitoring component can be used to implement parameter updates related to bandwidth calculation. Specifically, during the chip function verification process, the chip under test sends a data packet to trigger the parameter update module 302 to call the second built-in function of the bandwidth monitoring component to update the value of its own bandwidth monitoring parameter in real time.
[0128] In one embodiment, the parameter updating module 302 includes:
[0129] A monitoring unit, configured to monitor whether there is a data packet sent from the corresponding binding interface of the chip under test during the chip function verification process;
[0130] A first calling unit, configured to call the second built-in function of the bandwidth monitoring component to execute the parameter update unit when a data packet sent from the corresponding binding interface of the chip under test is monitored;
[0131] A parameter update unit, configured to determine whether to perform bandwidth monitoring. If bandwidth monitoring is to be performed, the current total number of data packets is updated and it is determined whether to start counting bandwidth data. If bandwidth monitoring is not to be performed, the start time point of the first frame data is updated; if bandwidth data counting is started, the current total data volume, the total data volume of the current process, the total number of data packets of the current process, the end time point of the last frame data, and the end time point of the last frame data of the process are updated. If bandwidth data counting has not been started, the start time point of the first frame data and the start time point of the first frame data of the process are updated.
[0132] As Figure 4 shown, Figure 4 is a schematic flowchart of a parameter update embodiment of the bandwidth monitoring component in an embodiment of the present invention. As Figure 4 shown, when the trigger condition is met, the second built-in function of the bandwidth monitoring component is automatically triggered to perform bandwidth parameter update. Among them, it is preferably to use the data packet sent from the corresponding binding interface of the chip under test to the bandwidth monitoring component as the trigger condition.
[0133] In this embodiment, the process of triggering the second built-in function of the bandwidth monitoring component to update the bandwidth parameters includes:
[0134] 1.1 Determine whether bandwidth monitoring is required. When the parameter perf_en == 1, it is determined that bandwidth monitoring is required and the subsequent process is executed. If it is other values, such as perf_en == 0, the start time point of the first frame data start_time is updated and waiting for the next round of judgment;
[0135] 1.2 When it is determined that bandwidth monitoring is to be performed, update the current total number of packets: total_pkg_num++;
[0136] 1.3 After the total number of packets is updated, further determine whether to start counting bandwidth data. The condition for executing bandwidth data counting is: total_pkg_num > star_num. star_num is a fixed value specified by parameter initialization. If total_pkg_num < star_num, the start time point of the first frame data start_time and step_start_time are updated and waiting for the next round of judgment;
[0137] 1.4 If the conditions for statistical bandwidth data are met, update the current total data volume and time point: total_pld_size, total_bus_size, end_time, and update the total data volume and time point of the process: step_pld_size, step_bus_size, step_end_time.
[0138] The first bandwidth verification module 303 is used to calculate the final bandwidth and perform final bandwidth verification based on the most recently updated value of its own bandwidth monitoring parameter when receiving a call request from the test component to the third built-in function of the bandwidth monitoring component at the end of the chip function verification, and output the final bandwidth verification result.
[0139] In this embodiment, the third built-in function encapsulated in the bandwidth monitoring component can be used to implement final bandwidth calculation and final bandwidth verification. Specifically, when the chip function verification is completed, the test component triggers the parameter first bandwidth verification module 303 to call the third built-in function of the bandwidth monitoring component to calculate the final bandwidth and perform final bandwidth verification.
[0140] In one embodiment, the first bandwidth verification module 303 specifically includes:
[0141] A second calling unit is configured to execute the first bandwidth verification unit based on the value of the latest updated own bandwidth monitoring parameter when receiving a calling request of the test component to the third built-in function of the bandwidth monitoring component at the end of the chip function verification;
[0142] The first bandwidth verification unit is used to determine whether to perform bandwidth monitoring. If bandwidth monitoring is performed, the final bandwidth is calculated based on the latest updated total data volume, the first frame data time point and the last frame data time point; the calculated final bandwidth is compared with the initialized expected bandwidth to see whether they meet the initialized bandwidth mode, and if not, the final bandwidth verification result is printed.
[0143] like Figure 5 As shown, Figure 5 This is a flow chart of an embodiment of the present invention in which the bandwidth monitoring component performs final bandwidth calculation and verification. Figure 5 As shown, when the trigger condition is met, the third built-in function of the bandwidth monitoring component will be automatically triggered to perform the final bandwidth calculation and verification. Among them, the last event node before the chip function verification is completed is preferably used as the trigger condition. For example, Figure 1 It can be seen that the last event node before the end of the chip function verification is the MON component, so the MON component can trigger the call of the third built-in function report_perf_info of the bandwidth monitoring component to perform the final bandwidth calculation and inspection and print the bandwidth results.
[0144] In this embodiment, the process of triggering the calling of the third built-in function of the bandwidth monitoring component to perform final bandwidth calculation and inspection includes:
[0145] 2.1 Determine whether bandwidth monitoring is required. When the parameter perf_en==1, it is determined that bandwidth monitoring is required and the subsequent process is executed. If it is other values, such as perf_en==0, wait for the next round of judgment.
[0146] 2.2 When bandwidth monitoring is determined, the final bandwidth is calculated based on the values of the latest updated bandwidth monitoring parameters: step_pld_bw and step_bus_bw;
[0147] 2.3 Determine whether the currently used bandwidth mode is the specified mode, for example, determine mode == 1. If mode is 1, it indicates that the corresponding monitored chip interface needs to meet the minimum bandwidth requirement; if mode is 0, it indicates that the corresponding monitored chip interface needs to meet the maximum bandwidth requirement. The bandwidth mode mode is set as needed in the set_perf_info function.
[0148] 2.4 Determine whether the current final bandwidth meets the bandwidth requirements of the corresponding bandwidth mode. If mode is 1 and the current final bandwidth is less than the minimum bandwidth value, print an error message indicating that the bandwidth does not meet the requirements; if mode is 0 and the current final bandwidth is greater than the maximum bandwidth value, print an error message indicating that the bandwidth does not meet the requirements. The bandwidth requirements corresponding to the bandwidth mode are pre-set, such as setting parameters exp_pld_bw and exp_bus_bw to indicate the minimum bandwidth requirements or the maximum bandwidth requirements.
[0149] The second bandwidth verification module 304 is used to call the second built-in function of the bandwidth monitoring component to calculate the process bandwidth and perform process bandwidth verification when there is an updated value of the own bandwidth monitoring parameter during the chip function verification process, and output the process bandwidth verification result.
[0150] In this embodiment, in order to further monitor the process bandwidth in different verification time periods during the chip function verification process, the corresponding function is pre-encapsulated in the bandwidth monitoring component to realize process bandwidth calculation and verification. Since the process bandwidth calculation also requires updating the bandwidth monitoring parameters, it is preferred to encapsulate the bandwidth parameter update and the process bandwidth calculation verification in the same function, that is, the second built-in function. Of course, in other embodiments, they can also be encapsulated as different functions.
[0151] In one embodiment, the second bandwidth verification module 304 includes:
[0152] A third calling unit is used to call the second built-in function of the bandwidth monitoring component to execute the second bandwidth verification unit when there is an updated value of the own bandwidth monitoring parameter during the chip function verification process;
[0153] The second bandwidth verification unit is used to determine whether the process bandwidth is currently being compared based on the latest total process data packet volume and the initialized data packet volume. If the process bandwidth is being compared, the process bandwidth is calculated based on the latest updated total process data volume, the time point of the first frame data of the process, and the time point of the last frame data of the process; the calculated process bandwidth is compared with the initialized expected bandwidth to see whether they meet the initialized bandwidth mode; if not, the process bandwidth verification result is printed.
[0154] like Figure 4 As shown, it is preferred to encapsulate the bandwidth parameter update and the process bandwidth calculation verification in the same function. Therefore, after calling the second built-in function to complete the bandwidth parameter update, the process bandwidth calculation and verification need to be further performed. The specific implementation process is as follows:
[0155] 1.5 Determine whether the bandwidth comparison process is required. In this embodiment, the condition for performing the bandwidth comparison process is step_pkg_num == step_num, where step_num is a fixed value specified by parameter initialization. If step_pkg_num == step_num, then execute step 1.6, otherwise wait for the next round of judgment.
[0156] 1.6 Calculate the process bandwidth step_pld_bw, step_bus_bw. In addition, in order to facilitate the bandwidth calculation of the next process, the parameters step_pld_size, step_bus_size, and step_pkg_num used in the bandwidth calculation of this round of process need to be assigned a value of 0, and the parameter step_start_time is updated to the current time.
[0157] 1.7 Determine whether the currently used bandwidth mode is the specified mode, for example, determine mode == 1. If mode is 1, it indicates that the corresponding monitored chip interface needs to meet the minimum bandwidth requirement; if mode is 0, it indicates that the corresponding monitored chip interface needs to meet the maximum bandwidth requirement. The bandwidth mode mode is set as needed in the set_perf_info function.
[0158] 1.8 Determine whether the current process bandwidth meets the bandwidth requirements of the corresponding bandwidth mode. If mode is 1 and the current process bandwidth is less than the minimum bandwidth value, print the error message that the bandwidth does not meet the requirements; if mode is 0 and the current process bandwidth is greater than the maximum bandwidth value, print the error message that the bandwidth does not meet the requirements. The bandwidth requirements corresponding to the bandwidth mode are pre-set, such as setting parameters exp_pld_bw and exp_bus_bw to indicate the minimum bandwidth requirements or the maximum bandwidth requirements.
[0159] In this embodiment, in order to verify the chip bandwidth by reusing the chip function verification environment in the chip function verification environment built by the chip verification system, a bandwidth verification device is introduced. The bandwidth verification device is applied to the chip function verification environment in the form of a component. The chip verification system is built with a test component and a chip to be tested. The test component and the chip to be tested perform data exchange with each other in the chip function verification environment to realize chip verification, and continuously generate data packets during the chip function verification process. The data packets can be used to perform chip bandwidth verification.
[0160] The bandwidth verification device of this embodiment includes several bandwidth monitoring components, each of which has a bandwidth monitoring function and can realize bandwidth verification. Each bandwidth monitoring component is instantiated by the test component based on the chip bandwidth test needs, and the number of bandwidth monitoring components instantiated is the same as the number of interfaces that the chip to be tested needs to monitor. At the same time, the test component will further bind each bandwidth monitoring component to each monitoring interface of the chip to be tested one by one during the instantiation process, ensuring that the bandwidth monitoring component can obtain the data packets of each monitoring interface in the chip to be tested in real time, thereby quickly completing the bandwidth monitoring deployment of multiple interfaces of the chip. The data packets generated during the chip function verification process will be sent by the monitoring interface of the chip to be tested to the corresponding bound bandwidth monitoring component, and then the bandwidth monitoring component will realize real-time update of the value of its own bandwidth monitoring parameter; at the end of the chip function verification, the bandwidth monitoring component will further realize the value of its own bandwidth monitoring parameter based on the latest update, calculate the final bandwidth, perform bandwidth verification and output the bandwidth verification result. This embodiment reuses the chip function verification environment to verify the chip bandwidth, and the chip function verification can be performed in the chip verification environment while the bandwidth verification can be performed simultaneously, which improves the chip verification efficiency.
[0161] Reference Figure 6 , Figure 6 1 is a flow chart of an embodiment of a bandwidth verification method in an embodiment of the present invention. The bandwidth verification method in this embodiment is specifically applied to the bandwidth verification device described in any of the above embodiments. In this embodiment, the bandwidth verification method includes:
[0162] 601. Instantiate a plurality of the bandwidth monitoring components through the test component, and bind each of the bandwidth monitoring components to each monitoring interface of the chip under test in a one-to-one correspondence;
[0163] In this embodiment, considering that the chip has multiple interfaces (multiple internal interfaces, multiple input interfaces, and multiple output interfaces), if the chip bandwidth verification requires the establishment of a large number of bandwidth observation points, it will consume a lot of time and energy of the chip verification personnel, thereby increasing the difficulty of establishing the chip bandwidth verification environment, and further affecting the chip verification efficiency. To solve this problem, this embodiment provides a bandwidth monitoring component, which encapsulates corresponding functional functions and can implement related functions of bandwidth verification. In the chip function verification environment, multiple bandwidth monitoring components can be instantiated at the same time and bound one-to-one with each monitoring interface of the chip to be tested, thereby achieving rapid deployment of multiple bandwidth observation points, reducing the difficulty of establishing the chip bandwidth verification environment and improving the chip verification efficiency.
[0164] Optionally, in one embodiment, the bandwidth verification method further includes:
[0165] Before the chip function verification starts, the test component calls the first built-in function of each bandwidth monitoring component to initialize its own bandwidth monitoring parameters.
[0166] 602. During the chip function verification process, when a data packet sent by the binding interface corresponding to the chip under test is monitored, the bandwidth monitoring component updates the value of its own bandwidth monitoring parameter in real time;
[0167] Optionally, in one embodiment, step 602 further includes:
[0168] During the chip function verification process, when a data packet sent by the corresponding binding interface of the chip to be tested is monitored, the second built-in function of the bandwidth monitoring component is called to update the value of its own bandwidth monitoring parameter in real time.
[0169] Optionally, in one embodiment, during the chip function verification process, when a data packet sent by the corresponding binding interface of the chip under test is monitored, calling the second built-in function of the bandwidth monitoring component to update the value of its own bandwidth monitoring parameter in real time includes:
[0170] During the chip function verification process, monitoring whether there is a data packet sent by the binding interface corresponding to the chip under test; when monitoring the data packet sent by the binding interface corresponding to the chip under test, calling the second built-in function of the bandwidth monitoring component to perform the following operations, including:
[0171] Determine whether to perform bandwidth monitoring. If bandwidth monitoring is performed, update the current total data packet volume and determine whether to start counting bandwidth data. If bandwidth monitoring is not performed, update the first frame data time point. If bandwidth data statistics are started, update the current total data volume, the current process total data volume, the current process total data packet volume, the last frame data time point and the process last frame data time point. If bandwidth data statistics are not started, update the first frame data time point and the process first frame data time point.
[0172] Optionally, in one embodiment, after step 602, the method further includes:
[0173] During the chip function verification process, when there is an updated value of the own bandwidth monitoring parameter, the second built-in function of the bandwidth monitoring component is called to calculate the process bandwidth and perform process bandwidth verification, and the process bandwidth verification result is output.
[0174] Optionally, in one embodiment, during the chip function verification process, when there is an updated value of the own bandwidth monitoring parameter, calling the second built-in function of the bandwidth monitoring component to calculate the process bandwidth and perform process bandwidth verification, and outputting the process bandwidth verification result includes:
[0175] During the chip function verification process, when there is an updated value of the own bandwidth monitoring parameter, the second built-in function of the bandwidth monitoring component is called to perform the following operations, including:
[0176] Based on the latest total process data packet volume and the initialized data packet volume, determine whether the current process bandwidth is being compared. If the process bandwidth is being compared, calculate the process bandwidth based on the latest updated total process data volume, the time point of the first frame data of the process, and the time point of the last frame data of the process; compare the calculated process bandwidth with the initialized expected bandwidth to see if they meet the initialized bandwidth mode; if not, print the process bandwidth verification result.
[0177] 603. When the chip function verification is finished, based on the latest updated value of the own bandwidth monitoring parameter, the bandwidth monitoring component calculates the final bandwidth and performs bandwidth verification, and outputs the bandwidth verification result.
[0178] Optionally, in one embodiment, step 603 further includes:
[0179] At the end of the chip function verification, when the test component receives a call request for the third built-in function of the bandwidth monitoring component, the final bandwidth is calculated and the final bandwidth verification is performed based on the latest updated value of its own bandwidth monitoring parameter, and the final bandwidth verification result is output.
[0180] Optionally, in one embodiment, when the chip function verification is completed, when a call request of the test component to the third built-in function of the bandwidth monitoring component is received, the final bandwidth is calculated and the final bandwidth verification is performed based on the value of the latest updated own bandwidth monitoring parameter, and the output of the final bandwidth verification result includes:
[0181] At the end of the chip function verification, when a call request of the test component to the third built-in function of the bandwidth monitoring component is received, the third built-in function of the bandwidth monitoring component is called to perform the following operations, including:
[0182] Determine whether to perform bandwidth monitoring. If bandwidth monitoring is performed, calculate the final bandwidth based on the total data volume, first frame data time point, and last frame data time point of the latest update; compare the calculated final bandwidth with the initialized expected bandwidth to see if they meet the initialized bandwidth mode. If not, print the final bandwidth verification result.
[0183] In this embodiment, the chip bandwidth verification reuses the chip function verification environment. The bandwidth monitoring component can construct corresponding trigger conditions based on each event node of the chip function verification, and then trigger the relevant built-in functions (first built-in function, second built-in function, third built-in function) in the bandwidth monitoring component to perform corresponding functions. For example, before the chip function verification starts, the first built-in function of the bandwidth monitoring component is triggered to initialize its own bandwidth monitoring parameters; during the chip function verification process, the second built-in function of the bandwidth monitoring component is triggered to update its own bandwidth monitoring parameters and calculate the process bandwidth and perform process bandwidth verification based on the received data packet; at the end of the chip function verification, the third built-in function of the bandwidth monitoring component is triggered to calculate the final bandwidth and perform bandwidth verification by the relevant test components in the chip function verification environment, and the bandwidth verification result is output.
[0184] above Figure 2 The bandwidth verification device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The computer device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0185] Figure 71 is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. The computer device 500 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 510 (for example, one or more processors) and a memory 520, and one or more storage media 530 (for example, one or more mass storage devices) storing application programs 533 or data 532. Among them, the memory 520 and the storage medium 530 can be short-term storage or permanent storage. The program stored in the storage medium 530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the computer device 500. Furthermore, the processor 510 may be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the computer device 500.
[0186] The computer device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input and output interfaces 560, and / or one or more operating systems 531, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 7 The illustrated computer device structure does not constitute a limitation on the computer device, and may include more or fewer components than illustrated, or combine certain components, or arrange the components differently.
[0187] The present invention also provides a computer device, which includes a memory and a processor. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor executes the steps of the bandwidth verification method in the above embodiments.
[0188] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the bandwidth verification method.
[0189] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0190] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0191] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A bandwidth verification device, applied to a chip verification system, characterized in that: The chip verification system is constructed with a test component and a chip to be tested, the test component and the chip to be tested perform data exchange to realize chip function verification, and the bandwidth verification device includes several bandwidth monitoring components; The test component is used to instantiate a plurality of the bandwidth monitoring components, and bind each of the bandwidth monitoring components to each monitoring interface of the chip to be tested in a one-to-one correspondence; The bandwidth monitoring component is used to update the value of its own bandwidth monitoring parameter in real time during the chip function verification process when monitoring the data packet sent by the corresponding binding interface of the chip to be tested; at the end of the chip function verification, based on the latest updated value of its own bandwidth monitoring parameter, calculate the final bandwidth and perform bandwidth verification, and output the bandwidth verification result.
2. The bandwidth verification device according to claim 1, characterized in that: The bandwidth monitoring component includes: The initialization module is used to initialize its own bandwidth monitoring parameters when receiving a call request from the test component to the first built-in function of the bandwidth monitoring component.
3. The bandwidth verification device according to claim 2, characterized in that: The bandwidth monitoring component also includes: A parameter updating module is used to call the second built-in function of the bandwidth monitoring component to update the value of its own bandwidth monitoring parameter in real time when monitoring a data packet sent by the corresponding binding interface of the chip under test during the chip function verification process; The first bandwidth verification module is used to calculate the final bandwidth and perform final bandwidth verification based on the most recently updated value of its own bandwidth monitoring parameter when receiving a call request from the test component to the third built-in function of the bandwidth monitoring component at the end of the chip function verification, and output a final bandwidth verification result.
4. The bandwidth verification device according to claim 3, characterized in that: The bandwidth monitoring component also includes: The second bandwidth verification module is used to call the second built-in function of the bandwidth monitoring component to calculate the process bandwidth and perform process bandwidth verification when there is an updated value of the own bandwidth monitoring parameter during the chip function verification process, and output the process bandwidth verification result.
5. The bandwidth verification device according to claim 3, characterized in that: The parameter updating module comprises: A monitoring unit, used to monitor whether there is a data packet sent by the corresponding binding interface of the chip under test during the chip function verification process; A first calling unit is used to call the second built-in function execution parameter updating unit of the bandwidth monitoring component when monitoring a data packet sent by the binding interface corresponding to the chip under test; The parameter updating unit is used to determine whether to perform bandwidth monitoring. If bandwidth monitoring is performed, the current total data packet volume is updated and it is determined whether to start counting bandwidth data. If bandwidth monitoring is not performed, the first frame data time point is updated. If bandwidth data statistics are started, the current total data volume, the current process total data volume, the current process total data packet volume, the last frame data time point and the process last frame data time point are updated. If bandwidth data statistics are not started, the first frame data time point and the process first frame data time point are updated.
6. The bandwidth verification device according to claim 5, characterized in that: The first bandwidth verification module includes: A second calling unit is configured to execute the first bandwidth verification unit based on the value of the latest updated own bandwidth monitoring parameter when receiving a calling request of the test component to the third built-in function of the bandwidth monitoring component at the end of the chip function verification; The first bandwidth verification unit is used to determine whether to perform bandwidth monitoring. If bandwidth monitoring is performed, the final bandwidth is calculated based on the latest updated total data volume, the first frame data time point and the last frame data time point; the calculated final bandwidth is compared with the initialized expected bandwidth to see whether they meet the initialized bandwidth mode, and if not, the final bandwidth verification result is printed.
7. The bandwidth verification device according to claim 5, characterized in that: The second bandwidth verification module includes: A third calling unit is used to call the second built-in function of the bandwidth monitoring component to execute the second bandwidth verification unit when there is an updated value of the own bandwidth monitoring parameter during the chip function verification process; The second bandwidth verification unit is used to determine whether the process bandwidth is currently being compared based on the latest total process data packet volume and the initialized data packet volume. If the process bandwidth is being compared, the process bandwidth is calculated based on the latest updated total process data volume, the time point of the first frame data of the process, and the time point of the last frame data of the process; the calculated process bandwidth is compared with the initialized expected bandwidth to see whether they meet the initialized bandwidth mode; if not, the process bandwidth verification result is printed.
8. A bandwidth verification method, characterized in that: The bandwidth verification device applied to any one of claims 1 to 7, wherein the bandwidth verification method comprises: Instantiating a plurality of the bandwidth monitoring components through the test component, and binding each of the bandwidth monitoring components to each monitoring interface of the chip to be tested in a one-to-one correspondence; During the chip function verification process, when a data packet sent by the corresponding binding interface of the chip under test is monitored, the bandwidth monitoring component updates the value of its own bandwidth monitoring parameter in real time; When the chip function verification is finished, based on the latest updated value of the own bandwidth monitoring parameter, the bandwidth monitoring component calculates the final bandwidth and performs bandwidth verification, and outputs the bandwidth verification result.
9. A computer device, characterized in that: The computer device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory to enable the computer device to perform the bandwidth verification method according to claim 8.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by a processor, the bandwidth verification method as claimed in claim 8 is implemented.
