Tracking information sampling device and method and related equipment
By designing a tracking information sampling device that dynamically adjusts the sampling frequency in the Trace Bus system, the problem that the fixed sampling rate cannot be adapted to different load conditions is solved, and efficient tracking information collection under different load conditions is achieved.
Patent Information
- Application Number
- CN202510586646.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2045-05-08
AI Technical Summary
The existing Trace Bus system uses a fixed sampling rate and cannot adapt to different high and low loads of the chip, resulting in missing critical events at high loads, resulting in data redundancy and bandwidth waste at low loads.
A tracking information sampling device is designed, including a sampling module and a cache module. The sampling module is composed of a counter and a filter. The counter dynamically adjusts the counting cycle according to the load of the chip system, thereby changing the sampling frequency of the filter and adapting to different load conditions.
By dynamically adjusting the sampling frequency, the missed tracking information at high loads is avoided, data redundancy and bandwidth waste are reduced at low loads, and sampling efficiency and accuracy are improved.
Smart Images

Figure CN120104430A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of chips, and in particular to a tracking information sampling device, method and related equipment. Background Art
[0002] During chip debugging and operation, the trace information generated by each unit on the chip (such as computing unit, storage unit, etc.) can be collected, and the operation status of each unit can be determined based on the trace information of each unit. At present, the trace bus system is often used to collect the trace information of each unit. However, the current trace bus system often uses a fixed sampling rate. When the chip is running under high load, the fixed low sampling rate may cause the omission of key events; and when the chip is running under low load, the fixed high sampling rate may cause unnecessary data redundancy and bandwidth waste. Summary of the invention
[0003] The main purpose of this application is to propose a trace information sampling device, method and related equipment, aiming to solve the problem that the Trace Bus system in the prior art adopts a fixed sampling rate and cannot adapt to different high and low loads of the chip.
[0004] To achieve the above-mentioned purpose, the present application proposes a tracking information sampling device, which is applied to a chip system. The tracking information sampling device comprises: a sampling module and a cache module. The input end of the sampling module is used to connect to the output end of the tracking information output module, the input end of the cache module is used to connect to the output end of the sampling module, and the output end of the cache module is used to connect to the input end of the analysis module. The sampling module includes a counter and a filter, wherein the counter is used to send a sampling signal to the filter according to a preset counting cycle; The filter is used for sampling the tracking information output by the tracking information output module in response to receiving the sampling signal, and outputting the sampled tracking information to the cache module; The cache module is used to receive and cache the tracking information output by the sampling module; and output the cached tracking information to the analysis module for use by the analysis module.
[0005] In an embodiment of the present application, the counter is configured to: when the chip system load increases, reduce the preset counting period; When the chip system load decreases, the preset counting period is increased.
[0006] In the embodiment of the present application, the tracking information output module has multiple, and the cache module includes multiple first-level cache units, as well as a first polling arbitrator, a second-level cache unit, and a second polling arbitrator; each of the first-level cache units corresponds to each of the tracking information output modules one by one, and the input end of each of the first-level cache units is connected to the output end of the sampling module, and the output end of each of the first-level cache units is connected to the input end of the first polling arbitrator, and the output end of the first polling arbitrator is connected to the input end of the second-level cache unit, and the output end of the second-level cache unit is connected to the input end of the analysis module; The sampling module is also used to output the tracking information sampled from each tracking information output module to the first-level cache unit corresponding to each tracking information output module; The first polling arbitrator is used to receive tracking information from each first-level cache unit according to a first preset rule and output it to the second-level cache unit; The second polling arbitrator is used for receiving the tracking information output by the secondary cache unit and the debugging information of the debugging information cache unit according to a second preset rule, and outputting them to the analysis module.
[0007] In the embodiment of the present application, the first-level cache unit and the second-level cache unit are both configured as follows: In response to receiving a first back pressure signal sent by the analysis module when the load reaches a first preset load, determining the remaining cache space of the analysis module, and stopping receiving tracking information if the remaining cache space is less than a first preset value; In response to receiving a second back pressure signal sent by the analysis module when the load is reduced to a second preset load, starting to receive tracking information.
[0008] In the embodiment of the present application, the tracing information generated by the tracing information output module includes at least one of instruction tracing information, data tracing information and event tracing information.
[0009] In an embodiment of the present application, the counter is connected to a control register bus of the chip system, and the preset counting period can be adjusted based on the control register bus.
[0010] The present application also proposes a tracking information sampling method, which is applied to any of the tracking information sampling devices described above. The tracking information sampling method includes: receiving a sampling signal sent by a counter according to a preset counting cycle; Sampling the tracking information output by the tracking information output module; The sampled tracking information is sent to the cache module for use by the analysis module.
[0011] In an embodiment of the present application, the tracking information sampling method further includes: when the chip system load increases, reducing the preset counting period; When the chip system load decreases, the preset counting period is increased.
[0012] In the embodiment of the present application, the step of outputting the sampled tracking information to the cache module for use by the analysis module includes: Sending the sampled tracking information to a first-level cache unit corresponding to a tracking information output module of the tracking information source; receiving tracking information from each first-level cache unit according to a first preset rule and outputting it to a second-level cache unit; The tracking information output by the secondary cache unit is received according to a second preset rule, and is output to the analysis module for use by the analysis module.
[0013] In an embodiment of the present application, the tracking information sampling method further includes: When the first-level cache unit and / or the second-level cache unit receives the first back pressure signal sent by the analysis module when the load reaches the first preset load, the first-level cache unit and / or the second-level cache unit determines the remaining cache space thereof, and stops receiving the tracking information if the remaining cache space is less than the first preset value; When the first-level cache unit and / or the second-level cache unit receives the second back pressure signal sent by the analysis module when the load is reduced to a second preset load, it starts receiving tracking information.
[0014] In an embodiment of the present application, the tracing information includes at least one of instruction tracing information, data tracing information and event tracing information.
[0015] In an embodiment of the present application, the tracking information sampling method further includes: adjusting the counting period of the counter based on the load of the chip system and the control register bus of the chip system.
[0016] The embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, any of the above-mentioned tracking information sampling methods is implemented.
[0017] An embodiment of the present application further provides a chip, comprising any of the tracking information sampling devices described above.
[0018] In an embodiment of the present application, a counter and a filter are set, and the counter sends a sampling signal to the filter once after each counting cycle, and the filter samples the tracking information of each tracking information output module once each time it receives the sampling signal. Therefore, the counting cycle of the counter can be set according to the load of the chip system. When the load is high, the counting cycle can be reduced and the sampling frequency of the filter can be increased to avoid missing the tracking information of each tracking information output module. When the load of the chip system is low, the counting cycle of the counter can be increased and the sampling frequency of the filter can be reduced to avoid sampling data redundancy and bandwidth waste. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.
[0020] Figure 1 It is a module diagram of a tracking information sampling device in one embodiment of the present application; Figure 2 is a structural diagram of a sampling module in an embodiment of the present application; Figure 3 A step diagram of a tracking information sampling method in an embodiment of the present application; Figure 4 This is a module diagram of a computer-readable storage medium in one embodiment of the present application.
[0021] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0022] The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present application, and are not intended to limit the scope of the present application in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0023] Those skilled in the art know that the embodiments of the present application can be implemented as a system, device, method or computer program product. Therefore, the present disclosure can be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0024] According to the implementation of the present application, a tracking information sampling device, method and related equipment are proposed.
[0025] It should be understood herein that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction rather than having any limiting meaning.
[0026] The principles and spirit of the present application are explained in detail below with reference to several representative implementations of the present application.
[0027] Exemplary Devices like Figure 1 , Figure 2 As shown, the embodiment of the present application proposes a tracking information sampling device, which is applied to a chip system. The tracking information sampling device includes: a sampling module and a cache module. The input end of the sampling module is used to connect to the output end of the tracking information output module, the input end of the cache module is connected to the output end of the sampling module, and the output end of the cache module is used to connect to the input end of the analysis module; The sampling module includes a counter and a filter, wherein the counter is used to send a sampling signal to the filter according to a preset counting cycle; The filter is used for sampling the tracking information output by the tracking information output module in response to receiving the sampling signal, and outputting the sampled tracking information to the cache module; The cache module is used to receive and cache the tracking information output by the sampling module; and output the cached tracking information to the analysis module for use by the analysis module.
[0028] Among them, in the embodiments of the present application, the tracking information sampling device can be integrated into the chip system, for example, it can be applicable to scenarios such as real-time data collection, performance analysis and system monitoring in the chip's embedded system.
[0029] In the embodiment of the present application, the tracking information output module can be a module or unit in the chip system that can output tracking information, such as a processor core, a memory management unit, a bus interface, a cache unit, a peripheral controller, a debugging unit, a performance monitoring unit, a network communication unit, a power management unit, a graphics processing unit, and a security module. Each tracking information output module can generate corresponding tracking information, such as instruction tracking information, data tracking information, event tracking information, etc.
[0030] The chip system has an analysis module, which can analyze, record, and debug the operating status of each tracking information output module based on the tracking information generated by each tracking information output module. For example, the analysis module can be an On-Chip Logic Analysis in the chip system. The logic analyzer can add a time stamp to the received tracking information through a timestamp to facilitate the analysis of the sequence and time relationship of events, as well as monitor and record signal changes within the chip system, to help users diagnose and debug hardware and software related problems.
[0031] Each tracing information output module in the chip system will generate a large amount of tracing information during operation. The Trace Bus system in the prior art samples the tracing information generated by each tracing information output module at a fixed sampling frequency. If a high sampling frequency is always maintained, then when the load of the chip system is low, the high sampling frequency may cause unnecessary data redundancy and bandwidth waste. If a low sampling frequency is always maintained, then when the load of the chip system is high, it is easy to cause omission of key events of each tracing information output module.
[0032] Based on this, an embodiment of the present application proposes a tracking information sampling device, which adapts to high load and low load conditions of the chip system by changing the sampling frequency of the tracking information.
[0033] like Figure 1 As shown, in an embodiment of the present application, the sampling module includes a counter and a filter, wherein the counter can count according to the clock cycle, and the counter counts by 1 after each clock cycle. The counter can set a preset counting cycle value, such as the preset counting cycle is t. When the counter counts to t, a sampling signal is sent to the filter, and the sampling signal can be a voltage electrical signal. When the filter receives the sampling signal sent by the counter, it can sample the tracking information generated by each tracking information output module.
[0034] It should be noted that the number of tracking information output modules can be one or more, such as Figure 1As shown, the embodiment of the present application includes tracking information output modules 1-n, and the output ends of the tracking information output modules 1-n are all communicatively connected to the input ends of the filter. The tracking information generated by the tracking information output modules 1-n are all sent to the filter. However, the filter only samples the tracking information sent by each tracking information output module once after receiving the sampling signal, and all the tracking information before receiving the sampling signal is filtered out. For example, the counting period of the counter is t, starting from the 1st clock cycle, at the tth clock cycle, the counter sends a sampling signal to the sampling module, and the filter filters out all the tracking information received from each tracking information output module within the 1st-tth clock cycle, and samples the tracking information sent by each tracking information output module at the t+1th clock cycle.
[0035] In an embodiment of the present application, the tracking information sampled by the filter from each tracking information output module can be sent to the cache module for caching so as to be called by a subsequent analysis module.
[0036] In an embodiment of the present application, a counter and a filter are set, the counter is set to send a sampling signal to the filter once after each counting cycle, and the filter is set to sample the tracking information of each tracking information output module once each time a sampling signal is received. Therefore, the counting cycle of the counter can be set according to the load of the chip system. When the load is high, the counting cycle can be reduced and the sampling frequency of the filter can be increased to avoid missing the tracking information of each tracking information output module. When the load of the chip system is low, the counting cycle of the counter can be increased and the sampling frequency of the filter can be reduced to avoid sampling data redundancy and bandwidth waste.
[0037] In an embodiment of the present application, the counter is configured to: when the chip system load increases, reduce the preset counting period; when the chip system load decreases, increase the preset counting period.
[0038] In an embodiment of the present application, the preset counting period of the counter is adjusted according to the load of the chip system, thereby changing the sampling frequency of the filter to match the different loads of the chip system.
[0039] Continue to refer to Figure 1In the embodiment of the present application, the tracking information output module has multiple, the cache module includes multiple first-level cache units, and a first polling arbitrator, a second-level cache unit, and a second polling arbitrator; the input end of each of the first-level cache units is connected to the output end of the sampling module, each of the first-level cache units corresponds to each of the tracking information output modules one by one, the output end of each of the first-level cache units is connected to the input end of the first polling arbitrator, the output end of the first polling arbitrator is connected to the input end of the second-level cache unit, and the output end of the second-level cache unit is connected to the input end of the analysis module; The sampling module is also used to output the tracking information sampled from each tracking information output module to the first-level cache unit corresponding to each tracking information output module; The first polling arbitrator is used to receive tracking information from each first-level cache unit according to a first preset rule and output it to the second-level cache unit; The second polling arbitrator is used for receiving the tracking information output by the secondary cache unit and the debugging information of the debugging information cache unit according to a second preset rule, and outputting them to the analysis module.
[0040] There are multiple tracking information output modules. In order to distinguish the tracking information of each tracking information output module, in the embodiment of the present application, multiple first-level cache units can be set in the cache module, and each first-level cache unit corresponds to each tracking information output module. Figure 1 As shown, the first-level cache units 1-n correspond to the tracking information output modules 1-n one by one, and are respectively used to cache the tracking information of the tracking information output modules 1-n. In addition, in the embodiment of the present application, each first-level cache unit can be a data cache element using a first-in first-out queue (First Input First Output, FIFO) mechanism. Continue to refer to Figure 1, the output end of each first-level cache unit is connected to the input end of the first polling arbitrator, and the first polling arbitrator can configure the weight of receiving tracking information from each first-level cache unit, that is, the first preset rule. Among them, the weight of receiving tracking information from each first-level cache unit can be the same or different. When the weight of receiving tracking information from each first-level cache unit is the same, the tracking information can be received alternately from each first-level cache unit in the order of each first-level cache unit; when the weight of receiving tracking information from each first-level cache unit is different, the tracking information can be received from each first-level cache unit according to the weight of each first-level cache unit, that is, the first-level cache unit with a larger weight receives more tracking information from it, and the first-level cache unit with a smaller weight receives less tracking information from it. The specific weight of receiving tracking information from each first-level cache unit can be set based on the actual situation of the chip system, and the embodiment of the present application does not limit it.
[0041] Continue to refer to Figure 1 In the embodiment of the present application, the first polling arbitrator receives the tracing information from each first-level cache unit and sends it to the second-level cache unit for caching. The second-level cache unit can also be a data cache element using a first-in first-out queue (FIFO) mechanism. In addition, in the embodiment of the present application, a debug information cache unit is also provided in the chip system, which is used to specifically receive and cache debug information. The output ends of the debug information cache unit and the second-level cache unit are both connected to the input end of the second polling arbitrator. The second polling arbitrator can be configured with the weight of receiving debug information from the debug information cache unit and receiving tracing information from the second-level cache unit, that is, the second preset rule. Among them, the weight of receiving debug information from the debug information cache unit and the weight of receiving tracing information from the second-level cache unit can be the same or different; if they are the same, they can be received alternately from the second-level cache unit and the adjustment information cache unit. If they are different, they are received based on their respective weights, that is, more tracing information is received from the one with a larger weight, and less tracing information is received from the one with a smaller weight.
[0042] The tracing information received by the second polling arbitrator from the secondary cache unit, or the debugging information received from the debugging information cache unit, may be sent to the analysis module for analysis and calling.
[0043] The embodiment of the present application can increase the ability of sampling tracking information to a certain extent by setting a first-level cache unit and a second-level cache unit, thereby avoiding omission of key tracking information, and setting a filter can avoid redundancy of tracking information.
[0044] In the embodiment of the present application, the first-level cache unit and the second-level cache unit are both configured as follows: In response to receiving a first back pressure signal sent by the analysis module when the load reaches a first preset load, determining the remaining cache space of the analysis module, and stopping receiving tracking information if the remaining cache space is less than a first preset value; In response to receiving a second back pressure signal sent by the analysis module when the load is reduced to a second preset load, starting to receive tracking information.
[0045] In the embodiment of the present application, the analysis module is provided with a first preset load. When the load reaches the first preset load, it means that the current load of the analysis module is high and it is no longer possible to continue to receive new tracking information for analysis. At this time, the analysis module can send a first back pressure signal to the first-level cache unit and the second-level cache unit respectively. When the first-level cache unit and the second-level cache unit receive the first back pressure signal, they can determine whether to continue to receive tracking information based on their respective remaining cache space. For example, both the first-level cache unit and the second-level cache unit make a determination according to the first preset value. If the remaining cache space is greater than the first preset value, tracking information can continue to be received until the remaining cache space is less than or equal to the first preset value; if the remaining cache space is less than or equal to the first preset value, tracking information is stopped from being received.
[0046] As the analysis module processes, the load will gradually decrease. When the load is reduced to a second preset load, a second back pressure signal can be sent to the first-level cache unit and the second-level cache unit. When the first-level cache unit and the second-level cache unit receive the second back pressure signal, they can continue to receive tracking information.
[0047] like Figure 1 , Figure 2 As shown, in the embodiment of the present application, the counter in the sampling module can be connected to the control register bus of the chip system, and the preset counting period can be adjusted based on the control register bus. The counter is connected to the chip control register bus of the chip system for communication, and the counting period of the counter can be adjusted through the chip control register control bus, so as to facilitate the adjustment of the sampling frequency of the filter at any time.
[0048] In an embodiment of the present application, a counter and a filter are set, and the counter sends a sampling signal to the filter once after each counting cycle, and the filter samples the tracking information of each tracking information output module once each time it receives the sampling signal. Therefore, the counting cycle of the counter can be set according to the load of the chip system. When the load is high, the counting cycle can be reduced and the sampling frequency of the filter can be increased to avoid missing the tracking information of each tracking information output module. When the load of the chip system is low, the counting cycle of the counter can be increased and the sampling frequency of the filter can be reduced to avoid sampling data redundancy and bandwidth waste.
[0049] Exemplary Methods The present application also proposes a tracking information sampling method, which is applied to the tracking information sampling device described in any of the above embodiments, such as Figure 3 As shown, in the embodiment of the present application, the tracking information sampling method includes the following steps S100-S300: S100: receiving a sampling signal sent by a counter according to a preset counting period.
[0050] S200: Sampling the tracking information output by the tracking information output module.
[0051] S300: Output the sampled tracking information to the cache module for use by the analysis module.
[0052] The specific implementation methods of steps S100 - S300 may refer to the various embodiments of the above-mentioned tracking information sampling device, which will not be described in detail here.
[0053] In an embodiment of the present application, the tracking information sampling method further includes: when the chip system load increases, reducing the preset counting period; When the chip system load decreases, the preset counting period is increased.
[0054] In the embodiment of the present application, the step of outputting the sampled tracking information to the cache module for use by the analysis module includes: Sending the sampled tracking information to a first-level cache unit corresponding to a tracking information output module of the tracking information source; receiving tracking information from each first-level cache unit according to a first preset rule and outputting it to a second-level cache unit; The tracking information output by the secondary cache unit is received according to a second preset rule, and is output to the analysis module for use by the analysis module.
[0055] In an embodiment of the present application, the tracking information sampling method further includes: When the first-level cache unit and / or the second-level cache unit receives the first back pressure signal sent by the analysis module when the load reaches the first preset load, the first-level cache unit and / or the second-level cache unit determines the remaining cache space thereof, and stops receiving the tracking information if the remaining cache space is less than the first preset value; When the first-level cache unit and / or the second-level cache unit receives the second back pressure signal sent by the analysis module when the load is reduced to a second preset load, it starts receiving tracking information.
[0056] In an embodiment of the present application, the tracing information includes at least one of instruction tracing information, data tracing information and event tracing information.
[0057] In an embodiment of the present application, the tracking information sampling method further includes: adjusting the counting period of the counter based on the load of the chip system and the control register bus of the chip system.
[0058] The tracking information sampling method in the embodiment of the present application is applied to the tracking information sampling device described in any of the above embodiments. Therefore, it has all the beneficial effects of the tracking information sampling device in the above embodiments, which will not be described one by one here.
[0059] Exemplary Media After introducing the method and device of the exemplary embodiment of the present application, next, refer to Figure 4 For a description of the computer-readable storage medium of the exemplary embodiment of the present application, please refer to Figure 4 , the computer-readable storage medium shown is a CD 70, on which a computer program (i.e., a program product) is stored. When the computer program is executed by the processor, it will implement the steps described in the above method implementation, for example, receiving a sampling signal sent by a counter according to a preset counting period; sampling the tracking information output by the tracking information output module; and outputting the sampled tracking information to the cache module for use by the analysis module. The specific implementation method of each step is not repeated here. It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which will not be repeated here.
[0060] Exemplary Chips After introducing the method, apparatus, and medium of the exemplary embodiment of the present application, next, the chip of the exemplary embodiment of the present application is introduced.
[0061] The present application proposes a chip, including the tracking information sampling device described in any of the above embodiments, and therefore has all the beneficial effects of the tracking information sampling device described in the above embodiments, which will not be described one by one here.
[0062] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
[0063] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
Claims
1. A tracking information sampling device, used in a chip system, characterized in that: The tracking information sampling device comprises: a sampling module and a buffer module, wherein the input end of the sampling module is used to connect to the output end of the tracking information output module, the input end of the buffer module is used to connect to the output end of the sampling module, and the output end of the buffer module is used to connect to the input end of the analysis module; The sampling module includes a counter and a filter, wherein the counter is used to send a sampling signal to the filter according to a preset counting cycle; The filter is used for sampling the tracking information output by the tracking information output module in response to receiving the sampling signal, and outputting the sampled tracking information to the cache module; The cache module is used to receive and cache the tracking information output by the sampling module; and output the cached tracking information to the analysis module for use by the analysis module.
2. The tracking information sampling device according to claim 1, characterized in that: The counter is configured to: when the chip system load increases, reduce the preset counting period; When the chip system load decreases, the preset counting period is increased.
3. The tracking information sampling device according to claim 1, characterized in that: The tracking information output module has multiple, and the cache module includes multiple first-level cache units, a first polling arbitrator, a second-level cache unit, and a second polling arbitrator; each of the first-level cache units corresponds to each of the tracking information output modules one by one, the input end of each of the first-level cache units is connected to the output end of the sampling module, the output end of each of the first-level cache units is connected to the input end of the first polling arbitrator, the output end of the first polling arbitrator is connected to the input end of the second-level cache unit, and the output end of the second-level cache unit is connected to the input end of the analysis module; The sampling module is also used to output the tracking information sampled from each tracking information output module to the first-level cache unit corresponding to each tracking information output module; The first polling arbiter is used to receive tracking information from each first-level cache unit according to a first preset rule and output it to the second-level cache unit; The second polling arbitrator is used for receiving the tracking information output by the secondary cache unit and the debugging information of the debugging information cache unit according to a second preset rule, and outputting them to the analysis module.
4. The tracking information sampling device according to claim 3, characterized in that: The first-level cache unit and the second-level cache unit are both configured as: In response to receiving a first back pressure signal sent by the analysis module when the load reaches a first preset load, determining the remaining cache space of the analysis module, and stopping receiving tracking information if the remaining cache space is less than a first preset value; In response to receiving a second back pressure signal sent by the analysis module when the load is reduced to a second preset load, receiving tracking information is started.
5. The tracking information sampling device according to claim 1, characterized in that: The tracing information generated by the tracing information output module includes at least one of instruction tracing information, data tracing information and event tracing information.
6. The tracking information sampling device according to claim 1, characterized in that: The counter is connected to a control register bus of the chip system, and the preset counting period can be adjusted based on the control register bus.
7. A tracking information sampling method, applied to the tracking information sampling device according to any one of claims 1 to 6, the tracking information sampling method comprising: receiving a sampling signal sent by a counter according to a preset counting period; Sampling the tracking information output by the tracking information output module; The sampled tracking information is sent to the cache module for use by the analysis module.
8. The tracking information sampling method according to claim 7, further comprising: When the chip system load increases, reducing the preset counting period; When the chip system load decreases, the preset counting period is increased.
9. The tracking information sampling method according to claim 7, wherein the step of outputting the sampled tracking information to the cache module for use by the analysis module comprises: Sending the sampled tracking information to a first-level cache unit corresponding to a tracking information output module of the tracking information source; receiving tracking information from each first-level cache unit according to a first preset rule and outputting it to a second-level cache unit; The tracking information output by the secondary cache unit is received according to a second preset rule, and is output to the analysis module for use by the analysis module.
10. The tracking information sampling method according to claim 9, further comprising: When the first-level cache unit and / or the second-level cache unit receives the first back pressure signal sent by the analysis module when the load reaches the first preset load, the first-level cache unit and / or the second-level cache unit determines the remaining cache space thereof, and stops receiving the tracking information if the remaining cache space is less than the first preset value; When the first-level cache unit and / or the second-level cache unit receives the second back pressure signal sent by the analysis module when the load is reduced to a second preset load, it starts receiving tracking information.
11. The tracing information sampling method according to claim 7, wherein the tracing information comprises at least one of instruction tracing information, data tracing information and event tracing information.
12. The tracking information sampling method according to claim 7, further comprising: The counting cycle of the counter is adjusted based on the load of the chip system and the control register bus of the chip system.
13. A computer-readable storage medium comprising instructions, which, when executed on a computer, causes the computer to execute the method according to any one of claims 7 to 12.
14. A chip, characterized in that: The chip includes the tracking information sampling device according to any one of claims 1-6.
Citation Information
Patent Citations
Chip debugging method and device
CN106294056A
Chip verification device and method, electronic equipment and computer readable storage medium
CN117033093A
Tracking information acquisition method and device and electronic equipment
CN118642916A