WO2012149720A1 - Chip state monitoring method and device, and chip - Google Patents
Chip state monitoring method and device, and chip Download PDFInfo
- Publication number
- WO2012149720A1 WO2012149720A1 PCT/CN2011/079249 CN2011079249W WO2012149720A1 WO 2012149720 A1 WO2012149720 A1 WO 2012149720A1 CN 2011079249 W CN2011079249 W CN 2011079249W WO 2012149720 A1 WO2012149720 A1 WO 2012149720A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- chip
- counter
- operation processing
- module
- processing module
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3055—Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3024—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a central processing unit [CPU]
Definitions
- Chip state monitoring method device and chip
- the present invention relates to the field of data communications, and in particular, to a chip state monitoring method, apparatus, and chip. Background technique
- the device located in the forwarding plane of the data communication network generally includes a plurality of chips, such as a media access control chip (MAC), a network processor chip (NP, Network Processor), a traffic manager chip (TM, a traffic manager), a switch chip, and the like.
- MAC media access control chip
- NP network processor chip
- TM traffic manager chip
- switch chip a switch chip
- Each of the operating processing modules of the chips respectively performs operations such as receiving, buffering, processing, transmitting, and discarding various service data
- the chip collects statistics on the amount of business data processed by each operation processing module through a counter.
- the external monitoring device can determine the basic state of the chip by looking at the count values of these counters.
- the chip allocates at least one counter for each operational processing module, for example, an input counter is assigned to the input module, an output counter is assigned to the output module, and a discard counter and a completion counter are assigned to the processing module.
- the monitoring module can sequentially read the count values of the counters in the chip, and compare the count values to determine the basic state of the chip.
- the monitoring module sequentially reads the count values of the counters in the chip, and the scheme for determining the basic state of the chip by these count values has obvious defects:
- the processing module collects statistics on the service data, that is, the monitoring module cannot read the count values of all the counters in the chip at the same time.
- the monitoring module reads the count value A of the input counter at time T1, and reads the count value B of the output counter at time T2. Since there is another service data entering the chip processing between T1 and T2, the count value A The count value B is not read at the same time, so the monitoring module cannot accurately determine the state of the chip based on the relative relationship between the count value A and the count value B.
- the technical problem to be solved by the embodiments of the present invention is to provide a chip state monitoring method, device and chip, which can obtain the count value of the counters of each operation processing module in the chip at the same time, thereby more accurately determining the chip according to the count values. status.
- an embodiment of the present invention provides a chip state monitoring method, including:
- the control module simultaneously sends a numerical copying instruction to each operation processing module with a counter in the chip;
- each operation processing module copies the current count value of the self counter, and saves the copied count value to the designated position;
- the monitoring module acquires the count value of each operation processing module from the specified position, and determines the state of the chip based on the count value.
- the method further includes:
- the control module receives a counter acquisition instruction sent by the monitoring module, and the counter acquisition instruction triggers the control module to simultaneously send a value replication instruction to each operation processing module with a counter in the chip.
- the operation processing module after receiving the value copy instruction, copies the current count value of the self counter, and saves the copied count value to the specified location, including:
- each operation processing module copies the current count value of the own counter; each operation processing module saves the copied count value to the designated position; the specified position includes: a storage unit of each operation processing module itself, or Control module
- the value copy instruction is the highest priority instruction, and each operation processing module receives the value copy instruction and preferentially executes the instruction.
- Each operation processing module with a counter in the chip includes: an input module, a processing module, and an output module.
- the embodiment of the invention further provides a chip state monitoring device, including:
- control module configured to simultaneously send a numerical value to each operation processing module with a counter in the chip Making a command; causing each operation processing module with a counter in the chip to copy the current count value of the counter, and saving the copied count value to the specified position;
- a monitoring module configured to acquire a count value of each operation processing module from the specified location, and determine a state of the chip according to the count value.
- the control module includes:
- An instruction receiving unit configured to receive a counter acquisition instruction sent by the monitoring module
- the instruction sending unit is configured to simultaneously send a value copy instruction to each operation processing module with a counter in the chip after the instruction receiving unit receives the counter acquisition instruction.
- the designated location includes: a storage unit of each operation processing module itself, or the control module.
- the value copy instruction is the highest priority instruction, and each operation processing module receives the value copy instruction and preferentially executes the instruction.
- an embodiment of the present invention further provides a chip, including: a control module and at least two operation processing modules with a counter;
- control module configured to simultaneously send a value replication instruction to each operation processing module with a counter in the chip
- An operation processing module configured to: after receiving the value copy instruction sent by the control module, copy the current count value of the counter, and save the copied count value to a specified position; and read by other devices to determine the status of the chip .
- the operation processing module with a counter includes: an input module, a processing module, and an output module.
- the chip state monitoring method, device and chip provided by the embodiments of the present invention can send an instruction for obtaining the counter count value to each operation processing module having a counter in the chip at the same time, so that the monitoring module obtains each operation processing module counter in the chip.
- the count value at the same time so that the chip status is more accurately judged.
- FIG. 1 is a schematic flow chart of a first embodiment of a chip state monitoring method according to the present invention
- FIG. 2 is a schematic flow chart of a second embodiment of a chip state monitoring method according to the present invention.
- FIG. 3 is a schematic structural view of a first embodiment of a chip state monitoring device according to the present invention.
- FIG. 4 is a schematic structural diagram of a second embodiment of a chip state monitoring apparatus according to the present invention.
- FIG. 5 is a schematic structural diagram of an embodiment of a chip provided by the present invention. detailed description
- the chip state monitoring method, apparatus and chip provided by the embodiment of the invention send an instruction to obtain a counter count value to each operation processing module having a counter in the chip at the same time, so that the monitoring module obtains each operation processing in the chip.
- the module counter counts at the same time, which makes more accurate judgment of the chip status.
- FIG. 1 is a schematic flowchart of a first embodiment of a chip state monitoring method according to the present invention, as shown in FIG.
- control module simultaneously sends a value copy instruction to each of the operational processing modules with counters in the chip.
- each operation processing module copies the current count value of the self-counter.
- the respective operation processing modules save the count value of the copy thereof to the designated position.
- the monitoring module acquires the count value of each operation processing module from the specified location.
- the monitoring module determines the state of the chip based on the count value it has acquired.
- the control module sends an instruction for acquiring the counter count value to each operation processing module having a counter in the chip at the same time, so that the monitoring module can obtain the counter of each operation processing module in the chip.
- the count value at the same time can make a more accurate judgment on the state of the chip.
- FIG. 2 is a schematic flowchart of a second embodiment of a chip state monitoring method according to the present invention. In the embodiment, the flow of the chip state monitoring method will be described in more detail.
- the control module receives a counter acquisition instruction.
- the counter acquisition instruction is used to trigger the control module to simultaneously send a value copy instruction to each operation processing module with a counter in the chip.
- each operation processing module with a counter in the chip includes: an input module, a processing module, and an output module.
- the monitoring module may be a central processing unit (CPU).
- multiple input modules, processing modules, and output modules in the chip.
- Multiple input modules indicate that the chip has multiple input interfaces.
- Multiple output modules indicate that the chip has multiple output interfaces.
- the processing modules may be serially and possibly parallelized. In this embodiment, an input module, a processing module, and an output module in the chip are taken as an example for description.
- control module simultaneously sends a value copy instruction to each of the operational processing modules with counters in the chip.
- each operation processing module with a counter in the chip includes: an input module, a processing module, an output module, and the like, and the operation processing module has at least one counter for processing instructions and messages that have been processed by the operation processing module.
- the number of business data is counted.
- the input module has an input counter for counting the number of service data that the input module has received;
- the processing module has a drop counter and a completion counter, which are respectively used to count the number of service data that the processing module has completed processing and the processed module. The amount of business data discarded.
- the counter statistics may be performed by the operation processing module for each operation processing of the service data, and the counter is incremented by one.
- the current counter value of the own counter is copied.
- the value copy instruction is the highest priority instruction, and each operation processing module receives the value copy instruction and preferentially executes the instruction.
- the value copy instruction is the highest priority index. Therefore, after each operation processing module receives, the instruction will be executed immediately, and will not be queued in the sequence of instructions to be executed, thereby ensuring that each operation processing module will copy the current count value of its own counter at the same time.
- the value copy instruction may be an electrical signal in practical applications, such as a rising edge pulse signal.
- the manner in which each operational processing module replicates the current count value of its own counter can employ various data replication techniques, such as data snapshot techniques.
- Data snapshot technology (such as Flash copy, Snapshot, Point-in-time-copy, etc.) is a technology that preserves data images at a certain time. The retained image is called a snapshot (ie Snapshot) and allows the image to operate as raw data. Read or write to the "image" as well.
- each operation processing module saves the copied count value to a designated location for reading by the monitoring module; the specified location includes: a storage unit of each operation processing module itself, or the control module, and may even It is a storage device external to the chip.
- the monitoring module acquires the count value of each operation processing module from the specified location. More specifically, the monitoring module reads the count value from the specified position where the count value is saved when it is needed. It should be emphasized that, regardless of when and how the monitoring module reads the count value in S204, the count value read by it is always the count value that each operation processing module saves at the specified position after being copied at the same time, and Not the current real-time count value of each operation processing module counter.
- the monitoring module determines the state of the chip based on the count value of each of the operational processing modules it reads. More specifically, the present embodiment is described by taking three operation processing modules of an input module, a processing module, and an output module in the chip as an example. Other chips having different functions or quantities of operation processing modules are monitored in the same manner as the present embodiment.
- the input module has an input counter; the processing module has a drop counter; and the output module has an output counter.
- the amount of business data X being processed inside the chip is relatively small, usually several tens.
- the user can set the value of X according to his own needs, for example 100.
- the monitoring module determines that the chip is abnormal.
- further chip failure detection may be triggered if a large change in B/A is found during successive multiple monitoring.
- the monitoring module sequentially reads the counters one by one in sequence, and each time the monitoring module reads a counter, it needs to initiate a read command first, and then waits for the result, and the monitoring module and the chip generally use the control channel to communicate, the rate. Slower, each read operation has a certain delay. Therefore, in the prior art, the monitoring module cannot obtain the count value of each operation processing module at the same time, and the calculated number of service data being processed by the processing module is compared with the number of service data actually processed by the processing module at a certain moment. The large gap causes the monitoring module to not accurately determine the true state of the chip.
- the control module sends an instruction to each operation processing module in the chip at the same time, and the control module can obtain the count value of each operation processing module counter at the same time, thereby more accurately facing the chip. State makes a judgment.
- the chip state monitoring device includes:
- the control module 1 is configured to simultaneously send a value copy instruction to each operation processing module with a counter in the chip; so that each operation processing module with a counter in the chip copies the current count value of the counter, and saves the copied count value to Specify the location.
- the monitoring module 2 is configured to acquire a count value of the respective operation processing module counters from the specified position, and determine a state of the chip according to the count value.
- the chip state monitoring device provided by the embodiment of the present invention sends an instruction for acquiring the counter count value to each operation processing module in the chip at the same time by the control module, so that the monitoring module can obtain the counters of the operation processing modules in the chip at the same time.
- the value is counted to make a more accurate judgment of the state of the chip.
- the chip state monitoring device includes: a control module 1 and a monitoring module 2.
- the control module 1 is configured to simultaneously send a value copy instruction to each operation processing module with a counter in the chip; so that each operation processing module with a counter in the chip copies the current count value of the counter, and the copied count value Save to the specified location. More specifically, the control module 1 can be located inside the monitored chip, and includes: an instruction receiving unit 11 and an instruction transmitting unit 12.
- the instruction receiving unit 11 is configured to receive a counter acquisition instruction sent by the monitoring module 2;
- the device fetch instruction is used to trigger the instruction transmitting unit 12 of the control module 1 to simultaneously transmit a value copy instruction to each operation processing module with a counter in the chip.
- the counter acquisition instruction may be sent by the monitoring module 2 connected to the control module 1, or may be periodically triggered by the control module 1 itself.
- the instruction sending unit 12 is configured to simultaneously send a value copy instruction to each operation processing module with a counter in the chip after the instruction receiving unit 11 receives the counter acquisition instruction.
- each operation processing module with a counter in the chip includes: an input module 3, a processing module 4, and an output module 5.
- Multiple input modules indicate that the chip has multiple input interfaces.
- Multiple output modules indicate that the chip has multiple output interfaces.
- the processing modules may be serially connected in parallel. In this embodiment, an input module, a processing module, and an output module in the chip are taken as an example for description.
- Input module 3, processing module 4, output module 5 These operation processing modules are provided with at least one counter for counting service data such as instructions and messages that have been processed by the operation processing module.
- the input module 3 has an input counter 31 for counting the number of service data that the input module 3 has received;
- the processing module 4 has a drop counter 41 for counting the number of service data discarded by the processing module 4.
- the output module 5 has an output counter 51 for counting the number of service data output by the output module 5.
- the value copy instruction sent by the command sending unit 12 is the highest priority instruction, and each operation processing module receives the value copy instruction and preferentially executes the instruction.
- each operation processing module receives the value copy instruction and preferentially executes the instruction.
- the value copy instruction should be the highest priority instruction so that each operation processing module executes the instruction immediately after it is received, without placing the instruction in the sequence of instructions to be executed.
- each operation processing module after each operation processing module receives the value copy instruction, it immediately copies the current count value of the own counter. More specifically, each operation processing module can copy the current counter value of the counter itself by using various data replication technologies, such as data snapshot technology, and each operation processing module does not receive the counter itself during the process of copying the counter value. Influence, continue to run.
- the specified location includes: a storage list of each operation processing module itself
- the element, or the control module can also be stored in an external storage device connected to the chip if necessary.
- the input module 3 stores the current count value of the input counter 31 to the input count snapshot unit 32; the processing module 4 will discard the current counter 41 The count value is stored to the discard count snapshot unit 42; the output module 5 stores the current count value of the output counter 51 to the output count snapshot unit 52.
- each operation processing module copies the count value of its own counter, each counter is not affected and continues to operate.
- the monitoring module 2 is configured to obtain a count value of each operation processing module counter from the specified location, and determine a state of the chip according to the count value.
- the monitoring module 2 can be a CPU.
- the monitoring module 2 reads the count value from the specified position where the count value is stored when it is needed. It should be emphasized that although the manner in which the monitoring module 2 in the embodiment reads the count value may be sequentially read, it reads the count value of each operation processing module that is saved at the specified position after copying the counter at the same time. Instead of reading its current count value directly from the counters of the individual operational processing modules.
- the amount of business data X being processed inside the chip will be relatively small, usually dozens.
- the user can set the threshold of X according to his own needs, for example 100.
- the monitoring module 1 determines that the chip is abnormal; preferably, even if the value of A-(B+C) does not exceed the preset X threshold, However, if the B/A change is found to be large during successive multiple monitoring, further chip failure detection can be triggered.
- the monitoring module sequentially reads the counters one by one in sequence, and each time the monitoring module reads a counter, it needs to initiate a read command first, and then waits for the result, and the monitoring module and the chip generally use the control channel to communicate, the rate. Slower, each read operation has a certain delay. Therefore, in the prior art, because the monitoring module cannot obtain the count value of each operation processing module at the same time, the calculated number of service data being processed by the processing module is actually being processed by the processing module at a certain moment. There is a large gap in the number of business data, which causes the monitoring module to not accurately determine the true state of the chip.
- the chip state monitoring device provided by the embodiment of the present invention sends a command to each operation processing module in the chip at the same time by the control module, so that the monitoring module can obtain the count value of each operation processing module counter at the same time, thereby more accurately The state of the chip is judged.
- the chip includes: a control module 1 and at least two operation processing modules with a counter.
- an input module is included.
- the processing module 4 and the output module 5 are three chips of an operation processing module with a counter as an example.
- an input module 3, a processing module 4, and an output module 5 in the chip are taken as an example for description.
- the control module 1 is configured to simultaneously send a numerical copy instruction to each operation processing module with a counter in the chip.
- Control Module 1 The action of simultaneously transmitting a value copy instruction to each operation processing module with a counter in the chip is triggered by the counter acquisition instruction.
- the counter acquisition command may be sent by the monitoring module 2 connected to the chip, or may be periodically triggered by the control module 1 itself.
- the control module 1 After receiving the counter acquisition command, the control module 1 simultaneously sends a numerical copy instruction to each operation processing module (input module 3, processing module 4, and output module 5) with a counter in the chip.
- the value copy instruction sent by the control module 1 to each operation processing module is the highest priority instruction, and each operation processing module receives the value copy instruction and preferentially executes the instruction.
- each operation processing module receives the value copy instruction and preferentially executes the instruction.
- the control module needs to send a value copy instruction to each operation processing module at the same time, but also each operation processing module needs to execute the instruction at the same time.
- the operation processing module is configured to: after receiving the value copy instruction sent by the control module 1, immediately copy the current count value of the counter, and save the copied count value to the designated position; and the monitoring module reads to determine the chip status.
- various operation processing modules can copy the current count value of their counters by using various data replication techniques, such as data snapshots. After each operation processing module completes the copying, the copied count value can be saved in its own storage unit, for example, the input count snapshot unit 32 of the input module 3, the discard count snapshot unit 42 of the processing module 4, and the output count of the output module 5.
- the snapshot unit 52 may also send the copied count value to the control module for saving, and may even be sent to a storage device external to the chip for saving if necessary, and each operation processing module is in the copy counter During the numerical process, the counter itself is not affected and continues to run.
- the monitoring module 2 connected to the chip acquires the count values of the respective operation processing module counters of the chip from the designated position when necessary, and determines the state of the chip based on the count values. It should be emphasized that the monitoring module 2 in this embodiment reads the count value of the specified position in any manner, and reads the count value of each operation processing module that is saved at the specified position after being copied at the same time, and Not the current count value of the counter of each operation processing module.
- the chip provided by the embodiment of the present invention sends an instruction for acquiring the counter count value to each operation processing module having a counter in the chip at the same time by the control module, so that the monitoring module connected to the chip can obtain each operation processing module in the chip.
- the count value of the counter at the same time in order to make a more accurate judgment of the state of the chip.
- This can be accomplished by a computer program controlling the associated hardware, which can be stored in a computer readable storage medium, which, when executed, can include the flow of an embodiment of the methods described above.
- the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Debugging And Monitoring (AREA)
Abstract
Description
一种芯片状态监控方法、 装置以及芯片 技术领域 Chip state monitoring method, device and chip
本发明涉及数据通信领域, 尤其涉及一种芯片状态监控方法、 装置以及芯 片。 背景技术 The present invention relates to the field of data communications, and in particular, to a chip state monitoring method, apparatus, and chip. Background technique
位于数据通信网络转发平面的设备一般包括很多芯片, 例如媒体访问控制 芯片(MAC, Media Access Control ) 网络处理器芯片( NP, Network Processor ). 流量管理器芯片 (TM, Traffic Manager )、 交换芯片等。 这些芯片内部的各个操 作处理模块分别对各种业务数据进行接收、 緩存、 处理、 发送和丢弃等操作处 理, 同时芯片会通过计数器对每个操作处理模块处理的业务数据量进行统计。 外部的监控设备通过查看这些计数器的计数数值, 可以判定芯片的基本状态。 The device located in the forwarding plane of the data communication network generally includes a plurality of chips, such as a media access control chip (MAC), a network processor chip (NP, Network Processor), a traffic manager chip (TM, a traffic manager), a switch chip, and the like. . Each of the operating processing modules of the chips respectively performs operations such as receiving, buffering, processing, transmitting, and discarding various service data, and the chip collects statistics on the amount of business data processed by each operation processing module through a counter. The external monitoring device can determine the basic state of the chip by looking at the count values of these counters.
现有技术中的具体实现方式为, 芯片为每个操作处理模块分配至少一个计 数器, 例如为输入模块分配输入计数器, 为输出模块分配输出计数器, 为处理 模块分配丢弃计数器和完成计数器。 监控模块可以依次读取芯片中各计数器的 计数数值, 并通过比较这些计数数值判定芯片的基本状态。 A specific implementation in the prior art is that the chip allocates at least one counter for each operational processing module, for example, an input counter is assigned to the input module, an output counter is assigned to the output module, and a discard counter and a completion counter are assigned to the processing module. The monitoring module can sequentially read the count values of the counters in the chip, and compare the count values to determine the basic state of the chip.
但是, 现有技术中监控模块依次读取芯片中各计数器的计数数值, 并通过 这些计数数值判定芯片基本状态的方案存在明显的缺陷: However, in the prior art, the monitoring module sequentially reads the count values of the counters in the chip, and the scheme for determining the basic state of the chip by these count values has obvious defects:
若监控模块读取芯片中各计数器的计数数值之前, 该芯片已经停止接收和 处理业务数据, 则监控模块依次读取的计数数值可以正确反映芯片处理业务数 据的数量。 但是, 现网中的设备不会因为监控模块需要读取芯片中各计数器的 计数数值而停止对业务数据的处理, 从而导致监控模块依次读取的计数器计数 数值无法正确反映同一个时刻芯片各个操作处理模块对业务数据的统计, 即监 控模块不能在同一时刻读取芯片中所有计数器的计数数值。 If the monitoring module reads the count value of each counter in the chip and the chip has stopped receiving and processing the service data, the count value sequentially read by the monitoring module can correctly reflect the number of data processed by the chip. However, the devices in the current network do not stop processing the service data because the monitoring module needs to read the count value of each counter in the chip, so that the counter count value sequentially read by the monitoring module cannot correctly reflect the operation of the chip at the same time. The processing module collects statistics on the service data, that is, the monitoring module cannot read the count values of all the counters in the chip at the same time.
例如, 假设监控模块在 T1时刻读取了输入计数器的计数数值 A, 在 T2时 刻读取了输出计数器的计数数值 B , 由于在 T1到 T2时刻之间又有业务数据进 入芯片处理, 计数数值 A和计数数值 B又不是在同一个时刻被读取的, 所以导 致监控模块无法根据计数数值 A和计数数值 B之间的相对关系来准确判断芯片 的状态。 发明内容 For example, suppose that the monitoring module reads the count value A of the input counter at time T1, and reads the count value B of the output counter at time T2. Since there is another service data entering the chip processing between T1 and T2, the count value A The count value B is not read at the same time, so the monitoring module cannot accurately determine the state of the chip based on the relative relationship between the count value A and the count value B. Summary of the invention
本发明实施例所要解决的技术问题在于, 提供一种芯片状态监控方法、 装 置以及芯片, 可获取芯片中各操作处理模块的计数器在同一时刻的计数数值, 从而根据这些计数数值更加准确的判断芯片的状态。 The technical problem to be solved by the embodiments of the present invention is to provide a chip state monitoring method, device and chip, which can obtain the count value of the counters of each operation processing module in the chip at the same time, thereby more accurately determining the chip according to the count values. status.
为了解决上述技术问题, 本发明实施例提供了一种芯片状态监控方法, 包 括: In order to solve the above technical problem, an embodiment of the present invention provides a chip state monitoring method, including:
控制模块向芯片中带有计数器的各个操作处理模块同时发送数值复制指 令; The control module simultaneously sends a numerical copying instruction to each operation processing module with a counter in the chip;
所述各个操作处理模块接收所述数值复制指令后, 复制自身计数器当前的 计数数值, 并将复制的计数数值保存至指定位置; After receiving the numerical copy instruction, each operation processing module copies the current count value of the self counter, and saves the copied count value to the designated position;
监控模块从所述指定位置获取各个操作处理模块的计数数值, 并根据所述 计数数值确定所述芯片的状态。 The monitoring module acquires the count value of each operation processing module from the specified position, and determines the state of the chip based on the count value.
其中, 所述控制模块向芯片中带有计数器的各个操作处理模块同时发送数 值复制指令之前, 还包括: Before the control module sends the value copy instruction to each operation processing module with a counter in the chip, the method further includes:
控制模块接收所述监控模块发送的计数器获取指令, 所述计数器获取指令 将触发所述控制模块向芯片中带有计数器的各个操作处理模块同时发送数值复 制指令。 The control module receives a counter acquisition instruction sent by the monitoring module, and the counter acquisition instruction triggers the control module to simultaneously send a value replication instruction to each operation processing module with a counter in the chip.
其中, 所述各个操作处理模块接收所述数值复制指令后, 复制自身计数器 当前的计数数值, 并将复制的计数数值保存至指定位置, 包括: The operation processing module, after receiving the value copy instruction, copies the current count value of the self counter, and saves the copied count value to the specified location, including:
各个操作处理模块接收数值复制指令后, 复制自身计数器当前的计数数值; 各个操作处理模块将其复制的计数数值保存至指定位置; 所述指定位置包 括: 各个操作处理模块自身的存储单元, 或所述控制模块; After receiving the value copy instruction, each operation processing module copies the current count value of the own counter; each operation processing module saves the copied count value to the designated position; the specified position includes: a storage unit of each operation processing module itself, or Control module
所述各个操作处理模块自身的计数器正常工作。 The counters of the respective operation processing modules themselves work normally.
其中, 所述数值复制指令为最高优先级的指令, 各个操作处理模块接收该 数值复制指令后, 优先执行该指令。 The value copy instruction is the highest priority instruction, and each operation processing module receives the value copy instruction and preferentially executes the instruction.
其中, 所述芯片中带有计数器的各个操作处理模块包括: 输入模块、 处理 模块、 输出模块。 Each operation processing module with a counter in the chip includes: an input module, a processing module, and an output module.
相应的, 本发明实施例还提供一种芯片状态监控装置, 包括: Correspondingly, the embodiment of the invention further provides a chip state monitoring device, including:
控制模块, 用于向芯片中带有计数器的各个操作处理模块同时发送数值复 制指令; 使所述芯片中带有计数器的各个操作处理模块复制自身计数器当前的 计数数值, 并将复制的计数数值保存至指定位置; a control module, configured to simultaneously send a numerical value to each operation processing module with a counter in the chip Making a command; causing each operation processing module with a counter in the chip to copy the current count value of the counter, and saving the copied count value to the specified position;
监控模块, 用于从所述指定位置获取所述各个操作处理模块的计数数值, 并根据所述计数数值确定所述芯片的状态。 And a monitoring module, configured to acquire a count value of each operation processing module from the specified location, and determine a state of the chip according to the count value.
其中, 所述控制模块包括: The control module includes:
指令接收单元, 用于接收所述监控模块发送的计数器获取指令; An instruction receiving unit, configured to receive a counter acquisition instruction sent by the monitoring module;
指令发送单元, 用于在所述指令接收单元接收到所述计数器获取指令后, 向芯片中带有计数器的各个操作处理模块同时发送数值复制指令。 The instruction sending unit is configured to simultaneously send a value copy instruction to each operation processing module with a counter in the chip after the instruction receiving unit receives the counter acquisition instruction.
其中, 所述指定位置包括: 各个操作处理模块自身的存储单元, 或所述控 制模块。 The designated location includes: a storage unit of each operation processing module itself, or the control module.
其中, 所述数值复制指令为最高优先级的指令, 各个操作处理模块接收该 数值复制指令后, 优先执行该指令。 The value copy instruction is the highest priority instruction, and each operation processing module receives the value copy instruction and preferentially executes the instruction.
相应的, 本发明实施例还提供一种芯片, 其包括: 控制模块以及至少两个 带有计数器的操作处理模块; Correspondingly, an embodiment of the present invention further provides a chip, including: a control module and at least two operation processing modules with a counter;
控制模块, 用于向芯片中带有计数器的各个操作处理模块同时发送数值复 制指令; a control module, configured to simultaneously send a value replication instruction to each operation processing module with a counter in the chip;
操作处理模块, 用于接收所述控制模块发送的数值复制指令后, 复制自身 计数器当前的计数数值, 并将复制的计数数值保存至指定位置; 供其它设备读 取, 以确定所述芯片的状态。 An operation processing module, configured to: after receiving the value copy instruction sent by the control module, copy the current count value of the counter, and save the copied count value to a specified position; and read by other devices to determine the status of the chip .
其中, 所述带有计数器的操作处理模块包括: 输入模块、 处理模块、 输出 模块。 The operation processing module with a counter includes: an input module, a processing module, and an output module.
本发明实施例提供的芯片状态监控方法、 装置以及芯片, 可以在同一时刻 向芯片中具有计数器的各个操作处理模块发送要求获取其计数器计数数值的指 令, 使监控模块获得芯片中各个操作处理模块计数器在同一时刻的计数数值, 从而更加准确的对芯片状态 #文出判断。 附图说明 The chip state monitoring method, device and chip provided by the embodiments of the present invention can send an instruction for obtaining the counter count value to each operation processing module having a counter in the chip at the same time, so that the monitoring module obtains each operation processing module counter in the chip. The count value at the same time, so that the chip status is more accurately judged. DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实施 例或现有技术描述中所需要使用的附图作筒单地介绍, 显而易见地, 下面描述 中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付 出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。 In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description Only some embodiments of the present invention, for those of ordinary skill in the art, do not pay Other drawings can also be obtained from these drawings on the premise of inventive labor.
图 1为本发明提供的芯片状态监控方法第一实施例流程示意图; 1 is a schematic flow chart of a first embodiment of a chip state monitoring method according to the present invention;
图 2为本发明提供的芯片状态监控方法第二实施例流程示意图; 2 is a schematic flow chart of a second embodiment of a chip state monitoring method according to the present invention;
图 3为本发明提供的芯片状态监控装置第一实施例结构示意图; 3 is a schematic structural view of a first embodiment of a chip state monitoring device according to the present invention;
图 4为本发明提供的芯片状态监控装置第二实施例结构示意图; 4 is a schematic structural diagram of a second embodiment of a chip state monitoring apparatus according to the present invention;
图 5为本发明提供的芯片实施例结构示意图。 具体实施方式 FIG. 5 is a schematic structural diagram of an embodiment of a chip provided by the present invention. detailed description
本发明实施例提供的芯片状态监控方法、 装置以及芯片, 通过控制模块在 同一时刻向芯片中具有计数器的各个操作处理模块发送要求获取其计数器计数 数值的指令, 使监控模块获得芯片中各个操作处理模块计数器在同一时刻的计 数数值, 从而更加准确的对芯片状态做出判断 The chip state monitoring method, apparatus and chip provided by the embodiment of the invention send an instruction to obtain a counter count value to each operation processing module having a counter in the chip at the same time, so that the monitoring module obtains each operation processing in the chip. The module counter counts at the same time, which makes more accurate judgment of the chip status.
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。 BRIEF DESCRIPTION OF THE DRAWINGS The technical solutions in the embodiments of the present invention will be described in detail with reference to the accompanying drawings. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative work are within the scope of the present invention.
参见图 1 , 为本发明提供的芯片状态监控方法第一实施例流程示意图, 如图 1所示: 1 is a schematic flowchart of a first embodiment of a chip state monitoring method according to the present invention, as shown in FIG.
在 S100, 控制模块向芯片中带有计数器的各个操作处理模块同时发送数值 复制指令。 At S100, the control module simultaneously sends a value copy instruction to each of the operational processing modules with counters in the chip.
在 S101 , 所述各个操作处理模块接收所述数值复制指令后, 复制自身计数 器当前的计数数值。 In S101, after receiving the numerical copy instruction, each operation processing module copies the current count value of the self-counter.
在 S102, 所述各个操作处理模块将其复制的计数数值保存至指定位置。 在 S103 , 监控模块从所述指定位置获取各个操作处理模块的计数数值。 在 S104, 监控模块根据其获取的计数数值确定所述芯片的状态。 At S102, the respective operation processing modules save the count value of the copy thereof to the designated position. At S103, the monitoring module acquires the count value of each operation processing module from the specified location. At S104, the monitoring module determines the state of the chip based on the count value it has acquired.
本发明实施例提供的芯片状态监控方法, 通过控制模块在同一时刻向芯片 中具有计数器的各个操作处理模块发送要求获取其计数器计数数值的指令, 使 监控模块能够获得芯片中各个操作处理模块计数器在同一时刻的计数数值, 可 以更加准确的对芯片状态做出判断 According to the chip state monitoring method provided by the embodiment of the present invention, the control module sends an instruction for acquiring the counter count value to each operation processing module having a counter in the chip at the same time, so that the monitoring module can obtain the counter of each operation processing module in the chip. The count value at the same time can make a more accurate judgment on the state of the chip.
参见图 2, 为本发明提供的芯片状态监控方法第二实施例流程示意图, 在本 实施例中, 将更为详细的描述该芯片状态监控方法的流程。 如图 2所示: 在 S200, 控制模块接收计数器获取指令。 所述计数器获取指令用于触发所 述控制模块向芯片中带有计数器的各个操作处理模块同时发送数值复制指令。 2 is a schematic flowchart of a second embodiment of a chip state monitoring method according to the present invention. In the embodiment, the flow of the chip state monitoring method will be described in more detail. As shown in FIG. 2: At S200, the control module receives a counter acquisition instruction. The counter acquisition instruction is used to trigger the control module to simultaneously send a value copy instruction to each operation processing module with a counter in the chip.
更为具体的, 控制模块可以位于被监控的芯片内部, 计数器获取指令可以 是由与芯片连接的监控模块发送的, 也可以是由控制模块自身周期性触发的。 在本发明实施例中, 所述芯片中带有计数器的各个操作处理模块包括: 输入模 块、处理模块、输出模块。在具体实现中,所述监控模块可以是中央处理器( CPU, Central Processing Unit )。 More specifically, the control module may be located inside the monitored chip, and the counter acquisition command may be sent by the monitoring module connected to the chip, or may be periodically triggered by the control module itself. In the embodiment of the present invention, each operation processing module with a counter in the chip includes: an input module, a processing module, and an output module. In a specific implementation, the monitoring module may be a central processing unit (CPU).
本领域技术人员应该知道, 芯片中的输入模块、 处理模块和输出模块都可 能是多个。 多个输入模块表示芯片有多个输入接口, 多个输出模块表示芯片有 多个输出接口, 芯片内部也可能存在多个处理模块, 处理模块之间可能串行也 可能并行。 本实施例中以芯片中输入模块、 处理模块、 输出模块各一个为例进 行说明。 Those skilled in the art will appreciate that there may be multiple input modules, processing modules, and output modules in the chip. Multiple input modules indicate that the chip has multiple input interfaces. Multiple output modules indicate that the chip has multiple output interfaces. There may also be multiple processing modules inside the chip. The processing modules may be serially and possibly parallelized. In this embodiment, an input module, a processing module, and an output module in the chip are taken as an example for description.
在 S201 , 控制模块向芯片中带有计数器的各个操作处理模块同时发送数值 复制指令。 At S201, the control module simultaneously sends a value copy instruction to each of the operational processing modules with counters in the chip.
更为具体的, 芯片中带有计数器的各个操作处理模块包括: 输入模块、 处 理模块、 输出模块等, 这些操作处理模块带有至少一个计数器, 用于对本操作 处理模块已经处理的指令、 报文等业务数据数量进行统计。 例如, 输入模块带 有输入计数器, 用于统计输入模块已经接收的业务数据的数量; 处理模块带有 丢弃计数器和完成计数器, 分别用于统计处理模块已经完成处理的业务数据的 数量和被处理模块丢弃的业务数据的数量。 More specifically, each operation processing module with a counter in the chip includes: an input module, a processing module, an output module, and the like, and the operation processing module has at least one counter for processing instructions and messages that have been processed by the operation processing module. The number of business data is counted. For example, the input module has an input counter for counting the number of service data that the input module has received; the processing module has a drop counter and a completion counter, which are respectively used to count the number of service data that the processing module has completed processing and the processed module. The amount of business data discarded.
进一步的, 计数器统计的方式可以是, 操作处理模块每完成一个业务数据 的操作处理, 计数器加 1。 Further, the counter statistics may be performed by the operation processing module for each operation processing of the service data, and the counter is incremented by one.
在 S202, 各个操作处理模块接收数值复制指令后, 复制自身计数器当前的 计数数值。 优选的, 对芯片中各个操作处理模块来说, 该数值复制指令为最高 优先级的指令, 各个操作处理模块接收该数值复制指令后, 优先执行该指令。 At S202, after each operation processing module receives the value copy instruction, the current counter value of the own counter is copied. Preferably, for each operation processing module in the chip, the value copy instruction is the highest priority instruction, and each operation processing module receives the value copy instruction and preferentially executes the instruction.
本实施例为使监控模块更加准确的对芯片状态做出判断, 需要获取芯片中 各个操作处理模块计数器在同一时刻的计数数值。 要达到上述目的, 不仅需要 控制模块在同一时刻向各个操作处理模块发送数值复制指令, 还需要各个操作 处理模块同时执行该指令。 故在 S202中, 由于数值复制指令为最高优先级的指 令, 故各个操作处理模块接收后, 该指令会立即被执行, 而不会在待执行指令 序列中排队, 从而保证各个操作处理模块会在同一时刻复制自身计数器当前的 计数数值。 In this embodiment, in order to make the monitoring module more accurately judge the state of the chip, it is necessary to obtain the count value of each operation processing module counter in the chip at the same time. To achieve the above objectives, not only the control module needs to send a numerical copy instruction to each operation processing module at the same time, but also each operation processing module needs to execute the instruction at the same time. Therefore, in S202, the value copy instruction is the highest priority index. Therefore, after each operation processing module receives, the instruction will be executed immediately, and will not be queued in the sequence of instructions to be executed, thereby ensuring that each operation processing module will copy the current count value of its own counter at the same time.
更为具体的, 该数值复制指令在实际应用中可以是一个电信号, 例如一个 上升沿的脉冲信号。 各个操作处理模块复制自身计数器当前的计数数值的方式 可以采用各种数据复制技术, 例如数据快照技术。 数据快照技术 (例如 Flash copy, Snapshot, Point-in-time-copy等)是一种保留某一时刻数据影像的技术, 其保留的影像被称为快照(即 Snapshot ), 并允许像操作原始数据一样对 "影像" 进行读取或写入。 More specifically, the value copy instruction may be an electrical signal in practical applications, such as a rising edge pulse signal. The manner in which each operational processing module replicates the current count value of its own counter can employ various data replication techniques, such as data snapshot techniques. Data snapshot technology (such as Flash copy, Snapshot, Point-in-time-copy, etc.) is a technology that preserves data images at a certain time. The retained image is called a snapshot (ie Snapshot) and allows the image to operate as raw data. Read or write to the "image" as well.
需要说明的是, 各个操作处理模块复制自身计数器的计数数值时, 该计数 器本身不受影响、 继续运行。 It should be noted that when each operation processing module copies the count value of its own counter, the counter itself is not affected and continues to operate.
在 S203 , 各个操作处理模块将其复制的计数数值保存至指定位置, 供监控 模块读取; 所述指定位置包括: 各个操作处理模块自身的存储单元、 或所述控 制模块, 在必要时甚至可以是芯片外部的存储设备。 In S203, each operation processing module saves the copied count value to a designated location for reading by the monitoring module; the specified location includes: a storage unit of each operation processing module itself, or the control module, and may even It is a storage device external to the chip.
在 S204, 监控模块从所述指定位置获取各个操作处理模块的计数数值。 更为具体的, 监控模块在其需要时, 从保存计数数值的指定位置读取计数 数值。 需要强调的是, S204中的无论监控模块在何时、 以何种方式读取计数数 值, 其读取的计数数值始终是各个操作处理模块在同一时刻复制后保存在指定 位置的计数数值, 而不是各个操作处理模块计数器当前的实时计数数值。 At S204, the monitoring module acquires the count value of each operation processing module from the specified location. More specifically, the monitoring module reads the count value from the specified position where the count value is saved when it is needed. It should be emphasized that, regardless of when and how the monitoring module reads the count value in S204, the count value read by it is always the count value that each operation processing module saves at the specified position after being copied at the same time, and Not the current real-time count value of each operation processing module counter.
在 S205 , 监控模块根据其读取的各个操作处理模块的计数数值确定所述芯 片的状态。 更为具体的, 本实施例以芯片中具有输入模块、 处理模块、 输出模 块三个操作处理模块为例进行说明。 其它具有不同功能或数量操作处理模块的 芯片的监控方式与此本实施例的原理相同。 At S205, the monitoring module determines the state of the chip based on the count value of each of the operational processing modules it reads. More specifically, the present embodiment is described by taking three operation processing modules of an input module, a processing module, and an output module in the chip as an example. Other chips having different functions or quantities of operation processing modules are monitored in the same manner as the present embodiment.
假设, 输入模块带有输入计数器; 处理模块带有丢弃计数器; 输出模块带 有输出计数器。 监控模块读取某一时刻输入计数器的计数数值 A、 丢弃计数器 的计数数值 B、 输出计数器的计数数值 C, 同时假设在该时刻, 处理模块正在处 理的业务数据数量为 X, 则 X=A- ( B+C )。 Assume that the input module has an input counter; the processing module has a drop counter; and the output module has an output counter. The monitoring module reads the count value A of the input counter at a certain moment, the count value B of the discard counter, and the count value C of the output counter, and assumes that at this moment, the number of service data being processed by the processing module is X, then X=A- (B+C).
一般情况下, 芯片内部正在处理的业务数据量 X相对较小, 通常为几十个。 用户可以根据自身需要设定 X的阁值, 例如 100。 当 A- ( B+C ) 的值大于预设 的 X阈值 100时, 监控模块即判定该芯片出现异常。 优选的, 即使 A- ( B+C ) 的值不超过预设的 X阈值, 但如果在连续的多次 监测过程中发现 B/A的变化较大, 也可以触发进一步的芯片故障检测。 In general, the amount of business data X being processed inside the chip is relatively small, usually several tens. The user can set the value of X according to his own needs, for example 100. When the value of A-(B+C) is greater than the preset X threshold of 100, the monitoring module determines that the chip is abnormal. Preferably, even if the value of A-(B+C) does not exceed the preset X threshold, further chip failure detection may be triggered if a large change in B/A is found during successive multiple monitoring.
现有技术中, 监控模块都是逐个依次串行读取计数器, 监控模块每读一个 计数器需要先发起读取指令, 再等待结果, 而监控模块和芯片之间一般又是采 用控制通道通信, 速率较慢, 每次读取操作都有一定的时延。 所以现有技术中 监控模块不能获得各个操作处理模块在同一时刻的计数数值, 其计算得出的处 理模块正在处理的业务数据数量与该处理模块在某一时刻实际正在处理的业务 数据数量有较大差距, 导致监控模块不能准确的判断芯片的真实状态。 In the prior art, the monitoring module sequentially reads the counters one by one in sequence, and each time the monitoring module reads a counter, it needs to initiate a read command first, and then waits for the result, and the monitoring module and the chip generally use the control channel to communicate, the rate. Slower, each read operation has a certain delay. Therefore, in the prior art, the monitoring module cannot obtain the count value of each operation processing module at the same time, and the calculated number of service data being processed by the processing module is compared with the number of service data actually processed by the processing module at a certain moment. The large gap causes the monitoring module to not accurately determine the true state of the chip.
而本发明实施例提供的芯片状态监控方法, 通过控制模块在同一时刻向芯 片中各个操作处理模块发送指令, 控模块可以获得各个操作处理模块计数 器在同一时刻的计数数值, 从而更加准确的对芯片状态做出判断。 In the chip state monitoring method provided by the embodiment of the present invention, the control module sends an instruction to each operation processing module in the chip at the same time, and the control module can obtain the count value of each operation processing module counter at the same time, thereby more accurately facing the chip. State makes a judgment.
参见图 3 , 为本发明提供的芯片状态监控装置第一实施例结构示意图, 如图 3所示, 该芯片状态监控装置包括: 3 is a schematic structural diagram of a first embodiment of a chip state monitoring device according to the present invention. As shown in FIG. 3, the chip state monitoring device includes:
控制模块 1,用于向芯片中带有计数器的各个操作处理模块同时发送数值复 制指令; 使芯片中带有计数器的各个操作处理模块复制自身计数器当前的计数 数值, 并将复制的计数数值保存至指定位置。 The control module 1 is configured to simultaneously send a value copy instruction to each operation processing module with a counter in the chip; so that each operation processing module with a counter in the chip copies the current count value of the counter, and saves the copied count value to Specify the location.
监控模块 2,用于从所述指定位置获取所述各个操作处理模块计数器的计数 数值, 并根据所述计数数值确定所述芯片的状态。 The monitoring module 2 is configured to acquire a count value of the respective operation processing module counters from the specified position, and determine a state of the chip according to the count value.
本发明实施例提供的芯片状态监控装置, 通过控制模块在同一时刻向芯片 中各个操作处理模块发送要求获取其计数器计数数值的指令, 使监控模块可以 获得芯片中各个操作处理模块计数器在同一时刻的计数数值, 从而更加准确的 对芯片状态做出判断。 The chip state monitoring device provided by the embodiment of the present invention sends an instruction for acquiring the counter count value to each operation processing module in the chip at the same time by the control module, so that the monitoring module can obtain the counters of the operation processing modules in the chip at the same time. The value is counted to make a more accurate judgment of the state of the chip.
参见图 4, 为本发明提供的芯片状态监控装置第二实施例结构示意图。 在本 实施例中, 将更为详细的描述该芯片状态监控装置的具体结构。 图 4所示, 该 芯片状态监控装置包括: 控制模块 1和监控模块 2。 Referring to FIG. 4, it is a schematic structural diagram of a second embodiment of a chip state monitoring device provided by the present invention. In the present embodiment, the specific structure of the chip state monitoring device will be described in more detail. As shown in FIG. 4, the chip state monitoring device includes: a control module 1 and a monitoring module 2.
控制模块 1 ,用于向芯片中带有计数器的各个操作处理模块同时发送数值复 制指令; 使所述芯片中带有计数器的各个操作处理模块复制自身计数器当前的 计数数值, 并将复制的计数数值保存至指定位置。 更为具体的, 控制模块 1 可 以位于被监控的芯片内部, 包括: 指令接收单元 11和指令发送单元 12。 The control module 1 is configured to simultaneously send a value copy instruction to each operation processing module with a counter in the chip; so that each operation processing module with a counter in the chip copies the current count value of the counter, and the copied count value Save to the specified location. More specifically, the control module 1 can be located inside the monitored chip, and includes: an instruction receiving unit 11 and an instruction transmitting unit 12.
指令接收单元 11 , 用于接收监控模块 2发送的计数器获取指令; 所述计数 器获取指令用于触发所述控制模块 1的指令发送单元 12向芯片中带有计数器的 各个操作处理模块同时发送数值复制指令。 所述计数器获取指令可以是由与控 制模块 1连接的监控模块 2发送的, 也可以是由控制模块 1 自身周期性触发的。 The instruction receiving unit 11 is configured to receive a counter acquisition instruction sent by the monitoring module 2; The device fetch instruction is used to trigger the instruction transmitting unit 12 of the control module 1 to simultaneously transmit a value copy instruction to each operation processing module with a counter in the chip. The counter acquisition instruction may be sent by the monitoring module 2 connected to the control module 1, or may be periodically triggered by the control module 1 itself.
指令发送单元 12, 用于在指令接收单元 11接收到所述计数器获取指令后, 向芯片中带有计数器的各个操作处理模块同时发送数值复制指令。 The instruction sending unit 12 is configured to simultaneously send a value copy instruction to each operation processing module with a counter in the chip after the instruction receiving unit 11 receives the counter acquisition instruction.
更为具体的, 芯片中带有计数器的各个操作处理模块包括: 输入模块 3、 处 理模块 4、 输出模块 5。 本领域技术人员应该知道, 芯片中的输入模块、 处理模 块和输出模块都可能是多个。 多个输入模块表示芯片有多个输入接口, 多个输 出模块表示芯片有多个输出接口, 芯片内部也可能存在多个处理模块, 处理模 块之间可能串行也可能并行。 本实施例中以芯片中输入模块、 处理模块、 输出 模块各一个为例进行说明。 More specifically, each operation processing module with a counter in the chip includes: an input module 3, a processing module 4, and an output module 5. Those skilled in the art will appreciate that there may be multiple input modules, processing modules, and output modules in the chip. Multiple input modules indicate that the chip has multiple input interfaces. Multiple output modules indicate that the chip has multiple output interfaces. There may also be multiple processing modules inside the chip. The processing modules may be serially connected in parallel. In this embodiment, an input module, a processing module, and an output module in the chip are taken as an example for description.
输入模块 3、 处理模块 4、 输出模块 5这些操作处理模块带有至少一个计数 器, 用于对本操作处理模块已经处理的指令、 报文等业务数据进行统计。 例如, 输入模块 3带有输入计数器 31 , 用于统计所述输入模块 3已经接收的业务数据 的数量; 处理模块 4带有丢弃计数器 41 , 用于统计被处理模块 4丟弃的业务数 据的数量; 输出模块 5带有输出计数器 51 , 用于统计输出模块 5输出的业务数 据的数量。 Input module 3, processing module 4, output module 5 These operation processing modules are provided with at least one counter for counting service data such as instructions and messages that have been processed by the operation processing module. For example, the input module 3 has an input counter 31 for counting the number of service data that the input module 3 has received; the processing module 4 has a drop counter 41 for counting the number of service data discarded by the processing module 4. The output module 5 has an output counter 51 for counting the number of service data output by the output module 5.
优选的, 指令发送单元 12所发送的数值复制指令为最高优先级的指令, 各 个操作处理模块接收该数值复制指令后, 优先执行该指令。 本实施例为使监控 模块 2 更加准确的对芯片状态做出判断, 需要获取芯片中各个操作处理模块在 同一时刻的计数数值。 要达到上述目的, 不仅需要指令发送单元 12在同一时刻 向的各个操作处理模块发送数值复制指令, 还需要各个操作处理模块同时执行 该指令。 因此, 数值复制指令应该为最高优先级的指令, 以使各个操作处理模 块接收后立即执行该指令, 而不会将该指令放入待执行的指令序列中排队。 Preferably, the value copy instruction sent by the command sending unit 12 is the highest priority instruction, and each operation processing module receives the value copy instruction and preferentially executes the instruction. In this embodiment, in order to make the monitoring module 2 more accurately judge the state of the chip, it is necessary to obtain the count value of each operation processing module in the chip at the same time. To achieve the above object, not only the instruction transmitting unit 12 needs to send a value copy instruction to each operation processing module at the same time, but also each operation processing module needs to execute the instruction at the same time. Therefore, the value copy instruction should be the highest priority instruction so that each operation processing module executes the instruction immediately after it is received, without placing the instruction in the sequence of instructions to be executed.
进一步的, 各个操作处理模块接收数值复制指令后, 立即复制自身计数器 当前的计数数值。 更为具体的, 各个操作处理模块复制自身计数器当前的计数 数值的方式可以采用各种数据复制技术, 例如数据快照技术, 且各个操作处理 模块在复制计数器的计数数值的过程中, 计数器本身不受影响、 继续运行。 Further, after each operation processing module receives the value copy instruction, it immediately copies the current count value of the own counter. More specifically, each operation processing module can copy the current counter value of the counter itself by using various data replication technologies, such as data snapshot technology, and each operation processing module does not receive the counter itself during the process of copying the counter value. Influence, continue to run.
各个操作处理模块复制计数数值后, 需要将这些计数数值保存到指定的位 置, 供监控模块 2读取。 所述指定位置包括: 各个操作处理模块自身的存储单 元、 或所述控制模块, 在必要时也可以保存在与芯片相连的外部存储设备中。 以各个操作处理模块将复制的计数数值保存在自身的存储单元中为例, 则输入 模块 3将输入计数器 31当前的计数数值存储至输入计数快照单元 32;处理模块 4将丟弃计数器 41当前的计数数值存储至丢弃计数快照单元 42; 输出模块 5将 输出计数器 51当前的计数数值存储至输出计数快照单元 52。 After each operation processing module copies the count value, it is necessary to save these count values to the specified position for the monitoring module 2 to read. The specified location includes: a storage list of each operation processing module itself The element, or the control module, can also be stored in an external storage device connected to the chip if necessary. Taking each operation processing module to save the copied count value in its own storage unit as an example, the input module 3 stores the current count value of the input counter 31 to the input count snapshot unit 32; the processing module 4 will discard the current counter 41 The count value is stored to the discard count snapshot unit 42; the output module 5 stores the current count value of the output counter 51 to the output count snapshot unit 52.
需要说明的是, 各个操作处理模块在复制自身计数器的计数数值时, 各计 数器不受影响、 继续运行。 It should be noted that when each operation processing module copies the count value of its own counter, each counter is not affected and continues to operate.
监控模块 2, 用于从所述指定位置获取各个操作处理模块计数器的计数数 值, 并根据这些计数数值确定所述芯片的状态。 在具体实现中, 该监控模块 2 可以是 CPU。 The monitoring module 2 is configured to obtain a count value of each operation processing module counter from the specified location, and determine a state of the chip according to the count value. In a specific implementation, the monitoring module 2 can be a CPU.
更为具体的, 监控模块 2在其需要的时候, 从保存计数数值的指定位置读 取计数数值。 需要强调的是, 虽然本实施例中的监控模块 2读取计数数值的方 式也可以是依次读取, 但是其读取的是各个操作处理模块于同一时刻复制计数 器后保存在指定位置的计数数值, 而不是直接从各个操作处理模块的计数器中 读取其当前的计数数值。 More specifically, the monitoring module 2 reads the count value from the specified position where the count value is stored when it is needed. It should be emphasized that although the manner in which the monitoring module 2 in the embodiment reads the count value may be sequentially read, it reads the count value of each operation processing module that is saved at the specified position after copying the counter at the same time. Instead of reading its current count value directly from the counters of the individual operational processing modules.
监控模块 2根据读取的各个操作处理模块计数器的计数数值确定芯片的状 态。 以芯片中具有输入模块 3、 处理模块 4、输出模块 5三个操作处理模块为例: 假设监控模块 2读取某一时刻输入计数器 31的计数数值为 A、 丟弃计数器 41的计数数值为 B、 输出计数器 51的计数数值为 C, 同时假设在该时刻, 处理 模块 4正在处理的业务数据数量为 X, 则 X=A- ( B+C )。 The monitoring module 2 determines the state of the chip based on the count value of each of the read operation processing module counters. Taking three operation processing modules of the input module 3, the processing module 4, and the output module 5 in the chip as an example: Assume that the monitoring module 2 reads the count value of the input counter 31 at a certain time, and the count value of the discard counter 41 is B. The count value of the output counter 51 is C, and it is assumed that at this moment, the number of service data being processed by the processing module 4 is X, then X=A-(B+C).
一般情况下, 芯片内部正在处理的业务数据量 X会相对较小, 通常为几十 个。 用户可以根据自身需要设定 X的阈值, 例如 100。 当 A- ( B+C ) 的值大于 预设的 X阈值 100时,监控模块 1即判定该芯片出现异常;优选的,即使 A-( B+C ) 的值不超过预设的 X阈值, 但如果在连续的多次监测过程中发现 B/A的变化较 大, 也可以触发进一步的芯片故障检测。 In general, the amount of business data X being processed inside the chip will be relatively small, usually dozens. The user can set the threshold of X according to his own needs, for example 100. When the value of A-(B+C) is greater than the preset X threshold 100, the monitoring module 1 determines that the chip is abnormal; preferably, even if the value of A-(B+C) does not exceed the preset X threshold, However, if the B/A change is found to be large during successive multiple monitoring, further chip failure detection can be triggered.
现有技术中, 监控模块都是逐个依次串行读取计数器, 监控模块每读一个 计数器需要先发起读取指令, 再等待结果, 而监控模块和芯片之间一般又是采 用控制通道通信, 速率较慢, 每次读取操作都有一定的时延。 所以现有技术中 由于监控模块不能获得各个操作处理模块在同一时刻的计数数值, 其计算得出 的处理模块正在处理的业务数据数量与该处理模块在某一时刻实际正在处理的 业务数据数量有较大差距, 导致监控模块不能准确的判断芯片真实状态。 而本 发明实施例提供的芯片状态监控装置, 通过控制模块在同一时刻向芯片中各个 操作处理模块发送指令, 使监控模块可以获得各个操作处理模块计数器在同一 时刻的计数数值, 从而更加准确的对芯片状态做出判断。 In the prior art, the monitoring module sequentially reads the counters one by one in sequence, and each time the monitoring module reads a counter, it needs to initiate a read command first, and then waits for the result, and the monitoring module and the chip generally use the control channel to communicate, the rate. Slower, each read operation has a certain delay. Therefore, in the prior art, because the monitoring module cannot obtain the count value of each operation processing module at the same time, the calculated number of service data being processed by the processing module is actually being processed by the processing module at a certain moment. There is a large gap in the number of business data, which causes the monitoring module to not accurately determine the true state of the chip. The chip state monitoring device provided by the embodiment of the present invention sends a command to each operation processing module in the chip at the same time by the control module, so that the monitoring module can obtain the count value of each operation processing module counter at the same time, thereby more accurately The state of the chip is judged.
参见图 5 , 为本发明提供的芯片实施例结构示意图, 如图 5所示, 该芯片包 括: 控制模块 1 以及至少两个带有计数器的操作处理模块, 在本实施例中, 以 包括输入模块 3、 处理模块 4、 输出模块 5三个带有计数器的操作处理模块的芯 片为例。 本领域技术人员应该知道, 芯片中的输入模块、 处理模块和输出模块 都可能是多个。 本实施例中以芯片中输入模块 3、 处理模块 4、 输出模块 5各一 个为例进行说明。 5 is a schematic structural diagram of a chip embodiment according to the present invention. As shown in FIG. 5, the chip includes: a control module 1 and at least two operation processing modules with a counter. In this embodiment, an input module is included. 3. The processing module 4 and the output module 5 are three chips of an operation processing module with a counter as an example. Those skilled in the art will appreciate that there may be multiple input modules, processing modules, and output modules in the chip. In this embodiment, an input module 3, a processing module 4, and an output module 5 in the chip are taken as an example for description.
控制模块 1 ,用于向芯片中带有计数器的各个操作处理模块同时发送数值复 制指令。 控制模块 1 向芯片中带有计数器的各个操作处理模块同时发送数值复 制指令的动作由计数器获取指令触发。 所述计数器获取指令可以是由与芯片连 接的监控模块 2发送的, 也可以是由控制模块 1 自身周期性触发的。控制模块 1 接收计数器获取指令后,向芯片中带有计数器的各个操作处理模块(输入模块 3、 处理模块 4、 输出模块 5 ) 同时发送数值复制指令。 The control module 1 is configured to simultaneously send a numerical copy instruction to each operation processing module with a counter in the chip. Control Module 1 The action of simultaneously transmitting a value copy instruction to each operation processing module with a counter in the chip is triggered by the counter acquisition instruction. The counter acquisition command may be sent by the monitoring module 2 connected to the chip, or may be periodically triggered by the control module 1 itself. After receiving the counter acquisition command, the control module 1 simultaneously sends a numerical copy instruction to each operation processing module (input module 3, processing module 4, and output module 5) with a counter in the chip.
优选的, 控制模块 1 向各个操作处理模块发送的数值复制指令为最高优先 级的指令, 各个操作处理模块接收该数值复制指令后, 优先执行该指令。 本实 施例为使监控模块更加准确的对芯片状态做出判断, 需要获取芯片中各个操作 处理模块在同一时刻的计数数值。 故不仅需要控制模块在同一时刻向的各个操 作处理模块发送数值复制指令, 还需要各个操作处理模块同时执行该指令。 Preferably, the value copy instruction sent by the control module 1 to each operation processing module is the highest priority instruction, and each operation processing module receives the value copy instruction and preferentially executes the instruction. In this embodiment, in order to make the monitoring module more accurately judge the state of the chip, it is necessary to obtain the count value of each operation processing module in the chip at the same time. Therefore, not only the control module needs to send a value copy instruction to each operation processing module at the same time, but also each operation processing module needs to execute the instruction at the same time.
操作处理模块, 用于在接收控制模块 1 发送的数值复制指令后, 立即复制 自身计数器当前的计数数值, 并将复制的计数数值保存至指定位置; 供监控模 块读取, 以确定所述芯片的状态。 The operation processing module is configured to: after receiving the value copy instruction sent by the control module 1, immediately copy the current count value of the counter, and save the copied count value to the designated position; and the monitoring module reads to determine the chip status.
更为具体的, 各个操作处理模块复制自身计数器当前的计数数值的方式可 以采用各种数据复制技术, 例如数据快照。 各个操作处理模块完成复制后, 既 可以将复制的计数数值保存在自身的存储单元中, 例如输入模块 3 的输入计数 快照单元 32、 处理模块 4的丢弃计数快照单元 42、 输出模块 5的输出计数快照 单元 52; 也可以将复制的计数数值发送至控制模块进行保存, 在必要时甚至可 以发送至芯片外部的存储设备进行保存, 且各个操作处理模块在复制计数器计 数数值的过程中, 计数器本身不受影响、 继续运行。 More specifically, various operation processing modules can copy the current count value of their counters by using various data replication techniques, such as data snapshots. After each operation processing module completes the copying, the copied count value can be saved in its own storage unit, for example, the input count snapshot unit 32 of the input module 3, the discard count snapshot unit 42 of the processing module 4, and the output count of the output module 5. The snapshot unit 52; may also send the copied count value to the control module for saving, and may even be sent to a storage device external to the chip for saving if necessary, and each operation processing module is in the copy counter During the numerical process, the counter itself is not affected and continues to run.
与芯片连接的监控模块 2在其需要时, 从指定位置获取芯片各个操作处理 模块计数器的计数数值, 并根据这些计数数值确定芯片的状态。 需要强调的是, 本实施例中的监控模块 2无论以何种方式读取指定位置的计数数值, 其读取的 都是各个操作处理模块在同一时刻复制后保存在指定位置的计数数值, 而不是 各个操作处理模块的计数器当前的计数数值。 The monitoring module 2 connected to the chip acquires the count values of the respective operation processing module counters of the chip from the designated position when necessary, and determines the state of the chip based on the count values. It should be emphasized that the monitoring module 2 in this embodiment reads the count value of the specified position in any manner, and reads the count value of each operation processing module that is saved at the specified position after being copied at the same time, and Not the current count value of the counter of each operation processing module.
本发明实施例提供的芯片, 通过控制模块在同一时刻向芯片中具有计数器 的各个操作处理模块发送要求获取其计数器计数数值的指令, 使与该芯片连接 的监控模块可以获得芯片中各个操作处理模块计数器在同一时刻的计数数值, 以便更加准确的对芯片状态做出判断。 是可以通过计算机程序来控制相关的硬件来完成, 所述的程序可存储于一计算 机可读取存储介质中, 该程序在执行时, 可包括如上述各方法的实施例的流程。 其中, 所述的存储介质可为磁碟、 光盘、 只读存储记忆体(Read-Only Memory, ROM )或随机存储记忆体(Random Access Memory, RAM ) 等。 The chip provided by the embodiment of the present invention sends an instruction for acquiring the counter count value to each operation processing module having a counter in the chip at the same time by the control module, so that the monitoring module connected to the chip can obtain each operation processing module in the chip. The count value of the counter at the same time, in order to make a more accurate judgment of the state of the chip. This can be accomplished by a computer program controlling the associated hardware, which can be stored in a computer readable storage medium, which, when executed, can include the flow of an embodiment of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
以上所揭露的仅为本发明一种较佳实施例而已, 当然不能以此来限定本发 明之权利范围, 因此依本发明权利要求所作的等同变化, 仍属本发明所涵盖的 范围。 The above description is only a preferred embodiment of the present invention, and the scope of the present invention is not limited thereto, and the equivalent changes made by the claims of the present invention are still within the scope of the present invention.
Claims
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2011/079249 WO2012149720A1 (en) | 2011-09-01 | 2011-09-01 | Chip state monitoring method and device, and chip |
| CN2011800018090A CN102369517A (en) | 2011-09-01 | 2011-09-01 | Chip state monitoring method and device and chip |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2011/079249 WO2012149720A1 (en) | 2011-09-01 | 2011-09-01 | Chip state monitoring method and device, and chip |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2012149720A1 true WO2012149720A1 (en) | 2012-11-08 |
Family
ID=45761449
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2011/079249 Ceased WO2012149720A1 (en) | 2011-09-01 | 2011-09-01 | Chip state monitoring method and device, and chip |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN102369517A (en) |
| WO (1) | WO2012149720A1 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109885442B (en) * | 2019-02-13 | 2020-03-27 | 上海燧原智能科技有限公司 | Performance analysis method, device, equipment and storage medium |
| CN114356600B (en) * | 2021-12-31 | 2025-07-18 | 展讯通信(深圳)有限公司 | Multiplexed communication method, device, first chip and second chip |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20030067334A1 (en) * | 2001-10-05 | 2003-04-10 | Eckhard Brass | Circuit configuration for processing data, and method for identifying an operating state |
| CN101079623A (en) * | 2006-05-25 | 2007-11-28 | 李�浩 | A large-capacity and no-refresh high-speed statistical counter |
| CN101309184A (en) * | 2008-05-28 | 2008-11-19 | 华为技术有限公司 | Method and device for detecting micro-engine failure |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100419693C (en) * | 2005-09-16 | 2008-09-17 | 鸿富锦精密工业(深圳)有限公司 | Computer system status monitoring circuit |
| CN101206614B (en) * | 2006-12-20 | 2010-12-08 | 上海华虹集成电路有限责任公司 | Simulator for simulating register with specific function |
-
2011
- 2011-09-01 CN CN2011800018090A patent/CN102369517A/en active Pending
- 2011-09-01 WO PCT/CN2011/079249 patent/WO2012149720A1/en not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20030067334A1 (en) * | 2001-10-05 | 2003-04-10 | Eckhard Brass | Circuit configuration for processing data, and method for identifying an operating state |
| CN101079623A (en) * | 2006-05-25 | 2007-11-28 | 李�浩 | A large-capacity and no-refresh high-speed statistical counter |
| CN101309184A (en) * | 2008-05-28 | 2008-11-19 | 华为技术有限公司 | Method and device for detecting micro-engine failure |
Also Published As
| Publication number | Publication date |
|---|---|
| CN102369517A (en) | 2012-03-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN102984059B (en) | Gigabit Ethernet redundancy network interface card and link switching condition criterion output control method thereof | |
| WO2016192408A1 (en) | Fault detection method and apparatus for node in cluster system | |
| WO2019072085A1 (en) | Log entry duplication method and device, computer equipment, and storage medium | |
| US9323596B2 (en) | Network apparatus and method of monitoring processor | |
| CN110149220A (en) | A method and device for managing a data transmission channel | |
| CN111163018B (en) | Network equipment and method for reducing transmission delay thereof | |
| US20200019485A1 (en) | Dynamic management of monitoring tasks in a cloud environment | |
| CN102662782A (en) | Method and device for monitoring system bus | |
| WO2017161997A1 (en) | Packet channel detection method and apparatus | |
| WO2017219834A1 (en) | Monitoring method and device, and watchdog system | |
| JP2019096243A (en) | Semiconductor device and method for detecting failures of the same | |
| CN110535715A (en) | Port status real-time detection method, circuit and interchanger based on Linux | |
| JP2017168950A (en) | Communication control device, communication system, and communication control method | |
| US11243603B2 (en) | Power management of an event-based processing system | |
| WO2012149720A1 (en) | Chip state monitoring method and device, and chip | |
| CN109726151B (en) | Method, apparatus, and medium for managing input-output stack | |
| WO2011137833A1 (en) | Network processor and method for diagnosing programs stored in network processor | |
| US11550694B2 (en) | Packet backpressure detection method, apparatus, and device | |
| CN114756489B (en) | Direct memory access (DMA) engine for diagnostic data | |
| US8788735B2 (en) | Interrupt control apparatus, interrupt control system, interrupt control method, and interrupt control program | |
| JP2019153981A (en) | Communication device, communication system, and communication method | |
| CN109947798A (en) | Method and device for processing stream events | |
| CN115633044B (en) | Message processing methods, devices, electronic equipment and storage media | |
| US12487866B2 (en) | Synchronized system-on-chip telemetry aggregation and buffering | |
| JP5742343B2 (en) | Transmission apparatus and information acquisition control method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| WWE | Wipo information: entry into national phase |
Ref document number: 201180001809.0 Country of ref document: CN |
|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 11864633 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 11864633 Country of ref document: EP Kind code of ref document: A1 |