A method and application for reducing chip pipeline timestamp bus width

By encoding the low bits of the inbound timestamp in the chip and using the timestamp conversion module for borrowing compensation, the problem of increased pipeline bus width caused by the 64-bit timestamp is solved, the chip design complexity and manufacturing cost are reduced, and time is achieved. Efficient conversion of stamps.

CN115987476BActive Publication Date: 2024-09-13SUZHOU CENTEC COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211666308.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-23
Publication Date
2024-09-13
Estimated Expiration
2042-12-23

AI Technical Summary

Technical Problem

In the existing technology, the 64-bit inbound timestamp causes the chip pipeline bus width to increase, thereby increasing the chip design complexity and manufacturing cost.

Method used

When the inbound timestamp capture module captures the M-bit inbound timestamp, it encodes its low-order N bits into the message information bus, and uses the timestamp conversion module to base the M-bit outbound timestamp and the low-order N bits on the inbound direction. The timestamp is converted, and the expected M-bit inbound direction timestamp is calculated using the borrow compensation method, which reduces the pipeline bus width.

Benefits of technology

It effectively reduces the width of the pipeline bus of the switching chip carrying a 64-bit timestamp, solves the problem of value inversion of the switching chip during timestamp calculation, simplifies chip design, and reduces manufacturing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115987476B
    Figure CN115987476B
Patent Text Reader

Abstract

The present invention discloses a method for reducing the bit width of a chip pipeline timestamp bus, the method comprising the following steps: when an inbound timestamp capture module captures an M-bit inbound timestamp, the low-order N-bit inbound timestamp of the M-bit inbound timestamp is encoded into a message information bus, wherein N is less than M; the outbound timestamp capture module sends a capture signal to a clock engine, the clock engine captures the M-bit outbound timestamp and transmits it to a timestamp conversion module; the timestamp conversion module converts the M-bit outbound timestamp and the low-order N-bit inbound timestamp in the message information bus to obtain an M-bit inbound timestamp; and a message editing module receives the M-bit inbound timestamp and edits the M-bit inbound timestamp to a predefined position of the message. The method can effectively reduce the pipeline bus width of the timestamp carried by the switching chip.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electronic communications, and in particular to a method and application for reducing the bit width of a chip Pipeline timestamp bus. Background Art

[0002] When the message is forwarded by the switching chip, an ingress timestamp (ingresstimestamp) will be generated based on the MAC layer of the ingress port. The ingress timestamp will be stored in the message information (PI, PacketInformation) of the pipeline bus. As the message pipeline is processed step by step, it is transmitted to the editing module. The editing module fills the ingress timestamp into the message to meet various protocol applications, such as INT (In-band Telemetry), ErspanV3 (EncapsulatedRemoteSwitchPortAnalyzer), and PTP (PrecisionTimeProtocol).

[0003] The chip pipeline needs to go through three main pipeline processes: IPE (ingressPipelineEngine, ingress pipeline processing), BSR (BufferStoreRetrieve, cache storage retrieval) and EPE (Egress PipelineEngine, egress pipeline processing). The ingress timestamp indicates the timestamp when the message enters the switching chip. Generally, the MAC layer of the ingress port generates a capture signal to the TsEngine (high-precision clock engine), and the TsEngine immediately generates a set of timestamps. When the ingress timestamp needs to be edited into the message, the ingress timestamp needs to be passed to the editing module of the EPE before the ingress timestamp can be edited into the message.

[0004] In the prior art, when the MAC layer of the inbound port captures the inbound timestamp, the M-bit inbound timestamp is encoded into the message information. The message information is a bus that carries message processing information and runs through the IPE, BSR, and EPE of the switching chip. As the message is processed in the pipeline, the M-bit inbound timestamp is passed to the edit module of the EPE along with the message information. The edit module directly obtains the M-bit inbound timestamp from the message information and edits it to a predefined position in the message, such as the Metadata part of the INT protocol and the extendheader part of the ErspanV3 message. At this time, the inbound timestamp of the switching chip is a 64-bit value, that is, M is 64.

[0005] Since the message information runs through the IPE, BSR and EPE of the chip, the bus width of the message information restricts the chip design complexity and manufacturing cost. The 64-bit inbound timestamp will greatly increase the message information bus width of IPE, BSR and EPE, and also increase the chip design complexity and manufacturing cost.

[0006] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgment or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention

[0007] The purpose of the present invention is to provide a method and application for reducing the bit width of a chip pipeline timestamp bus, which can reduce the pipeline bus width of the bit timestamp carried by the switching chip, thereby reducing the design complexity and chip manufacturing cost caused by the chip pipeline bus width.

[0008] To achieve the above objective, an embodiment of the present invention provides a method for reducing the bit width of a chip Pipeline timestamp bus.

[0009] In one or more embodiments of the present invention, the method includes: when the inbound timestamp capture module captures an M-bit inbound timestamp, the low-order N-bit inbound timestamp of the M-bit inbound timestamp is encoded into a message information bus, where N is less than M; the outbound timestamp capture module sends a capture signal to a clock engine, the clock engine captures the M-bit outbound timestamp and passes it into a timestamp conversion module; the timestamp conversion module converts the M-bit outbound timestamp and the low-order N-bit inbound timestamp in the message information bus to obtain an M-bit inbound timestamp; and the message editing module receives the M-bit inbound timestamp and edits the M-bit inbound timestamp to a predefined position in the message.

[0010] In one or more embodiments of the present invention, the low-order N-bit inbound timestamp of the M-bit inbound timestamp is encoded into the message information bus, including: when the message enters the chip from the inbound port, the inbound timestamp capture module notifies the high-precision clock engine to generate an M-bit inbound timestamp; and the inbound timestamp capture module truncates the M-bit inbound timestamp to obtain the low-order N-bit inbound timestamp, and encodes the low-order N-bit inbound timestamp into the message information.

[0011] In one or more embodiments of the present invention, the timestamp conversion module obtains an M-bit inbound timestamp based on the M-bit outbound timestamp and the low-order N-bit inbound timestamp in the message information bus, including: the timestamp conversion module obtains the low-order N-bit inbound timestamp in the message information, combines the M-bit outbound timestamp, cuts out the low-order N-bit outbound timestamp from the M-bit outbound timestamp, and obtains the M-bit inbound timestamp through a conversion algorithm.

[0012] In one or more embodiments of the present invention, the M-bit input direction timestamp is calculated through a conversion algorithm, including: comparing the sizes of the N-bit output direction timestamp and the N-bit input direction timestamp; when the N-bit input direction timestamp is smaller than the N-bit output direction timestamp, using the N-bit input direction timestamp to replace the low-order N-bit output direction timestamp in the M-bit output direction timestamp to obtain the M-bit input direction timestamp.

[0013] In one or more embodiments of the present invention, the M-bit input timestamp is calculated by a conversion algorithm, and further includes: when the N-bit input timestamp is greater than the N-bit output timestamp, the time difference between the N-bit input timestamp and the N-bit output timestamp is calculated by borrow compensation to convert the expected M-bit input timestamp.

[0014] In one or more embodiments of the present invention, the time difference value is calculated by borrow compensation, including: compensating the value 1 of the N+1th bit of the N-bit outgoing direction timestamp by borrowing, so that the N+1-bit outgoing direction timestamp is larger than the N-bit inbound direction timestamp, then the N+1-bit outgoing direction timestamp minus the N-bit inbound direction timestamp obtains a positive time difference, that is, the residence time of message forwarding; and subtracting the time difference from the M-bit outgoing direction timestamp to obtain the M-bit inbound direction timestamp.

[0015] In one or more embodiments of the present invention, the method further includes: M is 64, 30≤N≤40.

[0016] In another aspect of the present invention, a device for reducing the bit width of a chip Pipeline timestamp bus is provided, which includes an input direction processing module, an output direction processing module, a timestamp conversion module and a message editing module.

[0017] The inbound direction processing module is used to encode the lower N-bit inbound direction timestamps of the M-bit inbound direction timestamps into the message information bus when the inbound direction timestamp capture module captures the M-bit inbound direction timestamps, wherein N is less than M.

[0018] The outgoing direction processing module is used for the outgoing direction timestamp capture module to send a capture signal to the clock engine, and the clock engine captures the M-bit outgoing direction timestamp and transmits it to the timestamp conversion module.

[0019] The timestamp conversion module is used for converting the timestamp conversion module to obtain an M-bit inbound timestamp based on the M-bit outbound timestamp and the low-order N-bit inbound timestamp in the message information bus.

[0020] The message editing module is used for receiving the M-bit inbound time stamp and editing the M-bit inbound time stamp to a predefined position of the message.

[0021] In one or more embodiments of the present invention, the inbound direction processing module is also used for: when a message enters the chip from the inbound direction port, the inbound direction timestamp capture module notifies the high-precision clock engine to generate an M-bit inbound direction timestamp; and the inbound direction timestamp capture module truncates the M-bit inbound direction timestamp to obtain the low-order N-bit inbound direction timestamp, and encodes the low-order N-bit inbound direction timestamp into the message information.

[0022] In one or more embodiments of the present invention, the outgoing direction processing module is also used for: the timestamp conversion module obtains the low-order N-bit incoming direction timestamp in the message information, combines it with the M-bit outgoing direction timestamp, cuts out the low-order N-bit outgoing direction timestamp code from the M-bit outgoing direction timestamp, and calculates the M-bit ingoing direction timestamp through a conversion algorithm.

[0023] In one or more embodiments of the present invention, the timestamp conversion module is also used to: compare the sizes of the N-bit outgoing timestamp and the N-bit incoming timestamp; when the N-bit incoming timestamp is smaller than the N-bit outgoing timestamp, use the N-bit incoming timestamp to replace the low-order N-bit outgoing timestamp in the M-bit outgoing timestamp to obtain the M-bit incoming timestamp.

[0024] In one or more embodiments of the present invention, the timestamp conversion module is also used for: when the N-bit input timestamp is greater than the N-bit output timestamp, the time difference between the N-bit input timestamp and the N-bit output timestamp is calculated by borrow compensation to convert the expected M-bit input timestamp.

[0025] In one or more embodiments of the present invention, the timestamp conversion module is also used to: compensate the value of 1 of the N+1th bit of the N-bit outgoing direction timestamp by borrowing, so that the N+1-bit outgoing direction timestamp is larger than the N-bit inbound direction timestamp, and then the N+1-bit outgoing direction timestamp minus the N-bit inbound direction timestamp obtains a positive time difference, that is, the residence time of the message forwarding; and the M-bit outgoing direction timestamp minus the time difference obtains the M-bit inbound direction timestamp.

[0026] In one or more implementations of the present invention, the inbound direction processing module is further configured to: M is 64, 30≤N≤40.

[0027] In another aspect of the present invention, an electronic device is provided, comprising: at least one processor; and a memory, wherein the memory stores instructions, and when the instructions are executed by the at least one processor, the at least one processor executes the method for reducing the chip Pipeline timestamp bus bit width as described above.

[0028] In another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for reducing the bit width of the chip Pipeline timestamp bus are implemented as described above.

[0029] Compared with the prior art, the method and application of reducing the chip Pipeline timestamp bus bit width according to the implementation mode of the present invention can solve the problem of excessive consumption of pipeline bus bit width, obtain the timestamp through the pipeline and combine it with the target timestamp with a shorter bit width, and obtain the target timestamp with a longer bit width through the algorithm operation of the conversion module, thereby effectively reducing the pipeline bus width of the switching chip carrying a 64-bit timestamp; solve the problem of switching chip value flipping during timestamp calculation, innovatively use the borrow compensation method, and can perform borrow subtraction operations based on binary data, thereby realizing the improvement of the timestamp conversion algorithm, greatly reducing the design complexity and chip manufacturing cost caused by the chip pipeline bus width. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 is a flow chart of a method for reducing the bit width of a chip Pipeline timestamp bus according to an embodiment of the present invention;

[0031] Figure 2 It is a specific structural flow chart of a method for reducing the chip Pipeline timestamp bus bit width according to an embodiment of the present invention;

[0032] Figure 3It is a flowchart of a timestamp conversion algorithm of a method for reducing the bit width of a chip Pipeline timestamp bus according to an embodiment of the present invention;

[0033] Figure 4 It is a structural diagram of a device for reducing the bit width of a chip Pipeline timestamp bus according to an embodiment of the present invention;

[0034] Figure 5 It is a hardware structure diagram of a computing device for reducing the chip Pipeline timestamp bus bit width according to an embodiment of the present invention. DETAILED DESCRIPTION

[0035] The specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings, but it should be understood that the protection scope of the present invention is not limited by the specific implementation modes.

[0036] Unless explicitly stated otherwise, throughout the specification and claims, the term “comprise” or variations such as “include” or “comprising”, etc., will be understood to include the stated elements or components but not to exclude other elements or components.

[0037] The technical solutions provided by various embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.

[0038] Example 1

[0039] like Figures 1 to 3 As shown, a method for reducing the chip Pipeline timestamp bus bit width in an embodiment of the present invention is introduced, and the method includes the following steps.

[0040] In step S101 , when the inbound timestamp capture module captures an M-bit inbound timestamp, the lower N-bit inbound timestamps of the M-bit inbound timestamps are encoded into a message information bus, where N is less than M.

[0041] In this embodiment, when a message enters the chip from the inbound port, the inbound timestamp capture module notifies the high-precision clock engine to generate an M-bit inbound timestamp; and the inbound timestamp capture module truncates the M-bit inbound timestamp to obtain the low-order N-bit inbound timestamp, and encodes the low-order N-bit inbound timestamp into the message information.

[0042] like Figure 2As shown, in the IP Epiline of the ASIC chip, the ingress timestamp capture module (ingresstimestampcapturemodule) triggers the high-precision time engine (TsEngine) to capture the M-bit ingress timestamp (Mbitingresstimestamp), and the high-precision time engine passes the M-bit ingress timestamp to the ingress timestamp capture module, and the ingress timestamp capture module encodes the low-order N-bit timestamp (Nbittimestamp) of the M-bit ingress timestamp into the PI.

[0043] Specifically, in order to meet the requirements of INT protocol and ErspanV3 protocol, the timestamp in the inbound direction of the switching chip is generally a 64-bit value, that is, M is 64. The N-bit timestamp is a timestamp shorter than the M-bit timestamp, and the value of N is defined as between [30,40]. Because the chip message from IPEpipeline to EPEpipeline will not exceed 1s at most, the typical reference value of N is 30 bits, which is sufficient to represent the delay time of the message forwarding from the chip through IPE, BSR to EPE.

[0044] In step S102, the outgoing timestamp capture module sends a capture signal to the clock engine, and the clock engine captures the M-bit outgoing timestamp and transmits it to the timestamp conversion module.

[0045] Specifically, a timestamp conversion module is added in the switching chip EPE. Before the EPE edits the message, the timestamp capture module of the EPE's outgoing direction triggers the high-precision clock engine to capture the M-bit outgoing direction timestamp, where the number of bits of the M-bit outgoing direction timestamp is consistent with the M-bit inbound direction timestamp, and is passed to the EPE timestamp conversion module for subsequent processing.

[0046] like Figure 2 As shown, in the EP Epipeline of the ASIC chip, the egress timestamp capture module (egress timestamp capture module) triggers the high-precision time engine (TsEngine) to capture the M-bit egress timestamp (Mbit engress timestamp), and the high-precision time engine passes the M-bit egress timestamp to the egress timestamp capture module, and the egress timestamp capture module passes the M-bit egress timestamp to the timestamp forwarding module (timestamp translate module).

[0047] In step S103, the timestamp conversion module converts the M-bit outgoing timestamp and the low-order N-bit ingoing timestamp in the message information bus to obtain an M-bit ingoing timestamp.

[0048] In this embodiment, the timestamp conversion module obtains the low-order N-bit inbound timestamp in the message information, combines it with the M-bit outbound timestamp, extracts the low-order N-bit outbound timestamp code from the M-bit outbound timestamp, and obtains the M-bit inbound timestamp through calculation using a conversion algorithm.

[0049] Specifically, the conversion algorithm is to compare the size of the N-bit outgoing timestamp and the N-bit incoming timestamp. When the N-bit incoming timestamp is smaller than the N-bit outgoing timestamp, it indicates that the time for the message to be processed by the IPE, BSR and EPE does not generate a time carry, and the N-bit ingoing timestamp is directly used to replace the low-order N-bit outgoing timestamp in the M-bit outgoing timestamp to obtain the M-bit ingoing timestamp.

[0050] When the N-bit inbound timestamp is greater than the N-bit outbound timestamp, it indicates that the time for the message to be processed by IPE, BSR and EPE has been generated based on the N-bit outbound timestamp and carried to the N+1th bit. At this time, the low-order N-bit outbound timestamp cannot be directly used to perform a subtraction operation on the N-bit inbound timestamp. The time difference between the N-bit inbound timestamp and the N-bit outbound timestamp is calculated through borrow compensation to convert the expected M-bit inbound timestamp.

[0051] Furthermore, the borrow compensation method is to compensate the value of 1 of the N+1th bit of the N-bit outgoing direction timestamp by borrowing, so that the N+1-bit outgoing direction timestamp is larger than the N-bit inbound direction timestamp, and then the N+1-bit outgoing direction timestamp minus the N-bit inbound direction timestamp obtains a positive time difference, that is, the residence time of message forwarding; and the M-bit outgoing direction timestamp minus the time difference obtains the M-bit inbound direction timestamp.

[0052] like Figure 3 As shown, P1: Compare the sizes of NbittimestampA and lowNbittimestampB. If NbittimestampA is less than lowNbittimestampB, execute P2, otherwise execute P3. P2: When NbittimestampA is less than lowNbittimestampB, use NbittimestampA to replace the lowNbit value in Mbit timestampB to obtain MbittimestampA. P3: When NbittimestampA is greater than lowNbittimestampB, lowNbittimestampB and NbittimestampA need to calculate the time difference through borrow compensation to convert the expected MbittimestampA. The formula is as follows:

[0053] (1){1,NbittimestampB}-{0,Nbittimestamp}={0,Nbittimestampdifference}; (2)

[0054] {MbittimestampB}-{Nbittimestampdifference}=MbittimestampA. MbittimestampA is obtained by formula (2) as the final M-bit inbound timestamp.

[0055] In step S104, the message editing module receives the M-bit inbound time stamp and edits the M-bit inbound time stamp to a predefined position in the message.

[0056] like Figure 2 As shown, in the EP Epiline of the ASIC chip, the EPE timestamp forwarding module restores the original M-bit inbound timestamp through the conversion algorithm and transmits it to the packet edit module.

[0057] In this embodiment, a 64-bit inbound timestamp and a low-order 30-bit inbound timestamp are taken as examples to describe the specific implementation manner of the present invention.

[0058] 1) When a message enters the inbound port, the IPE timestamp capture module triggers TsEngine to generate a 64-bit inbound timestamp.

[0059] 2) The IPE timestamp capture module truncates the 64-bit inbound timestamp to obtain the lower 30 bits of the inbound timestamp and encodes it into the message information.

[0060] 3) After the message is processed by IPE and BSR, it enters EPE processing. At this time, the EPE timestamp capture module triggers TsEngine to generate a 64-bit outgoing timestamp.

[0061] 4) The EPE timestamp conversion module intercepts the lower 30 bits of the 64-bit outgoing timestamp and compares it with the 30-bit incoming timestamp.

[0062] 5) If the 30-bit outgoing timestamp is larger than the 30-bit incoming timestamp, it indicates that the forwarding time of the message in the chip is the time difference between the 30-bit outgoing timestamp and the 30-bit incoming timestamp. Then, the 30-bit incoming timestamp is directly used to replace the lower 30 bits of the 64-bit outgoing timestamp to obtain the 64-bit incoming timestamp.

[0063] 6) If the 30-bit outgoing timestamp is smaller than the 30-bit incoming timestamp, a negative number will be obtained when the 30-bit outgoing timestamp is directly subtracted from the 30-bit incoming timestamp, causing the switching chip value to flip. Therefore, the 30-bit outgoing timestamp is compensated by the value of 1 in the 31st bit, so that the 31-bit outgoing timestamp is larger than the 30-bit incoming timestamp. Then the 31-bit outgoing timestamp minus the 30-bit incoming timestamp will get a positive time difference, which is the residence time of the message forwarding. Finally, the 64-bit outgoing timestamp minus the obtained time difference will get the 64-bit incoming timestamp.

[0064] 7) The EPE timestamp conversion module sends the converted 64-bit inbound timestamp to the message editing module for processing. The message editing module edits the 64-bit inbound timestamp to the corresponding position of the message according to the position predefined by the protocol.

[0065] The method and application of reducing the chip pipeline timestamp bus bit width according to the embodiment of the present invention can solve the problem of excessive consumption of pipeline bus bit width, obtain the timestamp through the pipeline and combine it with the target timestamp with a shorter bit width, and obtain the target timestamp with a longer bit width through the algorithm operation of the conversion module, thereby effectively reducing the pipeline bus width of the switching chip carrying a 64-bit timestamp; solve the problem of switching chip value flipping during timestamp calculation, innovatively use the borrow compensation method, and can perform borrow subtraction operations based on binary data, so as to improve the timestamp conversion algorithm, greatly reducing the design complexity and chip manufacturing cost caused by the chip pipeline bus width.

[0066] like Figure 4 As shown, a device for reducing the chip Pipeline timestamp bus bit width according to a specific embodiment of the present invention is introduced.

[0067] In an embodiment of the present invention, the device for reducing the bit width of a chip Pipeline timestamp bus includes an input direction processing module 401 , an output direction processing module 402 , a timestamp conversion module 403 and a message editing module 404 .

[0068] The inbound processing module 401 is configured to encode the lower N bits of the M-bit inbound timestamp into the message information bus when the inbound timestamp capture module captures an M-bit inbound timestamp, wherein N is less than M.

[0069] The outgoing direction processing module 402 is used for the outgoing direction timestamp capture module to send a capture signal to the clock engine, and the clock engine captures the M-bit outgoing direction timestamp and transmits it to the timestamp conversion module.

[0070] The timestamp conversion module 403 is used for the timestamp conversion module to convert the M-bit outgoing direction timestamp and the low-order N-bit inbound direction timestamp in the message information bus to obtain the M-bit inbound direction timestamp.

[0071] The message editing module 404 is configured to receive the M-bit inbound time stamp and edit the M-bit inbound time stamp to a predefined position in the message.

[0072] The inbound direction processing module 401 is further configured to: M is 64, 30≤N≤40.

[0073] The inbound processing module 401 is also used for: when a message enters the chip from the inbound port, the inbound timestamp capture module notifies the high-precision clock engine to generate an M-bit inbound timestamp; and the inbound timestamp capture module truncates the M-bit inbound timestamp to obtain the low-order N-bit inbound timestamp, and encodes the low-order N-bit inbound timestamp into the message information.

[0074] The outgoing direction processing module 402 is also used for: the timestamp conversion module obtains the low-order N-bit incoming direction timestamp in the message information, combines the M-bit outgoing direction timestamp, cuts out the low-order N-bit outgoing direction timestamp code from the M-bit outgoing direction timestamp, and calculates the M-bit ingoing direction timestamp through a conversion algorithm.

[0075] The timestamp conversion module 403 is also used to: compare the sizes of the N-bit outgoing direction timestamp and the N-bit incoming direction timestamp; when the N-bit incoming direction timestamp is smaller than the N-bit outgoing direction timestamp, use the N-bit inbound direction timestamp to replace the low-order N-bit outgoing direction timestamp in the M-bit outgoing direction timestamp to obtain the M-bit inbound direction timestamp.

[0076] The timestamp conversion module 403 is further used to: when the N-bit inbound timestamp is greater than the N-bit outbound timestamp, calculate the time difference between the N-bit inbound timestamp and the N-bit outbound timestamp by borrow compensation to convert the expected M-bit inbound timestamp.

[0077] The timestamp conversion module 403 is also used for: compensating the value of the N+1th bit of the N-bit outgoing direction timestamp by borrowing 1, so that the N+1-bit outgoing direction timestamp is larger than the N-bit inbound direction timestamp, and then subtracting the N-bit inbound direction timestamp from the N+1-bit outgoing direction timestamp to obtain a positive time difference, that is, the residence time of the message forwarding; and subtracting the time difference from the M-bit outgoing direction timestamp to obtain the M-bit inbound direction timestamp.

[0078] Figure 5 FIG. 5 shows a hardware structure diagram of a computing device 50 for reducing the bit width of a chip Pipeline timestamp bus according to an embodiment of the present specification. Figure 5 As shown, the computing device 50 may include at least one processor 501, a memory 502 (e.g., a non-volatile memory), a memory 503, and a communication interface 504, and the at least one processor 501, the memory 502, the memory 503, and the communication interface 504 are connected together via a bus 505. The at least one processor 501 executes at least one computer-readable instruction stored or encoded in the memory 502.

[0079] It should be understood that the computer executable instructions stored in the memory 502, when executed, cause at least one processor 501 to perform the above combined operations in various embodiments of this specification. Figure 1-5 Describes the various operations and functions.

[0080] In the embodiments of the present specification, the computing device 50 may include, but is not limited to, a personal computer, a server computer, a workstation, a desktop computer, a laptop computer, a notebook computer, a mobile computing device, a smart phone, a tablet computer, a cellular phone, a personal digital assistant (PDA), a handheld device, a messaging device, a wearable computing device, a consumer electronic device, and the like.

[0081] According to one embodiment, a program product such as a machine-readable medium is provided. The machine-readable medium may have instructions (i.e., the above-mentioned elements implemented in the form of software), which, when executed by a machine, causes the machine to perform the above-mentioned combination of various embodiments of this specification. Figure 1-5 Specifically, a system or device equipped with a readable storage medium may be provided, on which a software program code implementing the functions of any of the above-mentioned embodiments is stored, and a computer or processor of the system or device reads and executes the instructions stored in the readable storage medium.

[0082] The method and application of reducing the chip pipeline timestamp bus bit width according to the embodiment of the present invention can solve the problem of excessive consumption of pipeline bus bit width, obtain the timestamp through the pipeline and combine it with the target timestamp with a shorter bit width, and obtain the target timestamp with a longer bit width through the algorithm operation of the conversion module, thereby effectively reducing the pipeline bus width of the switching chip carrying a 64-bit timestamp; solve the problem of switching chip value flipping during timestamp calculation, innovatively use the borrow compensation method, and can perform borrow subtraction operations based on binary data, so as to improve the timestamp conversion algorithm, greatly reducing the design complexity and chip manufacturing cost caused by the chip pipeline bus width.

[0083] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0084] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0085] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0086] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0087] The foregoing description of specific exemplary embodiments of the present invention is for the purpose of illustration and demonstration. These descriptions are not intended to limit the present invention to the precise form disclosed, and it is clear that many changes and variations can be made based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the present invention and its practical application, so that those skilled in the art can realize and utilize various different exemplary embodiments of the present invention and various different selections and changes. The scope of the present invention is intended to be limited by the claims and their equivalents.

Claims

1. A method for reducing the bit width of a chip Pipeline timestamp bus, wherein the chip has an inbound timestamp capture module and an outbound timestamp capture module and a timestamp conversion module, characterized in that: The method comprises: When the inbound timestamp capture module captures an M-bit inbound timestamp, the lower N-bit inbound timestamps of the M-bit inbound timestamps are encoded into the message information bus, where N is less than M; The outgoing timestamp capture module sends a capture signal to the clock engine, and the clock engine captures the M-bit outgoing timestamp and passes it to the timestamp conversion module; The timestamp conversion module converts the M-bit outgoing direction timestamp and the low-order N-bit ingoing direction timestamp in the message information bus to obtain an M-bit ingoing direction timestamp; and The message editing module receives the M-bit inbound time stamp and edits the M-bit inbound time stamp to a predefined position in the message.

2. The method for reducing the chip Pipeline timestamp bus width as claimed in claim 1, characterized in that: Encoding the lower N bits of the M bits of the inbound time stamp into the message information bus includes: When a message enters the chip from the inbound port, the inbound timestamp capture module notifies the high-precision clock engine to generate an M-bit inbound timestamp; and The inbound timestamp capture module truncates the M-bit inbound timestamp to obtain a low-order N-bit inbound timestamp, and encodes the low-order N-bit inbound timestamp into the message information.

3. The method for reducing the chip Pipeline timestamp bus width as claimed in claim 1, characterized in that: The timestamp conversion module converts the M-bit outgoing direction timestamp and the low-order N-bit ingoing direction timestamp in the message information bus to obtain the M-bit ingoing direction timestamp, including: The timestamp conversion module obtains the low-order N-bit inbound timestamp in the message information, combines it with the M-bit outbound timestamp, extracts the low-order N-bit outbound timestamp code from the M-bit outbound timestamp, and obtains the M-bit inbound timestamp through calculation using a conversion algorithm.

4. The method for reducing the chip Pipeline timestamp bus width as claimed in claim 3, characterized in that: The M-bit inbound time stamp is obtained by calculating through the conversion algorithm, including: Comparing the size of the N-bit outgoing direction timestamp and the N-bit incoming direction timestamp; When the N-bit inbound timestamp is smaller than the N-bit outbound timestamp, the N-bit inbound timestamp is used to replace the low-order N-bit outbound timestamp in the M-bit outbound timestamp to obtain the M-bit inbound timestamp.

5. The method for reducing the chip Pipeline timestamp bus width as claimed in claim 4, characterized in that: The M-bit inbound time stamp is obtained by calculating the conversion algorithm, and further includes: When the N-bit inbound timestamp is greater than the N-bit outbound timestamp, the time difference between the N-bit inbound timestamp and the N-bit outbound timestamp is calculated by borrow compensation to convert the expected M-bit inbound timestamp.

6. The method for reducing the chip Pipeline timestamp bus width as claimed in claim 5, characterized in that: The time difference is calculated by means of borrow compensation, including: The N-bit outgoing timestamp is compensated by a bit with a value of 1 at the N+1th bit, so that the N+1-bit outgoing timestamp is larger than the N-bit inbound timestamp. Then, the positive time difference is obtained by subtracting the N-bit inbound timestamp from the N+1-bit outgoing timestamp, i.e., the residence time of the message forwarding; and The M-bit outgoing direction timestamp minus the time difference is used to obtain an M-bit incoming direction timestamp.

7. The method for reducing the chip Pipeline timestamp bus width as claimed in claim 1, characterized in that: The method further comprises: M is 64, 30≤N≤40.

8. A device for reducing the bit width of a chip Pipeline timestamp bus, characterized in that: The device comprises: An inbound processing module, configured to encode the lower N-bit inbound timestamps of the M-bit inbound timestamps into a message information bus when the inbound timestamp capture module captures the M-bit inbound timestamps, wherein N is less than M; An outbound processing module, used for the outbound timestamp capture module to send a capture signal to the clock engine, and the clock engine captures the M-bit outbound timestamp and passes it to the timestamp conversion module; A timestamp conversion module, configured to convert the timestamp conversion module to obtain an M-bit inbound timestamp based on the M-bit outbound timestamp and the low-order N-bit inbound timestamp in the message information bus; and The message editing module is used for receiving the M-bit inbound time stamp and editing the M-bit inbound time stamp to a predefined position of the message.

9. An electronic device, characterized in that: include: at least one processor; as well as A memory storing instructions, which, when executed by the at least one processor, causes the at least one processor to execute a method for reducing the bit width of a chip pipeline timestamp bus as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of a method for reducing the bit width of a chip pipeline timestamp bus as described in any one of claims 1 to 7 are implemented.