Configurable micro-operation mechanism for directory protocols in multi-core processors

By introducing a configurable micro-operation mechanism into multi-core processor systems and using micro-operation codes to process messages and pipeline processing mechanisms, the problem of low Cache consistency protocol efficiency and deadlock in multi-core processors is solved, and the system fault tolerance and Execution efficiency.

CN114153756BInactive Publication Date: 2024-09-24NAT UNIV OF DEFENSE TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111471222.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-03
Publication Date
2024-09-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In multi-core processor systems, the directory-based cache consistency protocol has low execution efficiency due to low physical channel utilization and deadlock problems, making it difficult to effectively maintain cache consistency.

Method used

Design a configurable micro-operation mechanism for multi-core processors, interact with L2Cache and IMU through the directory controller module DCU, use micro-operation codes to process request and response messages, achieve flexible protocol execution, and process and retransmit through pipelines The mechanism improves channel utilization and reduces the risk of deadlock.

Benefits of technology

It significantly improves the fault tolerance and execution efficiency of the system, effectively utilizes physical resources, reduces design complexity and risks, and improves the execution efficiency of the Cache consistency protocol.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114153756B
    Figure CN114153756B
Patent Text Reader

Abstract

The present invention discloses a configurable micro-operation mechanism for a multi-core processor directory protocol, which is applied to an on-chip network, including: when DCU and L2Cache interact, after DCU receives a request message or a response message, it determines whether to enter the debugging mode, and if so, it matches the request message or the response message to the corresponding micro-operation code to perform corresponding actions, otherwise, the request message or the response message is pipelined; when DCU and IMU interact, it caches the message sent by DCU and determines whether the sent message has timed out, and if so, it resends the cached message, and the IMU unconditionally accepts the message until the physical link is emptied. The present invention can flexibly convert messages in different physical channels for subsequent operations, effectively improving the execution efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to directory control, and in particular to a configurable micro-operation mechanism for a multi-core processor directory protocol. Background Art

[0002] In a multi-core processor system, multi-level cache is used to balance the conflict between memory access speed and capacity. In a multi-level cache, dirty data is not always written directly to the main memory. Multiple caches mean that a piece of data may have multiple copies at the same time. When reading and writing data, the consistency of multiple copies needs to be maintained.

[0003] Common methods for maintaining consistency include the listening bus protocol and the directory-based cache consistency protocol. The listening bus has poor scalability. As the number of processor cores increases, a large number of broadcast operations are required, which is inefficient. Therefore, more and more cache consistency protocols based on directories are used, in which directory tables are used to record the storage status of data in other caches. When reading and writing data, only listening requests need to be sent to a few nodes. The size of the directory table is related to the cache capacity and the number of processor cores. As the number of processor cores increases, the increase in the directory table is limited, so it has good scalability.

[0004] In the directory-based cache consistency protocol, the message types are divided into request, reply, listen, and response, and there is a dependency relationship between different types of messages. The release of the request message depends on the response message, and the release of the listen message depends on the reply message. If the messages share the same physical channel, deadlock may occur. Usually, separate physical channels are allocated for different types of messages to avoid deadlock. However, in this case, the channel utilization is low and the execution efficiency of the protocol is low. Summary of the invention

[0005] The technical problem to be solved by the present invention is: In view of the above problems in the prior art, a configurable micro-operation mechanism for a directory protocol of a multi-core processor is provided, which has good flexibility and high fault tolerance.

[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0007] A configurable micro-operation mechanism for a multi-core processor directory protocol, applied to an on-chip network, includes the following steps:

[0008] When the directory controller module DCU interacts with L2Cache, after receiving the request message or the response message, the directory controller module DCU determines whether to enter the debugging mode. If yes, the request message or the response message is matched to the corresponding micro-operation code to perform corresponding actions. Otherwise, the request message or the response message is pipelined.

[0009] When the directory controller module DCU interacts with the IMU, the message sent by the directory controller module DCU is cached and it is determined whether the message sent is timed out. If so, the cached message is resent. At the same time, the IMU accepts the message unconditionally until the physical link is empty.

[0010] Furthermore, the specific process of matching the request message or response message to the corresponding micro-operation code to perform the corresponding action includes: judging whether to enter the debug mode according to the configuration register; if entering the debug mode, addressing the entry address of the microprogram through the command code of the corresponding request message or response message, obtaining the corresponding micro-operation code to perform the corresponding action, and then addressing the next microprogram according to the micro-address in the microprogram, and obtaining the corresponding next micro-operation code, until the exit bit in the microprogram is valid, the execution of the microprogram is completed.

[0011] Furthermore, the micro-operation code includes one or more of Tag allocation enable, SNP enable, request generation COMP enable, and DBID response enable.

[0012] The process of pipeline processing the request message or the response message includes:

[0013] The directory controller module DCU receives the request message from the L2Cache, caches it and waits for selection. If the selected request message does not hit the directory entry currently being processed, the directory table is used to perform pipeline operation on the request message. If the selected request message hits the directory entry currently being processed, the request message is cached and waits for selection until it does not hit the directory entry currently being processed.

[0014] The directory controller module DCU sends a snoop request to L2Cache, and L2Cache processes the snoop request and encapsulates the processing result into a response message;

[0015] If the L2Cache is a local L2Cache, a response message is sent to the directory controller module DCU. If the L2Cache is another L2Cache, the response message is sent to the on-chip network. The directory controller module DCU obtains the response message of the local L2Cache or the on-chip network, caches it and waits to be selected, and performs pipeline operations on the selected response message using the directory table.

[0016] Further, the pipeline operation using the directory table includes:

[0017] First level: Directory search, confirming the address directory in the request or response message;

[0018] Second level: directory reading, the pipeline of this station waits for directory reading;

[0019] Level 3: Data verification, confirming whether the read data is correct;

[0020] Level 4: Data error correction, correcting the data read from the directory;

[0021] Level 5: Directory comparison, comparing the contents in the directory memory with the contents in the message;

[0022] Level 6: Directory hit, confirm whether the directory is replaced;

[0023] Level 7: Directory generation, generating corresponding responses and monitoring operations based on directory content and message information;

[0024] Level 8: Directory writing, writing the newly generated directory entry and check digit into the directory memory.

[0025] Furthermore, before using the directory table for pipeline operation, a step of temporarily storing messages is also included, specifically including: if there is a directory conflict, or the directory is busy, or the directory is full, or the directory entry is replacing the buffer, the request message or the response message is cached and waits to be selected.

[0026] Furthermore, before caching the request message or the response message and waiting to be selected, it is determined whether the number of temporarily stored messages reaches a preset threshold. If so, the directory controller module DCU sends a retry response to L2Cache, and L2Cache waits for Grant and resends the corresponding message.

[0027] Furthermore, the resending of the cached message specifically includes: the directory controller module DCU first sends a request message to the next IMU until the IMU returns the DBID number, and then sends a request message encapsulated with specific data to the next IMU

[0028] Furthermore, the directory controller module DCU comprises:

[0029] Request buffer, used to receive and store request messages from L2Cache;

[0030] A response channel is used to receive and store response messages from the local L2Cache or the on-chip network, including connecting the command response buffer and the data response buffer;

[0031] The conflict buffer is used to store messages that cannot be processed temporarily due to directory conflicts;

[0032] The retry buffer is used to temporarily store requests that cannot be processed at present;

[0033] HeadQue, used to record the directory item currently being processed;

[0034] A multiplexer, used to select a suitable message from the request buffer, the retry buffer, and the conflict buffer for subsequent operation;

[0035] The directory table is used to record the usage of data copies in the cache and track and modify them according to the current command and directory status.

[0036] Furthermore, the directory controller module DCU also includes:

[0037] Output buffer RspCmdBuf, used to store commands to L2Cache;

[0038] Output buffer RspDatBuf, used to store data response messages to L2Cache;

[0039] The output buffer ReqCmdBuf is used to store commands to the MCU;

[0040] The output buffer ReqDatBuf is used to store the data request message to the MCU;

[0041] Output buffer SnpBuf, used to store normal listening operation request messages to L2C

[0042] The output buffer EvtBuf is used to store the monitoring operation message generated by the directory replacement to the L2C.

[0043] Compared with the prior art, the present invention has the following advantages:

[0044] First, the fault tolerance of the design is significantly increased. CPU design is difficult and risky. The micro-operation mechanism introduced in the present invention realizes the flexible configuration of the DCU function of the directory controller module, which can effectively reduce the risk of hidden errors in chip design. In the debugging mode, the efficiency of the system is appropriately reduced, and the fault tolerance of the system is significantly improved.

[0045] Second, physical resources such as channels are effectively utilized to improve execution efficiency. Maintaining the cache consistency protocol requires multiple physical channels. Under normal circumstances, the utilization rate of these channels is relatively low. The mechanism introduced by the present invention can flexibly configure the specific implementation of the protocol and flexibly convert the physical channels, effectively improving the execution efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is a schematic structural diagram of an embodiment of the present invention.

[0047] Figure 2 Schematic diagram of the DCM structure in an embodiment of the present invention.

[0048] Figure 3Schematic diagram of the structure of the directory controller module DCU in an embodiment of the present invention.

[0049] Figure 4 is a flow chart of an embodiment of the present invention.

[0050] Figure 5 Schematic diagram of the microprogram execution process in an embodiment of the present invention.

[0051] Figure 6 The figure is a schematic diagram of a network on chip constructed based on the present invention. DETAILED DESCRIPTION

[0052] The present invention is further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.

[0053] This embodiment first proposes a directory and cache consistency management module DCM, such as Figure 1 As shown in Figure 1, the directory and cache consistency management module DCM accesses the IO controller IMU through the on-chip network NoC, and the IO controller IMU sends the obtained results through the on-chip network NoC. The specific structure of DCM is as follows Figure 2 As shown in the figure, it mainly includes the directory controller module DCU, L2Cache interface and on-chip network NOC interface. The directory controller module DCU completes the cache consistency maintenance between each L2Cache, the L2Cache interface module completes the message buffering and command format conversion between DCU and L2Cache, and the NOC interface completes the direct command sending and receiving control from DCU to the consistency network NOC.

[0054] In this embodiment, the directory controller module DCU connects the L2Cache and the on-chip network NOC through the directory and cache consistency management module DCM to track and record the data status inside the cache. Figure 3As shown, there are four physical channels in the directory controller module DCU, including two input channels (including request channel and sniff response channel) and two output channels (response channel and sniff channel). It mainly includes input buffer ReqCmd, input buffer AckCmd, input buffer AckData, conflict request buffer CflBuf, retry buffer RtyBuf, directory table DirTab, output buffer RspCmdBuf, output buffer RspDatBuf, output buffer ReqCmdBuf, output buffer ReqDatBuf, output buffer SnpBuf and output buffer EvtBuf. Input buffer AckCmd, input buffer AckData are connected to L2Cache and storage controller MCU to receive sniff response from L2Cache and response data from storage controller. The input buffer ReqCmd is connected to L2C and NoC, and receives the listening request from L2Cache or NoC; the conflict request buffer CflBuf stores the requests that cannot be processed due to directory conflicts; the retry buffer RtyBuf stores the requests that cannot be processed at present, and waits for the appropriate time to be rescheduled for processing; the directory table DirTab records the usage of the data copies in the Cache through the directory; the output buffer RspCmdBuf and the output buffer RspDatBuf respectively store the command and data response messages of the L2C; the output buffer ReqCmdBuf and the output buffer ReqDatBuf respectively store the command and data request messages of the MCU; the output buffer SnpBuf stores the normal listening operation request messages of the L2C; the output buffer EvtBuf stores the listening operation messages of the L2C due to the directory replacement. The contents of the directory controller module DCU are summarized as follows:

[0055] Input buffer ReqCmd, used to receive and store request messages from L2Cache;

[0056] The response channel is used to receive and store the response message from the local L2Cache or the on-chip network, including the input buffer AckCmd and the input buffer AckData;

[0057] The conflict request buffer CflBuf is used to store messages that cannot be processed temporarily due to directory conflicts;

[0058] Retry buffer RtyBuf, used to temporarily store requests that cannot be processed at present;

[0059] HeadQue, used to record the directory item currently being processed;

[0060] A multiplexer, used to select a suitable message from the input buffer ReqCmd, the conflict request buffer CflBuf, and the retry buffer RtyBuf for subsequent operation;

[0061] The directory table DirTab is used to record the usage of data copies in the cache, and track and modify them according to the current command and directory status;

[0062] Output buffer RspCmdBuf, used to store commands to L2Cache;

[0063] Output buffer RspDatBuf, used to store data response messages to L2Cache;

[0064] The output buffer ReqCmdBuf is used to store commands to the MCU;

[0065] The output buffer ReqDatBuf is used to store the data request message to the MCU;

[0066] Output buffer SnpBuf, used to store normal listening operation request messages to L2C

[0067] The output buffer EvtBuf is used to store the monitoring operation message generated by the directory replacement to the L2C.

[0068] In this embodiment, the specific operation of maintaining consistency is completed by the directory controller module DCU. During the interaction between the directory controller module DCU and L2Cache, there are two sources of requests for maintaining cache consistency, one is sent by the local L2Cache, and the other is sent by other L2Caches through the on-chip network NoC network; after receiving the request message, the directory controller module DCU sends a monitoring request to the L2Cache; L2Cache processes the monitoring request according to the directory and encapsulates the processing result into a response message. At this time, depending on the source of the request message, the response message has two destinations. If the request is sent by the local L2Cache, the response message is returned to the directory controller module DCU, otherwise the response message is directly sent to the on-chip network NoC.

[0069] In this embodiment, the conflict buffer CflBuf is located after the request is sent for arbitration, and stores messages that cannot be processed temporarily due to directory conflicts; the retry buffer RtyBuf temporarily stores requests that cannot be processed at present, waiting for the right time to reprocess. The temporary storage of messages includes the following three situations: one is the busy state of the directory caused by monitoring, the second is that the directory is full and cannot accept new requests, and the third is that the directory entry is in the replacement buffer. The HeadQue records the directory entry that is currently being processed. When a new request arrives, it will be compared with the record in the HeadQue. If there is no hit, the request can continue. If there is a hit, it means that the directory entry of the current request cannot be processed immediately. In order to save time, the request message is temporarily stored in the retry buffer RtyBuf and waits for the right time to retry. The retry buffer RtyBuf adopts a credit reservation mechanism, and each L2Cache stores up to 4 messages in the retry buffer RtyBuf. The capacity of the retry buffer RtyBuf is limited, so when there are no free items, the directory controller module DCU will send a retry response RetryAck to the request sender. The sender will wait until Grant and resend the request; the multiplexer will select the appropriate message from the input buffer ReqCmd, the conflict request buffer CflBuf, and the retry buffer RtyBuf for the next step; the directory table DirTab records the usage of data copies in the Cache, and tracks and modifies it according to the current command and directory status to maintain data consistency between each L2Cache in the entire CPU; the directory entry structure in the directory table DirTab includes valid bits, busy flags, monitoring counters, source node numbers, bit vectors, check bits, etc.

[0070] After the message enters the directory table DirTab, the pipeline operation is adopted. The pipeline operation includes:

[0071] The first level is a directory lookup, confirming the address directory in the request or reply message;

[0072] The second level is directory readout, where the pipeline of this station waits for directory readout;

[0073] The third level is data verification, which confirms whether the read data is correct;

[0074] The fourth level is data error correction, which corrects the data read from the directory;

[0075] The fifth level is directory comparison, where the contents of the directory memory are compared with the contents of the message;

[0076] The sixth level is directory hit, confirming whether the directory has been replaced;

[0077] The seventh level is directory generation, which generates various responses and monitoring operations based on directory content, message information, etc.

[0078] The eighth level is directory writing, which writes the newly generated directory entry and check digit into the directory memory.

[0079] After the directory table DirTab adopts pipeline operation, the output buffer EvtBuf stores the directory items to be replaced. The directory items stored in the directory controller module DCU are smaller than the capacity of the cache. When the directory occupies a certain amount, the directory controller module DCU will clear some directory items and invalidate the data in the L2Cache or write it back to the memory. In the directory controller module DCU, the input and output of the message adopts the FIFO structure, and the transaction processing adopts a non-blocking pipeline design. The pipeline has 8 levels, namely directory search, directory reading, data verification, data error correction, directory comparison, directory hit, directory generation, and directory writing.

[0080] Based on the working principle of the directory controller module DCU proposed in this embodiment, as shown in FIG. Figure 4 As shown, this embodiment proposes a configurable micro-operation mechanism for a multi-core processor directory protocol, which is applied to an on-chip network and includes the following steps:

[0081] When DCU and L2Cache interact, after receiving the request message or the response message, DCU determines whether to enter the debugging mode. If yes, it matches the request message or the response message to the corresponding micro-operation code to perform corresponding actions. Otherwise, it performs pipeline processing on the request message or the response message.

[0082] When DCU and IMU interact, they cache messages sent by DCU and determine whether the sent messages have timed out. If so, they resend the cached messages. At the same time, IMU accepts messages unconditionally until the physical link is empty.

[0083] Under normal circumstances, the DCU processes messages in a pipeline manner, which is implemented by hardware. Considering the complexity of hardware implementation modification, in order to increase the fault tolerance and flexibility of the system, micro-operations are introduced to realize the configurability of the protocol. Different consistency protocols can be realized by modifying micro-commands. The specific process of matching the request message or response message to the corresponding micro-operation code to perform corresponding actions includes: judging whether to enter the debug mode according to the configuration register, if entering the debug mode, addressing the entry address of the microprogram through the command code of the corresponding request message or response message, obtaining the corresponding micro-operation code to perform corresponding actions, and then addressing the next microprogram according to the micro-address in the microprogram, and obtaining the corresponding next micro-operation code, until the exit bit in the microprogram is valid, the execution of the microprogram is completed.

[0084] In order to increase the fault tolerance of the design, a debug mode is introduced. Under normal circumstances, requests are processed in the pipeline. In debug mode, single-step execution is performed and request processing is controlled by micro-operations, which are implemented by microinstructions stored in the micro-operation memory. Each microinstruction consists of a microprogram address and a micro-operation code. The microprogram address is the program address that indicates the address of the next microprogram, and the micro-operation code indicates the action to be performed by the current microprogram. In debug mode, the entry address of the microprogram is first addressed through the command code of the request or response, and then the next microprogram is addressed according to the micro-address in the microprogram until the exit bit in the microprogram is valid, completing the execution of this microprogram. The meaning of the micro-operation code is as follows: Tag allocation enable, SNP enable, request generation COMP enable, DBID response enable, etc. Such as Figure 5 As shown in the figure, a request or response, when performing DCU operation, will determine whether to enter the debug mode according to the configuration register. After entering the debug mode, the entry address of the microprogram will be found according to the command code of the request or response, and then the next microprogram will be found according to the microaddress of the microprogram until the exit bit of the microprogram is valid. The implementation of different functions depends on the combination of different enable signals.

[0085] The process of pipeline processing the request message or the response message is as described above, and specifically includes:

[0086] DCU receives the request message from L2Cache, caches it and waits to be selected. If the selected request message does not hit the directory entry currently being processed, pipeline operation is performed on the request message using the directory table. If the selected request message hits the directory entry currently being processed, the request message is cached and waits to be selected until it does not hit the directory entry currently being processed.

[0087] DCU sends a snoop request to L2Cache, which processes the snoop request and encapsulates the processing result into a response message;

[0088] If the L2Cache is a local L2Cache, a response message is sent to the DCU. If the L2Cache is another L2Cache, the response message is sent to the on-chip network. The DCU obtains the response message from the local L2Cache or the on-chip network, caches it and waits to be selected, and performs pipeline operations on the selected response message using the directory table.

[0089] The pipeline operation using the directory table is as described above, including:

[0090] First level: Directory search, confirming the address directory in the request or response message;

[0091] Second level: directory reading, the pipeline of this station waits for directory reading;

[0092] Level 3: Data verification, confirming whether the read data is correct;

[0093] Level 4: Data error correction, correcting the data read from the directory;

[0094] Level 5: Directory comparison, comparing the contents in the directory memory with the contents in the message;

[0095] Level 6: Directory hit, confirm whether the directory is replaced;

[0096] Level 7: Directory generation, generating corresponding responses and monitoring operations based on directory content and message information;

[0097] Level 8: Directory writing, writing the newly generated directory entry and check digit into the directory memory.

[0098] In the mechanism of this embodiment, before using the directory table for pipeline operation, a step of temporarily storing messages is also included, specifically including: if there is a directory conflict, or the directory is busy, or the directory is full, or the directory entry is replacing the buffer, the request message or the response message is cached and waits to be selected.

[0099] In the mechanism of this embodiment, before the request message or the response message is cached and waits to be selected, it is also determined whether the number of temporarily stored messages reaches a preset threshold. If so, the DCU sends a retry response to the L2Cache, and the L2Cache waits for Grant and resends the corresponding message.

[0100] according to Figure 6 The constructed on-chip network instance structure. The directory controller module DCU and the IO controller IMU are connected to different routing nodes, and the communication between the two requires the help of the on-chip network NoC. In general, the communication process between the directory controller module DCU and the IO controller IMU is as follows: the directory controller module DCU sends a request without data to the IO controller IMU, and the IO controller IMU returns a response number to the directory controller module DCU based on its own buffer situation. The directory controller module DCU transmits specific data based on the response. This is a reliable communication that can ensure that the data sent by the directory controller module DCU can be processed. However, when the directory controller module DCU and the IO controller IMU are mounted on different routing nodes, the two parties need three communications to complete an operation, and this communication will generate a relatively large overhead. Therefore, when the directory controller module DCU sends a request to the IO controller IMU, the message directly encapsulates the specific data and selects the response channel for transmission.

[0101] like Figure 6As shown in the figure, IMU5 sends a request message to IMU3. According to the YX routing strategy, the request message reaches DCU6; DCU6 sends a request message to IMU, which reaches IMU3 through the response channel; IMU3 encapsulates the processing result into a response message and sends it directly back to IMU5 through the NoC network. When IMU5 receives the response message, a request operation is completed. In a special case, when IMU3 and IMU5 visit each other, a Figure 6 In the loop shown in the figure, when there are too many messages in the loop, deadlock will occur. The generation process is as follows: IMU3 and IMU5 send memory access requests to each other, and the response message of IMU5 goes through channel 0, channel 1, and channel 2. Since DCU6 sends a request message to IMU3, the two share physical channel 4; similarly, the response message of IMU3 goes through channel 5, channel 6, channel 7, and shares physical channel 9. The release of the request message in the IO controller IMU requires the issuance of the response message. Under normal circumstances, the memory access request of the IO controller IMU is executed slowly, so the request message from the directory controller module DCU will block channel 4 and channel 9, thereby affecting the transmission of the response message of the IO controller IMU. As the messages accumulate in the physical channel, a closed loop will eventually be formed, leading to deadlock.

[0102] The above deadlock problem is solved with the help of the debugging mode in the directory controller module DCU. Specifically, a counter is maintained inside the directory controller module DCU and a dedicated buffer is maintained to record the messages that have been sent. The depth of the buffer is the same as the maximum number of messages that physical channels 4 or 9 can accommodate. When the directory controller module DCU responds to the channel timeout and does not send a message, it is considered to be deadlocked, and the directory controller module DCU enters the debugging mode and resends the message in the buffer. Similarly, in the IO controller IMU, if a timeout state is detected, the IO controller IMU is responsible for unconditionally accepting the message, but does not specifically process it. The purpose is to empty the congested physical link. After the directory controller module DCU enters the debugging mode, there are two characteristics. First, the processing of the message is no longer in a pipeline manner, which can reduce congestion. Second, the directory controller module DCU converts the access to the IMU into a reliable method, that is, the directory controller module DCU first sends a request message to the IO controller IMU, which reaches the IO controller IMU through the request channel and the on-chip network NoC until the IO controller IMU returns the DBID number, and then sends a request message encapsulated with specific data to the IO controller IMU from the response channel. The combined effect of the two methods can effectively resolve deadlock and alleviate network congestion.

[0103] The above is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment, it is not intended to limit the present invention. Therefore, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the scope of protection of the technical solution of the present invention.

Claims

1. A configurable micro-operation mechanism for directory protocols in multi-core processors, applied to on-chip networks, It is characterized in that The following steps are involved: When the directory controller module DCU interacts with L2Cache, after receiving the request message or the response message, the directory controller module DCU determines whether to enter the debugging mode. If yes, the request message or the response message is matched to the corresponding micro-operation code to perform corresponding actions. Otherwise, the request message or the response message is pipelined. When the directory controller module DCU interacts with the IMU, the message sent by the directory controller module DCU is cached and it is determined whether the message sent is timed out. If so, the cached message is resent. At the same time, the IMU accepts the message unconditionally until the physical link is empty.

2. The configurable micro-operation mechanism for a multi-core processor directory protocol according to claim 1, It is characterized in that The specific process of matching the request message or response message to the corresponding micro-operation code and performing the corresponding action includes: judging whether to enter the debug mode according to the configuration register; if entering the debug mode, addressing the entry address of the microprogram through the command code of the corresponding request message or response message, obtaining the corresponding micro-operation code and performing the corresponding action; then addressing the next microprogram according to the micro-address in the microprogram, and obtaining the corresponding next micro-operation code, until the exit bit in the microprogram is valid, the execution of the microprogram is completed.

3. The configurable micro-operation mechanism for multi-core processor directory protocol according to claim 2, It is characterized in that The micro-operation code includes one or more of Tag allocation enable, SNP enable, request generation COMP enable, and DBID response enable.

4. The configurable micro-operation mechanism for a multi-core processor directory protocol according to claim 1, It is characterized in that The process of pipeline processing the request message or the response message includes: The directory controller module DCU receives the request message from the L2Cache, caches it and waits for selection. If the selected request message does not hit the directory entry currently being processed, the directory table is used to perform pipeline operation on the request message. If the selected request message hits the directory entry currently being processed, the request message is cached and waits for selection until it does not hit the directory entry currently being processed. The directory controller module DCU sends a snoop request to L2Cache, and L2Cache processes the snoop request and encapsulates the processing result into a response message; If the L2Cache is a local L2Cache, a response message is sent to the directory controller module DCU. If the L2Cache is another L2Cache, the response message is sent to the on-chip network. The directory controller module DCU obtains the response message of the local L2Cache or the on-chip network, caches it and waits to be selected, and performs pipeline operations on the selected response message using the directory table.

5. The configurable micro-operation mechanism for multi-core processor directory protocol according to claim 4, It is characterized in that The pipeline operation using the directory table includes: First level: Directory search, confirming the address directory in the request or response message; Second level: directory reading, the pipeline of this station waits for directory reading; Level 3: Data verification, confirming whether the read data is correct; Level 4: Data error correction, correcting the data read from the directory; Level 5: Directory comparison, comparing the contents in the directory memory with the contents in the message; Level 6: Directory hit, confirm whether the directory is replaced; Level 7: Directory generation, generating corresponding responses and monitoring operations based on directory content and message information; Level 8: Directory writing, writing the newly generated directory entry and check digit into the directory memory.

6. The configurable micro-operation mechanism for multi-core processor directory protocol according to claim 4, It is characterized in that Before using the directory table for pipeline operation, a step of temporarily storing messages is also included, specifically including: if there is a directory conflict, or the directory is busy, or the directory is full, or the directory entry is replacing the buffer, the request message or the response message is cached and waits to be selected.

7. The configurable micro-operation mechanism for multi-core processor directory protocol according to claim 6, It is characterized in that Before caching the request message or the response message and waiting to be selected, it is also determined whether the number of cached messages reaches a preset threshold. If so, the directory controller module DCU sends a retry response to L2Cache, and L2Cache waits for Grant and resends the corresponding message.

8. The configurable micro-operation mechanism for multi-core processor directory protocol according to claim 1, It is characterized in that The process of resending the cached message includes: the directory controller module DCU first sends a request message to the next IMU until the IMU returns the DBID number, and then sends a request message encapsulated with specific data to the next IMU.

9. The configurable micro-operation mechanism for a multi-core processor directory protocol according to any one of claims 1 to 8, It is characterized in that The directory controller module DCU comprises: Input buffer ReqCmd, used to receive and store request messages from L2Cache; The response channel is used to receive and store the response message from the local L2Cache or the on-chip network, including the input buffer AckCmd and the input buffer AckData; The conflict request buffer CflBuf is used to store messages that cannot be processed temporarily due to directory conflicts; Retry buffer RtyBuf, used to temporarily store requests that cannot be processed at present; HeadQue, used to record the directory item currently being processed; A multiplexer, used to select a suitable message from the input buffer ReqCmd, the conflict request buffer CflBuf, and the retry buffer RtyBuf for subsequent operation; The directory table DirTab is used to record the usage of data copies in the Cache, and track and modify them according to the current command and directory status.

10. The configurable micro-operation mechanism for multi-core processor directory protocol according to claim 9, It is characterized in that The directory controller module DCU also includes: Output buffer RspCmdBuf, used to store commands to L2Cache; Output buffer RspDatBuf, used to store data response messages to L2Cache; The output buffer ReqCmdBuf is used to store commands to the MCU; The output buffer ReqDatBuf is used to store the data request message to the MCU; Output buffer SnpBuf, used to store normal listening operation request messages to L2C The output buffer EvtBuf is used to store the monitoring operation message generated by the directory replacement to the L2C.

Citation Information

Patent Citations

  • Cache data consistency achieving method and device based on distributed limited directory

    CN108920192A

  • Cache consistency protocol verification method and system for on-chip multi-core processor, and medium

    CN111611120A

  • Directory controller test excitation generation method based on genetic algorithm

    CN112069081A