Integrated circuit, computer system and data processing method

By determining the existence of processing units in the memory system and generating load packets for multiple data elements, the system addresses network congestion in multi-core systems, enhancing performance through reduced packet transmission.

JP7601434B2Active Publication Date: 2024-12-17NEC PLATFROMS LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2023034908
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2023-03-07
Publication Date
2024-12-17
Estimated Expiration
2043-03-07

AI Technical Summary

Technical Problem

In multi-core systems with highly integrated memory systems, frequent data transmission in the intra-chip network leads to performance degradation due to the high number of load and reply packets, causing network congestion.

Method used

The system determines whether a processing unit including multiple element areas exists in the memory system for a vector gather instruction, and generates load packets to read multiple data elements simultaneously, updating the status of address registers to used when necessary.

Benefits of technology

This approach reduces the number of load and reply packets, alleviating network congestion and improving the performance of the computer system by optimizing data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007601434000001
    Figure 0007601434000001
  • Figure 0007601434000002
    Figure 0007601434000002
  • Figure 0007601434000003
    Figure 0007601434000003
Patent Text Reader

Abstract

To provide an arithmetic circuit for achieving performance improvement of a computer system.SOLUTION: The arithmetic circuit determines whether or not a processing unit including a plurality of element regions respectively corresponding to a memory address to be acquired exists in a memory system, outputs a load packet showing an offset and an element number for each of the element regions in the processing unit to the memory system if the processing unit exists, and writes an included data element corresponding to the element number of a replay packet inputted from the memory system in a vector register.SELECTED DRAWING: Figure 21
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present application relates to integrated circuits, computer systems and data processing methods, such as issuing load packets for vector gather instructions to a memory system. [Background technology]

[0002] As exemplified in Patent Document 1, a vector gather instruction is an instruction that sets an address pointer containing an address on a memory system in a vector register and instructs reading the data pointed to by this address into the vector register. A vector gather instruction is sometimes called a vector load instruction or simply a gather instruction. Typically, a vector gather instruction is decomposed into load packets indicating the reading of one word of data from a memory address, and the decomposed load packets are issued to the memory system. At this stage, the relationship between multiple memory addresses is not taken into consideration. A reply packet to the load packet is returned from the memory system for each word of data.

[0003] In recent years, efforts have been made to increase the integration and speed of memory systems by enabling the reading and writing of multiple words of data at one time, rather than just one word. By including multiple words of data to be read within the processing unit of the memory system, multiple words of data can be read in one process. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] Patent No. 2716254 [Patent Document 2] Patent No. 5926754 Summary of the Invention [Problem to be solved by the invention]

[0005] In relation to high integration, multi-core systems in which multiple cores and memory systems are connected via an in-chip network are becoming widespread. In multi-core systems, frequent data transmissions in the in-chip network can cause performance degradation. For this reason, it is desirable to reduce the number of load packets and reply packets to avoid or alleviate network congestion. In this case, it is conceivable to generate load packets that can load multiple words of data at once, and return reply packets for the multiple words of data, thereby reducing the number of load packets and reply packets.

[0006] For example, Patent Document 2 describes a method of loading multiple words of data using a limited range vector memory access instruction. The limited range vector memory access instruction specifies an instruction that specifies a limited range of a memory system and a vector gather instruction that indicates multiple indexes in the limited range. However, the memory address on the memory system in the vector register is calculated when the instruction is executed. Therefore, it is not possible to determine whether the memory address is included in the limited range of the memory system before the instruction is executed, and to generate an instruction that specifies the limited range and a vector gather instruction that indicates multiple indexes within the limited range. [Means for solving the problem]

[0007] The present application has been made to solve the above-mentioned problems, and has as its main object to realize an improvement in the performance of a computer system equipped with a memory system.

[0008] In order to achieve the above object, an arithmetic circuit according to a first aspect of the present application comprises: Multiple vector gather instructions are obtained.A determination is made as to whether or not a processing unit including a plurality of element areas each corresponding to a memory address exists in a memory system, and if the processing unit exists, a load packet indicating an element number and an offset for each of the element areas in the processing unit is output to the memory system, and a data element included in the reply packet input from the memory system corresponding to the element number is written to a vector register. and an address register for storing the memory address, and a determination is made as to whether or not there is a processing unit including a plurality of element areas corresponding to a memory address stored in the address register whose usage state is unused, and when outputting the load packet, the usage state of the address register in which the memory addresses corresponding to the plurality of element areas are stored is changed to used. .

[0009] A data processing method in an arithmetic circuit according to a second aspect of the present application includes the arithmetic circuit including an address register for storing a memory address, the arithmetic circuit comprising: Multiple vector gather instructions are obtained. A determination is made as to whether or not a processing unit including a plurality of element areas each corresponding to the acquired memory address exists in a memory system, and if the processing unit exists, a load packet indicating an element number and an offset for each of the element areas in the processing unit is output to the memory system, and a data element included in the reply packet input from the memory system corresponding to the element number is written to a vector register. and determining whether or not there is a processing unit including a plurality of element areas corresponding to a memory address stored in an address register whose usage state is unused, and changing the usage state of the address register in which the memory address corresponding to the plurality of element areas is stored to used when outputting the load packet. . Effect of the Invention

[0010] According to one aspect of the present application, it is possible to improve the performance of a computer system. [Brief description of the drawings]

[0011] [Figure 1] FIG. 1 is a schematic block diagram showing an example of the configuration of a computer system according to an embodiment of the present invention. [Diagram 2] 11 is an explanatory diagram showing an example of the operation of a vector gather instruction according to the embodiment; FIG. [Diagram 3] FIG. 2 is a configuration diagram showing an example of the configuration of a processing unit according to the embodiment; [Figure 4] FIG. 2 is a diagram showing an example of a memory address configuration according to the embodiment; [Diagram 5] FIG. 2 is a schematic block diagram showing an example of the configuration of a core according to the embodiment. [Figure 6]4 is a schematic block diagram showing an example of the configuration of a vector unit according to the present embodiment. FIG. [Figure 7] 2 is a schematic block diagram showing a configuration example of a load packet generating circuit according to the present embodiment; FIG. [Figure 8] FIG. 2 is a diagram showing a configuration example of a multiple element detection circuit according to the present embodiment. [Figure 9] 13 is a diagram showing a first example of a rule for determining a data element to be read by a load packet according to the embodiment; FIG. [Figure 10] FIG. 13 is a diagram showing a second example of a rule for determining a data element to be read by a load packet according to the embodiment; [Figure 11] FIG. 13 is a diagram showing a third example of a rule for determining a data element to be read by a load packet according to the embodiment; [Figure 12] FIG. 13 is a diagram showing a fourth example of a rule for determining a data element to be read by a load packet according to the embodiment; [Figure 13] FIG. 13 is a diagram showing a fifth example of a rule for determining a data element to be read by a load packet according to the embodiment; [Figure 14] FIG. 13 is a diagram showing a sixth example of a rule for determining a data element to be read by a load packet according to the embodiment; [Figure 15] FIG. 13 is a diagram showing a seventh example of a rule for determining a data element to be read by a load packet according to the embodiment; [Figure 16] FIG. 13 is a diagram showing an eighth example of a rule for determining a data element to be read by a load packet according to the embodiment; [Figure 17] 11 is a diagram illustrating an example of a configuration of a load packet according to the embodiment. FIG. [Figure 18] 11 is a diagram illustrating an example of a reply packet according to the embodiment of the present invention. FIG. [Figure 19] 11 is an explanatory diagram showing an example of a vector gather operation according to the embodiment; FIG. [Figure 20]11 is an explanatory diagram showing an example of transmission of a memory address from a vector unit to a load packet generation circuit according to the embodiment; FIG. [Figure 21] 1 is a schematic block diagram illustrating an arithmetic circuit according to a minimum configuration example of the present embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] Hereinafter, an embodiment of the present application will be described with reference to the drawings. FIG. 1 is a schematic block diagram showing an example of the configuration of a computer system according to this embodiment. The computer system according to this embodiment includes a plurality of cores 101 and a memory system 103. Each of the cores 101 is connected to the memory system 103 by wire so as to be able to transmit various data via an in-chip network 102. In this embodiment, the number of cores 101 may be one, or may be any number of two or more. Each of the cores 101 corresponds to a processor core. An independent arithmetic process can be performed for each of the cores 101. Each of the cores 101 includes a logic circuit for interpreting and executing an instruction sequence.

[0013] Next, a configuration example of the core 501 according to this embodiment will be described. Fig. 5 is a schematic block diagram showing a configuration example of the core 501 according to this embodiment. The configuration of the core 501 is similar to the configuration of each core 101 illustrated in Fig. 1. The core 501 includes a scalar unit 502, a vector unit 503, and a load packet generation circuit 505. The scalar unit 502 is an arithmetic circuit that decodes various instructions provided to it and executes various scalar operations. The vector unit 503 is an arithmetic circuit that performs various vector operations. The load packet generation circuit 505 generates a load packet for notifying an instruction to read data, and outputs the generated load packet to the memory system 504.

[0014] Next, the vector unit 601 according to this embodiment will be described. Fig. 6 is a schematic block diagram showing an example of the configuration of the vector unit 601 according to this embodiment. The configuration of the vector unit 601 is similar to the configuration of the vector unit 503 exemplified in Fig. 5. The vector unit 601 includes a vector register file 602 and an arithmetic unit 603. The vector register file 602 includes one or more vector registers. Each vector register includes multiple element registers. The number of vector registers in the vector register file 602 may be any number as long as it is one or more than one. The number of element registers in each vector register may be any number as long as it is more than one. In the following description, a case is exemplified in which the number of vector registers in the vector register file 602 is 64, and the number of element registers in each vector register is 64. It is assumed that the load packet generation circuit 701 can simultaneously read out memory addresses stored in each of the eight element registers from each vector register.

[0015] Next, the load packet generating circuit 701 according to this embodiment will be described. Fig. 7 is a schematic block diagram showing an example of the configuration of the load packet generating circuit 701 according to this embodiment. The configuration of the load packet generating circuit 701 is similar to the configuration of the load packet generating circuit 505 exemplified in Fig. 5. The load packet generation circuit 701 includes a multiple element detection circuit 702 and a load packet issuance circuit 703. The multiple element detection circuit 702 identifies eight memory addresses read from the vector register, and detects the presence or absence of a processing unit including multiple element areas indicated by the identified memory addresses in the memory system.

[0016] The load packet issuing circuit 703 generates a load packet for instructing the reading of multiple data elements or the reading of one data element as a result of detection by the multiple element detection circuit 702. The load packet generating circuit 701 issues the generated load packet to the memory system 504. Note that in the following description, the load packet generating circuit 701 mainly instructs the reading of two or one data element at the same time, but is not limited to this. The load packet generating circuit 701 may be capable of instructing the reading of 3 to N data elements in response to determining the presence of 3 to N data elements (described later) in the same processing unit.

[0017] Next, the multiple element detection circuit 702 according to this embodiment will be described. Fig. 8 is a configuration diagram showing an example of the configuration of the multiple element detection circuit 702 according to this embodiment. The multiple element detection circuit 702 includes N address registers A801 ​​to H808 and N(N-1) / 2 comparators 809 to 816. N is a natural number corresponding to the number of read addresses. The number of read addresses is the number of addresses that the multiple element detection circuit 702 is instructed to read from the vector register simultaneously. In the example of Fig. 8, the number of read addresses N is 8. The number of read addresses is not limited to 8, and may be 2 to 7 or less, or 9 or more.

[0018] The multiple element detection circuit 702 writes eight memory addresses read from the vector register to the address registers A801 ​​to H808, respectively. The multiple element detection circuit 702 judges whether or not a processing unit including a plurality of element areas corresponding to each memory address exists based on the memory addresses stored in each of the eight address registers A801 ​​to H808. In the example of FIG. 8, the presence or absence of a processing unit including element areas corresponding to memory addresses stored in any two of the address registers A801 ​​to H808 is judged. Here, 21 ((8-1)×(8-2) / 2) comparators compare the upper addresses of each pair of memory addresses each consisting of two memory addresses. The multiple element detection circuit 702 can judge whether or not the element areas corresponding to each of the two memory addresses belong to the same processing unit depending on whether or not the upper addresses are the same. The processing unit is designated by the upper addresses judged to be the same.

[0019] A processing unit refers to a unit in which data can be read and written at one time in memory system 504. In this embodiment, one processing unit allows access to multiple data elements. In the example of FIG. 3, processing unit 301 in memory system 504 occupies a 64-byte storage area. Processing unit 301 is divided into 8 words, and each word occupies an 8-byte storage area. The area of ​​each word is indicated by an offset. Data element A 302 is indicated by an offset of 0x8. Data element B 303 is indicated by an offset of 0x20.

[0020] The upper address refers to a portion represented by the upper bits that constitutes a memory address. The other portion represented by the lower bits that constitutes a memory address corresponds to the offset. In the example of FIG. 4, memory address 401 is represented by 64 bits. Upper address 403 is represented by 58 bits and indicates the processing unit of the memory system. Offset 402 is represented by 6 bits and indicates an individual element area within one processing unit. Therefore, the fact that upper addresses 403 match between multiple memory addresses means that the element areas related to each memory address exist in the same processing unit.

[0021] Next, an example of a load packet according to this embodiment will be described. The load packet is issued to the memory system 504 by the load packet issuing circuit 703. Fig. 17 is a configuration diagram showing an example of a load packet according to this embodiment. The offset or the number of element numbers (hereinafter sometimes referred to as "number of elements") respectively corresponds to the number of memory addresses. In the example of Fig. 17, both are two.

[0022] Load packet 1701 includes upper address 1702, offset 0 1703, offset 1 1704, element number 0 1705, element number 1 1706, type 1707, and vector register number 1708. Type 1707 indicates the number of valid elements. In this example, the number of elements is specified as 2 elements or 1 element. Vector register number 1708 indicates the vector register from which the memory address is obtained. In other words, load packet 1701 includes a command to instruct memory system 504 to read data elements from element areas specified by two offsets 0 and 1, respectively, of the processing unit specified by upper address 1702. Element numbers 0 and 1 correspond to two data elements or element areas, respectively, and are included in a reply packet that is a response to load packet 1701.

[0023] Next, an example of a reply packet according to this embodiment will be described. The reply packet is returned to the vector unit 503 by the memory system 504. Fig. 18 is a configuration diagram showing an example of a reply packet according to this embodiment. In the example of Fig. 18, the number of elements is two.

[0024] Reply packet 1801 is configured by storing element number 0 1802, element number 1 1803, data 0 1804, data 1 1805, and vector register number 1806. Data 0 1804 and data 1 1805 correspond to element number 0 1802 and element number 1 1803, respectively, and are element data stored in element areas designated by offset 0 1703 and offset 1 1704 in the processing unit designated by upper address 1702. Type 1807 indicates the number of valid elements. For example, when type 1807 is set to 2, it indicates that element number 0 1802, element number 1 1803, data 0 1804, and data 1 1805 are all valid. For example, when the type 1807 is set to 1, it indicates that the first pair of element number 0 1802 and data 0 1804 is valid, and the subsequent pair of element number 1 1803 and data 1 1805 is invalid.

[0025] Next, an example of the operation of the vector gather instruction according to this embodiment will be described. Fig. 2 is an explanatory diagram showing an example of the operation of the vector gather instruction according to this embodiment. The vector gather instruction is an instruction to read a plurality of data elements from data stored in a memory system and to write the read data elements to a vector register. In the example of Fig. 2, n memory addresses A0 202, A1 203, A2 204, ..., An-1 206 are stored in a vector register V0 201. The vector gather instruction instructs to read element data D0 208, D1 209, D2 210, ..., Dn-1 212 stored in each of the element areas designated by n memory addresses in a memory system 207, and to write the read element data to a vector register V1 213.

[0026] FIG. 19 is an explanatory diagram showing an example of the vector gather operation according to the present embodiment. In the following explanation, the vector gather operation is performed by the core 501 illustrated in FIG. 5 as an example. The scalar unit 1901 decodes an instruction provided to itself. When the decoded instruction is a vector gather instruction, the scalar unit 1901 generates vector gather instructions 1904 and 1905 based on the vector gather instruction. The scalar unit 1901 issues the generated vector gather instructions 1904 and 1905 to the vector unit 1902 and the load packet generation circuit 1903, respectively. The vector gather instruction 1904 indicates the vector register number of the vector register in which the memory address indicating the data read destination is stored, and the vector register in which the gather result is stored, i.e., the vector register number of the vector register to which the data is written.

[0027] A vector gather instruction 1904 is input to the vector unit 1902 from the scalar unit 1901. The vector unit 1902 reads a memory address 1906 stored in a vector register specified by the vector register number of the vector gather instruction 1904. The vector unit 1902 sends the read memory address 1906 to a load packet generation circuit 1903. In the example of FIG. 19, eight memory addresses 1906 are read at a time, and the read memory addresses 1906 are sent to the load packet generation circuit 1903.

[0028] A memory address 1906 is sent from the vector unit 1902 to the load packet generation circuit 1903. The load packet generation circuit 1903 generates a load packet 1908 based on the memory address 1906. The load packet generation circuit 1903 identifies eight memory addresses 1906 read from the vector register, and detects the presence or absence of a processing unit including multiple element areas designated by the identified memory addresses 1906 in the memory system 1907. As a result of the detection, the load packet issue circuit 703 generates a load packet 1908 for instructing the reading of multiple data elements at once or the reading of one data element. The data structure of the load packet 1908 can be the same as the data structure of the load packet 1701 illustrated in FIG. 17. The load packet generation circuit 1903 sends the generated load packet 1908 to the memory system 1907.

[0029] A load packet 1908 is input to the memory system 1907 from the load packet generation circuit 1903. The memory system 1907 reads a data element from an element area specified by the offset notified in the load packet 1908. The memory system 1907 generates a reply packet 1909 including the read data element and an element number associated with the offset. The data structure of the reply packet 1909 can be similar to the data structure of the reply packet 1801 illustrated in FIG. 18. The memory system 1907 returns the generated reply packet 1909 to the vector unit 1902 as a response to the load packet 1908. The vector unit 1902 writes the data elements stored in the reply packet 1909 received from the memory system 1907 into the vector register.

[0030] An example of a write operation to a vector register will now be described in more detail. 20 is an explanatory diagram showing an example of transmission of a memory address from the vector unit 1902 to the load packet generation circuit 1903 according to this embodiment. The vector unit 1902 reads an address element from an element area in which a memory address specified by a vector gather instruction is stored, from a vector register in the vector register file 2001. The address element is a data fragment that constitutes an element of a memory address. The vector unit 1902 transmits the read address element to the load packet generation circuit 1903. In the example of FIG. 20, 64 address elements 0 2002 to 63 2003 are sequentially read from the vector register in units of 8 elements and transmitted to the load packet generation circuit 1903.

[0031] The load packet generation circuit 1903 writes address elements input from the vector unit 1902 in units of 8 elements as memory addresses to address registers A 2004 to H 2005, respectively. The load packet generation circuit 1903 may hold usage status information indicating the usage status of the address registers. For example, the load packet generation circuit 1903 resets the usage status indicated in the usage status information related to the write destination address register to unused every time it writes a memory address. The load packet generation circuit 1903 may set the usage status indicated in the usage status information of the address register that stores the memory address used to generate the load packet to used, among the address registers that store memory addresses.

[0032] The multiple element detection circuit (FIG. 7) of the load packet generation circuit 1903 detects whether or not the element areas indicated by each pair of two memory addresses among the eight memory addresses stored in the address registers A 2004-H 2005 belong to the same processing unit. FIGS. 9-16 illustrate examples of judgment rules used by the load packet generation circuit 1903 to judge the data elements to be read by one load packet based on the comparison results by each comparator. In this judgment, it is determined whether two data elements or one data element is to be read. The load packet generation circuit 1903 executes judgment based on the judgment rules illustrated in each of FIGS. 9-16, generates load packets based on each judgment result, and transmits the generated load packets to the memory system 1907.

[0033] 9 is used to generate a load packet based on a comparison result between a memory address stored in address register A and one of memory addresses stored in address registers B to H. The determination rule instructs the following processes (A1) to (A8) depending on the comparison result.

[0034] (A1) When the upper address of address register A and the upper address of address register B match, one load packet is generated to obtain a data element stored in the memory address stored in each of address register A and address register B, and the usage status indicated in the usage status information of address register B is changed to used. (A2) When the upper address of address register A and the upper address of address register C match, one load packet is generated to obtain the data elements stored in the memory addresses stored in each of address register A and address register C, and the usage status indicated in the usage status information of address register C is changed to used.

[0035] (A3) When the upper address of address register A and the upper address of address register D match, one load packet is generated to obtain the data elements stored in the memory addresses stored in each of address register A and address register D, and the usage status indicated in the usage status information of address register D is changed to used. (A4) When the upper address of address register A and the upper address of address register E match, one load packet is generated to obtain the data elements stored in the memory addresses stored in address register A and address register E, respectively, and the usage status indicated in the usage status information of address register E is changed to used.

[0036] (A5) When the upper address of address register A and the upper address of address register F match, one load packet is generated to obtain the data elements stored in the memory addresses stored in address register A and address register F, respectively, and the usage status indicated in the usage status information of address register F is changed to used. (A6) When the upper address of address register A and the upper address of address register G match, one load packet is generated to obtain the data elements stored in the memory addresses stored in each of address register A and address register G, and the usage status indicated in the usage status information of address register G is changed to used.

[0037] (A7) When the upper address of address register A and the upper address of address register H match, one load packet is generated to obtain the data elements stored in the memory addresses stored in each of address register A and address register H, and the usage status indicated in the usage status information of address register H is changed to used. (A8) When the upper address of address register A does not match any of the upper addresses of address registers B to H, a single load packet is generated to obtain only the data element stored at the memory address stored in address register A.

[0038] 10 is used to generate a load packet based on the result of comparing the memory address stored in address register B with any of the memory addresses stored in address registers C to H. This determination rule is executed when the usage state indicated in the usage state information of address register B indicates unused, and is not executed when the usage state indicates used. This determination rule instructs the following processes (B1) to (B7).

[0039] (B1) When the upper address of address register B and the upper address of address register C match, one load packet is generated to obtain the data elements stored in the memory addresses stored in each of address register B and address register C, and the usage status indicated in the usage status information of address register C is changed to used. (B2) When the upper address of address register B and the upper address of address register D match, one load packet is generated to obtain the data elements stored in the memory addresses stored in each of address register B and address register D, and the usage status indicated in the usage status information of address register D is changed to used.

[0040] (B3) When the upper address of address register B and the upper address of address register E match, one load packet is generated to obtain the data elements stored in the memory addresses stored in address register B and address register E, respectively, and the usage status indicated in the usage status information of address register E is changed to used. (B4) When the upper address of address register B and the upper address of address register F match, one load packet is generated to obtain the data elements stored in the memory addresses stored in each of address register B and address register F, and the usage status indicated in the usage status information of address register F is changed to used.

[0041] (B5) When the upper address of address register B and the upper address of address register G match, one load packet is generated to obtain the data elements stored in the memory addresses stored in each of address register B and address register G, and the usage status indicated in the usage status information of address register G is changed to used. (B6) When the upper address of address register B and the upper address of address register H match, one load packet is generated to obtain the data elements stored in the memory addresses stored in each of address register B and address register H, and the usage status indicated in the usage status information of address register H is changed to used. (B7) When the upper address of address register B does not match any of the upper addresses of address registers C to H, a single load packet is generated to obtain only the data element stored at the memory address stored in address register B.

[0042] 11 is used to generate a load packet based on a comparison result between a memory address stored in address register C and any of the memory addresses stored in address registers D to H. The determination rule is executed when the usage state indicated in the usage state information of address register C indicates unused, and is not executed when the usage state indicates used. The determination rule instructs the following processes (C1) to (C6).

[0043] (C1) When the upper address of address register C and the upper address of address register D match, one load packet is generated to obtain the data elements stored in the memory addresses stored in each of address register C and address register D, and the usage status indicated in the usage status information of address register D is changed to used. (C2) When the upper address of address register C and the upper address of address register E match, one load packet is generated to obtain the data element stored in the memory address stored in each of address register C and address register E, and the usage status indicated in the usage status information of address register E is changed to used.

[0044] (C3) When the upper address of address register C and the upper address of address register F match, one load packet is generated to obtain the data elements stored in the memory addresses stored in address register C and address register F, respectively, and the usage status indicated in the usage status information of address register F is changed to used. (C4) When the upper address of address register C and the upper address of address register G match, one load packet is generated to obtain the data elements stored in the memory addresses stored in each of address register C and address register G, and the usage status indicated in the usage status information of address register G is changed to used.

[0045] (C5) When the upper address of address register C and the upper address of address register H match, one load packet is generated for obtaining the data elements stored in the memory addresses stored in each of address register C and address register H, and the usage status indicated in the usage status information of address register H is changed to used. (C6) When the upper address of address register C does not match any of the upper addresses of address registers D to H, a single load packet is generated to obtain only the data element stored at the memory address stored in address register C.

[0046] 12 is used to generate a load packet based on a comparison result between a memory address stored in address register D and any of the memory addresses stored in address registers E to H. The determination rule is executed when the usage state indicated in the usage state information of address register D indicates unused, and is not executed when the usage state indicates used. The determination rule instructs the following processes (D1) to (D5).

[0047] (D1) When the upper address of address register D and the upper address of address register E match, one load packet is generated to obtain the data elements stored in the memory addresses stored in address register D and address register E, respectively, and the usage status indicated in the usage status information of address register E is changed to used. (D2) When the upper address of address register D and the upper address of address register F match, one load packet is generated to obtain the data elements stored in the memory addresses stored in address register D and address register F, respectively, and the usage status indicated in the usage status information of address register F is changed to used.

[0048] (D3) When the upper address of address register D and the upper address of address register G match, one load packet is generated to obtain the data elements stored in the memory addresses stored in each of address register D and address register G, and the usage status indicated in the usage status information of address register G is changed to used. (D4) When the upper address of address register D and the upper address of address register H match, one load packet is generated to obtain the data elements stored in the memory addresses stored in address register D and address register H, respectively, and the usage status indicated in the usage status information of address register H is changed to used. (D5) When the upper address of address register D does not match any of the upper addresses of address registers E to H, a single load packet is generated to obtain only the data element stored at the memory address stored in address register D.

[0049] 13 is used to generate a load packet based on a comparison result between a memory address stored in address register E and any of the memory addresses stored in address registers F to H. The determination rule is executed when the usage state indicated in the usage state information of address register E indicates unused, and is not executed when the usage state indicates used. The determination rule instructs the following processes (E1) to (E4).

[0050] (E1) When the upper address of address register E and the upper address of address register F match, one load packet is generated to obtain the data elements stored in the memory addresses stored in address register E and address register F, respectively, and the usage status indicated in the usage status information of address register F is changed to used. (E2) When the upper address of address register E and the upper address of address register G match, one load packet is generated to obtain the data elements stored at the memory addresses stored in each of address register E and address register G, and the usage status indicated in the usage status information of address register G is changed to used.

[0051] (E3) When the upper address of address register E and the upper address of address register H match, one load packet is generated to obtain the data elements stored in the memory addresses stored in address register E and address register H, respectively, and the usage status indicated in the usage status information of address register H is changed to used. (E4) When the upper address of address register E does not match any of the upper addresses of address registers F to H, a single load packet is generated to obtain only the data element stored at the memory address stored in address register E.

[0052] 14 is used to generate a load packet based on a comparison result between a memory address stored in address register F and any of the memory addresses stored in address registers G to H. This determination rule is executed when the usage state indicated in the usage state information of address register F indicates unused, and is not executed when the usage state indicates used. This determination rule instructs the following processes (F1) to (F3).

[0053] (F1) When the upper address of address register F and the upper address of address register G match, one load packet is generated to obtain the data elements stored in the memory addresses stored in address register F and address register G, and the usage status indicated in the usage status information of address register G is changed to used. (F2) When the upper address of address register F and the upper address of address register H match, one load packet is generated to obtain the data elements stored in the memory addresses stored in address register F and address register H, respectively, and the usage status indicated in the usage status information of address register H is changed to used. (F3) When the upper address of address register F does not match any of the upper addresses of address registers G and H, a single load packet is generated to obtain only the data element stored at the memory address stored in address register F.

[0054] 15 is used to generate a load packet based on the result of comparing the memory address stored in address register G with the memory address stored in address register H. This determination rule is executed when the usage state indicated in the usage state information of address register G indicates unused, and is not executed when the usage state indicates used. This determination rule instructs the following processes (G1) and (G2).

[0055] (G1) When the upper address of address register G and the upper address of address register H match, one load packet is generated to obtain the data elements stored in the memory addresses stored in address register F and address register H, and the usage status indicated in the usage status information of address register H is changed to used. (G2) When the upper address of address register G does not match the upper address of address register H, one load packet is generated to obtain only the data element stored at the memory address stored in address register G.

[0056] 16 is executed when the usage state indicated in the usage state information of the address register G indicates unused, and is not executed when the usage state indicates used. This determination rule generates one load packet for obtaining only the data element stored in the memory address stored in the address register G.

[0057] The load packet issuing circuit (FIG. 7) of the load packet generating circuit 1903 generates a load packet in accordance with the result of the determination made by the above-mentioned determination rule, and sends the generated load packet to the memory system 1907. When generating a load packet for reading two data elements, the load packet issuing circuit includes offsets 0 and 1 and element numbers 0 and 1 as the offsets and element numbers of the two identified memory addresses, respectively, in association with each other. The load packet issuing circuit also includes the upper addresses of those memory addresses and the number of elements to be read, 2, as the type in the load packet.

[0058] When generating a load packet for reading one data element, the load packet issuing circuit includes offset 0 and element number 0 of the identified one memory address in association with each other, and further includes the upper address of the memory address and the number of elements to be read, 1, as the type in the load packet. In addition, the load packet issuing circuit extracts the vector register number to be the write destination from the vector gather instruction, and includes the extracted vector register number in the load packet.

[0059] The memory system 1907 identifies the processing unit indicated by the upper address stored in the load packet input from the load packet generation circuit 1903. The memory system 1907 determines whether to read two data elements or one data element from the identified processing unit based on the type stored in the load packet. The memory system 1907 identifies the element area from which the data element is to be read from the processing unit using the offset stored in the load packet. The memory system 1907 generates a reply packet including the element number associated with the offset in the load packet and the data element read from the element area identified based on the offset. Here, the memory system 1907 includes the type and vector register number stored in the load packet in the reply packet. The memory system 1907 sends the generated reply packet to the core (FIG. 5) that is the input source of the load packet.

[0060] The vector unit of the core (FIG. 5) determines whether to write two data elements or one data element based on the type described in the reply packet received from the memory system 1907. The vector unit reads the data element corresponding to each vector register number and element number from the received reply packet. The vector unit writes the data element corresponding to the element area specified by the element number of the vector register specified by the vector register number.

[0061] In the above description, as shown in FIG. 17, a type indicating the number of elements of a data element is included in the load packet as an example, but this is not limited to this. The load packet generation circuit 1903 may generate a load packet including a validity bit indicating whether or not the element number is valid, in association with each element number other than element number 0 (for example, element number 1), instead of the type. The memory system 1907 to which the load packet is sent can determine the validity of each element number based on the validity bit described in the load packet, and determine whether or not it is necessary to read element data from the element area indicated by the corresponding offset. A variety of validity patterns can be indicated using multiple element numbers, compared to the case where the number of valid elements is indicated by the type, and the element numbers of the number of elements indicated in the storage order in the load packet are specified.

[0062] 18, the reply packet includes the type, but the present invention is not limited to this. The memory system may generate a reply packet including a validity bit in association with each element number other than element number 0, instead of the type. The vector unit of the core to which the reply packet is sent can determine the validity of each element number based on the validity bit described in the received reply packet, and determine whether or not it is necessary to write the corresponding element data.

[0063] Next, an example of the minimum configuration according to this embodiment will be described. Fig. 21 is a schematic block diagram showing an arithmetic circuit 2102 according to an example of the minimum configuration of this embodiment. The arithmetic circuit 2102 judges whether or not a processing unit including a plurality of element areas each corresponding to an acquired memory address exists in the memory system 2104. If such a processing unit exists, the arithmetic circuit 2102 outputs a load packet indicating the element number and offset for each element area in the processing unit to the memory system 2104. The arithmetic circuit 2102 writes the data element included in the reply packet input from the memory system 2104 corresponding to the element number to the vector register 2106.

[0064] According to this configuration, when a processing unit including a plurality of element areas corresponding to a memory address designated by an instruction exists in the memory system 2104, the arithmetic circuit 2102 issues a load packet indicating the offset of the element area in the processing unit to the memory system 2104. The arithmetic circuit 2102 can also obtain data elements read from each element area by a reply packet obtained in response to the load packet, and write the data elements to the vector register 2106. By issuing one load packet, multiple data elements stored in an element area can be read. Therefore, the number of load packets and the number of reply packets can be reduced compared to the case of reading each single data element. Therefore, the load on the in-chip network connecting the arithmetic circuit 2102 and the memory system 2104 can be reduced, and the performance of the computer system including the arithmetic circuit 2102 and the memory system 2104 can be improved.

[0065] This embodiment may be realized as a computer system including an arithmetic circuit 2102 and a memory system 2104. The memory system 2104 reads data elements for each offset specified by the load packet from a processing unit including a plurality of element areas corresponding to a specified memory address, and generates a reply packet including the data elements and element numbers corresponding to the offsets.

[0066] Each memory address has an upper address and an offset, and when the upper addresses are identical between multiple memory addresses, the arithmetic circuit 2102 may determine that there is a processing unit that includes multiple element areas corresponding to each of the multiple memory addresses, and may include the upper addresses that are determined to be identical in the load packet. According to this configuration, the upper address is used to determine whether or not there is a processing unit having multiple element areas corresponding to the specified memory address, and the upper address indicating the processing unit is notified to the memory system 2104. Therefore, the memory system 2104 can easily identify the processing unit related to reading of the data elements.

[0067] The arithmetic circuit 2102 may include in the load packet the number of elements of memory addresses having the same upper address. With this arrangement, memory system 2104 is informed of the number of valid data elements to be read.

[0068] The arithmetic circuit 2102 may include in the load packet a validity flag indicating the validity of the element number. With this arrangement, memory system 2104 is informed of valid data elements to be read.

[0069] The arithmetic circuit 2102 may include an address register for storing a memory address, and may determine whether or not there is a processing unit including multiple element areas corresponding to a memory address stored in the address register whose usage state is unused, and may change the usage state of the address register in which the memory addresses corresponding to the multiple element areas are stored to used when outputting a load packet. According to this configuration, it is possible to avoid reading a data element again from a memory address designated as a target for reading a data element by outputting a load packet.

[0070] The arithmetic circuit 2102 may include the vector register number of the vector register in the load packet. Also, this embodiment may be realized as a computer system including such an arithmetic circuit and a memory system 2104. With this configuration, the memory system 2104 can be notified of the vector register number to which the data element is to be written, and a reply packet including the vector register number along with the data element to be read can be generated. When writing a data element, the vector register to which the data element is to be written can be specified by referring to the reply packet, without managing the reception status of the reply packet in response to the transmission of the load packet.

[0071] The above-mentioned vector gather instruction is often executed when an application program (hereinafter, referred to as "application") related to matrix operation is executed. The matrix to be operated on is generally a sparse matrix rather than a dense matrix. A sparse matrix is ​​a matrix with few non-zero elements. Therefore, the operation performance of the sparse matrix vector product tends to dominate the operation performance of the entire application. When performing the sparse matrix vector product, a computer system may store only the non-zero elements of the sparse matrix in a continuous area of ​​a memory system. In this case, access to the non-zero elements stored in the memory system is continuous access. On the other hand, access to the vector stored in the memory system is non-contiguous access. This is because the elements of the vector corresponding to the non-zero elements of the sparse matrix are accessed. In this case, the vector gather instruction may be used for accessing the vector. By improving the performance of the vector gather instruction according to this embodiment, a computer system with high sparse matrix vector performance can be realized.

[0072] Although several embodiments of the present application have been described above, these embodiments are presented as examples and are not intended to limit the scope of the invention. These embodiments can be implemented in various other forms, and various omissions, substitutions, and modifications can be made without departing from the gist of the invention. These embodiments and their modifications are included in the scope of the invention and its equivalents described in the claims, as well as the scope and gist of the invention. [Explanation of symbols]

[0073] 101...core, 102...intra-chip network, 103...memory system, 201, 213...vector register, 207...memory system, 301...processing unit, 401...memory address, 402...offset, 403...upper address, 501...core, 502...scalar unit, 503...vector unit, 504...memory system, 505...load packet generation circuit, 601...vector unit, 602...vector register file, 603...arithmetic unit, 701...load packet generation circuit, 702...multiple element detection circuit, 703...load packet issuance circuit, 801 to 808...address registers, 810 to 816...comparators, 1901...scalar unit, 1902...vector unit, 1903...load packet generation circuit, 1907...memory system, 2001...vector register file, 2004, 2005...address registers, 2102...arithmetic circuit, 2104...memory system, 2106...vector register

Claims

1. A method for determining whether a processing unit including a plurality of element regions each corresponding to a plurality of memory addresses designated by a vector gather instruction to be obtained exists in a memory system; If the processing unit exists, outputting a load packet to the memory system indicating an element number and an offset for each element area in the processing unit; writing a data element included in a reply packet input from the memory system corresponding to the element number into a vector register; an address register for storing the memory address; determining whether or not there is a processing unit including a plurality of element areas corresponding to a memory address stored in an address register whose usage state is unused; When the load packet is output, the usage state of the address register in which the memory addresses corresponding to the plurality of element areas are stored is changed to "used." Arithmetic circuit.

2. Each of the memory addresses has an upper address and an offset, When multiple memory addresses have the same upper address, determining that there is a processing unit including a plurality of element areas corresponding to each of the plurality of memory addresses; Include the same upper address in the load packet The arithmetic circuit according to claim 1 .

3. The load packet includes the number of elements of the memory address that have the same upper address. The arithmetic circuit according to claim 1 .

4. The load packet includes a validity flag indicating the validity of the element number. The arithmetic circuit according to claim 1 .

5. Include the vector register number of the vector register in the load packet The arithmetic circuit according to claim 1 .

6. A computer system comprising an arithmetic circuit and a memory system, The arithmetic circuit includes: determining whether or not a processing unit including a plurality of element regions respectively corresponding to a plurality of memory addresses designated by the obtained vector gather instruction exists in the memory system; If the processing unit exists, outputting a load packet to the memory system indicating an element number and an offset for each element area in the processing unit; writing a data element included in a reply packet input from the memory system corresponding to the element number into a vector register; The memory system includes: reading data elements from said processing unit at each offset indicated by said load packet; Generate the reply packet including the data element and an element number corresponding to the offset. Computer system.

7. The computer system of claim 6, further comprising a plurality of arithmetic circuits each including a vector register number of the vector register in the load packet.

8. A data processing method in an arithmetic circuit, comprising the steps of: the arithmetic circuit includes an address register for storing a memory address; The arithmetic circuit comprises: determining whether or not a processing unit including a plurality of element areas respectively corresponding to a plurality of memory addresses designated by the obtained vector gather instruction exists in the memory system; If the processing unit exists, outputting a load packet to the memory system indicating an element number and an offset for each element area in the processing unit; writing a data element included in a reply packet input from the memory system corresponding to the element number into a vector register; determining whether or not there is a processing unit including a plurality of element areas corresponding to a memory address stored in an address register whose usage state is unused; When the load packet is output, the usage state of the address register in which the memory addresses corresponding to the plurality of element areas are stored is changed to "used." Data processing methods.

Citation Information

Patent Citations

  • Electrostatic copying and printing device

    JP1984026754A

  • Information processor

    JP2010218350A

  • Vector processor and vector processing method

    JP2013182420A

  • Computer and calculation method

    JP2020052862A

  • list vector processor

    JP2716254B2