CN116226014A - Method and device for processing overflow under credit management and related equipment - Google Patents

Method and device for processing overflow under credit management and related equipment Download PDF

Info

Publication number
CN116226014A
CN116226014A CN202211623166.XA CN202211623166A CN116226014A CN 116226014 A CN116226014 A CN 116226014A CN 202211623166 A CN202211623166 A CN 202211623166A CN 116226014 A CN116226014 A CN 116226014A
Authority
CN
China
Prior art keywords
read
link object
write packet
current link
overflow
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.)
Pending
Application number
CN202211623166.XA
Other languages
Chinese (zh)
Inventor
付豪
刘东辉
杨雷宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Haiguang Integrated Circuit Design Co Ltd
Original Assignee
Chengdu Haiguang Integrated Circuit Design Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Chengdu Haiguang Integrated Circuit Design Co Ltd filed Critical Chengdu Haiguang Integrated Circuit Design Co Ltd
Priority to CN202211623166.XA priority Critical patent/CN116226014A/en
Publication of CN116226014A publication Critical patent/CN116226014A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • G06F13/4221Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3027Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application provides an overflow processing method under credit management, a processing device and related equipment, wherein the processing device comprises the steps of monitoring whether the residual space of a corresponding memory of root equipment reaches or is about to reach a preset monitoring value, and if so, sending overflow monitoring feedback; the overflow monitoring feedback is not received, and the current link object read-write packet passes detection, and the current link object read-write packet is written into the memory; if the overflow monitoring feedback is received, the current link object read-write packet cannot pass detection, the current link object read-write packet is discarded, and an error signal and the serial number of the current link object read-write packet are sent to the current link object; and after receiving the error signal, the link object resends the read-write packet, and the memory reads the read-write packet when resending the read-write packet. According to the embodiment of the application, the read-write packet is retransmitted when overflow is about to occur and the memory is read at the same time, so that the reserved space for receiving the read-write packet can be reduced.

Description

Method and device for processing overflow under credit management and related equipment
Technical Field
The embodiment of the application relates to a high-speed serial computer expansion bus, in particular to an overflow processing method under credit management, a processing device and related equipment.
Background
PCI-Express (Peripheral Component Interconnect Express, PCIe, high-speed serial bus) is a high-speed serial computer expansion bus standard, and has the main advantages of high data transmission rate, capability of meeting low-speed equipment requirements, and great development potential. Read-write packets of memory, input/Output (Input/Output), or configuration types, referred to as TLPs (Transaction Layer Packet, transaction layer packets), may be sent to each other between PCIe devices.
The credit interaction process defined by the PCIe protocol is divided into a limited one and an unlimited one, and according to the PCIe protocol, for PCIe devices, the response packet flow control of PCIe must be set to an unlimited flow control mode, that is, no flow control management is performed on the response packet sent by the link object. Because the PCIe protocol specifies a tag for each read-write packet, e.g., one end of the PCIe device sends a read request, the tag is 1, and the tag that the end that receives the request replies to the read request is also 1, so that the RC knows for which read-write packet the response is for. One prior art is to reserve a large enough space for a response packet to store a response packet that may be received; if the number of tags supported by PCIe is N, the reserved space is guaranteed to be capable of receiving N response packets.
However, the existing PCIe protocol specifies that the number of supported tags is 768, and the maximum load length of a packet may be 1024 dw=4096 Bytes; the prior art scheme is to reserve 768×4096= 3145728Bytes of storage space for the response packet to be received; this is a very large memory space, and all memory space of a PCIe device adds up to be much smaller than the memory space described above. Therefore, in a case similar to the above, reducing the reserved space for receiving the read-write packet becomes a technical problem to be solved by those skilled in the art.
Disclosure of Invention
In view of this, the present application provides an overflow processing method under credit management to reduce the reserved space for receiving read-write packets.
The overflow processing method under credit management in the embodiment of the application comprises the following steps:
monitoring whether the residual space of the corresponding memory of the root equipment reaches or is about to reach a preset monitoring value, and if so, sending overflow monitoring feedback;
the overflow monitoring feedback is not received, and the current link object read-write packet passes detection, and the current link object read-write packet is written into the memory;
if the overflow monitoring feedback is received, the current link object read-write packet cannot pass detection, the current link object read-write packet is discarded, and an error signal and the serial number of the current link object read-write packet are sent to the current link object;
and after receiving the error signal, the link object resends the read-write packet, the memory reads the read-write packet during resending, and the root equipment does not receive other read-write packets during resending.
Optionally, the overflow monitoring feedback is not received and the current link object read-write packet passes detection, and the current link object read-write packet is written into the memory, including the detection of the sequence code and the cyclic redundancy check code of the current link object read-write packet.
Optionally, if the overflow monitoring feedback is not received and the current link object read-write packet is not detected, discarding the current link object read-write packet and sending an error signal and a sequence number of the current link object read-write packet to the current link object.
Optionally, if the overflow monitoring feedback is not received and the current link object read-write packet fails to pass detection, discarding the current link object read-write packet, sending an error signal and a sequence number of the current link object read-write packet to the current link object, and further including a recording error.
Optionally, if the overflow monitoring feedback is received, the current link object read-write packet cannot pass detection, discard the current link object read-write packet, and send an error signal and a sequence number of the current link object read-write packet to the current link object, including not performing error recording.
Optionally, whether the remaining space of the memory corresponding to the root monitoring device reaches or is about to reach a preset monitoring value, and if so, sending overflow monitoring feedback, wherein the monitoring feedback comprises corresponding write enabling or read enabling triggering of the memory when the memory is written or read, and the monitoring calculating of the remaining space of the memory is performed.
Optionally, when the overflow monitoring feedback is received, the current link object read-write packet cannot pass detection, the current link object read-write packet is discarded, and an error signal and a sequence number of the current link object read-write packet are sent to the current link object.
Optionally, the monitoring whether the remaining space of the memory corresponding to the root device reaches or is about to reach a preset monitoring value, if so, sending overflow monitoring feedback, and further including:
monitoring whether the residual space of the memory reaches a full value, and if so, sending overflow monitoring feedback, wherein the full value is 0;
and monitoring whether the residual space of the memory reaches a near-full value, and if so, sending near-overflow monitoring feedback, wherein the near-full value is a preset value larger than the full value.
Optionally, after the link object receives the error signal, the read-write packet is retransmitted, the memory is read during retransmission, and during retransmission, the root device does not receive other read-write packets, including that after the link object repeatedly transmits the same read-write packet or multiple read-write packets for more than 4 times, the link object is reconfigured, and at the same time, the root device empties the memory.
Optionally, the receiving the current link object read-write packet and detecting the read-write packet, if passing, writing the current link object read-write packet into the memory, including sending a confirmation signal and a serial number of the current link object read-write packet to the current link object, and the current link object clearing the current link object read-write packet.
Optionally, the present application further provides an overflow processing device under credit management, including:
the monitoring module is used for monitoring whether the residual space of the corresponding memory of the root equipment reaches or is about to reach a preset monitoring value, and if so, the monitoring module sends overflow monitoring feedback;
the detection module is used for writing the current link object read-write packet into the memory when the overflow monitoring feedback is not received and the current link object read-write packet passes detection, discarding the current link object read-write packet and sending an error signal and the serial number of the current link object read-write packet to the current link object when the overflow monitoring feedback is received;
the link object, at least one link object, after the said link object receives the said error signal, resend the said read-write packet;
a memory for storing the current link object read-write packet when the current link object read-write packet passes detection; reading the memory when the current link object read-write packet is resent;
and the root equipment does not receive other read-write packets during the retransmission of the read-write packet of the current link object.
Optionally, the detection module further includes:
the recording module is used for recording errors after the detection module does not receive the overflow monitoring feedback and the current link object read-write packet fails to pass detection, discarding the current link object read-write packet and sending an error signal and the serial number of the current link object read-write packet to the current link object;
and the modification module is used for receiving the overflow monitoring feedback by the detection module, discarding the current link object read-write packet and sending an error signal and the serial number of the current link object read-write packet to the current link object if the current link object read-write packet cannot pass detection, and modifying the current link object read-write packet to enable the current link object read-write packet to pass detection if the overflow monitoring feedback is received.
Optionally, the present application further provides a chip configured as the overflow processing device under credit management.
Optionally, the application further provides electronic equipment, which comprises the chip.
Compared with the prior art, the technical scheme of the embodiment of the application has the following advantages:
in the overflow processing method and the processing device under credit management provided by the embodiment of the application, whether the residual space of the memory corresponding to the root equipment reaches or is about to reach the preset monitoring value is monitored, and if so, overflow monitoring feedback is sent; the overflow monitoring feedback is not received, and the current link object read-write packet passes detection, and the current link object read-write packet is written into the memory; if the overflow monitoring feedback is received, the current link object read-write packet cannot pass detection, the current link object read-write packet is discarded, and an error signal and the serial number of the current link object read-write packet are sent to the current link object; the link object resends the read-write packet after receiving the error signal; the memory reads during retransmission, and the root device does not receive other read-write packets during retransmission. Therefore, by adding the monitoring feedback of overflow, the retransmission mechanism of read-write packet detection is utilized to ensure that data is not lost under the condition that the memory cannot overflow, and the time for reading the memory is strived for by the delay of retransmission, so that the memory size for receiving the response packet is designed by calculating the delay, and the reserved space for receiving the read-write packet is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings may be obtained according to the provided drawings without inventive effort to a person skilled in the art.
FIG. 1 is a schematic diagram of a conventional PCIe device configuration;
FIG. 2 is a flow diagram of read-write packet transmission under credit management in a conventional PCIe device;
FIG. 3 is a schematic diagram of a portion of a prior PCIe device;
FIG. 4 is a flow chart of an overflow handling method under credit management provided by an embodiment of the present application;
FIG. 5 is a complete flow chart of an overflow handling method under credit management provided by an embodiment of the present application;
FIG. 6 is a flowchart illustrating an overflow handling device under credit management provided by an embodiment of the present application;
fig. 7 is a schematic structural diagram of an overflow handling device under credit management according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
PCI-Express (peripheral component interconnect Express, PCIe, high-speed serial bus) is a high-speed serial computer expansion bus standard, and has the main advantages of high data transmission rate, capability of meeting low-speed equipment requirements, and great development potential. The PCIe devices may send memory, input/Output (Input/Output), and configuration type read-write packets, referred to as TLPs (Transaction Layer Packet, transaction layer packets) to each other. The TPL is typically transmitted with credit management, i.e. with mutual credit interactions via data link layer packets, and read-write packets are transmitted with credit.
PCIe devices are of three types, root, switch, and endpoint, respectively.
As shown in fig. 1, the root device 13 is a PCIe device closest to one end of the CPU11, and may be connected to the memory 14, where the PCIe endpoint device 12 and the PCIe switch device 15 may be attached below, and the PCIe switch device 15 may be attached below the PCIe switch device 15, where the endpoint device 12 or the switch device 15 is collectively referred to as a link object. The root device under each PCIe tree structure may mount 256 PCIe devices according to PCIe protocol specifications.
PCIe read-write packets are divided into two main types, a request packet and a response packet, where the request packet is a read-write packet that one device actively sends to another device, and the response packet is a read-write packet that one device replies to the received request packet. The PCIe credit is not transmitted in the tree structure, and the credit only interacts between two devices, and the management mechanism is shown in fig. 2:
step S21: the device B sends a credit initialization message to the device A, and tells the device A that the currently available credit information is 2;
step S22: after receiving the credit initialization information sent by the device B, the device a updates the value of the quota to 2, but at this time, the device a does not send a read/write packet, and thus consumes a value of 0. The device a makes a judgment, and the quota-consumption= 2>0 considers that the read-write packet can be transmitted;
step S23: the device A sends two read-write packets to the device B, at the moment, the consumption value of the device A is updated to be 2, the device A judges again, and the limit-consumption=2-2=0, so that the read-write packets can not be sent;
step S24: the device B receives the read-write packet of the device A and stores the read-write packet in the storage of the device B, and when the read-write packet is read from the storage, the device B is indicated that a new space exists in the storage of the device B for receiving the read-write packet;
step S25: the device B sends updated credit information to the device A, wherein the value is the original value (2) +the accumulated value of the read pointer (1) =3, and the accumulated value of the read pointer represents the number of read and write packets which can be read in the period of time and can release the credit;
step S26: device a updates the value of the quota = received updated credit information = 3, quota-consumption
=3-2=1, and the transmission of the read-write packet can be continued.
It should be noted that the transmission process is simplified in the figure, and each read-write packet updates, compares and detects the packet header and the load.
The credit interaction process specified by the PCIe protocol is divided into a limited process and an unlimited process, wherein the limited process refers to the above example process, and the unlimited process does not need to carry out flow control, so that the opposite read-write packet can be received without limitation;
according to PCIe protocol, for RC root device, PCIe response packet flow control must be set to an infinite flow control mode, that is, no flow control management is performed on response packets sent from link objects;
because PCIe protocol specifies a tag for each read-write packet, for example, the RC sends a read request with a tag of 1, and the device replies with a read response packet with a tag of 1, so that the RC knows which read-write packet the response is directed to.
One prior art technique is to reserve a large enough space for the corresponding packet to store the response packet that may be received; if the number of tags supported by PCIe is N, the reserved space is guaranteed to be capable of receiving N response packets.
Based on the above description, the inventors of the present application found that, taking PCIe5.0 as an example, the PCIe protocol specifies the number of supported tags as 768, and the payload length of the packet may be 1024 dw=4096 Bytes at maximum. The prior art scheme is to reserve 768×4096= 3145728Bytes of storage space for the response packet to be received; this is the vast amount of memory that is significantly less than the total memory of PCIe endpoint devices.
Based on this, embodiments herein contemplate adding a monitor module to the memory and introducing a monitor feedback mechanism. In the prior art, there is a step of detecting a read-write packet, and if the detection fails, the read-write packet is retransmitted. As shown in fig. 3, the retransmission generally requires a read-write packet to be fetched from the memory of the current PCIe root device and sent to the memory of the opposite end, and the read-write packet needs to be sent to the opposite end through the sending circuit of the root device, the PCS (physical layer coding sub-layer) and the PHY (port physical layer), through the substrate, the slot, and the PHY/PCS of the opposite end through the receiving path of the opposite end to reach the memory, and then the link object feeds back the credit. Taking PCIe-X16 slots as an example, assuming that the time is X, a memory size greater than X is enough to satisfy the underlying path. Taking PCIe Gen5 as an example, X is generally less than 200, the data bit width is 512, the memory space is greater than 200X 512 = 12800Bytes, and is much less than 3145728Bytes. Therefore, the scheme can effectively reduce the reserved space for receiving the read-write packet.
The specific steps of the overflow processing method under credit management are shown in fig. 4, including:
step S41: monitoring whether the residual space of the corresponding memory of the root equipment reaches or is about to reach a preset monitoring value, if so, performing step S44 to send overflow monitoring feedback;
it is easy to understand that, at this time, if the read-write packet is continuously received, the remaining space in the memory may not be enough to write the read-write packet, so that overflow occurs, and sending the overflow monitoring feedback and performing the subsequent steps can ensure that the memory will not overflow.
Further, in an optional implementation, the monitoring whether the remaining space of the corresponding memory of the root device reaches or is about to reach the preset monitoring value, and if so, sending the overflow monitoring feedback, further includes:
monitoring whether the residual space of the memory reaches a full value, and if so, sending overflow monitoring feedback, wherein the full value is 0;
and monitoring whether the residual space of the memory reaches a near-full value, and if so, sending near-overflow monitoring feedback, wherein the near-full value is a preset value larger than the full value.
It should be noted that, the near overflow feedback transmission speed is slow, and there is a delay; the overflow monitoring feedback is transmitted faster without delay.
Therefore, when the space in the memory reaches the near-full value, sending out near-overflow monitoring feedback, and the memory can continuously write the read-write packet sent in the transmission delay of the near-overflow monitoring feedback; and after the space in the memory reaches the full value, sending overflow monitoring feedback, wherein the overflow monitoring feedback has high transmission speed and can immediately terminate the memory to write the read-write packet.
Therefore, when there is a read-write packet with a size greater than the near-full value, the read-write packet with a size greater than the near-full value after sending the near-overflow monitoring feedback cannot be written into the memory because the size is greater than the memory remaining space, but has no effect on reading other read-write packets with a size less than the near-full value. And the overflow monitoring feedback can terminate the writing of all the read-write packets. For example, near overflow monitoring feedback only affects larger posted write-packages, while other write-packages are unaffected, and can continue to write into memory, while overflow monitoring feedback pauses writing of all types of write-packages, and if posted write-packages pull down the near full value, pauses writing of smaller write-packages such as non-posted write-packages and completed write-packages.
Therefore, the setting of the near overflow monitoring feedback needs to be set smaller than the size of the read-write packet expected to be limited according to the size of the read-write packet expected to be limited.
And in the monitoring step, the residual space of the memory is continuously compared with a preset monitoring value, and the comparison result is dynamically responded. And continuously or intermittently sending overflow monitoring feedback when the residual space of the memory in the monitoring step reaches or is about to reach a preset monitoring value, and stopping sending the overflow monitoring feedback when the residual space of the memory does not reach or is about to reach the preset monitoring value.
In order to accurately monitor the remaining space in the memory, in an alternative implementation, when the memory is written or read, the corresponding write enable or read enable triggers the monitoring step to calculate the remaining space of the memory.
It should be noted that, when the memory is written or read, there will be control signals responsible for controlling the input and output of the memory, i.e. write enable and read enable. When the memory is written, writing enabling is sent to the monitoring step at the same time, and the residual space in the memory is calculated in the monitoring step; when the memory is read, the read enable is sent to the monitoring step at the same time, and the remaining space in the memory is calculated again in the monitoring step. Current memory space of memory = memory space size-memory write enable number + memory read enable number, remaining space-1 if write enable is valid, remaining space +1 if read enable is valid.
Step S42: if the overflow monitoring feedback is not received and the current link object read-write packet passes detection, performing step S43 to write the current link object read-write packet into the memory;
it should be noted that, the root device receives the read-write packet at this time, and there is a detection step for the read-write packet, where the detection is used to check whether the read-write packet is transmitted correctly and is modified, so as to achieve the purpose of preventing cracking.
In order to check whether the read-write packet is uncoded or modified and to ensure that the read-write packet is transmitted correctly, in an alternative implementation, the detection herein includes detection of a sequence code and a cyclic redundancy check code of the current link object read-write packet.
It should be noted that, the read-write packet may be assigned a sequence code as a prefix in the link object, which may be understood as an identity number given to the read-write packet, so as to facilitate subsequent verification work. And then the link object generates a cyclic redundancy check code according to the sequence code and the data in the read-write packet, and the cyclic redundancy check code is attached to the end of the read-write packet as a suffix. After receiving the read-write packet, the root device calculates a cyclic redundancy check code according to the sequence code of the read-write packet and the data in the read-write packet, compares the cyclic redundancy check code with the cyclic redundancy check code at the end of the read-write packet, if the cyclic redundancy check code is consistent with the cyclic redundancy check code at the end of the read-write packet, continuously checks whether the sequence code is correct, if the sequence code is correct, the detection is passed, and if one of the sequence code is incorrect, the detection cannot be passed.
It will be readily appreciated that when the read-write packet passes the detection, it will continue to be transmitted and written to the memory, and that the write enable at this time will trigger the monitoring step, calculating the remaining space of the memory and comparing it with the preset value.
In an alternative implementation, as shown in fig. 5, after the read-write packet passes the detection, step S51 is performed to send an acknowledgement signal to the current link object and the sequence number of the current link object read-write packet, and then step S52 is performed, where the current link object clears the current link object read-write packet.
Here, the link object clears the read-write packet in the retransmission storage space, so that the received read-write packet can be prevented from being repeatedly sent in the subsequent retransmission.
Further, if the overflow monitoring feedback is not received and the read/write packet fails to pass detection, as shown in fig. 5, in an alternative implementation, step S53 is performed to discard the current link object read/write packet and send an error signal and the sequence number of the current link object read/write packet to the current link object.
It is easy to understand that, in this embodiment of the present application, when the overflow monitoring feedback is not received and the read-write packet fails to pass the detection, it is indicated that an error occurs in the read-write packet during the transmission process, so that the erroneous read-write packet needs to be cleared, and an error signal is returned to the link object to require retransmission, and inform the link object that the retransmitted read-write packet is needed.
Further, in order to facilitate the operation of the user monitoring program, as shown in fig. 5, after the step S53 is performed, step S54 is performed, and an error is recorded after an error signal is sent.
Step S55: receiving the overflow monitoring feedback, the current link object read-write packet cannot pass detection, and executing step S46: discarding a current link object read-write packet and sending an error signal to the current link object and a serial number of the current link object read-write packet;
as shown in fig. 5, after receiving the overflow monitoring feedback, the read/write packet is forced to fail to pass the monitoring, and the same step S46 as the step S51 may be performed.
By performing the same steps as the error handling process here, the delay of retransmission can be utilized to strive for memory for time to read without requiring additional design of complex modules and steps.
In this way, even if the detection of the read-write packet generated by overflow is not passed, an error signal is generated and the error signal and the serial number of the read-write packet of the current link object are sent to the current link object, thereby ensuring that the data is not lost.
After that, step S47 is executed, where after the link object receives the error signal, the read-write packet is retransmitted, and the memory reads the read-write packet when retransmitting, and the root device does not receive other read-write packets during retransmitting.
It should be noted that, during retransmission of the read-write packet, the root device discards new packets having received sequence numbers subsequent to the read-write packet sequence number, and there is no feedback signal. On the one hand, the read-write packet is cleared, so that the subsequent read-write packet can be prevented from being received in advance, and errors are prevented from occurring; on the other hand, the subsequent read-write packet can be continuously stored in the retransmission storage space without feedback signals, and the loss of the read-write packet can not occur.
Further, in order to implement that the current link object read-write packet cannot pass the detection, as shown in fig. 5, in an alternative implementation, after receiving the overflow monitoring feedback, step S55 is performed to modify the current link object read-write packet.
Specifically, the "change the current link object read-write packet" means that the sequence code of the read-write packet is added by 1. In this way, when detecting the read-write packet, the cyclic redundancy check code calculated according to the read-write packet sequence code is different from the cyclic redundancy check code of the read-write packet suffix, even if the cyclic redundancy check code of the read-write packet suffix is wrong in the transmission process, the cyclic redundancy check code is exactly the same as the cyclic redundancy check code calculated according to the read-write packet sequence code, and the sequence code of the read-write packet is also different from the sequence code expected by the root device, so that the read-write packet cannot be necessarily detected, and then the read-write packet can be forcedly retransmitted.
In addition, in order to avoid the modification of the read-write packet caused by the memory overflow, the detection caused by the modification cannot affect the monitoring of the program operation by the user or affect the system and the software, in an alternative implementation, if the detection of the read-write packet caused by the overflow is not passed, step S57 is performed without performing error recording.
Because the overflow processing method under credit management provided by the embodiment of the application greatly reduces the reserved space, the overflow processing is easy to occur, and if the overflow processing is regarded as error and recorded, great trouble is brought to the system and the system maintenance.
Particularly, if an error occurs in the memory reading process, the memory cannot be read smoothly, and at this time, the retransmitted read-write packet is continuously retransmitted circularly, so that a deadlock is generated. To avoid deadlock, as shown in fig. 5, in an alternative implementation, it further includes step S56, determining whether to resend the same read-write packet or multiple packets more than 4 times, if so, executing step S58, reconfiguring the link object, and simultaneously clearing the memory. If not, the process continues to step S47.
Thus, when the memory may overflow during receiving the read-write packet, the overflow monitoring feedback is generated, so that the read-write packet is retransmitted with delay, and thus the memory can be read with this time, so that the reserved space for receiving the read-write packet can be reduced.
Further, since the reserved space for receiving the read-write packet is reduced, the area of the chip can be reduced accordingly, and the power consumption of the chip can be reduced simultaneously.
The overflow processing method under credit management provided by the embodiment of the application is not only used for PCIe protocol, but also used for other high-speed interface protocol.
The embodiment of the present application further provides an overflow processing device under credit management, where the overflow processing device under credit management may be configured to execute the above-mentioned overflow processing method under credit management, as shown in fig. 6, including:
a monitoring module 625, configured to monitor whether the remaining space of the root device corresponding to the memory 624 reaches or is about to reach a preset monitoring value, and if so, send overflow monitoring feedback;
a detection module 621, configured to, when the overflow monitoring feedback is not received and the current link object read-write packet passes detection, write the current link object read-write packet into the memory 624, and when the overflow monitoring feedback is received, discard the current link object read-write packet and send an error signal and a sequence number of the current link object read-write packet to the current link object 61;
and a link object 61, at least one link object, where after the link object 61 receives the error signal, the read-write packet is retransmitted, and the memory 624 reads during retransmission, and the root device 62 does not receive other read-write packets during retransmission.
A memory 624 for storing the current link object read-write packet when the current link object read-write packet passes the detection; reading the memory when the current link object read-write packet is resent;
root device 62, which does not receive other read-write packets during the retransmission of the current link object read-write packet;
further, in an alternative implementation, the detection module further includes:
a recording module 622, configured to, when the detection module does not receive the overflow monitoring feedback and the current link object read-write packet fails to pass detection, discard the current link object read-write packet and send an error signal and a sequence number of the current link object read-write packet to the current link object, and record an error;
and a modifying module 623, configured to, when the detecting module receives the overflow monitoring feedback, discard the current link object read-write packet and send an error signal to the current link object and the sequence number of the current link object read-write packet, and when the overflow monitoring feedback is received, modify the current link object read-write packet to make the current link object read-write packet unable to pass detection. It will be readily appreciated that, as shown in fig. 6, in order to ensure the device to operate normally, the device further includes a working module 631 connected to the memory and disposed outside the root device 62 for reading and processing the read-write packet, and a working module 632 disposed inside the root device 62 for reading and processing the read-write packet.
It should be noted that, in a hardware implementation, as shown in fig. 6, a separate register 626 is present in the monitoring module 625, and is used for separately storing the preset monitoring value. In this way, the user can conveniently change the preset monitoring value.
Specifically, an example of the execution of the work between the modules is shown in fig. 7. When the device receives the read-write packet sent by the link object 76, the read-write packet is sent to the detection module 71 to detect the read-write packet, if the detection passes, the read-write packet is written into the memory 72 continuously, meanwhile, a confirmation signal is replied to the link object 76, and after the confirmation signal is received by the link object 76, the read-write packet is cleared in the retransmission storage space. The contents of memory 72 may be read into work module 74 for subsequent processing. Write and read enables in memory 72 are communicated to monitor module 73 simultaneously. When the monitoring module 73 finds that the remaining space in the memory 72 cannot continuously receive the read-write packet, it sends an overflow monitoring feedback to the detecting module 71, when the detecting module 71 receives the overflow monitoring feedback and receives the subsequent read-write packet, it changes the subsequent read-write packet through the modifying module 711, so that the subsequent read-write packet cannot pass the detection, and then the detection is continued as a passing step. At this time, an error signal and the sequence number of the read/write packet are first returned to the link object 76. The link object retransmits the read-write packet after receiving the error signal and the sequence number of the read-write packet. In the process of replying and retransmitting, the working module 74 reads the memory, so that there is enough space in the memory 72 to receive the read-write packet when the read-write packet is retransmitted to the detecting module 71. In addition, the detection module 71 does not receive other read-write packets while reading the memory 72. After recovering the error signal, the recording module 712 in the detecting module 71 determines whether the detection failure is overflow, if yes, the recording module 712 does not record the error, and if not, the recording module 712 records the error.
The embodiment of the application also provides a chip, and in the embodiment of the application, the chip can be configured with the overflow processing device under credit management.
The embodiment of the application also provides electronic equipment, which comprises the chip.
Although the embodiments of the present application are disclosed above, the present application is not limited thereto. Various changes and modifications may be made by one skilled in the art without departing from the spirit and scope of the invention, and the scope of the invention shall be defined by the appended claims.

Claims (14)

1. The overflow processing method under credit management is characterized by comprising the following steps of
Monitoring whether the residual space of the corresponding memory of the root equipment reaches or is about to reach a preset monitoring value, and if so, sending overflow monitoring feedback;
the overflow monitoring feedback is not received, and the current link object read-write packet passes detection, and the current link object read-write packet is written into the memory;
if the overflow monitoring feedback is received, the current link object read-write packet cannot pass detection, the current link object read-write packet is discarded, and an error signal and the serial number of the current link object read-write packet are sent to the current link object;
the link object resends the read-write packet after receiving the error signal; the memory reads during retransmission, and the root device does not receive other read-write packets during retransmission.
2. The method for overflow handling under credit management of claim 1, wherein the receiving of the overflow monitoring feedback and the passing of the current link object read-write packet by detection, writing the current link object read-write packet to the memory, comprises:
the detection is to detect the sequence code and the cyclic redundancy check code of the read-write packet of the current link object.
3. The method for overflow handling under credit management of claim 1, wherein said overflow monitoring feedback is not received and said current link object read-write packet passes detection, said current link object read-write packet being written to said memory, further comprising:
and if the overflow monitoring feedback is not received and the current link object read-write packet fails to pass detection, discarding the current link object read-write packet and sending an error signal and the sequence number of the current link object read-write packet to the current link object.
4. The method for overflow handling under credit management according to claim 3, wherein if the overflow monitoring feedback is not received and the current link object read-write packet is not detected, discarding the current link object read-write packet and sending an error signal and a sequence number of the current link object read-write packet to the current link object, further comprising a recording error.
5. The method of claim 1, wherein the receiving the overflow monitoring feedback fails the detection of the current link object read-write packet, discards the current link object read-write packet and sends an error signal and a sequence number of the current link object read-write packet to the current link object, including not performing error recording.
6. The method for overflow processing under credit management according to claim 1, wherein said monitoring whether the remaining space of the corresponding memory of the root device reaches or is about to reach a preset monitoring value, and if so, transmitting the overflow monitoring feedback, comprises:
and triggering the monitoring to calculate the residual space of the memory by corresponding write enabling or read enabling when the memory is written or read.
7. The method for overflow handling under credit management according to claim 1, wherein said receiving the overflow monitoring feedback, failing to detect the current link object read-write packet, discarding the current link object read-write packet and sending an error signal and a sequence number of the current link object read-write packet, includes:
when overflow monitoring feedback is received, the current link object read-write packet is changed, so that the current link object read-write packet cannot pass detection.
8. The method for overflow processing under credit management according to claim 1, wherein said monitoring whether the remaining space of the corresponding memory of the root device reaches or is about to reach a preset monitoring value, and if so, sending overflow monitoring feedback, further comprises:
monitoring whether the residual space of the memory reaches a full value, and if so, sending overflow monitoring feedback, wherein the full value is 0;
and monitoring whether the residual space of the memory reaches a near-full value, and if so, sending near-overflow monitoring feedback, wherein the near-full value is a preset value larger than the full value.
9. The method for processing overflow under credit management according to claim 1, wherein after receiving the error signal, the link object resends the read-write packet, and the memory reads the read-write packet when resending, and the root device does not receive other read-write packets during resending, comprising:
after the link object repeatedly sends the same read-write packet or multiple read-write packets more than 4 times, the link object is reconfigured, and the root device clears the memory.
10. The method for overflow handling under credit management according to claim 1, wherein said receiving a current link object read-write packet and performing read-write packet detection, if passed, writing the current link object read-write packet to the memory, comprises:
and sending an acknowledgement signal and a serial number of a current link object read-write packet to a current link object, wherein the current link object clears the current link object read-write packet.
11. An overflow handling device under credit management, comprising:
the monitoring module is used for monitoring whether the residual space of the corresponding memory of the root equipment reaches or is about to reach a preset monitoring value, and if so, the monitoring module sends overflow monitoring feedback;
the detection module is used for writing the current link object read-write packet into the memory when the overflow monitoring feedback is not received and the current link object read-write packet passes detection, discarding the current link object read-write packet and sending an error signal and the serial number of the current link object read-write packet to the current link object when the overflow monitoring feedback is received;
the link object, at least one link object, after the said link object receives the said error signal, resend the said read-write packet;
a memory for storing the current link object read-write packet when the current link object read-write packet passes detection; reading the memory when the current link object read-write packet is resent;
and the root equipment does not receive other read-write packets during the retransmission of the read-write packet of the current link object.
12. The credit-managed overflow handling device of claim 11, wherein the detection module further comprises:
the recording module is used for recording errors after the detection module does not receive the overflow monitoring feedback and the current link object read-write packet fails to pass detection, discarding the current link object read-write packet and sending an error signal and the serial number of the current link object read-write packet to the current link object;
and the modification module is used for receiving the overflow monitoring feedback by the detection module, discarding the current link object read-write packet and sending an error signal to the current link object and the serial number of the current link object read-write packet if the current link object read-write packet cannot pass detection, and modifying the current link object read-write packet to enable the current link object read-write packet to pass detection if the overflow monitoring feedback is received.
13. A chip, characterized in that the chip is configured as an overflow handling means under credit management according to any of claims 11-12.
14. An electronic device comprising a chip as claimed in claim 13.
CN202211623166.XA 2022-12-16 2022-12-16 Method and device for processing overflow under credit management and related equipment Pending CN116226014A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211623166.XA CN116226014A (en) 2022-12-16 2022-12-16 Method and device for processing overflow under credit management and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211623166.XA CN116226014A (en) 2022-12-16 2022-12-16 Method and device for processing overflow under credit management and related equipment

Publications (1)

Publication Number Publication Date
CN116226014A true CN116226014A (en) 2023-06-06

Family

ID=86588148

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211623166.XA Pending CN116226014A (en) 2022-12-16 2022-12-16 Method and device for processing overflow under credit management and related equipment

Country Status (1)

Country Link
CN (1) CN116226014A (en)

Similar Documents

Publication Publication Date Title
US7904576B2 (en) Reliable datagram via independent source destination resources
CN104866454A (en) Write message prospect processing method and device facing board-level high-speed bus
US20200174865A1 (en) Controller, storage device having the controller, and method of operating the controller
JP3996928B2 (en) How to handle corrupted data
CN101123485B (en) iSCSI packet processing method and device, error recovery method and device
US7305605B2 (en) Storage system
US7436777B2 (en) Failed link training
CN103368703B (en) Data package retransmission method, data packet receiving method and device
CN102436430A (en) Memory device, host controller and memory system
US7363402B2 (en) Data communications architecture employing parallel SERDES channels
CN113806108A (en) Retransmission method, memory controller, processor system and electronic equipment
US7606253B2 (en) Successful transactions
CN116226014A (en) Method and device for processing overflow under credit management and related equipment
US20070226549A1 (en) Apparatus for detecting errors in a communication system
US7672222B2 (en) Link failures
US7310762B2 (en) Detection of errors
US7613958B2 (en) Error detection in a system having coupled channels
US7454514B2 (en) Processing data with uncertain arrival time
WO2023020202A1 (en) Integrated circuit, communication method, and communication system
JP2002358177A (en) Image forming apparatus, serial communication method for the apparatus, program for allowing computer to perform the method and recording medium with the program recorded thereon
EP4149032A2 (en) Selection of processing mode for receiver circuit
US20220308954A1 (en) Selection of processing mode for receiver circuit
JP5182417B2 (en) Transmission data error checking device and method
JP4749820B2 (en) Interconnect communication with error correction function without affecting the latency when there is no error
CN117544617A (en) Data message breakpoint continuous transmission method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination