A monitoring management device, performance monitoring device, system, chip and method
By forming a monitoring loop in the chip and optimizing the performance monitoring process using timing parameters and synchronization signals, the problem of multi-module synchronous comparison in chip performance monitoring is solved, improving analysis efficiency and effectiveness.
Patent Information
- Application Number
- CN202611138842.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-11-06
AI Technical Summary
In existing technologies, it is difficult to effectively compare multiple modules simultaneously during chip performance monitoring, resulting in low efficiency in performance analysis and high consumption of hardware resources.
A monitoring loop is formed by the monitoring management device and the performance monitoring device. The timing duration parameter is transmitted and decayed sequentially on the monitoring loop to ensure that the timing operation of each performance monitoring device ends at the same time. The performance monitoring process is optimized by using synchronization signals and feedback signals.
It enables synchronized timing operations of multiple performance monitoring devices with limited hardware resources, improving the efficiency and effectiveness of performance analysis and facilitating intuitive comparison of performance curves.
Smart Images

Figure CN123048310A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of chip technology, and in particular to a monitoring and management device, a performance monitoring device, a system, a chip, and a method. Background Technology
[0002] Performance is a crucial factor in evaluating chip metrics. For example, chip performance can include metrics such as computing power, latency, bandwidth, and utilization. As the demands for computing power from artificial intelligence and high-performance computing increase, chip performance is becoming increasingly demanding, and chip systems are becoming increasingly complex.
[0003] In the pre-silicon stage, reference values for these performance metrics can be obtained through model imitation and design simulation. However, in the post-silicon stage, performance evaluation, analysis, and optimization have always been challenging due to the limited means of obtaining performance data. In related technologies, processors can configure monitoring for each monitored module and perform performance monitoring based on the configuration. However, the processor can only configure one monitored module at a time; it can only configure another module after completing the configuration for one. Furthermore, the time spent on configuration for each monitored module often varies. Thus, when multiple modules need to be monitored simultaneously, the start time for each module will differ, making it difficult to visually compare the performance curves of each module. Consequently, performance analysis efficiency is low and results are poor. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a monitoring and management device, a performance monitoring device, a system, a chip, and a method, which can effectively improve the efficiency and effectiveness of performance analysis with less hardware resources.
[0005] In a first aspect, embodiments of the present invention provide a monitoring and management device, which is used to be coupled to both ends of a monitoring chain to form a monitoring loop; wherein the monitoring chain includes at least two performance monitoring devices connected end-to-end; the monitoring and management device includes: a timing transmission module configured to send timing duration parameters to the performance monitoring device located at the first end of the monitoring chain along a first loop direction of the monitoring loop, so that the timing duration parameters are sequentially transmitted among the performance monitoring devices and then transmitted back to the monitoring and management device by the performance monitoring device located at the second end of the monitoring chain; wherein the parameter value of the timing duration parameter is attenuated once each time it reaches a performance monitoring device, and triggers the performance monitoring device to perform a timing operation based on the attenuated timing duration parameter, so that the timing operation of each performance monitoring device ends simultaneously and the performance monitoring of the monitored object starts simultaneously; and a data receiving module configured to receive performance counts sent by each performance monitoring device in the monitoring chain along the first loop direction of the monitoring loop.
[0006] In one embodiment, the monitoring and management device further includes: a first synchronization signal transmitting module, configured to transmit a synchronization signal to the performance monitoring device located at the second end of the monitoring chain along the second loop direction of the monitoring ring before the timing transmitting module transmits the timing duration parameter to the performance monitoring device located at the first end of the monitoring chain along the first loop direction of the monitoring ring, so that the synchronization signal is transmitted sequentially among the performance monitoring devices and then transmitted back to the monitoring and management device by the performance monitoring device located at the first end of the monitoring chain; wherein the first loop direction is opposite to the second loop direction; and a first synchronization signal receiving module, configured to... To receive the synchronization signal from the performance monitoring device located at the first end of the monitoring chain; a first feedback signal transmitting module, coupled to the first synchronization signal receiving module, is configured to, in response to the first synchronization signal receiving module receiving the synchronization signal, transmit a feedback signal for the synchronization signal to the performance monitoring device located at the first end of the monitoring chain along the first loop direction of the monitoring loop; a loop delay determination module is configured to determine the loop delay corresponding to the monitoring loop based on the difference between the reception time and the transmission time of the synchronization signal; and a timing duration determination module is configured to determine the initial value of the timing duration parameter based on the loop delay.
[0007] In one embodiment, the monitoring and management device further includes: a first feedback signal receiving module configured to receive a feedback signal for the synchronization signal sent along the first loop direction by a performance monitoring device located at the second end of the monitoring chain; and an adjacent delay determination module configured to determine a first transmission delay between the monitoring and management device and the performance monitoring device located at the second end of the monitoring chain based on the difference between the reception time of the feedback signal and the transmission time of the synchronization signal.
[0008] In one embodiment, the data receiving module is configured to receive raw performance count packets sent by each performance monitoring device in the monitoring chain along the first loop direction of the monitoring loop. The raw performance count packet includes a performance count and header information. The header information includes a device identifier of the performance monitoring device that sent the raw performance count packet and the raw delay duration experienced by the raw performance count packet during transmission in the monitoring loop. The raw delay duration is written by each performance monitoring device through which the raw performance count packet passes. The adjacent delay determination module is further configured to add the first transmission delay to the raw delay duration to obtain a target delay duration, and write the target delay duration into the header information to obtain a target performance count packet. The device further includes: a timestamp adding module, configured to add a timestamp to each target performance count packet to obtain a stamped count packet; the timestamp is used to indicate the time when the raw performance count packet arrives at the monitoring management device; and a data writing module, coupled to the timestamp adding module, configured to write the stamped count packet into memory.
[0009] In one embodiment, the data writing module is specifically configured to concatenate multiple tagged counting packets into a performance data packet and write the performance data packet into memory, wherein each performance data packet has a preset size.
[0010] In one embodiment, the monitoring loop includes a first loop along the direction of the first loop and a second loop along the direction of the second loop, wherein the first loop is an N-bit data bus and the second loop is a 1-bit signal line, where N is a positive integer.
[0011] In one embodiment, the device further includes: a management configuration module configured to, before the timing transmission module sends timing duration parameters to the performance monitoring device located at the first end of the monitoring chain along the first loop direction of the monitoring ring, acquire monitoring configuration information and generate a configuration data packet based on the monitoring configuration information, and send the configuration data packet along the first loop direction of the monitoring ring to the corresponding performance monitoring device, so that the corresponding performance monitoring device performs a configuration operation based on the configuration data packet; wherein, the configuration data packet includes a device identifier or a range of device identifiers of the performance monitoring device corresponding to the configuration data packet.
[0012] Secondly, embodiments of the present invention also provide a performance monitoring device, which is used as any one of the performance monitoring devices in a monitoring chain, wherein the monitoring chain includes at least two performance monitoring devices connected end-to-end; both ends of the monitoring chain are respectively coupled to a monitoring management device to form a monitoring loop; the performance monitoring device includes: a timing receiving module configured to receive timing duration parameters sent by the monitoring management device along a first loop direction of the monitoring loop, wherein the timing duration parameters are used to be transmitted sequentially among the performance monitoring devices and then transmitted back to the monitoring management device by the performance monitoring device located at the second end of the monitoring chain; wherein the timing duration parameters... The parameter value of the count is attenuated once each time it reaches a performance monitoring device; the timing processing module, coupled to the timing receiving module, is configured to attenuate the parameter value of the timing duration parameter, transmit the attenuated timing duration parameter along the first loop direction, and perform a timing operation based on the attenuated timing duration parameter, so that the timing operation of the performance monitoring device ends simultaneously with the timing operations of other performance monitoring devices in the monitoring chain; the monitoring module, coupled to the timing processing module, is configured to start performance monitoring of the monitored object in response to the end of the timing operation, and send the collected performance count to the monitoring management device along the first loop direction of the monitoring loop.
[0013] In one embodiment, the performance monitoring device further includes: a second synchronization signal receiving module, configured to receive a synchronization signal sent by an adjacent first target device along a second loop direction of the monitoring ring before the timing receiving module receives a timing duration parameter sent by the monitoring management device along a first loop direction of the monitoring ring, wherein the first loop direction is opposite to the second loop direction; the first target device includes the performance monitoring device or the monitoring management device; a second feedback signal sending module, coupled to the second synchronization signal receiving module, configured to send a feedback signal to the adjacent first target device along the first loop direction of the monitoring ring in response to the second synchronization signal receiving module receiving the synchronization signal; and a second synchronization signal sending module, coupled to the second synchronization signal receiving module, configured to send a feedback signal to the adjacent second target device along the second loop direction of the monitoring ring. The synchronization signal is transmitted sequentially among the performance monitoring devices and then transmitted back to the monitoring management device by the performance monitoring device located at the first end of the monitoring chain; the second target device includes the performance monitoring device or the monitoring management device; a second feedback signal receiving module is configured to receive a feedback signal sent by the second target device along the first loop direction in response to the synchronization signal; a transmission delay determination module is coupled to the second synchronization signal sending module and the second feedback signal receiving module respectively, and is configured to determine a second transmission delay between the performance monitoring device and the second target device based on the difference between the reception time of the feedback signal and the transmission time of the synchronization signal; an attenuation determination module is coupled to the transmission delay determination module and is configured to determine the attenuation value of the timing duration parameter of the performance monitoring device based on the second transmission delay.
[0014] In one embodiment, the monitoring module is configured to encapsulate the performance counts collected in each monitoring cycle into an original performance count packet, and send the original performance count packet to the monitoring management device along the first loop direction of the monitoring ring. The original performance count packet includes the performance counts and packet header information, wherein the packet header information includes the device identifier of the performance monitoring device and the original delay duration experienced by the original performance count packet during transmission in the monitoring ring.
[0015] In one embodiment, the performance monitoring device further includes: a forwarding module configured to receive the original performance counting packets sent by each of the performance monitoring devices located upstream of the monitoring ring along the first loop direction, add the original delay duration in the received original performance counting packets to the second transmission delay, update the original delay duration in the original performance counting packets using the addition result, and continue to send the original performance counting packets with the updated original delay duration along the first loop direction.
[0016] In one embodiment, the forwarding module is further configured to, in response to the blocking of the transmission channel of the original performance count packet after the original delay duration is updated, record the blocking duration and add the blocking duration to the original delay duration of the original performance count packet, and, when the transmission channel is open, continue to transmit the original performance count packet with the added blocking duration along the first loop direction.
[0017] In one embodiment, the monitoring loop includes a first loop along the direction of the first loop and a second loop along the direction of the second loop, wherein the first loop is an N-bit data bus and the second loop is a 1-bit signal line, where N is a positive integer.
[0018] In one embodiment, the device further includes: a monitoring configuration module, configured to receive a configuration data packet sent by the monitoring management device along the first loop direction of the monitoring ring before the timing receiving module receives the timing duration parameter sent by the monitoring management device along the first loop direction of the monitoring ring, determine whether to perform a configuration operation based on the device identifier or device identifier range carried in the configuration data packet, and continue to send the configuration data packet along the first loop direction.
[0019] Thirdly, embodiments of the present invention also provide a performance monitoring system, including any monitoring and management device provided in the embodiments of the present invention and any performance monitoring device provided in the embodiments of the present invention; wherein, the number of performance monitoring devices is at least two, and each performance monitoring device is connected end to end to form a monitoring chain, and the two ends of the monitoring chain are respectively coupled to the monitoring and management device.
[0020] Fourthly, embodiments of the present invention also provide a chip, including at least two functional modules and a performance monitoring system provided by embodiments of the present invention; the at least two functional modules are connected via a system bus; wherein each functional module is coupled to at least one performance monitoring device in the performance monitoring system via a preset interface, and the at least one performance monitoring device is used to perform performance monitoring with the functional module to which it is coupled as the monitoring object.
[0021] Fifthly, embodiments of the present invention also provide a monitoring and management method, characterized in that it is applied to a monitoring and management device, the monitoring and management device being coupled to both ends of a monitoring chain to form a monitoring loop; wherein the monitoring chain includes at least two performance monitoring devices connected end-to-end; a timing duration parameter is sent to the performance monitoring device located at the first end of the monitoring chain along the first loop direction of the monitoring loop, so that the timing duration parameter is sequentially transmitted between each of the performance monitoring devices and then transmitted back to the monitoring and management device by the performance monitoring device located at the second end of the monitoring chain; wherein the parameter value of the timing duration parameter is attenuated once each time it reaches a performance monitoring device, and the performance monitoring device is triggered to perform a timing operation based on the attenuated timing duration parameter, so that the timing operation of each performance monitoring device ends simultaneously and the performance monitoring of the monitored object starts simultaneously; and performance counts sent by each of the performance monitoring devices in the monitoring chain along the first loop direction of the monitoring loop are received.
[0022] In one embodiment, before sending the timing duration parameter to the performance monitoring device located at the first end of the monitoring chain along the first loop direction of the monitoring ring, the method further includes: sending a synchronization signal to the performance monitoring device located at the second end of the monitoring chain along the second loop direction of the monitoring ring, so that the synchronization signal is transmitted sequentially among the performance monitoring devices and then transmitted back to the monitoring management device by the performance monitoring device located at the first end of the monitoring chain; wherein the first loop direction is opposite to the second loop direction; receiving the synchronization signal from the performance monitoring device located at the first end of the monitoring chain; in response to receiving the synchronization signal, sending a feedback signal for the synchronization signal to the performance monitoring device located at the first end of the monitoring chain along the first loop direction of the monitoring ring; determining the loop delay corresponding to the monitoring ring based on the difference between the reception time and the transmission time of the synchronization signal; and determining the initial value of the timing duration parameter based on the loop delay.
[0023] In one embodiment, after sending a synchronization signal to the performance monitoring device located at the second end of the monitoring chain along the second loop direction of the monitoring loop, the method further includes: receiving a feedback signal for the synchronization signal sent by the performance monitoring device located at the second end of the monitoring chain along the first loop direction; and determining a first transmission delay between the monitoring management device and the performance monitoring device located at the second end of the monitoring chain based on the difference between the reception time of the feedback signal and the transmission time of the synchronization signal.
[0024] In one embodiment, receiving the performance counts sent by each performance monitoring device in the monitoring chain along the first loop direction of the monitoring ring includes: receiving raw performance count packets sent by each performance monitoring device in the monitoring chain along the first loop direction of the monitoring ring, wherein the raw performance count packet includes performance counts and packet header information, the packet header information including the device identifier of the performance monitoring device that sent the raw performance count packet and the raw delay duration experienced by the raw performance count packet during transmission in the monitoring ring, wherein the raw delay duration is written by each performance monitoring device through which the raw performance count packet passes; adding the first transmission delay to the raw delay duration to obtain a target delay duration, and writing the target delay duration into the packet header information to obtain a target performance count packet; the method further includes: adding a timestamp to each target performance count packet to obtain a stamped count packet; the timestamp is used to indicate the time when the raw performance count packet arrives at the monitoring management device; and writing the stamped count packet into memory.
[0025] In one embodiment, writing the tagged counting packets into memory includes: concatenating multiple tagged counting packets into a performance data packet, and writing the performance data packet into memory, wherein each performance data packet has a preset size.
[0026] In one embodiment, before sending the timing duration parameter to the performance monitoring device located at the first end of the monitoring chain along the first loop direction of the monitoring ring, the method further includes: acquiring monitoring configuration information and generating a configuration data packet based on the monitoring configuration information; sending the configuration data packet along the first loop direction of the monitoring ring to the corresponding performance monitoring device, so that the corresponding performance monitoring device performs a configuration operation based on the configuration data packet; wherein, the configuration data packet includes a device identifier or a range of device identifiers of the performance monitoring device corresponding to the configuration data packet.
[0027] Sixthly, embodiments of the present invention also provide a performance monitoring method applied to a performance monitoring device, wherein the performance monitoring device is used as any one of the performance monitoring devices in a monitoring chain, wherein the monitoring chain includes at least two performance monitoring devices connected end-to-end; the two ends of the monitoring chain are respectively coupled to a monitoring management device to form a monitoring loop; the method includes: receiving timing duration parameters sent by the monitoring management device along a first loop direction of the monitoring loop, wherein the timing duration parameters are used to be transmitted sequentially among the performance monitoring devices and then transmitted back by the performance monitoring device located at the second end of the monitoring chain. The monitoring and management device includes a timing duration parameter whose value is attenuated each time it reaches a performance monitoring device. The attenuated timing duration parameter is transmitted along the first loop direction, and a timing operation is performed based on the attenuated timing duration parameter so that the timing operation of the performance monitoring device ends simultaneously with the timing operations of other performance monitoring devices in the monitoring chain. In response to the end of the timing operation, performance monitoring of the monitored object is initiated, and the collected performance counts are sent to the monitoring and management device along the first loop direction of the monitoring loop.
[0028] In one embodiment, before receiving the timing duration parameter sent by the monitoring and management device along the first loop direction of the monitoring ring, the method further includes: receiving a synchronization signal sent by an adjacent first target device along the second loop direction of the monitoring ring, wherein the first loop direction is opposite to the second loop direction; the first target device includes the performance monitoring device or the monitoring and management device; in response to receiving the synchronization signal, sending a feedback signal to the adjacent first target device along the first loop direction of the monitoring ring; sending the synchronization signal to an adjacent second target device along the second loop direction of the monitoring ring, so that the synchronization signal is transmitted sequentially among the performance monitoring devices and then transmitted back to the monitoring and management device by the performance monitoring device located at the first end of the monitoring chain; wherein the second target device includes the performance monitoring device or the monitoring and management device; receiving a feedback signal sent by the second target device along the first loop direction in response to the synchronization signal; determining a second transmission delay between the performance monitoring device and the second target device based on the difference between the reception time of the feedback signal and the transmission time of the synchronization signal; and determining an attenuation value of the timing duration parameter by the performance monitoring device based on the second transmission delay.
[0029] In one embodiment, sending the collected performance counts to the monitoring management device along the first loop direction of the monitoring ring includes: encapsulating the performance counts collected in each monitoring cycle into an original performance count packet, and sending the original performance count packet to the monitoring management device along the first loop direction of the monitoring ring, wherein the original performance count packet includes the performance counts and packet header information, the packet header information including the device identifier of the performance monitoring device and the original delay duration experienced by the original performance count packet during transmission in the monitoring ring.
[0030] In one embodiment, the method further includes: receiving the original performance counting packets sent by each of the performance monitoring devices located upstream of the monitoring ring along the first loop direction; adding the original delay duration in the received original performance counting packets to the second transmission delay; updating the original delay duration in the original performance counting packets using the addition result; and continuing to send the original performance counting packets with the updated original delay duration along the first loop direction.
[0031] In one implementation, after updating the original delay duration in the original performance counter packet using the summation result, and before continuing to send the original performance counter packet with the updated original delay duration along the first loop direction, the method further includes: in response to a blocking of the transmission channel of the original performance counter packet with the updated original delay duration, recording the blocking duration and accumulating the blocking duration into the original delay duration of the original performance counter packet; the continuing to send the original performance counter packet with the updated original delay duration along the first loop direction includes: if the transmission channel is unobstructed, continuing to send the original performance counter packet with the accumulated blocking duration along the first loop direction.
[0032] In one embodiment, before receiving the timing duration parameter sent by the monitoring management device along the first loop direction of the monitoring ring, the method further includes: receiving a configuration data packet sent by the monitoring management device along the first loop direction of the monitoring ring; determining whether to perform a configuration operation based on the configuration data packet according to the device identifier or device identifier range carried in the configuration data packet; and continuing to send the configuration data packet along the first loop direction.
[0033] The embodiments of the present invention provide a monitoring and management device, a performance monitoring device, a system, a chip, and a method. These devices can send timing duration parameters along the first loop direction of a monitoring ring to a performance monitoring device located at the first end of a monitoring chain. The timing duration parameters are then sequentially transmitted between the performance monitoring devices and finally transmitted back to the monitoring and management device by the performance monitoring device located at the second end of the monitoring chain. This achieves the connection of multiple performance monitoring devices to the monitoring and management device using a monitoring ring with minimal interconnection resources. Furthermore, the timing duration parameter value is attenuated each time it reaches a performance monitoring device, triggering that device to perform a timing operation based on the attenuated timing duration parameter. This also allows the timing operations of each performance monitoring device to end simultaneously and the performance monitoring of the monitored object to begin simultaneously. Thus, the observation time starting points of each performance monitoring device for the monitored object can be aligned, and the resulting performance curves can be compared intuitively. Therefore, this method effectively improves performance analysis efficiency and enhances performance analysis results with minimal hardware resources. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 A schematic diagram of a monitoring and management device provided in an embodiment of the present invention; Figure 2 Another schematic diagram of the monitoring and management device provided in the embodiments of the present invention; Figure 3 Another schematic diagram of the monitoring and management device provided in the embodiments of the present invention; Figure 4 Another schematic diagram of the monitoring and management device provided in the embodiments of the present invention; Figure 5 Another schematic diagram of the monitoring and management device provided in the embodiments of the present invention; Figure 6 A schematic diagram of a performance monitoring device provided in an embodiment of the present invention; Figure 7 Another structural schematic diagram of the performance monitoring device provided in the embodiments of the present invention; Figure 8 Another structural schematic diagram of the performance monitoring device provided in the embodiments of the present invention; Figure 9Another structural schematic diagram of the performance monitoring device provided in the embodiments of the present invention; Figure 10 A schematic diagram of a performance monitoring system provided in an embodiment of the present invention; Figure 11 A detailed structural diagram of a performance monitoring system provided for an embodiment of the present invention; Figure 12 A schematic diagram illustrating the calculation of transmission delay between two adjacent performance monitoring devices in a performance monitoring system provided as an embodiment of the present invention; Figure 13 for Figure 12 The corresponding timing diagram; Figure 14 A timing diagram for calculating loop delay in a performance monitoring system provided as an embodiment of the present invention; Figure 15 A schematic diagram of a performance monitoring system provided in an embodiment of the present invention, showing that each performance monitoring device starts performance monitoring simultaneously; Figure 16 A schematic diagram of a chip structure provided for an embodiment of the present invention; Figure 17 A flowchart of a monitoring and management method provided in an embodiment of the present invention; Figure 18 A flowchart of a performance monitoring method provided for an embodiment of the present invention. Detailed Implementation
[0036] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0037] It should be understood that the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0038] In a first aspect, embodiments of the present invention provide a monitoring and management device that effectively improves performance analysis efficiency and enhances performance analysis results with less hardware resources.
[0039] like Figure 1 As shown, an embodiment of the present invention provides a monitoring and management device 1, which is used to be coupled to both ends of a monitoring chain to form a monitoring loop; wherein, the monitoring chain includes at least two performance monitoring devices 2 connected end-to-end; the monitoring and management device 1 may include: The timing transmission module 11 is configured to send timing duration parameters to the performance monitoring device 2 located at the first end of the monitoring chain along the first loop direction of the monitoring ring, so that the timing duration parameters are transmitted sequentially between each performance monitoring device 2 and then transmitted back to the monitoring management device 1 by the performance monitoring device 2 located at the second end of the monitoring chain; wherein, the parameter value of the timing duration parameter is attenuated once each time it reaches a performance monitoring device 2, and the performance monitoring device 2 is triggered to perform a timing operation based on the attenuated timing duration parameter, so that the timing operation of each performance monitoring device 2 ends simultaneously and the performance monitoring of the monitored object starts simultaneously; The data receiving module 12 is configured to receive performance counts sent by each performance monitoring device 2 in the monitoring chain along the first loop direction of the monitoring loop.
[0040] The monitoring and management device 1 provided in the embodiments of the present invention has a timing transmission module 11 that can send timing duration parameters to the performance monitoring device 2 located at the first end of the monitoring chain along the first loop direction of the monitoring ring. This allows the timing duration parameters to be sequentially transmitted between the performance monitoring devices 2 and then transmitted back to the monitoring and management device by the performance monitoring device 2 located at the second end of the monitoring chain. In this way, on the one hand, multiple performance monitoring devices 2 are connected to the monitoring and management device 1 using a monitoring ring with fewer interconnection resources. On the other hand, the timing duration parameter value is attenuated each time it reaches a performance monitoring device 2, triggering that device 2 to perform a timing operation based on the attenuated timing duration parameter. This also allows the timing operations of each performance monitoring device 2 to end simultaneously and start performance monitoring of the monitored object simultaneously. Thus, the observation time starting points of each performance monitoring device 2 for the monitored object can be aligned with each other, and the resulting performance curves can be compared intuitively. Therefore, it is convenient to effectively improve performance analysis efficiency and improve performance analysis results with less hardware resources.
[0041] Specifically, in embodiments of the present invention, the monitoring and management device 1 can be used to manage one or more performance monitoring devices 2 and receive performance counts sent by each performance monitoring device 2. Each performance monitoring device 2 can be used to monitor one or more performance characteristics of a monitored object and send the monitored performance counts to the monitoring and management device 1. The monitored object can be various functional modules in a chip, such as a coprocessor, memory controller, etc.
[0042] In one embodiment, the performance monitoring devices 2 can be connected end-to-end to form a monitoring chain, and the performance monitoring devices 2 at both ends of the monitoring chain can be coupled to the monitoring management device 1 to form a closed loop, thus obtaining a monitoring loop. Here, "end-to-end" refers to the electrical connection between the input terminal of one performance monitoring device 2 and the output terminal of another performance monitoring device 2. Communication between the monitoring management device 1 and each performance monitoring device 2 can be based on the aforementioned monitoring loop. In one embodiment of the invention, communication between the monitoring management device 1 and each performance monitoring device 2 can occur along the first loop direction of the monitoring loop. In one example, the first loop direction can be clockwise; in another example, it can be counterclockwise.
[0043] In an embodiment of the present invention, the timing transmission module 11 of the monitoring management device 1 can send timing duration parameters to the performance monitoring device 2 located at the first end of the monitoring chain along the first loop direction of the monitoring ring. This allows the timing duration parameters to be sequentially transmitted between the performance monitoring devices 2 and then transmitted back to the monitoring management device 1 by the performance monitoring device 2 located at the second end of the monitoring chain. Here, the timing duration parameter can be used to describe a time length; a larger timing duration parameter indicates a longer time length. The timing duration parameter sent by the monitoring management device 1 is an initial value. When the timing duration parameter is transmitted along the monitoring ring, each time it reaches a performance monitoring device 2, that performance monitoring device 2 will attenuate the timing duration parameter and perform timing operations based on the attenuated timing duration parameter. The initial value of the timing duration parameter and the degree of attenuation of the timing duration parameter by each performance monitoring device 2 can be preset so that after each performance monitoring device 2 performs its timing operation, the timing operation of each performance monitoring device 2 can end simultaneously and the performance monitoring of the monitored object can start simultaneously. Optionally, in embodiments of the present invention, the above timing operation can be either a countdown or a forward timing, as long as the timing duration is equal to the decayed timing duration parameter.
[0044] For example, in one scenario, performance monitoring device 2A receives a timing duration parameter of 10 milliseconds, which decays to 8 milliseconds, while performance monitoring device 2B receives a timing duration parameter of 8 milliseconds, which decays to 5 milliseconds. Performance monitoring device 2A can then start counting down with an initial timing value of 8 milliseconds, and performance monitoring device 2B can start counting down with an initial timing value of 5 milliseconds. Finally, both performance monitoring devices 2A and 2B count down to 0 simultaneously, meaning the timing ends at the same time. In response to the end of the timing operation, each performance monitoring device 2 can simultaneously start monitoring the performance of the monitored object.
[0045] After the monitoring and management device 1 sequentially sends timing parameters to each performance monitoring device 2 via the monitoring chain, it can wait for each performance monitoring device 2 to finish timing before receiving the performance counts transmitted back by each performance monitoring device 2 through the monitoring chain. Specifically, the data receiving module 12 can receive the performance counts transmitted by each performance monitoring device 2 along the first loop direction of the monitoring ring. Here, the monitored performance can include one or more types, and the performance counts for different performances have different physical meanings. For example, in one example, if the monitored performance is bandwidth, the performance count is how many bytes are transmitted per second; in another example, if the monitored performance is average latency, the performance count is how many picoseconds the latency is.
[0046] Furthermore, such as Figure 2 As shown, in one embodiment of the present invention, in addition to the timing transmission module 11 and the data receiving module 12, the monitoring and management device 1 may also include a first synchronization signal transmission module 131, a first synchronization signal receiving module 132, a first feedback signal transmission module 141, a loop delay determination module 15, and a timing duration determination module 16.
[0047] Specifically, the first synchronization signal sending module 131 can be configured to send a synchronization signal sync along the second loop direction of the monitoring chain to the performance monitoring device 2 located at the second end of the monitoring chain before the timing sending module 11 sends the timing duration parameter along the first loop direction of the monitoring ring to the performance monitoring device 2 located at the first end of the monitoring chain. This allows the synchronization signal sync to be transmitted sequentially between each performance monitoring device 2 and then transmitted back to the monitoring management device 1 by the performance monitoring device 2 located at the first end of the monitoring chain. The first loop direction is opposite to the second loop direction. For example, the first loop direction is clockwise and the second loop direction is counterclockwise, or the first loop direction is counterclockwise and the second loop direction is clockwise.
[0048] It should be noted that although both the timing duration parameter and the synchronization signal are sent by the monitoring and management device 1, the sending direction and the transmission direction of these two signals in the monitoring ring are opposite. Specifically, the timing duration parameter is sent along the first loop direction of the monitoring ring, and the first performance monitoring device 2 to receive the timing duration parameter is located at the first end of the monitoring chain. On the other hand, the synchronization signal is sent along the second loop direction of the monitoring ring, and the first performance monitoring device 2 to receive the synchronization signal is located at the second end of the monitoring chain.
[0049] In a specific implementation, in one embodiment of the present invention, the monitoring loop may include a first loop along the direction of the first loop and a second loop along the direction of the second loop, wherein the first loop may be an N-bit data bus and the second loop may be a 1-bit signal line, wherein N is a positive integer.
[0050] In an embodiment of the present invention, after the synchronization signal is transmitted along the second loop direction of the monitoring ring, the first synchronization signal receiving module 132 can receive the synchronization signal sync from the performance monitoring device 2 located at the first end of the monitoring chain. That is to say, the synchronization signal sync can form a closed loop around the monitoring ring.
[0051] The first feedback signal sending module 141 is coupled to the first synchronization signal receiving module 132 and is configured to send a feedback signal for the synchronization signal to the performance monitoring device 2 located at the first end of the monitoring chain along the first loop direction of the monitoring loop in response to the first synchronization signal receiving module 132 receiving the synchronization signal, so that the performance monitoring device 2 located at the first end of the monitoring chain can use the feedback signal to perform relevant calculations.
[0052] After receiving the transmitted synchronization signal 'sync', the monitoring and management device 1 can determine the loop delay Y corresponding to the monitoring loop based on the difference between the reception time and transmission time of the synchronization signal 'sync'. For example, in one embodiment of the present invention, after the first synchronization signal transmitting module 131 transmits the synchronization signal 'sync', it can trigger a timing operation. After the first synchronization signal receiving module 132 receives the transmitted synchronization signal 'sync', it can stop the timing operation, thereby obtaining the difference between the reception time and transmission time of the synchronization signal 'sync'. This difference is the time required for the synchronization signal 'sync' to transmit once in the monitoring loop, i.e., the loop delay Y.
[0053] After obtaining the loop delay Y, the timing duration determination module 16 can determine the initial value of the timing duration parameter based on the loop delay Y. For example, in one example, the loop delay Y can be determined as the initial value of the timing duration parameter; in another example, the loop delay Y can be increased or decreased by a set amount and used as the initial value of the timing duration parameter, as long as the initial value of the timing duration parameter is greater than or equal to the time required for the signal to be transmitted from the monitoring management device 1 along the first loop direction of the monitoring loop to the performance monitoring device 2 located at the second end of the monitoring chain.
[0054] In one implementation, the synchronization signal (sync) can not only circle back to the monitoring management device 1 along the second loop direction of the monitoring ring, but also trigger the performance monitoring module 2, which receives the synchronization signal (sync), to send a corresponding feedback signal. Since the feedback signal is sent from the receiving end of the synchronization signal to the sending end, the transmission direction of the feedback signal is opposite to that of the synchronization signal. For example, if the synchronization signal is transmitted along the second loop direction of the monitoring ring, then the feedback signal is output along the first loop direction of the monitoring ring.
[0055] Based on this, such as Figure 3As shown, in one embodiment of the present invention, the monitoring and management device 1 may further include a first feedback signal receiving module 142 and an adjacent delay determination module 18. The first feedback signal receiving module 142 can receive a feedback signal fb sent by the performance monitoring device 2 located at the second end of the monitoring chain along the first loop direction, for the synchronization signal sync. The adjacent delay determination module 18 can determine a first transmission delay delay1 between the monitoring and management device 1 and the performance monitoring device 2 located at the second end of the monitoring chain based on the difference between the reception time of the feedback signal fb and the transmission time of the synchronization signal sync.
[0056] Specifically, since the difference between the reception time of the feedback signal fb and the transmission time of the synchronization signal sync is the round-trip time between the monitoring and management device 1 and the performance monitoring device 2, the first transmission delay delay1 can be equal to half of this difference. For example, if the difference between the reception time of the feedback signal fb and the transmission time of the synchronization signal sync is T1, then the first transmission delay delay1 can be determined to be T1 / 2. After determining the first transmission delay delay1, the monitoring and management device 1 can save the first transmission delay delay1 for subsequent use.
[0057] It should be noted that although the feedback signal fb is transmitted along the first loop direction of the monitoring ring, in one example the path in the first loop direction of the monitoring ring is an N-bit data bus, the feedback signal fb is only to notify the sender of the synchronization signal sync that the synchronization signal has been received. Therefore, the feedback signal fb can require at least one data signal. In one example, the feedback signal fb can be sent through any data line of the monitoring ring data bus.
[0058] Specifically, in one embodiment of the present invention, the data receiving module 12 can receive raw performance count packets sent by each performance monitoring device 2 in the monitoring chain along the first loop direction of the monitoring ring, wherein the raw performance count packet includes performance count and packet header information, the packet header information includes the device identifier of the performance monitoring device that sent the raw performance count packet and the raw delay duration experienced by the raw performance count packet in the monitoring ring, wherein the raw delay duration is written by each performance monitoring device through which the raw performance count packet passes; Based on this, the adjacent delay determination module 18 is further configured to add the first transmission delay to the original delay duration to obtain the target delay duration, and write the target delay duration into the packet header information to obtain the target performance counting packet; like Figure 4As shown, in one embodiment, the device may further include a timestamp adding module 191 and a data writing module 192. The timestamp adding module 191 is configured to add a timestamp to each target performance counting packet to obtain a stamped counting packet; the timestamp indicates the time when the original performance counting packet arrives at the monitoring and management device 1. The data writing module 192, coupled to the timestamp adding module 191, is configured to write the stamped counting packet into memory. Thus, the processor can obtain these stamped counting packets by reading memory, and can also determine which performance monitoring device 2 the performance counting packet originates from and the target delay duration experienced by the performance counting packet during transmission in the monitoring loop based on the packet header information of the stamped counting packet. Furthermore, in one embodiment, the performance counting acquisition time can be calculated based on the timestamp of the stamped counting packet and the aforementioned target delay duration. For example, in one example, if the timestamp of the stamped counting packet is timestp1 and the target delay duration recorded in the packet header information is t1, the performance counting acquisition time can be calculated as timestp1-t1. In this way, there is no need to add a collection timestamp when the performance monitoring device 2 collects the original performance count packet. Since the timestamp is usually long and occupies a lot of bit width, not adding a collection timestamp to the original performance count packet can greatly save bandwidth resources and effectively improve the data transmission efficiency in the monitoring loop when bandwidth resources are limited.
[0059] In one implementation, the data writing module 192 can be specifically configured to concatenate multiple stamped counting packets into a single performance data packet and write the performance data packet into memory, wherein each performance data packet has a preset size. For example, in one example, the size of the performance data packet is 100 bytes, while the sizes of the performance counting packets from different performance monitoring devices 2 can be the same or different; for example, some performance counting packets may be 2 bytes in size, and some may be 8 bytes in size. Multiple such performance counting packets can be concatenated together to form a 100-byte performance data packet. In this way, a large amount of data can be written to memory at once, thereby effectively reducing bus occupancy time and improving bus utilization.
[0060] In the embodiments of the present invention, the performance monitoring device 2 can monitor one or more performance characteristics of the monitored object, and each performance monitoring has its own characteristics. In order for each performance monitoring device 2 to perform performance monitoring as required, the monitoring management device 1 can configure each performance monitoring device 2 first.
[0061] Specifically, such as Figure 5As shown, in one embodiment, the monitoring management device 1 may further include a management configuration module 17, configured to acquire monitoring configuration information and generate a configuration data packet based on the monitoring configuration information before the timing transmission module 11 sends the timing duration parameter to the performance monitoring device located at the first end of the monitoring chain along the first loop direction of the monitoring ring, and send the configuration data packet to the corresponding performance monitoring device 2 along the first loop direction of the monitoring ring, so that the corresponding performance monitoring device 2 performs a configuration operation based on the configuration data packet; wherein, the configuration data packet includes the device identifier or device identifier range of the performance monitoring device 2 corresponding to the configuration data packet.
[0062] The monitoring configuration information can be user-inputted configuration information or a pre-written configuration file. The monitoring management device 1 can obtain this monitoring configuration information by interacting with the processor; for example, the processor can write the monitoring configuration information into the registers of the monitoring management device 1. The monitoring management device 1 can generate a configuration data packet based on the monitoring configuration information and send it to the corresponding performance monitoring device 2. In one embodiment, the configuration data packet can be sent along the first loop direction of the monitoring ring, that is, both the configuration data packet and the performance count can be sent along the first loop direction of the monitoring ring.
[0063] For example, if a configuration data packet includes a device identifier range of device1-device5, then the configuration data packet can be used to configure performance monitoring devices 2 with device identifiers of device1, device2, device3, device4, and device5.
[0064] Secondly, embodiments of the present invention also provide a performance monitoring device, which facilitates the effective improvement of performance analysis efficiency and performance analysis results with less hardware resources.
[0065] like Figure 6 As shown, an embodiment of the present invention provides a performance monitoring device 2, which is used as any one of the performance monitoring devices 2 in a monitoring chain, wherein the monitoring chain includes at least two performance monitoring devices 2 connected end-to-end; the two ends of the monitoring chain are respectively coupled to a monitoring management device 1 to form a monitoring loop; the performance monitoring device 2 may include: The timing receiving module 21 is configured to receive timing duration parameters sent by the monitoring management device 1 along the first loop direction of the monitoring ring. The timing duration parameters are used to be transmitted sequentially between each performance monitoring device 2 and then transmitted back to the monitoring management device 1 by the performance monitoring device 2 located at the second end of the monitoring chain. The parameter value of the timing duration parameters is attenuated once each time it reaches a performance monitoring device 2. The timing processing module 22, coupled to the timing receiving module 21, is configured to attenuate the parameter value of the timing duration parameter, transmit the attenuated timing duration parameter along the first loop direction, and perform timing operation based on the attenuated timing duration parameter, so that the timing operation of the performance monitoring device 2 ends simultaneously with the timing operation of other performance monitoring devices 2 in the monitoring chain. The monitoring module 23, coupled to the timing processing module 22, is configured to initiate performance monitoring of the monitored object in response to the end of the timing operation, and send the collected performance counts to the monitoring management device 1 along the first loop direction of the monitoring loop.
[0066] The performance monitoring device 2 provided in the embodiments of the present invention has a timing receiving module 21 that can receive timing duration parameters sent by the monitoring management device 1 along the first loop direction of the monitoring ring. Its timing processing module 22 can attenuate the parameter value of the timing duration parameter, transmit the attenuated timing duration parameter along the first loop direction, and perform a timing operation based on the attenuated timing duration parameter, so that the timing operation of the performance monitoring device 2 ends simultaneously with the timing operations of other performance monitoring devices 2 in the monitoring chain. Its monitoring module 23 can respond to the end of the timing operation by starting performance monitoring of the monitored object and sending the collected performance counts to the monitoring management device 1 along the first loop direction of the monitoring ring. In this way, on the one hand, multiple performance monitoring devices 2 are connected to the monitoring management device 1 in the form of a monitoring loop with fewer interconnection resources. On the other hand, the timing processing module 22 can attenuate the parameter value of the timing duration parameter, transmit the attenuated timing duration parameter along the first loop direction, and perform timing operations based on the attenuated timing duration parameter, so that the timing operation of the performance monitoring device 2 ends at the same time as the timing operations of other performance monitoring devices 2 in the monitoring chain. This enables each performance monitoring device 2 to start monitoring the performance of the monitored object at the same time. In this way, the observation time starting points of each performance monitoring device 2 can be aligned with each other, and the obtained performance curves can be compared intuitively. Therefore, it is convenient to effectively improve the efficiency and effect of performance analysis with less hardware resources.
[0067] Specifically, in embodiments of the present invention, the performance monitoring device 2 can be used to monitor one or more performance characteristics of a monitored object and send the monitored performance counts to the monitoring management device 1. The monitored object can be various functional modules in a chip, such as a coprocessor, memory controller, etc. When performance monitoring of multiple monitored objects is required, or when performance monitoring of a single monitored object requires multiple items, at least two performance monitoring devices 2 can be used for performance monitoring.
[0068] In one embodiment, the performance monitoring devices 2 can be connected end-to-end to form a monitoring chain, and the performance monitoring devices 2 at both ends of the monitoring chain can be coupled to the monitoring management device 1 to form a closed loop, thus obtaining a monitoring loop. These performance monitoring devices 2 can have similar structures and functions; this document will use one of the performance monitoring devices 2 as an example for illustration. The term "end-to-end" here refers to the electrical connection between the input terminal of one performance monitoring device 2 and the output terminal of another performance monitoring device 2. Communication between the monitoring management device 1 and each performance monitoring device 2 can be based on the aforementioned monitoring loop. In one embodiment of the invention, communication between the monitoring management device 1 and each performance monitoring device 2 can be along the first loop direction of the monitoring loop. In one example, the first loop direction can be clockwise; in another example, the first loop direction can be counterclockwise.
[0069] In embodiments of the present invention, the timing receiving module 21 in the performance monitoring device 2 can receive timing duration parameters sent by the monitoring management device 1 along the first loop direction of the monitoring ring. Here, the timing duration parameter can be used to describe a time length; the larger the timing duration parameter, the longer the time length. The timing duration parameter sent by the monitoring management device 1 is an initial value. When the timing duration parameter is transmitted along the monitoring ring, each time it reaches a performance monitoring device 2, that performance monitoring device 2 will attenuate the timing duration parameter once.
[0070] Specifically, the timing processing module 22 in the performance monitoring device 2 can attenuate the value of the timing duration parameter, transmit the attenuated timing duration parameter along the first loop direction, and perform a timing operation based on the attenuated timing duration parameter, so that the timing operation of the performance monitoring device 2 ends simultaneously with the timing operations of other performance monitoring devices 2 in the monitoring chain. The initial value of the timing duration parameter and the attenuation degree of each performance monitoring device 2 can be preset so that after each performance monitoring device 2 performs its timing operation, the timing operations of each performance monitoring device 2 can end simultaneously and the performance monitoring of the monitored object can start simultaneously.
[0071] In response to the end of the timing operation, the monitoring module 23 in the performance monitoring device 2 can start performance monitoring of the monitored object and send the collected performance counts to the monitoring management device 1 along the first loop direction of the monitoring loop. Since the timing operations of each performance monitoring device 2 end simultaneously, each performance monitoring device 2 can also start performance monitoring of the monitored object simultaneously in response to the end of the timing operation.
[0072] Optionally, in embodiments of the present invention, the timing operation can be either a countdown or a forward countdown, as long as the timing duration is equal to the decayed timing duration parameter. For example, in one example, the timing duration parameter received by performance monitoring device 2A is 10 milliseconds, which decays to 8 milliseconds, and the timing duration parameter received by performance monitoring device 2B is 8 milliseconds, which decays to 5 milliseconds. Then, performance monitoring device 2A can start the countdown with 8 milliseconds as the initial timing value, and performance monitoring device 2B can start the countdown with 5 milliseconds as the initial timing value. Finally, performance monitoring devices 2A and 2B simultaneously count down to 0, meaning the timing ends simultaneously. In response to the end of the timing operation, each performance monitoring device 2 can simultaneously start performance monitoring of the monitored object.
[0073] In performance monitoring, monitoring module 23 can collect various performance counts of the monitored object and send these counts to monitoring management device 1 along the first loop of the monitoring loop. The performance monitored by monitoring module 23 can include one or more types, and the performance counts for different performances have different physical meanings. For example, in one example, if the monitored performance is bandwidth, the performance count is how many bytes are transmitted per second; in another example, if the monitored performance is average latency, the performance count is how many picoseconds the latency is.
[0074] Furthermore, such as Figure 7 As shown, in addition to the timing receiving module 21, the timing processing module 22, and the monitoring module 23, in one embodiment of the present invention, the performance monitoring device 2 may also include a second synchronization signal receiving module 241, a second feedback signal sending module 261, a second synchronization signal sending module 242, a second feedback signal receiving module 262, a transmission delay determination module 27, and an attenuation determination module 28.
[0075] Specifically, the second synchronization signal receiving module 241 can receive a synchronization signal (sync) sent by an adjacent first target device along the second loop direction of the monitoring ring before the timing receiving module 21 receives the timing duration parameter sent by the monitoring and management device 1 along the first loop direction of the monitoring ring. The first loop direction is opposite to the second loop direction. For example, the first loop direction is clockwise, and the second loop direction is counterclockwise. The first target device includes either the performance monitoring device or the monitoring and management device.
[0076] It should be noted that although both the timing duration parameter and the synchronization signal are sent by the monitoring and management device 1, the sending direction and the transmission direction of these two signals in the monitoring ring are opposite. Specifically, the timing duration parameter is sent along the first loop direction of the monitoring ring, and the first performance monitoring device 2 to receive the timing duration parameter is located at the first end of the monitoring chain. On the other hand, the synchronization signal is sent along the second loop direction of the monitoring ring, and the first performance monitoring device 2 to receive the synchronization signal is located at the second end of the monitoring chain.
[0077] In a specific implementation, in one embodiment of the present invention, the monitoring loop may include a first loop along the direction of the first loop and a second loop along the direction of the second loop, wherein the first loop may be an N-bit data bus and the second loop may be a 1-bit signal line, wherein N is a positive integer.
[0078] The second feedback signal transmitting module 261 is coupled to the second synchronization signal receiving module 241 and is configured to send a feedback signal to the adjacent first target device along the first loop direction of the monitoring loop in response to the second synchronization signal receiving module 241 receiving the synchronization signal.
[0079] The second synchronization signal transmitting module 242 can be coupled to the second synchronization signal receiving module 241. After the second synchronization signal receiving module 241 receives the synchronization signal "sync", the second synchronization signal transmitting module 242 can transmit the synchronization signal to the adjacent target device along the second loop direction of the monitoring loop. This allows the synchronization signal to be transmitted sequentially between the performance monitoring devices and then transmitted back to the monitoring management device 1 by the performance monitoring device 2 located at the first end of the monitoring chain. The adjacent second target device can include another adjacent performance monitoring device 2 or an adjacent monitoring management device 1. In other words, after receiving the synchronization signal "sync" from upstream, the performance monitoring device 2 can continue to transmit the synchronization signal "sync" to the downstream performance monitoring device 2 or monitoring management device 1, thereby forming a closed loop around the monitoring loop along the second loop direction.
[0080] Furthermore, in one embodiment, after receiving the synchronization signal 'sync', the performance monitoring device 2 can not only continue to send the synchronization signal 'sync' downstream, but also receive feedback signals sent downstream in response to the synchronization signal 'sync' via the second feedback signal receiving module 262. Specifically, in one embodiment, the second feedback signal receiving module 262 can receive feedback signals sent by the second target device along the first loop direction in response to the synchronization signal. Since the feedback signal is sent from the receiving end to the sending end of the synchronization signal, the transmission direction of the feedback signal is opposite to the transmission direction of the synchronization signal. For example, if the synchronization signal is transmitted along the second loop direction of the monitoring loop, then the feedback signal is output along the first loop direction of the monitoring loop.
[0081] The transmission delay determination module 27, coupled to the second synchronization signal transmission module 242 and the second feedback signal reception module 262, determines the second transmission delay 'delay2' between the performance monitoring device and the target device based on the difference between the reception time of the feedback signal and the transmission time of the synchronization signal. Specifically, since the difference between the reception time of the feedback signal fb and the transmission time of the synchronization signal sync is the round-trip time between the performance monitoring device 2 and the target device, the second transmission delay 'delay2' can be equal to half of this difference. For example, if the difference between the reception time of the feedback signal fb and the transmission time of the synchronization signal sync is T2, then the second transmission delay 'delay2' can be determined as T2 / 2. After determining the second transmission delay 'delay2', the performance monitoring device 2 can save the second transmission delay 'delay2' for subsequent use.
[0082] The attenuation determination module 28, coupled to the transmission delay determination module 27, can be configured to determine the attenuation value of the timing duration parameter by the performance monitoring device based on the second transmission delay. In one example, the performance monitoring device 2 can subtract this attenuation value from the received timing duration parameter to obtain the attenuated timing duration parameter. Thus, the timing processing module 22 can attenuate the received timing duration parameter according to the attenuation value, transmit the attenuated timing duration parameter along the first loop direction, and perform timing operations based on the attenuated timing duration parameter.
[0083] For example, if the received timing duration parameter is 100 nanoseconds and the attenuation value is 20 nanoseconds, the timing processing module 22 can subtract 20 nanoseconds from 100 nanoseconds to get 80 nanoseconds, and obtain the attenuated timing duration of 80 nanoseconds. The timing duration parameter of 80 nanoseconds is then sent to the next performance monitoring device 2 along the first loop of the monitoring loop, and a countdown starts from 80 nanoseconds. When the countdown reaches 0, the monitoring module 23 is triggered to start performance monitoring of the monitored object.
[0084] Specifically, in one embodiment of the present invention, the monitoring module 23 can encapsulate the performance counts collected in each monitoring cycle into an original performance count packet, and send the original performance count packet to the monitoring management device 1 along the first loop direction of the monitoring ring. The original performance count packet may include the performance counts and packet header information. The packet header information may include the device identifier of the performance monitoring device 2 and the original delay duration experienced by the original performance count packet in the monitoring ring.
[0085] In embodiments of the present invention, the performance monitoring device 2 can monitor the monitoring object according to a monitoring cycle. When the performance monitoring device 2 monitors the monitoring object continuously, the next monitoring cycle begins synchronously at the end of one monitoring cycle. After each monitoring cycle ends, the performance counts collected in that monitoring cycle can be added to a packet header and encapsulated into an original performance count packet. Optionally, if the original performance count packet has been encapsulated but has not yet been transmitted in the monitoring loop, the original delay duration is 0.
[0086] Furthermore, the performance monitoring device 2 provided in the embodiments of the present invention can not only encapsulate its own original performance count packets, but also forward the original performance count packets encapsulated by each performance monitoring device 2 upstream in the monitoring chain. Specifically, as Figure 8 As shown, in one embodiment of the present invention, the performance monitoring device 2 may further include: a forwarding module 291, configured to receive original performance counting packets sent by each performance monitoring device 2 located upstream of the monitoring ring along the first loop direction, add the original delay duration in the received original performance counting packet to the second transmission delay, update the original delay duration in the original performance counting packet using the addition result, and continue to send the original performance counting packet with the updated original delay duration along the first loop direction.
[0087] In an embodiment of the present invention, after the performance monitoring device 2 receives the original performance counting packet sent by the target device, it can obtain the original delay duration from the packet header information of the original performance counting packet. Since the original delay duration is the data in the original performance counting packet sent by the target device, the data itself does not automatically increase. Therefore, when the performance monitoring device 2 receives the original performance counting packet, the original delay duration does not include the delay spent by the original performance counting packet being transmitted from the target device to the current performance monitoring device 2.
[0088] As mentioned earlier, each performance monitoring device 2 can determine the second transmission delay 'delay2' between itself and the target device based on the difference between the reception time of the feedback signal and the transmission time of the synchronization signal. That is, each performance monitoring device 2 stores the delay between itself and its upstream neighboring target device, i.e., the second transmission delay 'delay2'. Therefore, by adding the original delay duration in the received original performance counting packet to the second transmission delay, and updating the original delay duration in the original performance counting packet using the addition result, the updated original delay duration includes the delay required for the original performance counting packet to be transmitted from the target module to the current performance monitoring device 2.
[0089] Depending on the position of each performance monitoring module 2 in the monitoring ring, the number of performance monitoring modules 2 through which the raw performance count packet it encapsulates is different when it is transmitted to the monitoring management device 1. Among them, the raw performance count packet encapsulated by the performance monitoring module 2 located at the first end of the monitoring chain, that is, the downstream performance monitoring device 2 in the first ring direction, passes through the fewest performance monitoring devices 2, so the raw delay time in the raw performance count packet is the shortest. The raw performance count packet encapsulated by the performance monitoring module 2 located at the second end of the monitoring chain, that is, the upstream performance monitoring device 2 in the first ring direction, passes through the most performance monitoring devices 2, so the raw delay time in the raw performance count packet is the longest.
[0090] As described above, in the embodiments of the present invention, the performance monitoring device 2 can either encapsulate performance counts into original performance count packets or forward original performance count packets encapsulated and sent by other upstream performance monitoring devices 2. Based on this, if the performance monitoring device 2 receives other original performance count packets while sending an original performance count packet, the newly received packets may not be immediately sent. Therefore, in one embodiment, the forwarding module 291 can also be configured to, in response to channel blocking of the original performance count packet after the original delay duration is updated, record the blocking duration and add the blocking duration to the original delay duration of the original performance count packet. If the transmission channel is open, the original performance count packet with the added blocking duration is sent along the first loop direction. Thus, even if some original performance count packets encounter channel blocking during transmission, the corresponding blocking duration can be added to the original delay duration in the packet header information, thereby facilitating the tracing of the collection time of the performance counts in the original performance count packets.
[0091] In embodiments of the present invention, the performance monitoring device 2 can monitor one or more performance characteristics of the monitored object, and each performance monitoring has its own characteristics. In order for each performance monitoring device 2 to perform performance monitoring as required, the performance monitoring device 2 can be configured according to the instructions of the monitoring management device 1.
[0092] Specifically, in one embodiment of the present invention, such as Figure 9 As shown, the performance monitoring device 2 may further include a monitoring configuration module 292, configured to receive a configuration data packet sent by the monitoring management device 1 along the first loop direction of the monitoring ring before the timing receiving module 21 receives the timing duration parameter sent by the monitoring management device 1 along the first loop direction of the monitoring ring, determine whether to perform a configuration operation according to the device identifier or device identifier range carried in the configuration data packet, and continue to send the configuration data packet along the first loop direction.
[0093] In other words, before the performance monitoring device 2 performs performance monitoring on the monitored object, it can receive configuration data packets sent by the monitoring management device 1. There can be one or more configuration data packets. Each configuration data packet can be used to configure one or more performance monitoring devices 2. Each configuration data packet can carry device identifiers of one or more performance monitoring devices 2, specifying which one or more performance monitoring devices 2 are being configured. Optionally, the device identifiers of the performance monitoring devices 2 can be omitted from the configuration data packet. In this case, it can be assumed that the configuration data packet can be used to configure all performance monitoring devices 2 in the monitoring ring.
[0094] Thirdly, embodiments of the present invention also provide a performance monitoring system that effectively improves performance analysis efficiency and enhances performance analysis results with less hardware resources.
[0095] like Figure 10 As shown, the performance monitoring system provided by the embodiments of the present invention may include any of the monitoring management devices 1 and performance monitoring devices 2 provided by the foregoing embodiments; wherein, the number of performance monitoring devices 2 is at least two, and each performance monitoring device 2 is connected end to end to form a monitoring chain, and the two ends of the monitoring chain are respectively coupled to the monitoring management device 1.
[0096] The performance monitoring system provided in the embodiments of the present invention includes any of the monitoring and management devices 1 and performance monitoring devices 2 provided in the foregoing embodiments. Therefore, it can also achieve the corresponding beneficial technical effects, which have been described in detail above and will not be repeated here.
[0097] The performance monitoring system provided by the present invention will be described in detail below through a specific embodiment.
[0098] like Figure 11 As shown, the performance monitoring system provided by the embodiments of the present invention may include a monitoring management device PMM (Performance Monitoring Manager) and a performance monitoring device PMC (Performance Monitoring Customer): PMC0, PMC1, PMC2, ..., PMCn-1; each performance monitoring device PMC is connected end to end to form a monitoring chain, and the two ends of the monitoring chain are respectively coupled to the monitoring management device PMM.
[0099] Since adjacent PMCs may be physically far apart on the chip, one or more repeater stages can be inserted during physical implementation to address timing convergence issues. This results in varying transmission delays (y) between different PMCs. The transmission delay y is related to the number of repeater stages between PMCs.
[0100] To achieve global synchronization of performance monitoring, two pieces of information are needed: first, the path delay yi between adjacent PMCs and between PMC and PMM; and second, the path delay Y of the entire ring bus. The former is achieved through the synchronization signal line sync and the least significant bit (data[0]) of the data bus. Figure 12 and Figure 13 It shows two adjacent PMCs (PMCs) i and PMC i-1 The calculation principle of path delay between (). Figure 14 The calculation principle of the path delay Y of the entire ring bus is demonstrated.
[0101] Combination Figures 11 to 14 The principles of path delay calculation can include: Step 101: PMM initiates path delay calculation by raising o_sync. PMM records the time from when o_sync is raised to when it originates from PMC. n-1 The time interval of the feedback signal i_data[0] is denoted as X. n Then PMM and PMC n-1 Path delay y between n =X n / 2 (i.e., the first transmission delay).
[0102] Step 102, PMC n-1 Upon receiving the synchronization signal i_sync from the PMM, the synchronization signal o_sync is simultaneously forwarded to the PMC. n-2 And pull the least significant bit o_data[0] of the data bus high.
[0103] Step 103, PMC n-1 records the time interval from forwarding the synchronization signal o_sync to receiving the feedback signal i_data[0] from the PMC n-2 , which is denoted as X n-1 , then the PMC n-1 and the PMC n-2 have a path delay y n-1 =X n-1 / 2, and the PMC n-1 stores the delay value y n-1 .
[0104] By analogy, the path delay y between any PMC i and the PMC i-1 (0≤i<n, where in the case of i=0, the PMC -1 is exactly the PMM) can be obtained, where y i =X i / 2, and the PMC i stores the delay value y i (i.e., the second transmission delay).
[0105] For example, after PMCi receives the synchronization signal i_sync from the upper-level PMCi+1, PMCi forwards the synchronization signal o_sync to PMCi-1 and the internal lat_cntr starts timing. After PMCi receives the synchronization feedback signal i_data[0] from PMCi-1, it stops counting by lat_cntr, divides the current count value Xi by 2 to obtain the path delay yi=Xi / 2 between PMCi and PMCi-1. PMCi stores the delay value yi in the internal circuit.
[0106] Step 104, the PMM records the time interval from the rising edge of o_sync to the synchronization signal i_sync from PMC0, which is denoted as Y, and the PMM stores the delay value Y. The formula is satisfied as follows: Y = ∑y i , 0≤i≤n Step 105, the PMM sends the synchronization delay value Y to PMC0 through the data bus, and PMC0 subtracts the locally stored path delay value y0 from the received synchronization delay value to obtain Z0=Y-y0. PMC0 completes the following two things: ① start a countdown with Z0 as the initial value; ② forward Z0 as the synchronization delay value to PMC1.
[0107] By analogy, for any PMC i (0<i<n), the synchronization delay value from the PMC i-1 is subtracted by the locally stored path delay value y i to obtain Zi =Y-∑y j , 0≤j≤i. PMC i Complete the following two tasks: ① Using Z i ① Start the countdown for the initial value; ② Set Z i Forwarded to PMC as a synchronization delay value i+1 (Where i=n-1, the forwarding object is PMM).
[0108] Once all PMCs countdowns reach 0, they immediately begin collecting performance data from the client modules. This ensures that all PMCs start working at the same time, achieving global synchronization.
[0109] For example, in one instance, the timing for the six PMCs to achieve global synchronization can be as follows: Figure 15 As shown: Starting at time T0, the PMM sends the synchronization delay value to the PMC0.
[0110] At time T1, PMC0 receives the synchronization delay value from PMM and starts a countdown. The initial value of the countdown is (Y-y0).
[0111] At time T2, PMC1 receives the synchronization delay value from PMC0 and starts a countdown. The initial value of the countdown is (Y-y0-y1).
[0112] At time T3, PMC2 receives the synchronization delay value from PMC1 and starts a countdown. The initial value of the countdown is (Y-y0-y1-y2).
[0113] At time T4, PMC3 receives the synchronization delay value from PMC2 and starts a countdown. The initial value of the countdown is (Y-y0-y1-y2-y3).
[0114] At time T5, PMC4 receives the synchronization delay value from PMC3 and starts a countdown. The initial value of the countdown is (Y-y0-y1-y2-y3-y4).
[0115] At time T6, PMC5 receives the synchronization delay value from PMC4 and starts a countdown. The initial value of the countdown is (Y-y0-y1-y2-y3-y4-y5).
[0116] At time T7, all PMC countdowns end, and the system begins working within a globally synchronized time window to collect performance data for the corresponding modules.
[0117] Fourthly, embodiments of the present invention also provide a chip that effectively improves performance analysis efficiency and enhances performance analysis results with less hardware resources.
[0118] like Figure 16As shown, the chip 5 provided in the embodiments of the present invention may include at least two functional modules 3 and any of the performance monitoring systems 4 provided in the foregoing embodiments; at least two functional modules 3 are connected through a system bus; wherein, each functional module 3 is coupled to at least one performance monitoring device 2 in the performance monitoring system 4 through a preset interface, and at least one performance monitoring device 2 is used to perform performance monitoring with the functional module 3 coupled to it as the monitoring object.
[0119] The chip provided in the embodiments of the present invention includes any of the performance monitoring systems provided in the foregoing embodiments, and therefore can also achieve the corresponding beneficial technical effects, which have been described in detail above and will not be repeated here.
[0120] Fifthly, embodiments of the present invention also provide a monitoring and management method that effectively improves performance analysis efficiency and enhances performance analysis results with less hardware resource expenditure.
[0121] like Figure 17 As shown, the monitoring and management method provided in the embodiments of the present invention is applied to a monitoring and management device, which is used to couple to both ends of a monitoring chain to form a monitoring loop; wherein, the monitoring chain includes at least two performance monitoring devices connected end-to-end; the monitoring and management method may include: S62. Along the first loop direction of the monitoring ring, a timing duration parameter is sent to the performance monitoring device located at the first end of the monitoring chain, so that the timing duration parameter is transmitted sequentially between each performance monitoring device and then transmitted back to the monitoring management device by the performance monitoring device located at the second end of the monitoring chain; wherein, the parameter value of the timing duration parameter is attenuated once each time it reaches a performance monitoring device, and the performance monitoring device is triggered to perform a timing operation based on the attenuated timing duration parameter, so that the timing operation of each performance monitoring device ends simultaneously and the performance monitoring of the monitored object starts simultaneously; S64. Receive the performance counts sent by each of the performance monitoring devices in the monitoring chain along the first loop direction of the monitoring loop.
[0122] The monitoring and management method provided by the embodiments of the present invention can send timing duration parameters to the performance monitoring device located at the first end of the monitoring chain along the first loop direction of the monitoring ring. The timing duration parameters are then sequentially transmitted between the performance monitoring devices and transmitted back to the monitoring management device by the performance monitoring device located at the second end of the monitoring chain. In this way, on the one hand, multiple performance monitoring devices are connected to the monitoring management device in the form of a monitoring ring with fewer interconnection resources; on the other hand, the parameter value of the timing duration parameter is attenuated each time it reaches a performance monitoring device, triggering that device to perform a timing operation based on the attenuated timing duration parameter. This also allows the timing operations of each performance monitoring device to end simultaneously and start performance monitoring of the monitored object simultaneously. Thus, the observation time starting points of each performance monitoring device for the monitored object can be aligned with each other, and the resulting performance curves can be compared intuitively. Therefore, it is convenient to effectively improve performance analysis efficiency and improve performance analysis results with less hardware resources.
[0123] In one embodiment, before sending the timing duration parameter to the performance monitoring device located at the first end of the monitoring chain along the first loop direction of the monitoring ring, the method further includes: sending a synchronization signal to the performance monitoring device located at the second end of the monitoring chain along the second loop direction of the monitoring ring, so that the synchronization signal is transmitted sequentially among the performance monitoring devices and then transmitted back to the monitoring management device by the performance monitoring device located at the first end of the monitoring chain; wherein the first loop direction is opposite to the second loop direction; receiving the synchronization signal from the performance monitoring device located at the first end of the monitoring chain; in response to receiving the synchronization signal, sending a feedback signal for the synchronization signal to the performance monitoring device located at the first end of the monitoring chain along the first loop direction of the monitoring ring; determining the loop delay corresponding to the monitoring ring based on the difference between the reception time and the transmission time of the synchronization signal; and determining the initial value of the timing duration parameter based on the loop delay.
[0124] In one embodiment, after sending a synchronization signal to the performance monitoring device located at the second end of the monitoring chain along the second loop direction of the monitoring loop, the method further includes: receiving a feedback signal for the synchronization signal sent by the performance monitoring device located at the second end of the monitoring chain along the first loop direction; and determining a first transmission delay between the monitoring management device and the performance monitoring device located at the second end of the monitoring chain based on the difference between the reception time of the feedback signal and the transmission time of the synchronization signal.
[0125] In one embodiment, receiving the performance counts sent by each performance monitoring device in the monitoring chain along the first loop direction of the monitoring ring includes: receiving raw performance count packets sent by each performance monitoring device in the monitoring chain along the first loop direction of the monitoring ring, wherein the raw performance count packet includes performance counts and packet header information, the packet header information including the device identifier of the performance monitoring device that sent the raw performance count packet and the raw delay duration experienced by the raw performance count packet during transmission in the monitoring ring, wherein the raw delay duration is written by each performance monitoring device through which the raw performance count packet passes; adding the first transmission delay to the raw delay duration to obtain a target delay duration, and writing the target delay duration into the packet header information to obtain a target performance count packet; the method further includes: adding a timestamp to each target performance count packet to obtain a stamped count packet; the timestamp is used to indicate the time when the raw performance count packet arrives at the monitoring management device; and writing the stamped count packet into memory.
[0126] In one embodiment, writing the tagged counting packets into memory includes: concatenating multiple tagged counting packets into a performance data packet, and writing the performance data packet into memory, wherein each performance data packet has a preset size.
[0127] In one embodiment, before sending the timing duration parameter to the performance monitoring device located at the first end of the monitoring chain along the first loop direction of the monitoring ring, the method further includes: acquiring monitoring configuration information and generating a configuration data packet based on the monitoring configuration information; sending the configuration data packet along the first loop direction of the monitoring ring to the corresponding performance monitoring device, so that the corresponding performance monitoring device performs a configuration operation based on the configuration data packet; wherein, the configuration data packet includes a device identifier or a range of device identifiers of the performance monitoring device corresponding to the configuration data packet.
[0128] Sixthly, embodiments of the present invention also provide a performance monitoring method that effectively improves performance analysis efficiency and enhances performance analysis results with less hardware resource expenditure.
[0129] like Figure 18 As shown, the performance monitoring method provided in the embodiments of the present invention is applied to a performance monitoring device, wherein the performance monitoring device is used as any one of the performance monitoring devices in a monitoring chain, wherein the monitoring chain includes at least two performance monitoring devices connected end-to-end; the two ends of the monitoring chain are respectively coupled to a monitoring management device to form a monitoring loop; the method may include: S72. Receive timing duration parameters sent by the monitoring management device along the first loop direction of the monitoring ring, wherein the timing duration parameters are used to be transmitted sequentially between each of the performance monitoring devices and then transmitted back to the monitoring management device by the performance monitoring device located at the second end of the monitoring chain; wherein the parameter value of the timing duration parameters is attenuated once each time it reaches a performance monitoring device; S74. Attenuate the value of the timing duration parameter, transmit the attenuated timing duration parameter along the first loop direction, and perform a timing operation based on the attenuated timing duration parameter so that the timing operation of the performance monitoring device ends simultaneously with the timing operations of other performance monitoring devices in the monitoring chain. S76. In response to the end of the timing operation, start performance monitoring of the monitored object and send the collected performance counts to the monitoring management device along the first loop direction of the monitoring loop.
[0130] The performance monitoring method provided by the embodiments of the present invention can receive timing duration parameters sent by a monitoring management device along the first loop direction of the monitoring ring, attenuate the parameter value of the timing duration parameters, transmit the attenuated timing duration parameters along the first loop direction, and perform a timing operation based on the attenuated timing duration parameters, so that the timing operation of the performance monitoring device ends simultaneously with the timing operations of other performance monitoring devices in the monitoring chain. In response to the end of the timing operation, performance monitoring of the monitored object can be started, and the collected performance counts can be sent to the monitoring management device along the first loop direction of the monitoring ring. In this way, on the one hand, multiple performance monitoring devices and monitoring management devices are connected in the form of a monitoring loop with fewer interconnection resources. On the other hand, the parameter value of the timing duration parameter can be attenuated, and the attenuated timing duration parameter is transmitted along the first loop direction. Timing operations are performed based on the attenuated timing duration parameter, so that the timing operations of the performance monitoring devices end simultaneously with the timing operations of other performance monitoring devices in the monitoring chain. This enables each performance monitoring device to start monitoring the performance of the monitored object at the same time. In this way, the observation time starting points of each performance monitoring device can be aligned with each other, and the obtained performance curves can be compared intuitively. Therefore, it is convenient to effectively improve the efficiency and effect of performance analysis with less hardware resources.
[0131] In one embodiment, before receiving the timing duration parameter sent by the monitoring and management device along the first loop direction of the monitoring ring, the method further includes: receiving a synchronization signal sent by an adjacent first target device along the second loop direction of the monitoring ring, wherein the first loop direction is opposite to the second loop direction; the first target device includes the performance monitoring device or the monitoring and management device; in response to receiving the synchronization signal, sending a feedback signal to the adjacent first target device along the first loop direction of the monitoring ring; sending the synchronization signal to an adjacent second target device along the second loop direction of the monitoring ring, so that the synchronization signal is transmitted sequentially among the performance monitoring devices and then transmitted back to the monitoring and management device by the performance monitoring device located at the first end of the monitoring chain; wherein the second target device includes the performance monitoring device or the monitoring and management device; receiving a feedback signal sent by the second target device along the first loop direction in response to the synchronization signal; determining a second transmission delay between the performance monitoring device and the second target device based on the difference between the reception time of the feedback signal and the transmission time of the synchronization signal; and determining an attenuation value of the timing duration parameter by the performance monitoring device based on the second transmission delay.
[0132] In one embodiment, sending the collected performance counts to the monitoring management device along the first loop direction of the monitoring ring includes: encapsulating the performance counts collected in each monitoring cycle into an original performance count packet, and sending the original performance count packet to the monitoring management device along the first loop direction of the monitoring ring, wherein the original performance count packet includes the performance counts and packet header information, the packet header information including the device identifier of the performance monitoring device and the original delay duration experienced by the original performance count packet during transmission in the monitoring ring.
[0133] In one embodiment, the performance monitoring method further includes: receiving the original performance counting packets sent by each of the performance monitoring devices located upstream of the monitoring ring along the first loop direction; adding the original delay duration in the received original performance counting packets to the second transmission delay; updating the original delay duration in the original performance counting packets using the addition result; and continuing to send the original performance counting packets with the updated original delay duration along the first loop direction.
[0134] In one implementation, after updating the original delay duration in the original performance counter packet using the summation result, and before continuing to send the original performance counter packet with the updated original delay duration along the first loop direction, the method further includes: in response to a blocking of the transmission channel of the original performance counter packet with the updated original delay duration, recording the blocking duration and accumulating the blocking duration into the original delay duration of the original performance counter packet; the continuing to send the original performance counter packet with the updated original delay duration along the first loop direction includes: if the transmission channel is unobstructed, continuing to send the original performance counter packet with the accumulated blocking duration along the first loop direction.
[0135] In one embodiment, before receiving the timing duration parameter sent by the monitoring management device along the first loop direction of the monitoring ring, the method further includes: receiving a configuration data packet sent by the monitoring management device along the first loop direction of the monitoring ring; determining whether to perform a configuration operation based on the configuration data packet according to the device identifier or device identifier range carried in the configuration data packet; and continuing to send the configuration data packet along the first loop direction.
[0136] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0137] The various embodiments in this specification are described in a related manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0138] In particular, the device embodiment is basically similar to the method embodiment, so the description is relatively simple. For relevant details, please refer to the description of the method embodiment.
[0139] For ease of description, the above apparatus is described by dividing it into various functional units / modules. Of course, in implementing this invention, the functions of each unit / module can be implemented in one or more software and / or hardware.
[0140] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0141] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A monitoring and management device, characterized in that, The monitoring and management device is used to be coupled to both ends of the monitoring chain to form a monitoring loop; wherein, the monitoring chain includes at least two performance monitoring devices that are connected end to end to each other; The monitoring and management device includes: The timing transmission module is configured to send timing duration parameters along the first loop direction of the monitoring ring to the performance monitoring device located at the first end of the monitoring chain, so that the timing duration parameters are sequentially transmitted between the performance monitoring devices and then transmitted back to the monitoring management device by the performance monitoring device located at the second end of the monitoring chain; wherein, the parameter value of the timing duration parameter is attenuated once each time it reaches a performance monitoring device, and the performance monitoring device is triggered to perform a timing operation based on the attenuated timing duration parameter, so that the timing operation of each performance monitoring device ends simultaneously and the performance monitoring of the monitored object starts simultaneously; The data receiving module is configured to receive performance counts sent by each of the performance monitoring devices in the monitoring chain along the first loop direction of the monitoring loop.
2. The monitoring and management device according to claim 1, characterized in that, Also includes: The first synchronization signal transmitting module is configured to transmit a synchronization signal to the performance monitoring device located at the second end of the monitoring chain along the second loop direction of the monitoring ring before the timing transmitting module transmits the timing duration parameter to the performance monitoring device located at the first end of the monitoring chain along the first loop direction of the monitoring ring. This is so that the synchronization signal is transmitted sequentially among the performance monitoring devices and then transmitted back to the monitoring management device by the performance monitoring device located at the first end of the monitoring chain. The first loop direction is opposite to the second loop direction. The first synchronization signal receiving module is configured to receive the synchronization signal from the performance monitoring device located at the first end of the monitoring chain; The first feedback signal transmitting module is coupled to the first synchronization signal receiving module and is configured to, in response to the first synchronization signal receiving module receiving the synchronization signal, send a feedback signal for the synchronization signal to the performance monitoring device located at the first end of the monitoring chain along the first loop direction of the monitoring loop. The loop delay determination module is configured to determine the loop delay corresponding to the monitoring loop based on the difference between the reception time and the transmission time of the synchronization signal. The timing duration determination module is configured to determine the initial value of the timing duration parameter based on the loop delay.
3. The monitoring and management device according to claim 2, characterized in that, Also includes: The first feedback signal receiving module is configured to receive a feedback signal for the synchronization signal sent by the performance monitoring device located at the second end of the monitoring chain along the first loop direction; The adjacent delay determination module is configured to determine the first transmission delay between the monitoring management device and the performance monitoring device located at the second end of the monitoring chain based on the difference between the reception time of the feedback signal and the transmission time of the synchronization signal.
4. The monitoring and management device according to claim 3, characterized in that, The data receiving module is configured to receive raw performance count packets sent by each performance monitoring device in the monitoring chain along the first loop direction of the monitoring ring. The raw performance count packet includes a performance count and packet header information. The packet header information includes the device identifier of the performance monitoring device that sent the raw performance count packet and the raw delay duration experienced by the raw performance count packet during transmission in the monitoring ring. The raw delay duration is written by each performance monitoring device through which the raw performance count packet passes. The adjacent delay determination module is further configured to add the first transmission delay to the original delay duration to obtain the target delay duration, and write the target delay duration into the packet header information to obtain the target performance counting packet; The device further includes: The timestamp addition module is configured to add a timestamp to each of the target performance counting packages to obtain a stamped counting package; the timestamp is used to indicate the time when the original performance counting package arrives at the monitoring and management device. The data writing module is coupled to the timestamp adding module and is configured to write the stamped counting packet into memory.
5. The monitoring and management device according to claim 4, characterized in that, The data writing module is specifically configured to concatenate multiple tagged counting packets into a performance data packet, and write the performance data packet into memory, wherein each performance data packet has a preset size.
6. The monitoring and management device according to claim 2, characterized in that, The monitoring loop includes a first loop along the direction of the first loop and a second loop along the direction of the second loop, wherein the first loop is an N-bit data bus and the second loop is a 1-bit signal line, where N is a positive integer.
7. The monitoring and management device according to any one of claims 1 to 6, characterized in that, The device further includes: The management configuration module is configured to, before the timing transmission module sends timing duration parameters to the performance monitoring device located at the first end of the monitoring chain along the first loop direction of the monitoring ring, acquire monitoring configuration information and generate a configuration data packet based on the monitoring configuration information, and send the configuration data packet along the first loop direction of the monitoring ring to the corresponding performance monitoring device, so that the corresponding performance monitoring device performs a configuration operation based on the configuration data packet; wherein, the configuration data packet includes the device identifier or device identifier range of the performance monitoring device corresponding to the configuration data packet.
8. A performance monitoring device, characterized in that, The performance monitoring device is used as any one of the performance monitoring devices in the monitoring chain, wherein the monitoring chain includes at least two performance monitoring devices connected end to end; the two ends of the monitoring chain are respectively coupled to the monitoring management device to form a monitoring loop; The performance monitoring device includes: The timing receiving module is configured to receive timing duration parameters sent by the monitoring management device along the first loop direction of the monitoring ring, wherein the timing duration parameters are used to be transmitted sequentially among the performance monitoring devices and then transmitted back to the monitoring management device by the performance monitoring device located at the second end of the monitoring chain; wherein the parameter value of the timing duration parameters is attenuated once each time it reaches a performance monitoring device; A timing processing module, coupled to the timing receiving module, is configured to attenuate the parameter value of the timing duration parameter, transmit the attenuated timing duration parameter along the first loop direction, and perform a timing operation based on the attenuated timing duration parameter, so that the timing operation of the performance monitoring device ends simultaneously with the timing operations of other performance monitoring devices in the monitoring chain. The monitoring module, coupled to the timing processing module, is configured to initiate performance monitoring of the monitored object in response to the end of the timing operation, and send the collected performance counts to the monitoring management device along the first loop direction of the monitoring loop.
9. The performance monitoring device according to claim 8, characterized in that, Also includes: The second synchronization signal receiving module is configured to receive a synchronization signal sent by an adjacent first target device along the second loop direction of the monitoring ring before the timing receiving module receives the timing duration parameter sent by the monitoring management device along the first loop direction of the monitoring ring, wherein the first loop direction is opposite to the second loop direction; the first target device includes the performance monitoring device or the monitoring management device; The second feedback signal transmitting module is coupled to the second synchronization signal receiving module and is configured to send a feedback signal to the adjacent first target device along the first loop direction of the monitoring loop in response to the second synchronization signal receiving module receiving the synchronization signal. The second synchronization signal transmitting module, coupled to the second synchronization signal receiving module, is configured to transmit the synchronization signal to an adjacent second target device along the second loop direction of the monitoring loop, so that the synchronization signal is transmitted sequentially between each of the performance monitoring devices and then transmitted back to the monitoring management device by the performance monitoring device located at the first end of the monitoring chain; the second target device includes the performance monitoring device or the monitoring management device; The second feedback signal receiving module is configured to receive a feedback signal for the synchronization signal sent by the second target device along the first loop direction; The transmission delay determination module is coupled to the second synchronization signal sending module and the second feedback signal receiving module, respectively, and is configured to determine the second transmission delay between the performance monitoring device and the second target device based on the difference between the reception time of the feedback signal and the transmission time of the synchronization signal. An attenuation determination module, coupled to the transmission delay determination module, is configured to determine the attenuation value of the timing duration parameter by the performance monitoring device based on the second transmission delay.
10. The performance monitoring device according to claim 9, characterized in that, The monitoring module is configured to encapsulate the performance counts collected in each monitoring cycle into an original performance count packet, and send the original performance count packet to the monitoring management device along the first loop direction of the monitoring ring. The original performance count packet includes the performance counts and packet header information. The packet header information includes the device identifier of the performance monitoring device and the original delay duration experienced by the original performance count packet during transmission in the monitoring ring.
11. The performance monitoring device according to claim 10, characterized in that, Also includes: The forwarding module is configured to receive the original performance counting packets sent by each of the performance monitoring devices located upstream of the monitoring ring along the first loop direction, add the original delay duration in the received original performance counting packets to the second transmission delay, update the original delay duration in the original performance counting packets using the addition result, and continue to send the original performance counting packets with the updated original delay duration along the first loop direction.
12. The performance monitoring device according to claim 11, characterized in that, The forwarding module is further configured to, in response to the blocking of the transmission channel of the original performance count packet after the original delay duration is updated, record the blocking duration and add the blocking duration to the original delay duration of the original performance count packet, and, when the transmission channel is open, continue to transmit the original performance count packet with the added blocking duration along the first loop direction.
13. The performance monitoring device according to claim 9, characterized in that, The monitoring loop includes a first loop along the direction of the first loop and a second loop along the direction of the second loop, wherein the first loop is an N-bit data bus and the second loop is a 1-bit signal line, where N is a positive integer.
14. The performance monitoring device according to any one of claims 8 to 13, characterized in that, The device further includes: The monitoring configuration module is configured to receive a configuration data packet sent by the monitoring management device along the first loop direction of the monitoring ring before the timing receiving module receives the timing duration parameter sent by the monitoring management device along the first loop direction of the monitoring ring; determine whether to perform a configuration operation based on the device identifier or device identifier range carried in the configuration data packet; and continue to send the configuration data packet along the first loop direction.
15. A performance monitoring system, characterized in that, The device includes the monitoring and management device according to any one of claims 1 to 7 and the performance monitoring device according to any one of claims 8 to 14; wherein the number of the performance monitoring devices is at least two, and each of the performance monitoring devices is connected end to end to form a monitoring chain, and the two ends of the monitoring chain are respectively coupled to the monitoring and management device.
16. A chip, characterized in that, It includes at least two functional modules and the performance monitoring system as described in claim 15; The at least two functional modules are connected via a system bus; wherein each functional module is coupled to at least one performance monitoring device in the performance monitoring system via a preset interface, and the at least one performance monitoring device is used to perform performance monitoring with the functional module coupled to it as the monitoring object.
17. A monitoring and management method, characterized in that, It is applied to a monitoring and management device, which is used to couple to both ends of a monitoring chain to form a monitoring loop; wherein the monitoring chain includes at least two performance monitoring devices that are connected end to end to each other; Along the first loop direction of the monitoring ring, a timing duration parameter is sent to the performance monitoring device located at the first end of the monitoring chain, so that the timing duration parameter is transmitted sequentially among the performance monitoring devices and then transmitted back to the monitoring management device by the performance monitoring device located at the second end of the monitoring chain; wherein, the parameter value of the timing duration parameter is attenuated once each time it reaches a performance monitoring device, and the performance monitoring device is triggered to perform a timing operation based on the attenuated timing duration parameter, so that the timing operation of each performance monitoring device ends simultaneously and the performance monitoring of the monitored object starts simultaneously; Receive performance counts sent by each of the performance monitoring devices in the monitoring chain along the first loop direction of the monitoring loop.
18. A performance monitoring method, characterized in that, The method is applied to a performance monitoring device, which is used as any one of the performance monitoring devices in a monitoring chain, wherein the monitoring chain includes at least two performance monitoring devices connected end to end; the two ends of the monitoring chain are respectively coupled to a monitoring management device to form a monitoring loop; The method includes: The system receives timing duration parameters sent by the monitoring and management device along the first loop direction of the monitoring ring. The timing duration parameters are used to be transmitted sequentially between the performance monitoring devices and then transmitted back to the monitoring and management device by the performance monitoring device located at the second end of the monitoring chain. The value of the timing duration parameters is attenuated once each time it reaches a performance monitoring device. The value of the timing duration parameter is attenuated, the attenuated timing duration parameter is transmitted along the first loop direction, and a timing operation is performed based on the attenuated timing duration parameter so that the timing operation of the performance monitoring device ends simultaneously with the timing operations of other performance monitoring devices in the monitoring chain. In response to the end of the timing operation, performance monitoring of the monitored object is initiated, and the collected performance counts are sent to the monitoring management device along the first loop direction of the monitoring loop.
