The disclosure relates to an integrated circuit. Particularly, the disclosure relates to a method for executing a cache management operation in an integrated circuit.
A system-on-chip (SoC) is a semiconductor technology for integrating a plurality of complex multifunctional systems into one single chip. Silicon intellectual properties (IP) configured in the SoC may be connected to each other through an interconnect bus. TileLink, for example, is an interconnect bus designed for the SoC. Through the interconnect bus compliant with the TileLink protocol, L1-caches (e.g., data caches) of different cores may be connected to an L2-cache. Regardless, a core cannot manage data consistency between different data caches of other cores through the TileLink interconnect bus.
The disclosure provides an integrated circuit and a method for executing a cache management operation (CMO), in which a master interface (e.g., a master interface of a first core) can execute the cache management operation on data caches of other cores.
In an embodiment of the disclosure, the integrated circuit includes a link and a master interface. The link is connected between the master interface and a slave interface, and the link includes an A-channel, a B-channel, a C-channel, a D-channel, and an E-channel. The method for executing a cache management operation includes the following. An AcquireBlock message compliant with a TileLink protocol is sent from the master interface through the A-channel to the slave interface. A GrantData message or a Grant message compliant with the TileLink protocol sent by the slave interface is received by the master interface through the D-channel. A GrantAck message compliant with the TileLink protocol is sent from the master interface through the E-channel to the slave interface. A ReleaseData message or a Release message compliant with a TileLink protocol is sent from the master interface through the C-channel to the slave interface. A ReleaseAck message compliant with the TileLink protocol sent by the slave interface is received by the master interface through the D-channel. A ProbeBlock message or a ProbePerm message compliant with a TileLink protocol sent by the slave interface is received by the master interface through the B-channel. a ProbeAckData message or a ProbeAck message compliant with the TileLink protocol is sent from the master interface through the C-channel to the slave interface. A cache management operation message is sent from the master interface through the A-channel to the slave interface. The cache management operation message is configured to manage data consistency between different data caches. A cache management operation acknowledgement message of the slave interface is received by the master interface through the D-channel. Wherein, the cache management operation message and the cache management operation acknowledgement message are unstandardized messages to a TileLink specification.
In an embodiment of the disclosure, the integrated circuit includes a master interface, a slave interface, and a link. The link is connected between the master interface and the slave interface. The link includes an A-channel, a B-channel, a C-channel, a D-channel, and an E-channel. The A-channel is configured to transmit an AcquireBlock message compliant with the TileLink protocol sent by the master interface to the slave interface. The D-channel is configured to transmit a GrantData message or a Grant message compliant with the TileLink protocol sent by the slave interface to the master interface. The E-channel is configured to transmit a GrantAck message compliant with the TileLink protocol sent by the master interface to the slave interface. The C-channel is configured to transmit a ReleaseData message or a Release message compliant with the TileLink protocol sent by the master interface to the slave interface. The D-channel is further configured to transmit a ReleaseAck message compliant with the TileLink protocol sent by the slave interface to the master interface. The B-channel is configured to transmit a ProbeBlock message or a ProbePerm message compliant with the TileLink protocol sent by the slave interface to the master interface. The C-channel is further configured to transmit a ProbeAckData message or a ProbeAck message compliant with the TileLink protocol sent by the master interface to the slave interface. The A-channel is further configured to transmit a cache management operation message of the master interface to the slave interface, and the cache management operation message is configured to manage data consistency between different data caches. The D-channel is further configured to transmit a cache management operation acknowledgement message of the slave interface to the master interface. The cache management operation message and the cache management operation acknowledgement message are unstandardized messages to a TileLink specification.
Based on the foregoing, in some embodiments, a first core of the integrated circuit may send the cache management operation message to the L2-cache through the A-channel compliant with the TileLink protocol. The L2-cache may execute the cache management operation message from the first core, and, in response to the execution of the cache management operation message, may send a probe message (e.g., a ProbeBlock message or a ProbePerm message) to other cores (a second core), thus managing data consistency between all L1-caches (e.g., data caches of the first core and the second core). Therefore, the first core may execute the cache management operation on the data caches of the other cores by sending the cache management operation message.
To make the aforementioned more comprehensible, several embodiments accompanied with drawings are described in detail as follows.
The accompanying drawings are included to provide a further understanding of the disclosure, and are incorporated in and constitute a part of this specification. The drawings illustrate exemplary embodiments of the disclosure and, together with the description, serve to explain the principles of the disclosure.
The term “coupling (or connection)” used throughout the whole specification of the present application (including the appended claims) may refer to any direct or indirect connection means. For example, if it is herein described that a first device is coupled (or connected) to a second device, it should be interpreted that the first device may be directly connected to the second device, or the first device may be indirectly connected through other devices or some connection means to the second device. The terms “first”, “second”, and similar terms mentioned throughout the whole specification of the present application (including the appended claims) are merely used to name discrete elements or to differentiate among different embodiments or ranges, instead of limiting an upper bound or lower bound of the number of elements or the sequence of elements. In addition, wherever possible, elements/components/steps using the same reference numerals in the drawings and the embodiments indicate the same or similar parts. Cross-reference may be mutually made between relevant descriptions of elements/components/steps using the same reference numerals or the same terms in different embodiments.
The master interface 110 may send a message compliant with a TileLink protocol to the slave interface 120 through the A-channel CHA, the C-channel CHC, and/or the E-channel CHE. The slave interface 120 may transmit a message compliant with the TileLink protocol to the master interface 110 through the B-channel CHB and/or the D-channel CHD. For example, the master interface 110 may send an AcquireBlock message compliant with the TileLink protocol to the slave interface 120 through the A-channel CHA. Then, the master interface 110 may receive a GrantData message (or a Grant message) compliant with the TileLink protocol sent by the slave interface 120 through the D-channel CHD. Then, the master interface 110 may send a GrantAck message compliant with the TileLink protocol to the slave interface 120 through the E-channel CHE. For another example, the master interface 110 may send a ReleaseData message (or a Release message) compliant with the TileLink protocol to the slave interface 120 through the C-channel CHC. Then, the master interface 110 may receive a ReleaseAck message compliant with the TileLink protocol sent by the slave interface 120 through the D-channel CHD. For still another example, the master interface 110 may receive a ProbeBlock message (or a ProbePerm message) compliant with the TileLink protocol sent by the slave interface 120 through the B-channel CHB. Then, the master interface 110 may send a ProbeAckData message (or a ProbeAck message) compliant with the TileLink protocol to the slave interface 120 through the C-channel CHC.
The AcquireBlock message, the GrantData message, the Grant message, the GrantAck message, the ReleaseData message, the Release message, the ReleaseAck message, the ProbeBlock message, the ProbePerm message, the ProbeAckData message, and the ProbeAck message are each a message defined in the TileLink protocol, and will not be repeatedly described herein. In addition, the difference from the TileLink protocol lies in that, the A-channel CHA may transmit a cache management operation message (hereinafter CMO message) of the master interface 110 to the slave interface 120, and the D-channel CHD may transmit a cache management operation acknowledgement message (hereinafter CMOAck message) of the slave interface 120 to the master interface 110. The CMO message and the CMOAck message are custom messages (unstandardized messages to the TileLink specification).
The master interface 110, the slave interface 120, and the link LINK1 shown in
The integrated circuit 300 also includes a coherent interconnect circuit 310, a memory-mapped input/output (MMIO) circuit 320, and an L2-cache 330. Depending on the actual design, the MMIO circuit 320 may be any MMIO circuit, for example, a conventional MMIO circuit or other MMIO circuits.
The coherent interconnect circuit 310 is connected to the data caches D$ of the cores CORE1 to CORE4 through links LINK31, LINK32, LINK33, and LINK34. The coherent interconnect circuit 310 is also connected to the L2-cache 330 through a link LINK35. Depending on the actual design, the coherent interconnect circuit 310 may be any interconnection circuit, for example, a conventional interconnection circuit or other interconnection circuits. For any one of the links LINK31 to LINK35, reference may be made to the relevant description of the link LINK1 shown in
During the actual operation, any one of the cores CORE1 to CORE4 may execute a cache management operation instruction. The cache management operation instruction may manage the data consistency between different data caches D$. The syntax of the cache management operation instruction is not limited by this embodiment. For example, the cache management operation instruction may include a pseudocode as described below, where “L” is a label, “CMO.VAR.” denotes a cache management operation, “cmo_specifier” denotes an operation category, “rd” denotes a destination register (which is configured to store a cache line address), “rs1” denotes a source register (which is configured to store a current cache line addres), “rs2” denotes a boundary register (which is configured to storage a completion cache line address), and “bne” denotes a branch or a jump, that is, before the address of rd reaches the address of rs2, return to label “L” to continue the execution. Therefore, for the cache lines within a specified range (from the cache line address stored in the register rs1 to the cache line address stored in the register rs2) in different data caches D$, the cache management operation instruction may manage the data consistency of one cache line or between more cache lines within the specified range.
Based on the operation category “cmo_specifier”, the cache management operation instruction may perform at least one of a write-back and an invalidation on at least one cache line of each of the different data caches D$ of different cores. The operation category “cmo_specifier” may be defined depending on the actual design. For example, the operation category “cmo_specifier” may be “INVAL” (invalidating operation type), “WBINVAL” (write-back and invalidating operation type), or “WB” (write-back operation type). When the operation category “cmo_specifier” is “INVAL”, the cache management operation instruction may invalidate one or more cache lines within the specified range. When the operation category “cmo_specifier” is “WBINVAL”, the cache management operation instruction may write one or more cache lines within the specified range back to the L2-cache 330, and then invalidate the cache lines within the specified range. When the operation category “cmo_specifier” is “WB”, the cache management operation instruction may write one or more cache lines within the specified range back to the L2-cache 330.
For example, the core CORE1 may execute the cache management operation instruction. In response to the execution of the cache management operation instruction, the core CORE1 may send a CMO message from a master interface of the data cache D$ of the core CORE1 to a slave interface of the coherent interconnect circuit 310. The coherent interconnect circuit 310 may forward the CMO message sent by the core CORE1 to a slave interface of the L2-cache 330. Based on the CMO message sent by the core CORE1, the L2-cache 330 may change the permission of the corresponding cache line of the data caches D$ of the cores CORE2 to CORE4 to manage the data consistency between the different data caches D$.
To be specific, assuming that the core CORE1 executes the cache management operation instruction, then the core CORE1 may not only manage data consistency of the data cache D$ of the core CORE1, but may also manage data consistency between the data caches D$ of the other cores (e.g., the cores CORE2 to CORE4). Regarding the core CORE1 managing the data consistency of the data cache D$ of the core CORE1, the details will be described with reference to
When the load/store request is a non-cacheable request, the LSU 440 may forward the non-cacheable request to the coherent interconnect circuit 310 through a link that comply with the TileLink specification, so as to fetch data. When the load/store request is a cacheable request, the LSU 440 may send the cacheable request to the DCU 450. The DCU 450 can forward the cacheable request to the coherent interconnect circuit 310 through the link LINK31, so as to fetch data. In detail, the master interface IFm of the DCU 450 sends the cacheable request to the slave interface IFs of the coherent interconnect circuit 310, and then the slave interface IFs of the coherent interconnect circuit 310 returns the data to the master interface IFm of the DCU 450. The master interface IFm, link LINK31, and slave interface IFs shown in
For example, it is assumed that the operation category cmo_specifier of the cache management operation instruction is “WBINVAL”. When the state of the target cache line is an “M state” (Modified state, i.e., the target cache line is only present in the data cache D$ of the core CORE1, and the target cache line is dirty), the release message R_M shown in
For another example, it is assumed that the operation category cmo_specifier of the cache management operation instruction is “INVAL”. When the state of the target cache line is the “M state”, the release message R_M shown in
For still another example, it is assumed that the operation category cmo_specifier of the cache management operation instruction is “WB”. When the state of the target cache line is the “M state”, the release message R_M shown in
After the L2-cache 330 completes the execution of the release message R_M, the slave interface of the L2-cache 330 may send a release acknowledgement message RA_M to the master interface of the data cache D$ of the core CORE1 through the D-channel CHD. For example, the release message R_M shown in
To be specific, the L2-cache 330 receives and executes the CMO message CMO_M from the core CORE1. In response to the execution of the CMO message CMO_M, the L2-cache 330 sends a probe message P_M to the data caches D$ of the other cores (e.g., the cores CORE2 to CORE4) through the B-channel CHB to manage the data consistency between the data cache D$ of the core CORE1 and the data caches D$ of the cores CORE2 to CORE4. Depending on the actual operation, the probe message P_M may be the ProbeBlock message or the ProbePerm message compliant with the TileLink protocol. The probe message P_M may change the permission of the target cache line of the data caches D$ of the cores (e.g., cores CORE2 to CORE4). In response to the execution of the probe message P_M, the cores CORE2 to CORE4 return a probe acknowledgement message PA_M to the L2-cache 330 through the C-channel CHC. Based on the probe acknowledgement message PA_M returned by the cores CORE2 to CORE4, the L2-cache 330 may send a CMOAck message CMOA_M to the core CORE1 through the D-channel CHD.
Therefore, the core CORE1 may manage the data consistency between the data caches D$ of the other cores (e.g., the cores CORE2 to CORE4). Hereinafter, description with reference to the protocol shown in
For example, it is assumed that the operation category cmo_specifier of the cache management operation instruction is “WBINVAL”. When the state of the target cache line is the “M state”, the CMO message CMO_M shown in
For another example, it is assumed that the operation category cmo_specifier of the cache management operation instruction is “INVAL”. When the state of the target cache line is the “M state”, the CMO message CMO_M shown in
For still another example, it is assumed that the operation category cmo_specifier of the cache management operation instruction is “WB”. When the state of the target cache line is the “M state”, the CMO message CMO_M shown in
In summary of the foregoing, as described in above embodiments, the first core (e.g., the core CORE1) of the integrated circuit 300 may send the CMO message CMO_M not belonging to the TileLink protocol to the L2-cache 330 through the A-channel compliant with the TileLink protocol. The L2-cache 330 may execute the CMO message CMO_M from the first core, and, in response to the execution of the CMO message CMO_M, may send a probe message (e.g., a ProbeBlock message or a ProbePerm message) to the other cores (the second core, e.g., the cores CORE2 to CORE4), thus managing the data consistency between all of the L1-caches (e.g., the data caches D$ of the cores CORE1 to CORE4). Therefore, any one of the cores CORE1 to CORE4 may execute the cache management operation on the data caches $ of the other cores by sending the CMO message CMO_M.
The link LINK1 shown in
Any one of the cores CORE1 to CORE4 may transmit any message defined in the TileLink protocol to the memory agent circuit 331 through the coherent interconnect circuit 310. The master interface of the memory agent circuit 331 may transmit the message defined in the TileLink protocol to the slave interface of the handling register circuit 333 through a link LINK61. For the link LINK61, reference may be made to the relevant description of the link LINK1 shown in
The register agent circuit 332 has a plurality of registers. For example, depending on the actual design, the register agent circuit 332 has a command register and an access line register corresponding to each of the cores CORE1 to CORE4. Any one of the command registers is configured to record a command issued by one corresponding core, and the access line register is configured to record an address/index of a target cache line sent by a corresponding core. In addition, depending on the actual design, the register agent circuit 332 may also be configured with a cache control state register. Based on the contents of the registers, the register agent circuit 332 may generate a CMO message to the memory agent circuit 331. The master interface of the memory agent circuit 331 may forward the CMO message to the slave interface of the handling register circuit 333 through the link LINK61. The CMO message may be deduced by analogy with reference to the relevant descriptions in the above embodiments, will not be repeated.
The handling register circuit 333 is also referred to as a handling register file (HRF). The handling register circuit 333 may notify the control circuit 334 to execute a corresponding operation according to the message of the link LINK61, thus accessing the SRAM 335. For example, the link LINK61 may transmit the message defined in the TileLink protocol to the handling register circuit 333, and the handling register circuit 333 may execute the TileLink message and access the SRAM 335 through the control circuit 334. When the register agent circuit 332 transmits the CMO message to the handling register circuit 333 through the memory agent circuit 331 and the link LINK61, the handling register circuit 333 may change a permission of a cache line of the SRAM 335 in response to the execution of the CMO message to manage data consistency between the data caches D$ of the cores CORE1 to CORE4 and the SRAM 335.
It will be apparent to those skilled in the art that various modifications and variations can be made to the disclosed embodiments without departing from the scope or spirit of the disclosure. In view of the foregoing, it is intended that the disclosure covers modifications and variations provided that they fall within the scope of the following claims and their equivalents.
Number | Name | Date | Kind |
---|---|---|---|
11347512 | Soong | May 2022 | B1 |
20200387659 | Wachs et al. | Dec 2020 | A1 |
20210157728 | Terpstra | May 2021 | A1 |
20210255942 | Jung | Aug 2021 | A1 |
20230015240 | Mclellan | Jan 2023 | A1 |
Number | Date | Country |
---|---|---|
110083569 | Aug 2019 | CN |
112988647 | Jun 2021 | CN |
202127263 | Jul 2021 | TW |
Entry |
---|
McMillan (NPL: “Modular Specification and Verification of a Cache-Coherent Interface”, 2016 Formal Method in Computer-Aided Design (MCAD), Oct. 2016, pp. 109-116). (Year: 2016). |
Kenneth McMillan, “Modular specification and verification of a cache-coherent interface”, 2016 Formal Methods in Computer-Aided Design (FMCAD), Oct. 2016, pp. 109-116. |
“Office Action of Taiwan Counterpart Application”, dated Oct. 31, 2022, pp. 1-9. |
Number | Date | Country | |
---|---|---|---|
20230122423 A1 | Apr 2023 | US |