Flow monitoring method, device, medium and electronic equipment

Through the combination of the traffic termination monitor and the central controller, automatic monitoring and waiting for the data traffic to end, the problem of difficult data traffic duration in chip verification is solved, and the accuracy and efficiency of verification is improved.

CN118714047BActive Publication Date: 2025-08-15NANJING JINZHEN MICROELECTRONICS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410959789.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2025-08-15
Estimated Expiration
2044-07-17

AI Technical Summary

Technical Problem

During the chip verification process, it is difficult for the prior art to accurately obtain the duration of data traffic, resulting in the high probability of verification errors and high maintenance costs.

Method used

The traffic termination monitor and the traffic termination central controller are used to obtain the preset silent timeout threshold and the preset traffic timeout threshold of the target port, and the traffic termination monitor status is set based on busy events and timing values, and the traffic termination central controller is used to poll the monitor to automatically wait for the data traffic to end.

Benefits of technology

Reduces the error probability of verification personnel manually setting data traffic waiting time, saves development environment and test case time, reduces maintenance costs, and improves development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118714047B_ABST
    Figure CN118714047B_ABST
Patent Text Reader

Abstract

The present application provides a flow monitoring method, device, medium and electronic device. The flow monitoring method includes: obtaining a verification use case of a target port in a chip to be tested, a preset silence timeout threshold and a preset flow timeout threshold of the target port; starting the data flow of the verification use case according to the data flow driver in the UVM verification environment; setting the state of the flow termination monitor based on the busy event triggered in the flow termination monitor, the preset silence timeout threshold and the first timing value; based on the preset flow timeout threshold, polling the flow termination monitor through the flow termination central controller to wait for the data flow to end. The flow monitoring method can eliminate the need for verification personnel to manually set the waiting time for data flow, which not only saves time for the development environment and test cases, but also reduces the probability of verification errors caused by inappropriate manual setting of the waiting time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of chip verification and relates to a flow monitoring method, and in particular to a flow monitoring method, device, medium and electronic equipment. Background Art

[0002] For example, chips in the data path field, such as physical layer communication chips and switch chips, whose primary business is end-to-end data transmission, have become the mainstream method for functional verification of these chips using a verification environment built using the Universal Verification Method (UVM).

[0003] Take an 8-port switch chip as an example. There are eight data drivers serving as the inputs to the DUT (Design Under Test), and eight data monitors collecting the DUT's output data. When verifying the data path, validators often independently set the speed, input data length, number, and other properties of these eight ports. These configurations are typically independent and randomly generated. Based on typical switch functionality, the core analyzes and processes the data from each port, copying and forwarding it to a designated port or ports. Therefore, the data on each output port is not only related to the data on the input port, but is also closely related to the switch configuration for the current use case.

[0004] Based on this fact, in the above-mentioned use case of verifying the data path, it is often difficult to accurately obtain the data flow duration to wait and perform subsequent operations (such as counter checks, executing subsequent code to cover different scenarios, etc.). In short, it is not easy to safely exit the data flow stage.

[0005] To save time, many verifiers adopt a simple approach. This involves simply waiting for a sufficient amount of time at the end of a use case to ensure that data traffic on all ports completes within that time. However, this approach is overly simplistic and lacks flexibility. For a single use case, if the verification case is to cover all possible scenarios, the waiting time is often set very long, resulting in excessive consumption of simulation resources. Furthermore, since different use cases cover different scenarios and intentions, verifiers need to set a maximum foreseeable waiting time for each verification case, which can lead to high error rates and maintenance costs. Summary of the Invention

[0006] The purpose of this application is to provide a flow monitoring method, device, medium and electronic equipment to solve the problems of high probability of flow exit error and high maintenance cost in the current verification process.

[0007] In a first aspect, the present application provides a flow monitoring method, which is applied to a verification system, the verification system UVM verification environment, a flow termination central controller and a flow termination monitor associated with the flow termination central controller, the flow monitoring method comprising: obtaining a verification use case of a target port in a chip to be tested, a preset silence timeout threshold and a preset flow timeout threshold of the target port; starting the data flow of the verification use case according to a data flow driver in the UVM verification environment; setting the state of the flow termination monitor based on a busy event triggered in the flow termination monitor, the preset silence timeout threshold and a first timing value, wherein the busy event is triggered when the data monitor in the UVM verification environment transmits data, the state of the flow termination monitor is a busy state or a silent state, and the first timing value is the timing value of a timer in the flow termination monitor; based on the preset flow timeout threshold, polling the flow termination monitor through the flow termination central controller to wait for the data flow to end.

[0008] In the described traffic monitoring method, data traffic is monitored via the traffic termination monitor and the traffic termination central controller, eliminating the need for verification personnel to manually set the data traffic waiting time. This not only saves time in developing the environment and testing cases, but also reduces the probability of verification errors caused by manually setting inappropriate waiting times. This also significantly reduces maintenance costs for verification personnel in this area. Even if the port rate or data traffic configuration of a test case is changed, the data traffic waiting time does not need to be changed, thereby improving development efficiency.

[0009] In one embodiment of the present application, the traffic termination monitor includes a first parallel thread and a second parallel thread. Based on a busy event triggered in the traffic termination monitor, a preset silence timeout threshold and the first timing value, an implementation method for setting the state of the traffic termination monitor includes: when the busy event is triggered in the first parallel thread, setting the state of the traffic termination monitor to the busy state, and resetting the first timing value and the state of the busy event after the state of the traffic termination monitor is set to the busy state; when waiting in the second parallel thread for more than the preset silence timeout threshold, setting the state of the traffic termination monitor to the silent state; when the first parallel thread or the second parallel thread ends, both the first parallel thread and the second parallel thread end.

[0010] In one embodiment of the present application, based on the preset traffic timeout threshold, the traffic termination central controller polls the traffic termination monitor and waits for the data traffic to end. The implementation method includes: the traffic termination central controller monitors the traffic termination monitor through periodic polling, and if the status of the traffic termination monitor is the busy state, the traffic termination central controller wakes up the currently silent traffic termination monitor, otherwise the data traffic ends; when the second timing value of the traffic termination central controller reaches the preset traffic timeout threshold and the current status of the traffic termination monitor is the busy state, the current traffic abnormality information is reported, and the second timing value is the timing value of the timer in the traffic termination central controller.

[0011] In one embodiment of the present application, the method for obtaining the preset silence timeout threshold of the target port includes: obtaining parameter information of the data traffic; and obtaining the preset silence timeout threshold based on the parameter information and the rate of the target port.

[0012] In one embodiment of the present application, the parameter information is the maximum length of a data packet in the data traffic, and the preset silence timeout threshold is expressed as:

[0013] t_idle=max_pkt_size / port_speed×deviation

[0014] Among them, t_idle represents the preset silence timeout threshold, max_pkt_size represents the maximum length of the data packet in the data traffic, port_speed represents the speed of the target port, and deviation represents a coefficient associated with the packet interval time.

[0015] In one embodiment of the present application, the method for creating the traffic termination monitor includes: specifying the transaction type monitored by the traffic termination monitor when the traffic termination monitor is created, and the transaction type is the data packet; specifying the parent component when or after the traffic termination monitor is created, and the parent component is the traffic termination central controller.

[0016] In one embodiment of the present application, based on the preset traffic timeout threshold, the traffic termination monitor is polled by the traffic termination central controller, and the implementation method for waiting for the data traffic to end includes: obtaining the sub-component queue of the traffic termination central controller, and the sub-component queue is composed of the traffic termination monitor; based on the preset traffic timeout threshold, the sub-component queue is periodically polled for status, and waiting for the data traffic to end.

[0017] In a second aspect, the present application provides a flow monitoring device, which uses a verification system, the verification system including a UVM verification environment, a flow termination central controller and a flow termination monitor associated with the flow termination central controller, the flow monitoring device including: a verification use case acquisition module, used to obtain the verification use case of the target port in the chip to be tested, the preset silence timeout threshold and the preset flow timeout threshold of the target port; a data flow start module, used to start the data flow of the verification use case according to the data flow driver in the UVM verification environment; a monitor state setting module, used to set the state of the flow termination monitor based on a busy event triggered in the flow termination monitor, the preset silence timeout threshold and a first timing value, the busy event is triggered when the data monitor in the UVM verification environment transmits data, the state of the flow termination monitor is a busy state or a silent state, and the first timing value is the timing value of the timer in the flow termination monitor; a data flow termination module, used to poll the flow termination monitor through the flow termination central controller based on the preset flow timeout threshold, and wait for the data flow to end.

[0018] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the traffic monitoring method described in any one of the first aspects of the present application.

[0019] In a fourth aspect, the present application provides an electronic device comprising: a memory storing a computer program; and a processor communicatively connected to the memory, for executing any of the traffic monitoring methods described in the first aspect of the present application when the computer program is called.

[0020] As described above, the flow monitoring method, device, medium, and electronic device of the present application have the following beneficial effects:

[0021] In the described traffic monitoring method, data traffic is monitored via the traffic termination monitor and the traffic termination central controller, eliminating the need for verification personnel to manually set the data traffic waiting time. This not only saves time in developing the environment and testing cases, but also reduces the probability of verification errors caused by manually setting inappropriate waiting times. This also significantly reduces maintenance costs for verification personnel in this area. Even if the port rate or data traffic configuration of a test case is changed, the data traffic waiting time does not need to be changed, thereby improving development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 Shown is a structural diagram of the verification system according to an embodiment of the present application.

[0023] Figure 2 Shown is a flow chart of the flow monitoring method according to an embodiment of the present application.

[0024] Figure 3 A flowchart showing an implementation method for setting the status of the flow termination monitor according to an embodiment of the present application is shown.

[0025] Figure 4 Shown is a flowchart of an implementation method of the present application in which the traffic termination central controller polls the traffic termination monitor and waits for the data traffic to end.

[0026] Figure 5 Shown is a flowchart of a method for implementing the method of obtaining the preset silence timeout threshold of the target port according to an embodiment of the present application.

[0027] Figure 6 Shown is a flowchart of a method for creating a traffic termination monitor according to an embodiment of the present application.

[0028] Figure 7 Shown is a flowchart of an implementation method of the present application in which the traffic termination central controller polls the traffic termination monitor and waits for the data traffic to end.

[0029] Figure 8 Shown is a structural schematic diagram of the flow monitoring device described in an embodiment of the present application.

[0030] Component number description

[0031] 10 Verification System

[0032] 110 UVM Verification Environment

[0033] 120 EOT system

[0034] 800 Flow Monitoring Device

[0035] 810 Verification case acquisition module

[0036] 820 Data traffic start module

[0037] 830 Monitor status setting module

[0038] 840 Data flow end module

[0039] Steps S11-S14

[0040] Steps S21-S23

[0041] Steps S31-S32

[0042] Steps S41-S42

[0043] Steps S51-S52

[0044] Steps S61-S62 DETAILED DESCRIPTION

[0045] The following describes the embodiments of the present application through specific examples. Those skilled in the art can easily understand the other advantages and effects of the present application from the content disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments. The details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other unless they conflict.

[0046] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application. Therefore, the illustrations only show components related to the present application and are not drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component can be changed at will, and the component layout type may also be more complicated.

[0047] The technical solutions in the embodiments of the present application are described in detail below in conjunction with the drawings in the embodiments of the present application.

[0048] The flow monitoring method provided in the embodiment of the present application can be run in the verification system. Figure 1 For example, Figure 1 The structure diagram of the verification system is shown. The verification system 10 may include a UVM verification environment 110 and an EOT (End of Traffic) system 120. The UVM verification environment 110 may include a data monitor, a data traffic driver, etc., and the UVM verification environment 110 will not be described in detail in this embodiment. The EOT system 120 may include an EOT central controller and an EOT monitor associated with the EOT central controller. The EOT central controller is a traffic termination central controller, and the EOT monitor is a traffic termination monitor.

[0049] Optionally, each of the EOT monitors is responsible for monitoring a port of a DUT, and the EOT monitor may be connected to a data monitor connected to the DUT port in a verification environment through a UVM TLM (Transaction Level Modeling) port.

[0050] Optionally, the EOT system 120 will exit safely after the data traffic ends, and subsequent tasks of the test case can be executed.

[0051] Optionally, the EOT central controller can be used to control the state of the EOT monitor. When the EOT monitor is controlled by the EOT central controller, it becomes an EOT monitor associated with the EOT central controller.

[0052] like Figure 2 As shown, this embodiment provides a flow monitoring method, which is applied to a verification system. The flow monitoring method includes:

[0053] S11, obtaining a verification use case of a target port in the chip to be tested, a preset silence timeout threshold and a preset flow timeout threshold of the target port.

[0054] Optionally, the target port may be multiple ports, for example, each port in an 8-port switch is a target port. The preset silence timeout threshold and the preset flow timeout threshold may be flexibly set according to actual conditions, and will not be described in detail in this embodiment.

[0055] S12: Start the data traffic of the verification use case according to the data traffic driver in the UVM verification environment.

[0056] Optionally, the data flow of the verification use case can be in units of data packets, and the TLM transmission object can be a data packet based on the uvm_object type. When the target port has 8 ports, each port has a data output interface. In the UVM verification environment, 8 data monitors corresponding to the data output interfaces are provided. The data flow driver is uvm_driver, and the present embodiment will not repeat them in detail.

[0057] S13, setting the state of the traffic termination monitor based on the busy event triggered in the traffic termination monitor, the preset silence timeout threshold and the first timing value, wherein the busy event is triggered when the data monitor in the UVM verification environment transmits data, the state of the traffic termination monitor is a busy state or a silent state, and the first timing value is a timing value of the timer in the traffic termination monitor.

[0058] Optionally, the EOT monitor can be connected to the data monitor of the target port through a UVM TLM port to ensure that the data monitor can pass the monitoring information of the data packet to the corresponding EOT monitor. The data monitor is uvm_monitor, and the present embodiment will not repeat them in detail.

[0059] Optionally, the EOT monitor can be made into a parameterized type, that is, when creating an EOT monitor instance, the transaction type to be transmitted / monitored can be specified, and the type must be consistent with the data monitor passed through TLM. The definition is as follows: class eot_mon#(type TR=uvm_object) extends uvm_component;

[0060] Wherein, the EOT monitor may include a write function. When the data monitor monitors a data packet, data information is transmitted through the UVM TLM port. The write function in the EOT monitor is called each time the data monitor transmits data through the UVM TLM port. In the write function, a busy event, i.e., uvm_event, is triggered. The busy event refers to an event that enables the EOT monitor to enter a busy state. Optionally, when triggered, busy source information, i.e., uvm_object, is carried to record information such as the current time and the data source that causes the busyness, to facilitate subsequent printing and debugging. The write function can be flexibly designed according to actual conditions, and this embodiment will not go into details.

[0061] Optionally, the preset silence timeout threshold may indicate that if no new data packets are detected within the time indicated by the threshold after the last data packet is detected, the data flow is considered to have ended. Since the data monitor often provides valid monitoring information at the end or header of a data packet, the interval between two monitoring messages provided by it is at least the length of a data packet. The time period that the threshold must first cover is the time taken to transmit the longest possible data packet at the port rate. Taking the transmission time of the longest data packet into consideration here can eliminate the delay in the feedback of data packet monitoring information.

[0062] S14: Based on the preset traffic timeout threshold, the traffic termination central controller polls the traffic termination monitor to wait for the data traffic to end.

[0063] Optionally, S12 starts the data traffic of the verification use case according to the data traffic driver and S14 polls the EOT monitor through the EOT central controller and waits for the data traffic to end, which can be started in parallel. Specifically, they can be started in a fork...join manner, as shown below:

[0064]

[0065] According to the above description, the traffic monitoring method described in this embodiment includes: obtaining a verification use case of a target port in a chip to be tested, a preset silence timeout threshold and a preset traffic timeout threshold of the target port; starting the data traffic of the verification use case according to the data traffic driver in the UVM verification environment; setting the state of the traffic termination monitor based on the busy event triggered in the traffic termination monitor, the preset silence timeout threshold and the first timing value, wherein the busy event is triggered when the data monitor in the UVM verification environment transmits data, the state of the traffic termination monitor is a busy state or a silent state, and the first timing value is the timing value of the timer in the traffic termination monitor; based on the preset traffic timeout threshold, polling the traffic termination monitor through the traffic termination central controller, waiting for the data traffic to end.

[0066] In the traffic monitoring method, data traffic is monitored via the EOT monitor and the EOT central controller, eliminating the need for verification personnel to manually set data traffic waiting times. This not only saves time in developing environments and testing cases, but also reduces the probability of verification errors caused by inappropriate manual waiting time settings. This also significantly reduces maintenance costs for verification personnel in this area. Even if the port rate or data traffic configuration of a test case is changed, the data traffic waiting time does not need to be changed, thereby improving development efficiency.

[0067] The EOT monitor includes a first parallel thread and a second parallel thread, such as Figure 3 As shown, this embodiment provides a method for setting the state of the flow termination monitor based on a busy event triggered in the flow termination monitor, a preset silence timeout threshold, and the first timing value, including:

[0068] S21, when the busy event is triggered in the first parallel thread, setting the state of the traffic termination monitor to the busy state, and resetting the first timing value and the state of the busy event after the state of the traffic termination monitor is set to the busy state.

[0069] Optionally, the state of the busy event may include a valid state and an invalid state. When the busy event is triggered in the first parallel thread, the state of the busy event has changed from the invalid state to the valid state, and the state of the traffic termination monitor is set to the busy state. After the traffic termination monitor is set to the busy state, the state of the busy time is reset from the valid state to the invalid state. Resetting the first timer value may mean resetting the first timer value to 0 and restarting the count from 0.

[0070] S22: When the waiting time in the second parallel thread exceeds the preset silence timeout threshold, setting the state of the traffic termination monitor to the silent state.

[0071] S23: When the first parallel thread or the second parallel thread ends, both the first parallel thread and the second parallel thread end.

[0072] Optionally, the EOT monitor instance has a loop body with a timer. Each loop is a set of parallel events that can be executed by the first parallel thread and the second parallel thread respectively. This can be implemented using the fork..join_any statement of System Verilog. This statement will jump out after any parallel thread ends to execute subsequent statements. The code example is as follows:

[0073]

[0074] Optionally, when the EOT monitor detects data passing through the monitored port through the waiting busy event trigger method, i.e., uvm_event.wait_trigger, the loop body will enter the next loop, the EOT monitor will enter the busy state, and reset the timer and busy event. When the timer count value equals the set silent timeout threshold, that is, no new data passes through the port during this period, the EOT monitor determines that the data traffic on the current port has stopped, enters the silent state, and reports its own status to the EOT central controller.

[0075] like Figure 4 As shown, this embodiment provides a method for polling the traffic termination monitor by the traffic termination central controller based on the preset traffic timeout threshold, and waiting for the data traffic to end, including:

[0076] S31, the traffic termination central controller monitors the traffic termination monitor through periodic polling. If the status of the traffic termination monitor is the busy state, the traffic termination central controller wakes up the currently silent traffic termination monitor, otherwise the data traffic ends.

[0077] S32, when the second timing value of the traffic termination central controller reaches the preset traffic timeout threshold and the current state of the traffic termination monitor is the busy state, report the current traffic abnormality information, and the second timing value is the timing value of the timer in the traffic termination central controller.

[0078] Optionally, the timer in the EOT central controller may be in a loop, and the timer is a flow excess abnormality timer. The flow excess abnormality timer is used to deal with abnormal flow. When the second timer value of the EOT central controller reaches a preset flow timeout threshold and the current state of the EOT monitor is the busy state, the EOT system will consider the current flow abnormal and report it.

[0079] Optionally, within the EOT controller's loop, the EOT controller is responsible for continuously monitoring the status of mounted EOT monitors, i.e., whether they are busy or silent, through periodic polling. All data traffic in the current system is considered to have stopped only when all mounted EOT monitors are in the silent state. During this period, if the polling result indicates that not all EOT monitors are in the silent state, the EOT controller will reawaken the currently silent EOT monitor, placing it in the busy state and waiting for it to become silent again.

[0080] Optionally, the EOT system can provide a method for waiting for traffic to terminate, namely wait_for_idle mentioned above, for the user to call, and the preset traffic timeout threshold is the input parameter of this method. The preset traffic timeout threshold can be set by the user according to the actual situation, generally a large value, to prevent traffic anomalies from exceeding a reasonable time. When a traffic anomaly occurs, the method returns an error mark of the traffic anomaly, namely the traffic anomaly information. After the method returns the error mark of the traffic anomaly, the user can perform exception handling on the verification use case, such as interrupting the simulation.

[0081] like Figure 5 As shown, this embodiment provides a method for obtaining the preset silence timeout threshold, including:

[0082] S41, obtaining parameter information of the data flow.

[0083] S42: Acquire the preset silence timeout threshold based on the parameter information and the rate of the target port.

[0084] Optionally, the parameter information is the maximum length of a data packet in the data traffic, and the preset silence timeout threshold is expressed as:

[0085] t_idle=max_pkt_size / port_speed×deviation

[0086] Where t_idle represents the preset silence timeout threshold, max_pkt_size represents the maximum length of a packet in the data traffic, port_speed represents the speed of the target port, and deviation represents a coefficient related to the packet interval. Deviation can typically be a value greater than 1 and can be adjusted based on the maximum packet spacing generated by the data driver in the verification environment. In actual simulations, the driver does not drive packets at extremely slow data rates. This means that the interval between two adjacent packets is not excessively large, ensuring that the interval is within a certain range to achieve an appropriate preset silence timeout threshold. Deviation can typically be 1.2-1.5. Assume that at time A, the EOT monitor receives a packet and enters the busy state. The time consumed by the maximum packet length is t_pkt = max_pkt_size / port_speed. If the maximum interval between two packets sent by the system at this time is likely to be t_gap, we will assume that a regular packet driver sends packets continuously, with a relatively small interval. Assuming that the conversion between t_gap and the maximum packet length is approximately t_gap ~ t_pkt * 1.2, that is, t_gap is approximately t_pkt * 1.2, it can be assumed that if a time greater than t_gap has passed since time A and the next packet has not been received, the silent state can be entered. Therefore, t_idle can be set to t_idle = max_pkt_size / port_speed * 1.2. Deviation can be flexibly set based on actual conditions and is not explicitly limited in this embodiment.

[0087] Optionally, the step of generating the preset silence timeout threshold can be written into a base class use case as a public process to improve code reusability.

[0088] Optionally, the EOT system may include an EOT parameter calculation module, which is used to obtain the preset silence timeout threshold based on the rate of the data packet and the target port. The EOT parameter calculation module can be called before the verification use case starts the data traffic driver to set the calculated preset silence timeout threshold to the corresponding EOT monitor.

[0089] By generating the preset silence timeout threshold based on the data packet and the target port rate, an appropriate silence timeout threshold can be obtained to more accurately determine whether data traffic has stopped, thereby safely exiting the data traffic phase. Accurately determining the end of data traffic also allows test cases to exit at the appropriate time, avoiding idle waiting due to inappropriate wait time settings. This not only makes individual simulations run more efficiently, but also saves a significant amount of time and computing resources in regression testing, reducing costs and increasing efficiency.

[0090] like Figure 6 As shown, the method for creating the traffic termination monitor includes:

[0091] S51 , when creating the traffic termination monitor, specifying a transaction type to be monitored by the traffic termination monitor, wherein the transaction type is a data packet.

[0092] S52, specifying a parent component when or after the traffic termination monitor is created, where the parent component is the EOT central controller.

[0093] Optionally, the method of specifying the parent component when the EOT monitor is created can be implemented according to the set_parent method in UVM. The code example of specifying the parent component eot_ctrl of the EOT central controller when the EOT monitor is created is as follows:

[0094] eot_mon_0=eot_mon#(data_trans_item)::type_id::create(“u_eot_mon_0”,eot_ctrl);

[0095] Optionally, the code example of the EOT monitor specifying the EOT central controller parent component eot_ctrl after creation is as follows:

[0096] eot_mon_0=eot_mon#(data_trans_item)::type_id::create(“u_eot_mon_0”,this);

[0097] eot_mon_0.set_parent(eot_ctrl);

[0098] like Figure 7 As shown, based on the preset traffic timeout threshold, the method for polling the traffic termination monitor by the traffic termination central controller and waiting for the data traffic to end includes:

[0099] S61, obtaining a sub-component queue of the traffic termination central controller, where the sub-component queue is composed of the traffic termination monitor.

[0100] Optionally, before the EOT central controller is started, all EOT monitors mounted on the EOT central controller can be organized into a queue, ie, the subcomponent queue, through the get_children method to facilitate status polling of the EOT monitors.

[0101] S62: Based on the preset traffic timeout threshold, periodically poll the status of the subcomponent queue to wait for the data traffic to end.

[0102] The protection scope of the traffic monitoring method described in the embodiment of the present application is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, reducing, or replacing steps in the existing technology based on the principles of the present application are included in the protection scope of the present application.

[0103] like Figure 8 As shown, this embodiment provides a flow monitoring device 800, which applies a verification system. The verification system includes a UVM verification environment, a flow termination central controller, and a flow termination monitor associated with the flow termination central controller. The flow monitoring device 800 includes:

[0104] The verification case acquisition module 810 is used to acquire the verification case of the target port in the chip under test, the preset silence timeout threshold and the preset flow timeout threshold of the target port.

[0105] The data traffic starting module 820 is configured to start the data traffic of the verification use case according to the data traffic driver in the UVM verification environment.

[0106] The monitor state setting module 830 is used to set the state of the traffic termination monitor based on the busy event triggered in the traffic termination monitor, the preset silence timeout threshold and the first timing value, wherein the busy event is triggered when the data monitor in the UVM verification environment transmits data, the state of the traffic termination monitor is a busy state or a silent state, and the first timing value is the timing value of the timer in the traffic termination monitor.

[0107] The data traffic ending module 840 is configured to poll the traffic termination monitor through the traffic termination central controller based on the preset traffic timeout threshold, and wait for the data traffic to end.

[0108] In the flow monitoring device 800 provided in this embodiment, the verification case acquisition module 810 and Figure 2 The data flow monitoring method shown in FIG. 8 corresponds to step S11, wherein the data flow starting module 820 is connected to the data flow starting module 820. Figure 2 The flow monitoring method shown in FIG. 1 corresponds to step S12, wherein the monitor state setting module 830 is connected to the Figure 2 The data flow monitoring method shown in FIG. 1 corresponds to step S13, wherein the data flow end module 840 is connected to the data flow end module 840. Figure 2 This corresponds to step S14 of the flow monitoring method shown.

[0109] In the several embodiments provided in this application, it should be understood that the disclosed devices or methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules / units is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules or units, which can be electrical, mechanical or other forms.

[0110] The modules / units described as separate components may or may not be physically separate, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place or distributed across multiple network elements. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present application. For example, the functional modules / units in the various embodiments of the present application may be integrated into a processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into a single module / unit.

[0111] Those skilled in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0112] This embodiment provides an electronic device, which includes a memory storing a computer program; a processor connected to the memory for executing the computer program when the computer program is called; Figure 2 The flow monitoring method shown.

[0113] The embodiment of the present application also provides a computer-readable storage medium. Those skilled in the art will understand that all or part of the steps in the method for implementing the above embodiment can be completed by instructing the processor through a program, and the program can be stored in a computer-readable storage medium, and the storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid-state drive, a magnetic tape, a floppy disk, an optical disc, and any combination thereof. The above storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a digital video disc (DVD)), or a semiconductor medium (for example, a solid-state drive (SSD)), etc.

[0114] The embodiment of the present application may also provide a computer program product, the computer program product including one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiment of the present application is generated in whole or in part. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer or data center to another website, computer or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method.

[0115] When the computer program product is executed by a computer, the computer executes the method described in the above method embodiment. The computer program product can be a software installation package. When the above method is needed, the computer program product can be downloaded and executed on the computer.

[0116] The descriptions of the processes or structures corresponding to the above figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.

[0117] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Anyone skilled in the art may modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by one of ordinary skill in the art without departing from the spirit and technical concepts disclosed in this application shall be covered by the claims of this application.

Claims

1. A flow monitoring method, characterized in that: Applied to a verification system, the verification system includes a UVM verification environment, a traffic termination central controller, and a traffic termination monitor associated with the traffic termination central controller, the traffic monitoring method includes: Obtaining a verification case of a target port in the chip under test, a preset silence timeout threshold, and a preset flow timeout threshold of the target port; Start the data traffic of the verification use case according to the data traffic driver in the UVM verification environment; Setting a state of the traffic termination monitor based on a busy event triggered in the traffic termination monitor, the preset silence timeout threshold, and a first timing value, wherein the busy event is triggered when a data monitor in the UVM verification environment transmits data, the state of the traffic termination monitor is a busy state or a silent state, and the first timing value is a timing value of a timer in the traffic termination monitor; Based on the preset traffic timeout threshold, polling the traffic termination monitor through the traffic termination central controller to wait for the data traffic to end; The method for obtaining the preset silence timeout threshold of the target port includes: obtaining parameter information of the data traffic; obtaining the preset silence timeout threshold based on the parameter information and the rate of the target port; The parameter information is the maximum length of the data packet in the data traffic, and the preset silence timeout threshold is expressed as: t_idle=max_pkt_size / port_speed×deviation Among them, t_idle represents the preset silence timeout threshold, max_pkt_size represents the maximum length of the data packet in the data traffic, port_speed represents the speed of the target port, and deviation represents a coefficient associated with the packet interval time.

2. The flow monitoring method according to claim 1, characterized in that: The traffic termination monitor includes a first parallel thread and a second parallel thread. Based on a busy event triggered in the traffic termination monitor, a preset silence timeout threshold, and the first timing value, an implementation method for setting a state of the traffic termination monitor includes: When the busy event is triggered in the first parallel thread, setting the state of the traffic termination monitor to the busy state, and resetting the first timing value and the state of the busy event after the state of the traffic termination monitor is set to the busy state; When the waiting time in the second parallel thread exceeds the preset silence timeout threshold, setting the state of the traffic termination monitor to the silent state; When the first parallel thread or the second parallel thread ends, both the first parallel thread and the second parallel thread end.

3. The flow monitoring method according to claim 1, characterized in that: The method for polling the traffic termination monitor by the traffic termination central controller based on the preset traffic timeout threshold and waiting for the data traffic to end includes: The traffic termination central controller monitors the traffic termination monitor through periodic polling. If the state of any traffic termination monitor is the busy state, the traffic termination central controller wakes up the currently silent traffic termination monitor, otherwise the data traffic ends; When the second timing value of the traffic termination central controller reaches the preset traffic timeout threshold and the current state of the traffic termination monitor is the busy state, the current traffic abnormality information is reported, and the second timing value is the timing value of the timer in the traffic termination central controller.

4. The flow monitoring method according to claim 3, characterized in that: The method for creating the traffic termination monitor includes: When the traffic termination monitor is created, specifying a transaction type monitored by the traffic termination monitor, the transaction type being the data packet; A parent component is specified when or after the traffic termination monitor is created, and the parent component is the traffic termination central controller.

5. The flow monitoring method according to claim 4, characterized in that: The method for polling the traffic termination monitor by the traffic termination central controller based on the preset traffic timeout threshold and waiting for the data traffic to end includes: Obtaining a subcomponent queue of the traffic termination central controller, wherein the subcomponent queue is composed of the traffic termination monitor; Based on the preset traffic timeout threshold, the subcomponent queue is periodically polled for status, waiting for the data traffic to end.

6. A flow monitoring device, characterized in that: Applied to a verification system, the verification system includes a UVM verification environment, a traffic termination central controller, and a traffic termination monitor associated with the traffic termination central controller, the traffic monitoring device includes: A verification case acquisition module is used to obtain a verification case of a target port in the chip under test, a preset silence timeout threshold and a preset flow timeout threshold of the target port; A data traffic startup module, configured to start the data traffic of the verification use case according to a data traffic driver in the UVM verification environment; A monitor state setting module is used to set the state of the flow termination monitor based on a busy event triggered in the flow termination monitor, the preset silence timeout threshold and a first timing value, wherein the busy event is triggered when the data monitor in the UVM verification environment transmits data, the state of the flow termination monitor is a busy state or a silent state, and the first timing value is a timing value of a timer in the flow termination monitor; A data traffic termination module is configured to poll the traffic termination monitor through the traffic termination central controller based on the preset traffic timeout threshold, and wait for the data traffic to terminate; The method for obtaining the preset silence timeout threshold of the target port includes: obtaining parameter information of the data traffic; obtaining the preset silence timeout threshold based on the parameter information and the rate of the target port; The parameter information is the maximum length of the data packet in the data traffic, and the preset silence timeout threshold is expressed as: t_idle=max_pkt_size / port_speed×deviation Among them, t_idle represents the preset silence timeout threshold, max_pkt_size represents the maximum length of the data packet in the data traffic, port_speed represents the speed of the target port, and deviation represents a coefficient associated with the packet interval time.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the flow monitoring method according to any one of claims 1 to 5 is implemented.

8. An electronic device, characterized in that: The electronic device comprises: a memory storing a computer program; A processor is communicatively connected to the memory and executes the flow monitoring method according to any one of claims 1 to 5 when calling the computer program.

Citation Information

Patent Citations

  • Chip verification method and device, electronic equipment and storage medium

    CN115221071A

  • Verification method, verification device, medium and electronic equipment

    CN115879409A