On-chip AXI bus monitoring method and monitoring module

By monitoring the transmission operation time stamps and statistical data of the AXI bus, the problem of AXI bus failure and performance bottleneck positioning in chip tests is solved, real-time monitoring and performance analysis of the AXI bus is realized, and fault diagnosis and performance tuning efficiency is improved.

CN119065930AActive Publication Date: 2024-12-03WUXI STARS MICRO SYSTEM TECHNOLOGIES CO LTD

Patent Information

Application Number
CN202411209556.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-03
Estimated Expiration
2044-08-29

AI Technical Summary

Technical Problem

During the chip testing process, there is a lack of efficient online testing tools to quickly locate AXI bus hardware failures and performance bottlenecks. The Arteris NoC bridge fails in deadlock situations and is difficult to deploy monitoring bandwidth, making it impossible to accurately obtain bus status in real time.

Method used

By monitoring the start timestamp and response timestamp of each transmission operation of the AXI bus, the delay is calculated, and the average delay and bandwidth are counted within the time window, the interrupt mechanism is triggered to enable the CPU processor to obtain statistical results and output the data to The ATB bus performs analysis to achieve real-time monitoring and problem positioning.

Benefits of technology

Real-time monitoring and performance analysis of AXI bus is realized, and it responds to bus problems quickly, improves fault diagnosis accuracy and performance tuning efficiency, and reduces dependence on the laboratory environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065930A_ABST
    Figure CN119065930A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of chip testing, in particular to an on-chip AXI bus monitoring method and a monitoring module.The method is executed by the monitoring module.The method comprises the steps that the starting timestamp and the response timestamp of each transmission operation are monitored so as to obtain the time delay of each transmission operation; obtaining an average delay and an average bandwidth by counting the delays and the data volume of a plurality of transmission operations in a time window; when the delay, the average delay, the average bandwidth or the termination time of the time window of each transmission operation triggers an interrupt mechanism of the target AXI bus, enabling the CPU to obtain a statistical result of the current time window; and outputting the delay, the bandwidth and the information entry of each transmission operation of the target AXI bus to the ATB bus. The monitoring module provided by the invention can retain and provide key deadlock command information even under the condition that a CPU (Central Processing Unit) is deadly hung, so that a root cause can be quickly found, and the bus state can be obtained in real time without interfering the operation of a service scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of chip testing, and in particular to an on-chip AXI bus monitoring method and a monitoring module. Background Art

[0002] AXI (Advanced eXtensible Interface) is a widely used on-chip bus standard. As a key communication protocol in the system-on-chip (SoC), it is responsible for data transmission between various modules inside the chip. The performance of the AXI bus directly affects the performance of the entire chip.

[0003] During chip testing and performance tuning, two major challenges are faced. First, hardware failures such as bus deadlock and CPU stuck often occur on the chip, but there is a lack of efficient online testing tools to quickly locate the root cause of the problem, because it is difficult to build effective cases to reproduce and locate hardware deadlocks in prototype testing. Secondly, during performance tuning, although it can be detected that the performance is not up to standard, there is a lack of necessary observation methods to accurately identify performance bottlenecks, resulting in the inability to implement targeted improvements. Although the Arteris NoC bridge can monitor the AXI bus, it may fail in the event of a deadlock, unable to output monitoring information, and the information is lost after reset. In addition, the Arteris NoC bridge has deployment difficulties and functional limitations in monitoring bus bandwidth, such as not supporting detailed bandwidth occupancy ratio analysis, which further increases the difficulty of performance tuning.

[0004] Therefore, there is an urgent need for an on-chip non-intrusive AXI bus monitoring method technology that can obtain the bus status in real time without interfering with the operation of business scenarios. Summary of the invention

[0005] In view of this, the present invention provides an on-chip AXI bus monitoring method and monitoring module to solve the problem that the related technology cannot obtain the bus status in real time and accurately due to the lack of testing tools and observation means.

[0006] In a first aspect, the present invention provides an on-chip AXI bus monitoring method, the method being executed by a monitoring module in an on-chip AXI bus monitoring system, the method comprising:

[0007] Monitor the start timestamp and response timestamp of each transfer operation of the target AXI bus to obtain the delay of each transfer operation;

[0008] By counting the delays and data volumes of multiple transmission operations within a time window, an average delay and an average bandwidth within the time window are obtained;

[0009] When the delay of each transmission operation, the average delay, the average bandwidth or the end time of the time window triggers the interrupt mechanism of the target AXI bus, the CPU processor obtains the statistical result of the current time window to obtain the deadlock information, bus error information or performance status of the target AXI bus;

[0010] The delay, bandwidth and information entry of each transfer operation of the target AXI bus are output to the ATB bus for bus status analysis.

[0011] The above scheme can calculate and obtain the delay of each operation in real time by monitoring the start timestamp and response timestamp of each transmission operation, thereby realizing real-time monitoring of the AXI bus performance; by counting the delay and data volume of multiple transmission operations within a time window, the average delay and average bandwidth are calculated, which helps to identify the changing trend of bus performance; under specific conditions (such as delay timeout, bus error, time window end or performance threshold triggering), the interrupt mechanism can be triggered to enable the CPU processor to obtain the statistical results of the current time window in time, which not only helps to quickly respond to bus problems, but also can accurately locate the problem by latching the information items when deadlock or errors occur; the statistical data (including the delay, bandwidth and information items of each transmission operation) are output to the ATB bus, which is convenient for integration with other systems or tools, to achieve more comprehensive bus status analysis and performance monitoring, and improve the flexibility and scalability of the monitoring system.

[0012] In an optional implementation, before monitoring the start timestamp and response timestamp of each transfer operation of the target AXI bus to obtain the delay of each transfer operation, the method further includes:

[0013] Acquire the transfer operation on the target AXI bus, and establish corresponding information entries for each transfer operation; the information entries include valid information extracted from the AXI command channel.

[0014] The above solution creates an information entry for each transmission operation. When a deadlock or performance problem occurs, the pre-established information entry can quickly help locate the source of the problem, reduce fault diagnosis time, and improve the accuracy of problem analysis.

[0015] In an optional implementation manner, monitoring the start timestamp and response timestamp of each transfer operation of the target AXI bus to obtain the delay of each transfer operation includes:

[0016] The start timestamp and the response timestamp of each transmission operation are monitored based on the trigger signal, and the delay of each transmission operation is obtained based on the difference between the start timestamp and the response timestamp.

[0017] The above scheme monitors the timestamps of transmission operations in real time, can quickly feedback the system performance status, and provide a basis for dynamically adjusting the command distribution intensity and bus bandwidth resource allocation.

[0018] In an optional implementation, the obtaining of the average delay and average bandwidth in a time window by counting the delays and data volumes of multiple transmission operations in the time window includes:

[0019] By counting the delays of multiple transmission operations within a time window, an average delay of the multiple transmission operations is obtained;

[0020] The data volume of each transmission operation in the time window is recorded, and based on the total data volume in the time window, an average bandwidth of the multiple transmission operations is obtained.

[0021] The above solution can provide timely feedback on performance changes by counting the delay and data volume of transmission operations within the time window, thereby quickly responding to possible performance degradation or bottleneck problems.

[0022] In an optional implementation, the interrupt mechanism includes deadlock and error interrupts; when the delay of each transmission operation, the average delay, the average bandwidth or the end time of the time window triggers the interrupt mechanism of the target AXI bus, the CPU processor obtains the statistical results of the current time window to obtain the deadlock information, bus error information or performance status of the target AXI bus, including:

[0023] When the delay of the transmission operation exceeds the timeout threshold or a bus error is monitored, it is determined that the target AXI bus triggers a deadlock interrupt, and the information entry corresponding to the first transmission operation in which a deadlock or bus error occurs is latched into a register accessible to the software, so that the CPU processor obtains the deadlock information or bus error information of the target AXI bus; the register is set to have no reset terminal, and the software resets the register through a clear operation.

[0024] When the delay of the transmission operation exceeds the preset timeout threshold or a bus error is monitored, the above scheme can quickly determine whether the target AXI bus has triggered a deadlock interrupt, thereby promptly identifying the occurrence of deadlock. Once a deadlock or bus error is detected, the information entry corresponding to the first transmission operation where the deadlock or bus error occurs is latched into a register accessible to the software, so that the CPU can obtain key deadlock information or bus error information.

[0025] In an optional implementation, the interrupt mechanism includes a statistical window end interrupt; when the delay of each transmission operation, the average delay, the average bandwidth or the end time of the time window triggers the interrupt mechanism of the target AXI bus, the CPU processor obtains the statistical results of the current time window to obtain the deadlock information, bus error information or performance status of the target AXI bus, including:

[0026] When the time window ends, it is determined that the target AXI bus triggers a statistical window end interrupt, and the CPU processor obtains the delay information and bandwidth information of the time window to obtain the performance status of the target AXI bus.

[0027] The above scheme notifies the CPU processor to immediately obtain the delay information and bandwidth information of the time window at the end of the time window, thereby obtaining the performance status of the target AXI bus, ensuring the timeliness and accuracy of the data, and providing real-time data support for performance analysis.

[0028] In an optional implementation, the interrupt mechanism includes a performance threshold interrupt; when the delay of each transmission operation, the average delay, the average bandwidth or the end time of the time window triggers the interrupt mechanism of the target AXI bus, the CPU processor obtains the statistical results of the current time window to obtain the deadlock information, bus error information or performance status of the target AXI bus, including:

[0029] When the average delay in the time window exceeds the average delay threshold or the average bandwidth is lower than the bandwidth threshold, it is determined that the target AXI bus triggers a performance threshold interrupt, and the CPU processor obtains the delay information and bandwidth information of the time window to obtain the performance status of the target AXI bus.

[0030] The performance threshold interruption of the above solution provides an effective performance guarantee mechanism, which helps to ensure that the AXI bus can maintain a good performance state under various working conditions.

[0031] In an optional implementation, outputting the delay, bandwidth and information entry of each transfer operation of the target AXI bus to the ATB bus for bus status analysis includes:

[0032] The latency, bandwidth, and information entries of each transfer operation are output to the ATB bus in a packaged manner and cached in an independent target storage space for bus status analysis.

[0033] The above solution can comprehensively analyze and monitor the transmission activities on the AXI bus by outputting data to the ATB bus, which helps to deeply understand the performance status.

[0034] In an optional embodiment, the method further includes:

[0035] Through statistics of multiple time windows, a time-axis-based delay and bandwidth histogram is formed to analyze the overall performance bottleneck of the bus.

[0036] The above solution can intuitively display the changing trends and bottlenecks of bus performance by forming visualization methods such as delay and bandwidth bar graphs based on the time axis, providing strong support for in-depth analysis of system performance and formulation of optimization strategies.

[0037] In a second aspect, the present invention provides a monitoring module, the monitoring module is arranged in an on-chip AXI bus monitoring system, the structure of the monitoring module includes an axi_mon interface, a monitoring read bus unit and a monitoring write bus unit;

[0038] The axi_mon interface of the monitoring module is respectively connected to the target AXI bus interface, the CPU processor interface, the target storage device interface and the CTI cross trigger interface;

[0039] The monitoring read bus unit is used to monitor the read bus of the target AXI bus, and the monitoring write bus unit is used to monitor the write bus of the target AXI bus;

[0040] The monitoring module is used to execute an on-chip AXI bus monitoring method according to the first aspect or any corresponding implementation manner thereof.

[0041] In a third aspect, the present invention provides an on-chip AXI bus monitoring system, the system comprising a monitoring module as described above, the monitoring module being configured to be connected to a CPU processor interface and a GDMA master interface, a PCIe AXI interface, a DDR memory and an OCM on-chip memory, and a peripheral channel.

[0042] In a fourth aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to thereby execute an on-chip AXI bus monitoring method of the above-mentioned first aspect or any corresponding embodiment thereof.

[0043] In a fifth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute an on-chip AXI bus monitoring method according to the first aspect or any corresponding embodiment thereof.

[0044] In a sixth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute an on-chip AXI bus monitoring method according to the first aspect or any corresponding embodiment thereof.

[0045] The technical solution provided by the present invention may include the following beneficial effects:

[0046] The present invention can calculate and obtain the delay of each operation in real time by monitoring the start timestamp and response timestamp of each transmission operation, thereby realizing real-time monitoring of AXI bus performance; by counting the delay and data volume of multiple transmission operations in a time window, the average delay and average bandwidth are calculated, which is helpful to identify the changing trend of bus performance; under specific conditions (such as delay timeout, bus error, end of time window or performance threshold triggering), the interrupt mechanism can be triggered so that the CPU processor can obtain the statistical results of the current time window in time, which not only helps to respond to bus problems quickly, but also can realize the accurate positioning of problems by latching the information items when deadlock or error occurs; the statistical data (including the delay, bandwidth and information items of each transmission operation) are output to the ATB bus, which is convenient for integration with other systems or tools, and realizes more comprehensive bus state analysis and performance monitoring, and improves the flexibility and scalability of the monitoring system. The present invention can also intuitively display the changing trend and bottleneck of bus performance by forming visualization means such as timeline-based delay and bandwidth bar graphs, which provides strong support for in-depth analysis of system performance and formulation of optimization strategies.

[0047] In addition, the present invention monitors and records bus information in real time. Even in the case of CPU hang, the monitoring module can retain and provide key deadlock command information to help quickly find the root cause; the monitoring module can capture bus errors in real time, which may indicate potential abnormalities or deadlocks in the system, providing first-hand data for problem troubleshooting; the monitoring module allows performance testing to be performed directly on the chip, and reduces dependence on the laboratory environment and improves testing efficiency by real-time tracking and analysis of performance data. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0049] Figure 1 is a schematic diagram of the structure of a monitoring module according to an embodiment of the present invention;

[0050] Figure 2is a schematic diagram of the structure of an on-chip AXI bus monitoring system according to an embodiment of the present invention;

[0051] Figure 3 is a flow chart of an on-chip AXI bus monitoring method according to an embodiment of the present invention;

[0052] Figure 4 is a flow chart of another on-chip AXI bus monitoring method according to an embodiment of the present invention;

[0053] Figure 5 is a schematic diagram of bandwidth and delay statistics timing according to an embodiment of the present invention;

[0054] Figure 6 is a schematic diagram of deadlock monitoring according to an embodiment of the present invention;

[0055] Figure 7 is a schematic diagram of the structure of a Trace bus and a bus error packet format according to an embodiment of the present invention;

[0056] Figure 8 is a structural diagram of a Trace deadlock packet format according to an embodiment of the present invention;

[0057] Fig. 9 is a schematic diagram of the structure of the Trace bandwidth and delay information packet format according to an embodiment of the present invention;

[0058] Fig.10 is a structural block diagram of an on-chip AXI bus monitoring device according to an embodiment of the present invention;

[0059] Fig.11 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0061] It should be noted that some key terms in the present invention are first explained:

[0062] Stuck: refers to a situation where a system, device, or a process cannot continue to execute for some reason and is stuck. In this case, the system or device cannot respond to any operation or command.

[0063] Deadlock: occurs when multiple processes or threads are waiting for each other to release resources, but no process can continue execution.

[0064] CPU: Central Processing Unit, responsible for executing program instructions and processing data.

[0065] IOPS: Input / Output Operations Per Second is an indicator to measure the performance of storage devices, indicating the number of IO operations that a storage device can process per second.

[0066] NoC: Network on Chip is a network architecture used to implement communication between different IP cores in an integrated circuit.

[0067] aw channel: AXI write address channel, used to transmit command information of write operations on the AXI bus.

[0068] ar channel: AXI read command channel (AXI Read Address Channel), used to transmit command information of read operations on the AXI bus.

[0069] r channel: AXI read response channel (AXI Read Data Channel), used to transmit the return data of the read operation on the AXI bus.

[0070] b channel: AXI Write Response Channel, used to transmit the confirmation response of the write operation on the AXI bus.

[0071] CTI: Cross Trigger Interface, a component in the Coresight system, is used to achieve synchronization and communication between different debugging and tracing components.

[0072] ATB: Advanced Trace Bus is a bus used to transmit system trace information.

[0073] Cmd_tim: Command Timing, which refers to the time when a command is sent in the system.

[0074] Resp_tim: Response Timing, which refers to the time when the system receives the command response.

[0075] RMW: Read-Modify-Write is a common data operation mode that reads data first, modifies the data, and then writes it back.

[0076] EMU: Emulator is a piece of hardware or software used to simulate the behavior of other systems or devices for testing or development.

[0077] OCM: On-Chip Memory is a storage resource integrated on the chip, used to store instructions and data.

[0078] GDMA: Global Direct Memory Access is a technology that allows certain hardware devices to directly access memory.

[0079] PER: Peripheral Subsystem is a component in the system used to manage and control external devices (such as sensors, displays, etc.).

[0080] Figure 1 is a schematic diagram of the structure of a monitoring module according to an embodiment of the present invention, the monitoring module is arranged in an on-chip AXI bus monitoring system, such as Figure 1 As shown, the structure of the monitoring module axi_mon includes an axi_mon interface, a monitoring read bus unit, and a monitoring write bus unit;

[0081] The axi_mon interface of the monitoring module is respectively connected to the target AXI bus interface, the CPU processor interface, the target storage device interface and the CTI cross trigger interface;

[0082] The monitoring read bus unit is used to monitor the read bus of the target AXI bus, and the monitoring write bus unit is used to monitor the write bus of the target AXI bus;

[0083] The monitoring module is used to execute an on-chip AXI bus monitoring method in the following embodiment.

[0084] Furthermore, the signals of the axi_mon interface of the monitoring module include AXI bus channel signals, interrupt request signals, software read / write bus signals, ATB Trace signals and trigger signals;

[0085] Furthermore, in this embodiment, the monitoring module axi_mon is a monitor for monitoring the activity of an AXI (Advanced Xtensible Interface) bus, and is used to perform performance analysis, deadlock detection, bandwidth and delay statistics on the AXI bus. Figure 1As shown, the interface signals of the monitoring module axi_mon include S1 to S5.

[0086] Among them, S1 is aw channel: AXI write command channel (AXI Write Address Channel);

[0087] ar channel: AXI read command channel (AXI Read Address Channel);

[0088] r channel: AXI read response channel (AXI Read Data Channel);

[0089] b channel: AXI write response channel (AXI Write Response Channel);

[0090] In order to achieve non-intrusive function, the handshake signals (such as valid) and payload signals (ie, information entries) of the four channels are input into the monitoring module axi_mon, where the command payload information, sending timestamp and response timestamp are recorded for recording and analysis.

[0091] S2 is an interrupt request signal (intr). The interrupt mechanism in this embodiment includes deadlock interrupt, statistical window end interrupt and performance threshold interrupt, corresponding to three scenarios: when a command does not receive a response for a certain period of time, a deadlock interrupt will be triggered to notify the CPU to read the deadlock information;

[0092] The time window for statistical bandwidth and delay ends, triggering the statistical window end interrupt to notify the CPU to read;

[0093] When the average bandwidth is lower than a threshold or the average latency exceeds a threshold, a performance threshold interrupt is triggered, notifying the CPU to read and obtain the scene of performance degradation in the first place.

[0094] S3 is the software read-write bus signal (Sw_rw). The software reads deadlock information, bus error, bandwidth, delay information and the number of transmission commands through the bus, and configures the time window, timeout threshold, bandwidth threshold, average delay threshold and trace filter conditions. The monitoring module axi_mon is connected to the CPU through the intr interface and the Sw_rw interface respectively. When the interrupt mechanism is triggered, the monitoring module axi_mon notifies the CPU to read the relevant information of the statistics through the intr interface, and the CPU reads the relevant information of the statistics through the Sw_rw interface.

[0095] S4 is the ATB Trace signal. The monitoring module axi_mon is connected to the storage device Memory through the ATB Trace interface to output the monitored AXI bus activities (such as commands, data, timestamps, etc.) to the ATB bus (Advanced Trace Bus) in the form of trace data stream. It supports outputting trace data to a variety of storage devices, such as Flash, on-chip RAM, DDR, and SSD disks.

[0096] S5 is the trigger signal. The monitoring module axi_mon is connected to the Coresight system through the trigger interface to receive the trigger signal from the CTI (Cross-Trigger Interface) or other system events of the Coresight system, thereby triggering the monitoring module axi_mon to start recording bandwidth and delay statistics or trace command information.

[0097] For further information, see Figure 1 From S6 to S8, the data structure of the monitoring module axi_mon includes:

[0098] srcid: source identifier, used to distinguish different master devices or channels;

[0099] address: the destination address of the transfer operation;

[0100] burst_len: burst length, indicating the number of transmissions included in the burst transmission;

[0101] burst_size: burst size, which defines the number of bytes of data in each transmission;

[0102] axi_payload signal: includes other information items, such as protection type (AWPROT / ARPROT), storage attributes (AWCACHE / ARCACHE), etc.

[0103] cmd_tim: command timestamp, recording the time when the command was sent;

[0104] Valid signal: used to indicate whether the transmission is valid.

[0105] Furthermore, the depth of the monitoring module axi_mon refers to the number of unfinished transactions it can track simultaneously, that is, the outstanding transaction capability. axi_mon is divided into two independent parts: read monitoring and write monitoring, which monitor the activities of the read bus and the write bus respectively, so as to achieve comprehensive performance evaluation and problem diagnosis of the AXI bus.

[0106] Figure 2is a schematic diagram of the structure of an on-chip AXI bus monitoring system according to an embodiment of the present invention. Figure 2 As shown, the system includes Figure 1 A monitoring module is shown, which is configured to be connected to a CPU processor interface and a GDMAmaster interface, a PCIe AXI interface, a DDR memory and an OCM on-chip memory, and a peripheral channel PER.

[0107] Further, such as Figure 2 As shown in N0 to N5, hanging on the CPU processor interface and GDMA master interface can monitor deadlock and bus error, and then find the root cause of the system;

[0108] Hanging on the PCIe AXI interface can not only monitor deadlock and bus error, but also monitor the link delay and bandwidth, and promptly know whether the link is lagging or failing. It can also obtain the bandwidth usage of other masters or channels accessing PCIe in real time to analyze the root cause of performance bottlenecks;

[0109] Hanging on DDR memory and OCM on-chip memory can monitor latency and bandwidth, obtain the bus utilization of DDR memory and OCM on-chip memory; monitor the bandwidth share of multiple masters accessing DDR memory and OCM on-chip memory, and analyze the root cause of performance bottlenecks.

[0110] By hanging on the peripheral channel, you can monitor deadlock and bus error bus conditions.

[0111] According to an embodiment of the present invention, an embodiment of an on-chip AXI bus monitoring method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0112] In this embodiment, an on-chip AXI bus monitoring method is provided. The method is executed by a monitoring module in an on-chip AXI bus monitoring system. Figure 3 is a flow chart of an on-chip AXI bus monitoring method according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0113] Step S301 , monitoring the start timestamp and response timestamp of each transfer operation of the target AXI bus to obtain the delay of each transfer operation.

[0114] Furthermore, when the AXI bus starts a transmission operation (for example, reading data from a memory or writing data to a peripheral device), the present embodiment records a timestamp of the time point, which marks the start of the operation; when the AXI bus completes the transmission operation and is ready for the next operation, the present embodiment records the timestamp of the time point again, which indicates the end of the operation. By comparing the start timestamp and the response timestamp, the delay of each transmission operation can be calculated. The delay of the transmission operation is one of the key indicators for measuring bus performance and efficiency, and can be used to analyze system performance and identify potential bottlenecks.

[0115] Step S302, by counting the delays and data volumes of multiple transmission operations in a time window, an average delay and an average bandwidth in the time window are obtained.

[0116] Furthermore, in this embodiment, the time window can be a preset time period for collecting and analyzing the performance data or performance status of the AXI bus; the length of the time window can be set according to specific needs. Within the target time window, this embodiment collects the delay and data volume information of all transmission operations within the time window, and calculates the average delay and average bandwidth. The average delay can reflect the average speed of data transmission within the time window, and the average bandwidth represents the amount of data successfully transmitted per unit time.

[0117] Step S303, when the delay of each transmission operation, the average delay, the average bandwidth or the end time of the time window triggers the interrupt mechanism of the target AXI bus, the CPU processor obtains the statistical result of the current time window to obtain the deadlock information, bus error information or performance status of the target AXI bus.

[0118] Furthermore, the trigger conditions may include that the delay of each transmission operation exceeds a preset threshold, the average delay exceeds the average delay threshold, the average bandwidth is lower than the bandwidth threshold, or the end time of the time window is reached; when any of the above conditions is met, the CPU processor will be notified and obtain the statistical results within the current time window. By analyzing these statistical results, it can be determined whether there is a deadlock in the AXI bus (that is, two or more devices are waiting for each other to release resources and cannot continue to operate), bus error information or performance bottlenecks.

[0119] Step S304 , outputting the delay, bandwidth and information item of each transmission operation of the target AXI bus to the ATB bus for bus status analysis.

[0120] Furthermore, the ATB (Advanced Trace Bus) bus in this embodiment is an on-chip bus for tracing and debugging, which can capture and transmit a large amount of system status information. This embodiment outputs the delay, bandwidth and related information items (such as transmission type, target address, etc.) of each transmission operation of the AXI bus to the ATB bus. The ATB (Advanced Trace Bus) bus is a bus for transmitting trace data in the debugging system of the SoC (System on Chip). By outputting the transmission information of the AXI bus to the ATB, the data flow on the bus can be tracked and analyzed.

[0121] In summary, this embodiment can calculate and obtain the delay of each operation in real time by monitoring the start timestamp and response timestamp of each transmission operation, thereby realizing real-time monitoring of AXI bus performance; by counting the delay and data volume of multiple transmission operations within a time window, the average delay and average bandwidth are calculated, which helps to identify the changing trend of bus performance; under specific conditions (such as delay timeout, bus error, end of time window or performance threshold triggering), the interrupt mechanism can be triggered so that the CPU processor can obtain the statistical results of the current time window in time, which not only helps to respond quickly to bus problems, but also can accurately locate the problem by latching the information items when deadlock or error occurs; the statistical data (including the delay, bandwidth and information items of each transmission operation) are output to the ATB bus, which is convenient for integration with other systems or tools, and realizes more comprehensive bus status analysis and performance monitoring, and improves the flexibility and scalability of the monitoring system. This embodiment can also intuitively display the changing trend and bottleneck of bus performance by forming visualization means such as timeline-based delay and bandwidth bar graphs, which provides strong support for in-depth analysis of system performance and formulation of optimization strategies.

[0122] In addition, this embodiment monitors and records bus information in real time. Even if the CPU is hung, the monitoring module can retain and provide key deadlock command information to help quickly find the root cause; the monitoring module can capture bus errors in real time. These errors may indicate potential abnormalities or deadlocks in the system, providing first-hand data for troubleshooting; the monitoring module allows performance testing to be performed directly on the chip, and by real-time tracking and analysis of performance data, it reduces dependence on the laboratory environment and improves testing efficiency.

[0123] In this embodiment, another on-chip AXI bus monitoring method is provided. The method is executed by a monitoring module in an on-chip AXI bus monitoring system. Figure 4 is a flow chart of another on-chip AXI bus monitoring method according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:

[0124] Step S401, obtaining the transfer operation on the target AXI bus, and establishing a corresponding information entry for each transfer operation; the information entry includes valid information extracted from the AXI command channel.

[0125] Furthermore, in the AXI (Advanced eXtensible Interface) bus protocol, a transmission operation indicates the data exchange between a master device (Master) and a slave device (Slave). This embodiment captures and monitors the information of all transmission operations, including the start timestamp, response timestamp and related data, and establishes an information entry (infoentry) for each transmission operation. The information entry includes valid information extracted from the AXI command channel, such as source ID, destination address, etc. That is, this embodiment establishes an info entry for each transmission, including the payload in the AXI command channel such as source ID and destination address. When a deadlock occurs, the first entry corresponding to the deadlock and bus error is latched into the software register. These registers are designed to have no reset terminal, but the software can clear them. After resetting, the transmission information can be read by the software. The above registers can be cleared by software, but will not be automatically reset. After the system is reset, the software can read the transmission information in these registers to help diagnose and solve the problem.

[0126] Step S402 , monitoring the start timestamp and response timestamp of each transfer operation of the target AXI bus to obtain the delay of each transfer operation.

[0127] In an optional implementation, step S402 includes:

[0128] The start timestamp and the response timestamp of each transmission operation are monitored based on the trigger signal, and the delay of each transmission operation is obtained based on the difference between the start timestamp and the response timestamp.

[0129] For further information, see Figure 5 The bandwidth and delay statistics timing diagram shown in Figure 5 As shown in T0, when an aw / ar transmission request is received, the command timestamp is recorded, and when the response of the r / b channel is returned, the recorded command timestamp is subtracted from the response timestamp to obtain the transmission delay of the command. That is, when the AXI bus receives an address write request AW or an address read request AR, this embodiment immediately records the timestamp of the command, and once the read data channel R or the write response channel B returns a response, the response timestamp is immediately recorded, and the command timestamp is subtracted from the response timestamp to obtain the transmission delay cmd_dly of the command.

[0130] Step S403 , obtaining an average delay of the multiple transmission operations by counting delays of the multiple transmission operations within a time window.

[0131] Further, such as Figure 5 As shown, within a time window (such as Figure 5 The average delay is the sum of the delays of multiple transmission operations (as shown in T1 in the figure). If the timeout threshold is exceeded and no response is received (such as Figure 5 cmd5 in the command, it is considered deadlock and the first command information is locked in the register. If there are multiple groups of timed-out commands, they are output through the Trace interface.

[0132] That is, in this embodiment, within a time window (T1), the transmission delays cmd_dly of all commands are added together to obtain the total transmission delay Total_dly, and then divided by the number of transmission commands n to obtain the average delay Ave_dly, and within the same time window, the maximum value Max_dly and the minimum value Min_dly of all command transmission delays are found. If a command such as cmd5 still does not receive a response after the timeout threshold, it is considered that a deadlock has occurred. The first piece of information of such a command is stored in a register, and if there are multiple timed-out commands, it is output through the Trace interface.

[0133] In this embodiment, the total transmission delay Total_dly is obtained by the following formula:

[0134]

[0135] The sum of all cmd_dly (the sum of the delays of transmission operations) is the total transmission delay in this data window, in cycles.

[0136] In this embodiment, the average delay Ave_dly is obtained by the following formula:

[0137] Ave_dly = total_dly / n;

[0138] The total transmission delay divided by the number of transmission commands is the average delay Ave_dly, in cycles.

[0139] In this embodiment, the maximum delay Max_dly in a time window is obtained by the following formula:

[0140] Max_dly=MAX{cmd_dly0,cmd_dly1,cmd_dlyn-1};

[0141] Among them, {cmd_dly0, cmd_dly1, cmd_dlyn-1} represents the delay of each transmission operation in a time window.

[0142] This embodiment uses the following formula to obtain the minimum delay Min_dly within a time window:

[0143] Min_dly=Min{cmd_dly0,cmd_dly1,cmd_dlyn-1}.

[0144] Step S404 , recording the data volume of each transmission operation in the time window, and obtaining the average bandwidth of the multiple transmission operations based on the total data volume in the time window.

[0145] Furthermore, this embodiment calculates the sum of the data volumes of all commands in the time window to obtain the total transmission bandwidth Total_bw, in bytes (B), and divides the total transmission bandwidth by the length of the time window time_win to obtain the average bandwidth Ave_bw, in bytes per cycle B / cycle. If the average bandwidth is lower than the set threshold or the average delay exceeds the threshold, the interrupt mechanism is triggered to notify the CPU to obtain the performance information of the current time window.

[0146] In this embodiment, the total data volume Total_bw in a time window is obtained by the following formula:

[0147]

[0148] The sum of all cmd data volumes is the total transmission bandwidth within this data window, in B.

[0149] In this embodiment, the average bandwidth Ave_bw in a time window is obtained by the following formula:

[0150] Ave_bw = total_bw / time_win;

[0151] The average bandwidth Ave_bw is the total transmission bandwidth divided by the time window, and the unit is B / cycle.

[0152] In this embodiment, when the average bandwidth is lower than the threshold or the average delay exceeds the threshold, the interrupt is triggered to immediately notify the CPU to obtain the bandwidth and delay information of the current time window and suspend new commands, which helps to locate the scene where the bus performance deteriorates and facilitates the subsequent EMU simulation reproduction. At the same time, this embodiment regularly polls (pooling) to collect the bandwidth and delay information in the time window to form a bandwidth and delay bar chart on the time axis to identify the specific moment of the performance problem, thereby effectively analyzing the bus performance.

[0153] Step S405, when the delay of each transmission operation, the average delay, the average bandwidth or the end time of the time window triggers the interrupt mechanism of the target AXI bus, the CPU processor obtains the statistical result of the current time window to obtain the deadlock information, bus error information or performance status of the target AXI bus.

[0154] In an optional implementation, when the interruption mechanism includes a deadlock interruption, step S405 includes:

[0155] When the delay of the transmission operation exceeds the timeout threshold or a bus error is monitored, the target AXI bus is judged to have triggered a deadlock interrupt, and the information entry corresponding to the first transmission operation in which a deadlock or bus error occurs is latched into a register accessible to the software, so that the CPU processor obtains the deadlock information or bus error information of the target AXI bus; the register is set to have no reset terminal, and the software resets the register through a clear operation.

[0156] For further information, see Figure 6 The deadlock monitoring schematic diagram shown in the figure, this embodiment establishes a record data buffer in the monitoring module axi_mon, records the start time and command information of each transmission, and uses the current time ( Figure 6 The difference between d0 (Curt_time) and the start time of each buffer entry is then compared with timeout_th ( Figure 6 If the value is greater than d1, it means timeout. The register without reset terminal will latch the command information and send an interrupt. If there are multiple such timeout commands, ATB trace will be started to output to the on-chip storage space.

[0157] When the patrol times out, if the response of channel b or channel r is incorrect, the command information is locked in the register without reset terminal and an interrupt is issued. If there are many such incorrect responses, ATB trace is started to output to the on-chip storage space.

[0158] That is to say, this embodiment creates a record data buffer Buffer in the monitoring module axi_mon, which is used to store the start time and related command information of each transmission operation on the AXI bus. Whenever the AXI bus initiates a transmission request, the start time and command information of the request are recorded in the Buffer, and the current time of the system (d0) is obtained regularly. For each record in the Buffer, this embodiment uses the current time (d0) minus the recorded start time to obtain the delay of the command, and compares the calculated delay with the preset timeout threshold (timeout_th, d1 in the figure). If the delay of a command exceeds the timeout threshold, it is considered that a timeout has occurred, and the timed-out command information will be latched into a register without a reset end (to retain detailed information of the problem command), and an interrupt signal will be issued to notify the CPU that a timeout event has occurred for further processing.

[0159] If multiple timeout commands are detected, this embodiment starts the ATB (Advanced Trace Bus) tracing function and outputs the timeout command information to the on-chip storage space for subsequent analysis. At the same time, the response status of the B (write response) channel or R (read data) channel of AXI is monitored. If the response indicates an error, the command information is also latched into a register without a reset terminal. For commands with error responses, an interrupt signal is issued to notify the CPU that a bus error event has occurred, and the bus error information is output to the on-chip storage space for subsequent analysis.

[0160] In an optional implementation, the interruption mechanism includes when the statistical window ends interruption; the step S405 includes:

[0161] When the time window ends, it is determined that the target AXI bus triggers a statistical window end interrupt, and the CPU processor obtains the delay information and bandwidth information of the time window to obtain the performance status of the target AXI bus.

[0162] In an optional implementation, when the interruption mechanism includes a performance threshold interruption, step S405 includes:

[0163] When the average delay of the time window exceeds the average delay threshold or the average bandwidth is lower than the bandwidth threshold, it is determined that the target AXI bus triggers a performance threshold interrupt, and the CPU processor obtains the delay information and bandwidth information of the time window to obtain the performance status of the target AXI bus.

[0164] Step S406, through the statistics of multiple time windows, a delay and bandwidth histogram based on the time axis is formed to analyze the overall performance bottleneck of the bus.

[0165] Furthermore, this embodiment periodically collects bandwidth and delay information within a time window to form a bandwidth and delay bar graph based on a time axis to identify specific moments of performance degradation, thereby facilitating subsequent simulation reproduction and optimization.

[0166] Step S407: Output the delay, bandwidth and information items of each transmission operation to the ATB bus in a packaged manner and cache them in the target storage device for bus status analysis.

[0167] Furthermore, the trace trigger conditions are a series of rules used to determine the time to start tracing and recording system behavior. The trace trigger conditions of the ATB bus include:

[0168] Specify IO command execution: When an input / output (IO) device in the system executes a command, a trace may be triggered to monitor the timing and performance of the IO operation.

[0169] Interrupt event: The CPU receives an interrupt indicating an increase in latency or a decrease in bandwidth. If the CPU receives an interrupt, it indicates that this embodiment detects an increase in transmission latency or a decrease in bandwidth, which may indicate a performance bottleneck or potential problem and requires further Trace analysis.

[0170] Deadlock or bus error: Interrupts caused by deadlock timeout or bus error. When deadlock timeout and bus error BusError occur, it means that an operation waits for a response for more than the scheduled time. These interrupts trigger Trace to record the system status before and after the problem occurs.

[0171] Coresight event: When a specific event occurs in the Coresight system, Coresight is a system-level debugging and tracing solution provided by ARM. Specific events in the Coresight system (such as triggering a counter reaching a threshold) can trigger Trace.

[0172] FIFO back pressure or bus back pressure: When FIFO (first-in-first-out queue) back pressure occurs, that is, the FIFO is full and no new data can be written, it may indicate a problem with data flow, triggering Trace to analyze the cause. Bus back pressure occurs when the data transmission rate on the bus exceeds the system's processing capacity, which may cause data loss or delay, triggering Trace to monitor the bus status.

[0173] FIFO becomes empty: The command FIFO becomes empty for a long time. If the command FIFO remains empty for a certain period of time, it may indicate that there is a command scheduling problem or idle resources in the system. Trigger Trace to check whether the system works as expected.

[0174] That is, when the trace trigger condition occurs, the present embodiment outputs the delay, bandwidth and information entry of each transmission operation to the ATB bus in a packaged manner and caches them in the target storage device for bus status analysis. The trace trigger condition includes the execution of a specified IO command, deadlock or bus error, Coresight event, FIFO back pressure or bus back pressure, and FIFO emptying.

[0175] Furthermore, after obtaining the deadlock information or performance bottleneck, in order to further find the root cause, this embodiment can specifically track and record a certain type of command on the bus to an external storage device for further analysis. Each filter condition in the filter condition table can have multiple groups, and each group of filter conditions is turned on or off by a mask. As long as the transmission payload meets the trigger condition, it is tracked and recorded. This embodiment defines the data type that needs to be captured and recorded by the transmission operation through the filter condition table. The filter condition table is shown in Table 1:

[0176] Table 1

[0177]

[0178]

[0179] Furthermore, this embodiment outputs the delay, bandwidth and information items of each transmission operation to the ATB bus in a packaged manner based on the Trace packet format, and caches them in the target storage device for bus status analysis.

[0180] The Trace packet format includes a Trace bus packet format, a Trace deadlock packet format, and a Trace bandwidth and delay information packet format;

[0181] The trace bus packet format is used to record activity information on the bus. Figure 7 The schematic diagram of the structure of the Trace bus and bus error packet format is shown, and the packet format includes the following fields:

[0182] Packet_head: used to identify the type of packet, distinguishing between Trace bus, deadlock, Bus Error or other types of packets.

[0183] AXI_srcid: Indicates the source identifier of the AXI bus transaction.

[0184] burst_len: indicates the length of the Burst transmission, that is, the number of data beats transmitted.

[0185] burst_size: indicates the data width of each beat in Burst transmission.

[0186] addr: The destination address of the transfer operation.

[0187] cmd_tim: command timestamp, used to record the time when the command was issued.

[0188] resp_tim: Response timestamp, used to record the arrival time of the response.

[0189] Other payload information: may include other useful information, such as transmitted data content, control signals, etc.

[0190] Figure 7 The Packet_head encoding in is used to distinguish the packet format of the Trace bus, deadlock, bus error, or bandwidth and delay.

[0191] See also Figure 8 The schematic diagram of the structure of the Trace deadlock packet format is shown. The packet format is the same as the Trace bus packet format, but because no response is returned in the deadlock situation, the resp_tim field is missing.

[0192] See also Fig. 9 The schematic diagram of the structure of the Trace bandwidth and delay information packet format is shown. The packet format is used to indicate performance statistics and provide data for system performance analysis. It may not contain specific AXI transmission details. The packet format includes the following fields:

[0193] Total delay: The sum of all transmission operation delays within a time window.

[0194] Total bandwidth: The total amount of data transmitted in a time window.

[0195] Minimum delay: The minimum transmission delay recorded in this time window.

[0196] Maximum delay: The maximum transmission delay recorded in this time window.

[0197] Number of commands: The total number of transfer operations within the time window.

[0198] In summary, this embodiment can calculate and obtain the delay of each operation in real time by monitoring the start timestamp and response timestamp of each transmission operation, thereby realizing real-time monitoring of AXI bus performance; by counting the delay and data volume of multiple transmission operations within a time window, the average delay and average bandwidth are calculated, which helps to identify the changing trend of bus performance; under specific conditions (such as delay timeout, bus error, end of time window or performance threshold triggering), the interrupt mechanism can be triggered so that the CPU processor can obtain the statistical results of the current time window in time, which not only helps to respond quickly to bus problems, but also can accurately locate the problem by latching the information items when deadlock or error occurs; the statistical data (including the delay, bandwidth and information items of each transmission operation) are output to the ATB bus, which is convenient for integration with other systems or tools, and realizes more comprehensive bus status analysis and performance monitoring, and improves the flexibility and scalability of the monitoring system. This embodiment can also intuitively display the changing trend and bottleneck of bus performance by forming visualization means such as timeline-based delay and bandwidth bar graphs, which provides strong support for in-depth analysis of system performance and formulation of optimization strategies.

[0199] In addition, this embodiment monitors and records bus information in real time. Even if the CPU is hung, the monitoring module can retain and provide key deadlock command information to help quickly find the root cause; the monitoring module can capture bus errors in real time. These errors may indicate potential abnormalities or deadlocks in the system, providing first-hand data for troubleshooting; the monitoring module allows performance testing to be performed directly on the chip, and by real-time tracking and analysis of performance data, it reduces dependence on the laboratory environment and improves testing efficiency.

[0200] In this embodiment, an on-chip AXI bus monitoring device is also provided, which is executed by a monitoring module in an on-chip AXI bus monitoring system. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0201] This embodiment provides an on-chip AXI bus monitoring device, such as Fig.10 As shown, including:

[0202] The delay calculation unit 1010 is used to monitor the start timestamp and response timestamp of each transmission operation of the target AXI bus to obtain the delay of each transmission operation;

[0203] The average delay and bandwidth calculation unit 1020 is used to obtain the average delay and average bandwidth in a time window by counting the delays and data volumes of multiple transmission operations in the time window;

[0204] The deadlock and performance monitoring unit 1030 is used to enable the CPU processor to obtain the statistical result of the current time window when the delay of each transmission operation, the average delay, the average bandwidth or the end time of the time window triggers the interrupt mechanism of the target AXI bus, so as to obtain the deadlock information or performance status of the target AXI bus;

[0205] The statistical result output unit 1040 is used to output the delay, bandwidth and information items of each transmission operation of the target AXI bus to the ATB bus for bus status analysis.

[0206] In some optional embodiments, the device is further used for:

[0207] Acquire the transfer operation on the target AXI bus, and establish a corresponding information entry for each transfer operation; the information entry includes valid information extracted from the AXI command channel.

[0208] In some optional implementations, the delay calculation unit 1010 is further configured to:

[0209] The start timestamp and the response timestamp of each transmission operation are monitored based on the trigger signal, and the delay of each transmission operation is obtained based on the difference between the start timestamp and the response timestamp.

[0210] In some optional implementations, the average delay and bandwidth calculation unit 1020 is further configured to:

[0211] By counting the delays of multiple transmission operations within a time window, an average delay of the multiple transmission operations is obtained;

[0212] The data volume of each transmission operation in the time window is recorded, and based on the total data volume in the time window, the average bandwidth of the multiple transmission operations is obtained.

[0213] In some optional implementations, when the interruption mechanism includes a deadlock interruption, the deadlock and performance monitoring unit 1030 is further configured to:

[0214] When the delay of the transmission operation exceeds the timeout threshold or a bus error is monitored, the target AXI bus is judged to have triggered a deadlock interrupt, and the information entry corresponding to the first transmission operation in which a deadlock or bus error occurs is latched into a register accessible to the software, so that the CPU processor obtains the deadlock information or bus error information of the target AXI bus; the register is set to have no reset terminal, and the software resets the register through a clear operation.

[0215] In some optional implementations, when the interruption mechanism includes the statistical window ending interruption, the deadlock and performance monitoring unit 1030 is further used to:

[0216] When the time window ends, it is determined that the target AXI bus triggers a statistical window end interrupt, and the CPU processor obtains the delay information and bandwidth information of the time window to obtain the performance status of the target AXI bus.

[0217] In some optional implementations, when the interruption mechanism includes a performance threshold interruption, the deadlock and performance monitoring unit 1030 is further used to:

[0218] When the average delay of the time window exceeds the average delay threshold or the average bandwidth is lower than the bandwidth threshold, it is determined that the target AXI bus triggers a performance threshold interrupt, and the CPU processor obtains the delay information and bandwidth information of the time window to obtain the performance status of the target AXI bus.

[0219] In some optional implementations, the statistical result output unit 1040 is further used to:

[0220] The latency, bandwidth, and information entries of each transfer operation are output to the ATB bus in a packaged manner and cached in the target storage device for bus status analysis.

[0221] In some optional embodiments, the device is further used for:

[0222] Through statistics of multiple time windows, a time-axis-based delay and bandwidth histogram is formed to analyze the overall performance bottleneck of the bus.

[0223] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0224] In summary, this embodiment can calculate and obtain the delay of each operation in real time by monitoring the start timestamp and response timestamp of each transmission operation, thereby realizing real-time monitoring of AXI bus performance; by counting the delay and data volume of multiple transmission operations within a time window, the average delay and average bandwidth are calculated, which helps to identify the changing trend of bus performance; under specific conditions (such as delay timeout, bus error, end of time window or performance threshold triggering), the interrupt mechanism can be triggered so that the CPU processor can obtain the statistical results of the current time window in time, which not only helps to respond quickly to bus problems, but also can accurately locate the problem by latching the information items when deadlock or error occurs; the statistical data (including the delay, bandwidth and information items of each transmission operation) are output to the ATB bus, which is convenient for integration with other systems or tools, and realizes more comprehensive bus status analysis and performance monitoring, and improves the flexibility and scalability of the monitoring system. This embodiment can also intuitively display the changing trend and bottleneck of bus performance by forming visualization means such as timeline-based delay and bandwidth bar graphs, which provides strong support for in-depth analysis of system performance and formulation of optimization strategies.

[0225] In addition, this embodiment monitors and records bus information in real time. Even if the CPU is hung, the monitoring module can retain and provide key deadlock command information to help quickly find the root cause; the monitoring module can capture bus errors in real time. These errors may indicate potential abnormalities or deadlocks in the system, providing first-hand data for troubleshooting; the monitoring module allows performance testing to be performed directly on the chip, and by real-time tracking and analysis of performance data, it reduces dependence on the laboratory environment and improves testing efficiency.

[0226] The embodiment of the present invention also provides a computer device, see Fig.11 , Fig.11 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig.11 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.11A processor 10 is taken as an example.

[0227] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0228] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0229] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0230] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0231] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0232] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0233] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0234] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the defined scope.

Claims

1. An on-chip AXI bus monitoring method, It is characterized in that The method is performed by a monitoring module in an on-chip AXI bus monitoring system, and the method includes: Monitor the start timestamp and response timestamp of each transfer operation of the target AXI bus to obtain the delay of each transfer operation; By counting the delays and data volumes of multiple transmission operations within a time window, an average delay and an average bandwidth within the time window are obtained; When the delay of each transmission operation, the average delay, the average bandwidth or the end time of the time window triggers the interrupt mechanism of the target AXI bus, the CPU processor obtains the statistical result of the current time window to obtain the deadlock information, bus error information or performance status of the target AXI bus; The delay, bandwidth and information entry of each transfer operation of the target AXI bus are output to the ATB bus for bus status analysis.

2. The method according to claim 1, It is characterized in that Before monitoring the start timestamp and response timestamp of each transfer operation of the target AXI bus to obtain the delay of each transfer operation, the method further includes: Acquire the transfer operation on the target AXI bus, and establish corresponding information entries for each transfer operation; the information entries include valid information extracted from the AXI command channel.

3. The method according to claim 1, It is characterized in that The monitoring of the start timestamp and the response timestamp of each transmission operation of the target AXI bus to obtain the delay of each transmission operation includes: The start timestamp and the response timestamp of each transmission operation are monitored based on the trigger signal, and the delay of each transmission operation is obtained based on the difference between the start timestamp and the response timestamp.

4. The method according to claim 1, It is characterized in that The step of obtaining the average delay and average bandwidth in a time window by counting the delays and data volumes of multiple transmission operations in the time window includes: By counting the delays of multiple transmission operations within a time window, an average delay of the multiple transmission operations is obtained; The data volume of each transmission operation in the time window is recorded, and based on the total data volume in the time window, an average bandwidth of the multiple transmission operations is obtained.

5. The method according to claim 2, It is characterized in that The interrupt mechanism includes a deadlock or error interrupt; when the interrupt mechanism of the target AXI bus is triggered by the end of each transmission operation, the average delay, the average bandwidth or the end time of the time window, the CPU processor obtains the statistical results of the current time window to obtain the deadlock information, bus error information or performance status of the target AXI bus, including: When the delay of the transmission operation exceeds the timeout threshold or a bus error is monitored, it is determined that the target AXI bus triggers a deadlock interrupt, and the information entry corresponding to the first transmission operation in which a deadlock or bus error occurs is latched into a register accessible to the software, so that the CPU processor obtains the deadlock information or bus error information of the target AXI bus; the register is set to have no reset terminal, and the software resets the register through a clear operation.

6. The method according to claim 2, It is characterized in that The interrupt mechanism includes an interrupt at the end of a statistical window; when the delay of each transmission operation, the average delay, the average bandwidth or the end time of the time window triggers the interrupt mechanism of the target AXI bus, the CPU processor obtains the statistical results of the current time window to obtain the deadlock information, bus error information or performance status of the target AXI bus, including: When the time window ends, it is determined that the target AXI bus triggers a statistical window end interrupt, and the CPU processor obtains the delay information and bandwidth information of the time window to obtain the performance status of the target AXI bus.

7. The method according to claim 2, It is characterized in that The interrupt mechanism includes a performance threshold interrupt; when the delay of each transmission operation, the average delay, the average bandwidth or the end time of the time window triggers the interrupt mechanism of the target AXI bus, the CPU processor obtains the statistical results of the current time window to obtain the deadlock information, bus error information or performance status of the target AXI bus, including: When the average delay in the time window exceeds the average delay threshold or the average bandwidth is lower than the bandwidth threshold, it is determined that the target AXI bus triggers a performance threshold interrupt, and the CPU processor obtains the delay information and bandwidth information of the time window to obtain the performance status of the target AXI bus.

8. The method according to claim 1, It is characterized in that Outputting the delay, bandwidth and information items of each transfer operation of the target AXI bus to the ATB bus for bus status analysis includes: The latency, bandwidth, and information entries of each transfer operation are output to the ATB bus in a packaged manner and cached in the target storage device for bus status analysis.

9. The method according to any one of claims 1 to 8, It is characterized in that The method further comprises: Through statistics of multiple time windows, a time-axis-based delay and bandwidth histogram is formed to analyze the overall performance bottleneck of the bus.

10. A monitoring module, It is characterized in that The monitoring module is arranged in an on-chip AXI bus monitoring system, and the structure of the monitoring module includes an axi_mon interface, a monitoring read bus unit and a monitoring write bus unit; The axi_mon interface of the monitoring module is respectively connected to the target AXI bus interface, the CPU processor interface, the target storage device interface and the CTI cross trigger interface; The monitoring read bus unit is used to monitor the read bus of the target AXI bus, and the monitoring write bus unit is used to monitor the write bus of the target AXI bus; The monitoring module is used to execute an on-chip AXI bus monitoring method according to any one of claims 1 to 9.

11. An on-chip AXI bus monitoring system, It is characterized in that The system comprises a monitoring module as claimed in claim 10, wherein the monitoring module is configured to be connected to a CPU processor interface and a GDMA master interface, a PCIe AXI interface, a DDR memory and an OCM on-chip memory, and a peripheral channel.

12. A computer device, It is characterized in that include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes an on-chip AXI bus monitoring method according to any one of claims 1 to 9 by executing the computer instructions.

13. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute an on-chip AXI bus monitoring method according to any one of claims 1 to 9.

14. A computer program product, It is characterized in that The method comprises computer instructions, wherein the computer instructions are used to enable a computer to execute an on-chip AXI bus monitoring method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Realization method of real-time operating system of component-based hardware

    CN103440171A

  • Method and device for detecting bus behavior of system on chip

    CN106708671A

  • Deadlock judgment method and device

    CN110196826A

  • Verification method and platform for abnormity detection circuit for AXI bus transmission

    CN116820866A

  • AXI bus real-time performance monitoring method for verification after silicon

    CN116932333A

Cited By

  • Bus timeout monitoring method, device and system based on AXI protocol

    CN119473801A

  • AXI Protocol-Based Bus Timeout Monitoring Method, Device and System

    CN119473801B

  • Embedded multimedia memory card test method and system, equipment and storage medium

    CN119905136A

  • AXI bus data processing method, AXI bus maintenance and measurement unit and AXI bus maintenance and measurement system

    CN121051055A

  • AXI bus data processing methods, AXI bus maintenance and testing units and systems

    CN121051055B