Flow monitoring method and device, medium and electronic equipment
By using the traffic termination monitor and central controller in the UVM verification environment, the end status of data traffic is automatically managed, which solves the problems of traffic exit errors and high maintenance costs in chip verification, and achieves a more efficient development process.
Patent Information
- Application Number
- CN202410959789.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-07-17
AI Technical Summary
During the chip verification process, it is difficult for verifiers to accurately obtain the duration of data traffic, resulting in a high probability of traffic exit errors and high maintenance costs. The existing methods are simple, crude and inflexible.
By introducing a traffic termination monitor and a central controller in the UVM verification environment, and using preset silent timeout thresholds and traffic timeout thresholds, the end status of data traffic can be automatically monitored and managed, avoiding manual setting of waiting times and achieving traffic monitoring.
It reduces the probability of verification errors and maintenance costs, improves development efficiency, and does not need to adjust the waiting time when the port rate or data traffic configuration changes.
Smart Images

Figure CN118714047A
Abstract
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 main business is end-to-end data transmission. For the functional verification of such chips, the verification environment built using UVM (Universal Verification Method) has gradually become the mainstream method.
[0003] Take an 8-port switch chip as an example, that is, there are 8 data drivers as the input of the DUT (Design Under Test), and 8 data monitors as the collection of the DUT output data. In the use case of verifying the data path, the verifier often independently sets the properties such as the rate, input data length, and number of these 8 ports, that is, these configurations are usually independent of each other and randomly generated. And according to the typical switch function, its kernel will analyze and process the data of each port, and make the action of copying and forwarding to a specified port or some ports. Therefore, the data of each output port is not only related to the data of the input port, but also closely related to the configuration of the switch in 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 traffic duration to wait and perform subsequent operations (such as counter checking, executing subsequent code to cover different scenarios, etc.). In short, it is not easy to safely exit the data traffic stage.
[0005] In order to save time, many verification personnel will adopt a relatively simple method. That is, they will wait for a long enough time at the end of the use case to ensure that the data traffic of all ports can be completed within this time. However, this method is too simple and crude and lacks flexibility. For a single use case, if you want to cover all the situations that may be randomly encountered in the verification use case, the waiting time is often set very long, resulting in excessive consumption of simulation resources. For different use cases, since each use case covers different scenarios and intentions, the verification personnel need to set the longest foreseeable waiting time for each verification use case separately, which may lead to a higher probability of error and maintenance costs. Summary of the invention
[0006] The purpose of the present 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, the busy event being triggered when the data monitor in the UVM verification environment transmits data, the state of the flow termination monitor being a busy state or a silent state, and the first timing value being a 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 flow monitoring method, the data flow is monitored by the flow termination monitor and the flow termination central controller, which can avoid the verification personnel from manually setting the waiting time for the data flow, saving time for the development environment and test cases, and reducing the probability of verification errors caused by inappropriate manual setting of the waiting time. At the same time, the maintenance cost of the verification personnel in this regard is also greatly reduced. Even if the port rate or data flow configuration of a test case is changed, there is no need to change the data flow waiting time, which improves the 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 timed polling, and if the state 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 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.
[0011] In one embodiment of the present application, a method for obtaining a 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 rate 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 a 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 a sub-component queue of the traffic termination central controller, wherein the sub-component queue is composed of the traffic termination monitor; based on the preset traffic timeout threshold, performing periodic status polling on the sub-component queue, 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 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 includes: a verification case acquisition module, which is used to obtain a verification 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; a data flow start module, which is used to start the data flow of the verification case according to the data flow driver in the UVM verification environment; a monitor state setting module, which 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 flow end module, which is 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 flow 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 flow monitoring method, the data flow is monitored by the flow termination monitor and the flow termination central controller, which can avoid the verification personnel from manually setting the waiting time for the data flow, saving time for the development environment and test cases, and reducing the probability of verification errors caused by inappropriate manual setting of the waiting time. At the same time, the maintenance cost of the verification personnel in this regard is also greatly reduced. Even if the port rate or data flow configuration of a test case is changed, there is no need to change the data flow waiting time, which improves the development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 Shown is a schematic diagram of the structure of the verification system of 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 state 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 an embodiment of the present application for obtaining a preset silence timeout threshold of the target port.
[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 schematic diagram of the structure 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 flow acquisition module
[0037] 830 Monitor status setting module
[0038] 840 Data flow end module
[0039] Steps S11-S14
[0040] Steps S21-S23
[0041] S31-S32 Steps
[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, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways 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 without conflict.
[0046] It should be noted that the illustrations provided in the following embodiments are only used to illustrate the basic concept of the present application in a schematic manner, and therefore the illustrations only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout 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 It is shown as a structural diagram of the verification system. 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 3 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 case of a target port in the chip to be tested, a preset silence timeout threshold and a preset traffic timeout threshold of the target port.
[0054] Optionally, the target port may be a plurality of 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 this embodiment will not be described in detail.
[0055] S12, starting 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 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, and 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, based on the busy event triggered in the traffic termination monitor, the preset silence timeout threshold and the first timing value, setting the state of the traffic termination monitor, 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 a timer in the traffic termination monitor.
[0058] Optionally, the EOT monitor can be connected to the data monitor of the target port through the 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 data monitor is not described in detail in this embodiment.
[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 that transmitted by the data monitor through TLM, and 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 will be called each time the data monitor transmits data through the UVM TLM port. In the write function, a busy event, i.e., uvm_event, will be triggered, i.e., trigger. The busy event refers to an event that can make the EOT monitor enter a busy state. Optionally, when triggered, the busy source information, i.e., uvm_object, is carried to record the current time, the data source causing the busyness, and other information to facilitate subsequent printing and debugging. The write function can be flexibly designed according to actual conditions, and this embodiment will not be repeated here.
[0061] Optionally, the preset silence timeout threshold may represent that after the last data packet is monitored, if no new data packet is monitored within the time indicated by the threshold, the data flow is considered to have ended. Since the data monitor often gives effective monitoring information at the end or header of a data packet, the interval between two monitoring information it gives is at least the length of a data packet. The time that the threshold must first cover is the time taken to transmit a possible longest data packet at the rate of the port. Here, taking the transmission time of the longest data packet into consideration can eliminate the delay in the feedback of data packet monitoring information.
[0062] S14, 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.
[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 by a fork...join method, 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 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 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 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, waiting for the data traffic to end.
[0066] In the traffic monitoring method, the data traffic is monitored by the EOT monitor and the EOT central controller, which can save the verification personnel from manually setting the data traffic waiting time, saving the time of the development environment and test cases, and reducing the probability of verification errors caused by inappropriate manual setting of the waiting time. At the same time, the maintenance cost of the verification personnel in this regard is also greatly reduced. Even if the port rate or data traffic configuration of a test case is changed, there is no need to change the data traffic waiting time, which improves the development efficiency.
[0067] The EOT monitor includes a first parallel thread and a second parallel thread, such as Figure 4 As shown, this embodiment provides a method for 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, 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 an invalid state to a 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 a valid state to an invalid state. Resetting the first timing value may refer to resetting the first timing value to 0 and restarting the counting 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 silence 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, and each loop is a set of parallel events, which can be executed by the first parallel thread and the second parallel thread respectively, and can be implemented by the fork..join_any statement of System Verilog, which 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 obtains data passing through the monitored port by waiting for the busy event trigger, i.e., uvm_event.wait_trigger, the loop body will enter the next cycle, the EOT monitor will enter the busy state, and reset the timer and the busy event. When the timer count value is equal to the set silent timeout threshold, that is, no new data passes through the port during this period, the EOT monitor determines that the data flow of the current port has stopped, enters the silent state, and reports its own status to the EOT central controller.
[0075] like Figure 5 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 status, 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 body, and the timer is a flow excess abnormal timer. The flow excess abnormal timer is used to deal with abnormal flow. When the second timing 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 to be abnormal and report it.
[0079] Optionally, in the loop of the EOT central controller, the EOT central controller is responsible for continuously monitoring the status of the mounted EOT monitors, i.e., busy or silent status, by means of periodic polling. When and only when all mounted EOT monitors are in silent state, it is considered that all data traffic of the current system has stopped. During this period, if the polling result shows that not all EOT monitors are in silent state, the EOT central controller will re-awaken the currently silent EOT monitor, put it into busy state, and wait for silence again.
[0080] Optionally, the EOT system can provide a method for waiting for traffic termination, namely wait_for_idle mentioned above, for the user to call, and the preset traffic timeout threshold is the input parameter of the method. The preset traffic timeout threshold can be set by the user according to the actual situation, which is generally a larger 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 processing on the verification use case, such as interrupting the simulation.
[0081] like Figure 6 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 a 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] Wherein, t_idle represents the preset silent timeout threshold, max_pkt_size represents the maximum length of the data packet in the data flow, port_speed represents the speed of the target port, and deviation represents the coefficient associated with the packet interval time. Deviation can usually be a value greater than 1, and can be adjusted according to the maximum packet spacing generated by the data driver of the verification environment when driving the data packet. In actual simulation, the driver will not drive the data packet at an extremely slow data rate, that is, the interval between two adjacent data packets will not be too large, which can ensure that the interval is controlled within a certain range, so as to obtain a suitable preset silent timeout threshold. Deviation can generally be 1.2-1.5. Assume that at time A, the EOT monitor receives the data packet information and turns to a 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, here we will assume that the conventional data packet driver sends data packets continuously, and the interval will not be particularly large. 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 considered that from time A, after a time > t_gap, if 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 according to actual conditions, and this embodiment does not explicitly limit this.
[0087] Optionally, the step of generating the preset silence timeout threshold can be written into a base class use case as a common 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 according to the data packet and the rate of the target port, a suitable silence timeout threshold can be obtained to more accurately determine whether the data traffic has stopped, and then safely exit the data traffic stage. Accurate judgment of the end time of data traffic can also allow test cases to exit at the appropriate time point, so as to avoid waiting in vain due to inappropriate waiting time setting. This not only makes a single simulation run more efficiently, but also saves a lot of time and computing resources in regression testing, reducing costs and increasing efficiency.
[0090] like Figure 7 As shown, the method for creating the traffic termination monitor includes:
[0091] S51, when the traffic termination monitor is created, specifying a transaction type monitored by the traffic termination monitor, the transaction type being a data packet.
[0092] S52, specifying a parent component when or after the traffic termination monitor is created, the parent component being 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 EOT monitor specifies the EOT central controller parent component eot_ctrl after creation, and the code example 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 8 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 subcomponent queue of the traffic termination central controller, wherein the subcomponent 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, namely, 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 prior art 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 uses 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, and 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 used 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 flow termination monitor based on the busy event triggered in the flow 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 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.
[0107] The data traffic end module 840 is used 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. 1 corresponds to step S11, wherein the data flow starting module 820 is connected to the 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 termination module 840 is connected to the Figure 2 This corresponds to step S14 of the flow monitoring method shown.
[0109] In the several embodiments provided in the present application, it should be understood that the disclosed device or method 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, such as 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 separated, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. 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 one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.
[0111] Those of ordinary skill 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 composition and steps of each example have been generally described in the above description 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, the electronic device comprising a memory storing a computer program; a processor connected to the memory for communication, and executing the computer program when the computer program is called. Figure 2 The flow monitoring method shown.
[0113] The present application embodiment also provides a computer-readable storage medium. A person of ordinary skill in the art can understand that all or part of the steps in the method for implementing the above embodiment can be completed by a program to instruct the processor, 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 hard disk, 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 integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state hard disk (SSD)), etc.
[0114] The present application embodiment 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 a website site, computer or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer or data center.
[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 may be a software installation package, and when the above method is required, the computer program product may be downloaded and executed on a computer.
[0116] The descriptions of the processes or structures corresponding to the above-mentioned 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 the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present 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 to be tested, a preset silence timeout threshold and a preset flow timeout threshold of the target port; Initiate data traffic for the verification use case according to a data traffic driver in the UVM verification environment; Based on the busy event triggered in the traffic termination monitor, the preset silence timeout threshold and the first timing value, setting the state of the traffic termination monitor, 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 a timer in the traffic termination monitor; 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.
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, the state of the traffic termination monitor is set to the busy state, and the first timing value and the state of the busy event are reset after the state of the traffic termination monitor is set to the busy state; When the waiting in the second parallel thread exceeds the preset silence timeout threshold, setting the state of the traffic termination monitor to the silence 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: Based on the preset traffic timeout threshold, the method for polling the traffic termination monitor by the traffic termination central controller to wait for the data traffic to end includes: The traffic termination central controller monitors the traffic termination monitor through periodic polling. If the state 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 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 1, characterized in that: The implementation method for obtaining the preset silence timeout threshold of the target port includes: Obtaining parameter information of the data flow; The preset silence timeout threshold is acquired based on the parameter information and the rate of the target port.
5. The flow monitoring method according to claim 4, characterized in that: The parameter information is the maximum length of a 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 rate of the target port, and deviation represents a coefficient associated with the packet interval time.
6. The flow monitoring method according to claim 5, characterized in that: The method for creating the flow 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.
7. The flow monitoring method according to claim 6, characterized in that: Based on the preset traffic timeout threshold, the method for polling the traffic termination monitor by the traffic termination central controller to wait 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.
8. A flow monitoring device, characterized in that: A verification system is applied, 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, and the flow monitoring device includes: A verification case acquisition module, used to acquire a verification 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; A data traffic start module, used for starting the data traffic of the verification use case according to the data traffic driver in the UVM verification environment; A monitor state setting module, configured 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; The data traffic termination module is used 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.
9. 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 described in any one of claims 1 to 7 is implemented.
10. 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 7 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
UVM platform and chip verification method based on UVM platform
CN116011391A
Performance speed-limiting verification method based on UVM and related equipment
CN117667546A
Simulation verification method and device of chip, computer equipment and storage medium
CN117950972A
