A high performance coprocessor interface
By designing a high-performance coprocessor interface and utilizing the Shim module, instruction routing module, return queue module, and return arbitration module, the traditional interface data transmission bottleneck and configurability issues are solved, and efficient coprocessor-main processor connection is achieved. and multi-coprocessor support to meet the high performance and scalability needs of future applications.
Patent Information
- Application Number
- CN202111062535.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-10
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2041-09-10
AI Technical Summary
There is a data transmission bottleneck in the connection between traditional coprocessors and main processors, which makes it difficult to meet the configurability and programmability requirements of future application scenarios. Moreover, existing interfaces lack scalability and efficient transmission performance.
A high-performance co-processor interface is designed, including Shim module, instruction routing module, return queue module and return arbitration module. Through these modules, efficient data transmission and result processing between the co-processor and the main processor are realized, supporting multiple Parallel connection of coprocessors and result arbitration.
It achieves lower cost and less hardware resource consumption, improves the data transmission efficiency between the processor core and co-processor, supports quick connection and configuration of different co-processors, and meets the scalability and high performance of future applications. Performance requirements.
Smart Images

Figure CN113760818B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of coprocessor interfaces, and in particular to a high-performance coprocessor interface. Background Art
[0002] Most traditional processors are general-purpose processors, which are characterized by being versatile but not specialized, that is, they are highly versatile and can take into account a variety of applications, but the computing effect is poor in some specific applications. Using a coprocessor that can accelerate specific applications can solve this problem. A coprocessor is a special processing chip or device that works with the main processor to assist it in completing specific computing tasks. As a processing unit, the coprocessor is used in parallel with the main processor and undertakes computing tasks that are usually performed by the main processor unit. The coprocessor is designed for certain specific computing tasks, and its versatility does not need to be considered too much during design, so it often has good specific computing performance. The main processor + coprocessor mode is adopted. The biggest advantage of this method is that it is not affected by software upgrades, and it only needs to change the implementation method of the accelerator according to needs to adapt to different conditions. It has the versatility of a general-purpose chip and can handle general tasks, while being able to accelerate certain specific problems and scenarios. This is the future development trend.
[0003] As an independent processing unit, how to connect the coprocessor with the main processor is a relatively important issue. There are some disadvantages in using a bus connection. Therefore, a bridge that interacts directly with the main processor is needed to perfectly couple the extended coprocessor with the main processor. Connecting the coprocessor to the core allows the processor core and the coprocessor to work in parallel in a tightly coupled manner, providing higher computing power. On the processor core side, the data bandwidth, timing behavior, transmission mode, etc. have been determined. The coprocessor side can configure the coprocessor interface parameters according to the specific situation, so as to achieve matching of data width, timing, and control signals between the core and the coprocessor.
[0004] The coprocessor interface is responsible for the bidirectional transmission of data between the main processor and the coprocessor, and is the bottleneck of the coprocessor data path. Considering the requirements of future application scenarios for configurability and programmability, the coprocessor interface needs to be connected to different coprocessors. To solve this problem, it is necessary to design a coprocessor interface with scalability and higher transmission performance. Summary of the invention
[0005] The object of the present invention is to provide a high-performance coprocessor interface to solve the problems in the background technology.
[0006] In order to solve the above technical problems, the present invention provides a high-performance coprocessor interface, including a Shim module, an instruction routing module, a return queue module and a return arbitration module;
[0007] The Shim module acquires micro-op codes, status signals, co-processing instructions and processing data, stores the input micro-op codes in a queue in order according to the index, transmits the status signals, co-processing instructions and processing data to the instruction routing module in order, and transmits the results returned by the return arbitration module and the micro-op codes stored in the queue back to the main processor in order;
[0008] The instruction routing module transmits the coprocessing instruction, processing data and status signal to the corresponding coprocessor connected to the coprocessor interface according to the opcode code in the coprocessing instruction, and the coprocessor processes the processing data input to the coprocessor according to the status signal and the coprocessing instruction;
[0009] The return queue module waits the processing result and the address of the storage result fed back by the coprocessor in the queue, waiting for arbitration by the next return arbitration module;
[0010] The return arbitration module arbitrates the results in multiple return queue modules and determines the order in which the return results and return addresses waiting in the queue are returned.
[0011] Optionally, the Shim module processes the micro-op code, the status signal, the co-processing instruction and the processing data, including:
[0012] Decode the input signal and determine whether it contains multiple micro-operation codes, control signals of co-processing instructions, empty and full execution queues, and indexes according to the input signal;
[0013] Three instructions are input in each cycle, and the index of the coprocessing instruction and the control signal of the queue input are obtained according to the three control signals input in each cycle. Then, the micro-op code, coprocessing instruction and processing data output in each cycle are determined according to the index of the coprocessing instruction, the index of the queue and other indexes. The micro-op code is transmitted to the corresponding coprocessor micro-op code return queue, and the coprocessing instruction and processing data are transmitted to the instruction routing module.
[0014] Optionally, the Shim module determines the co-processing instruction and stores the micro-operation code in a corresponding queue, including:
[0015] According to the opcode code in the coprocessing instruction, the opcode code corresponds to a coprocessor respectively, and the micro-op code is transmitted to the corresponding queues in the four coprocessor micro-op code return queues according to the judgment result of the coprocessing instruction;
[0016] The micro-op is transferred to the queue and output while waiting in the queue for the coprocessor result to be returned.
[0017] Optionally, the Shim module processes the return result and address, and the micro-op code return queue, including:
[0018] According to the return result of the return arbitration module, the micro-operation codes stored in the corresponding coprocessor micro-operation code return queue are taken out in sequence, and the micro-operation codes, the returned coprocessor processing results and the destination address to be stored are returned to the main processor together.
[0019] Optionally, the command routing module distributes the coprocessing instructions and the processing data to the corresponding coprocessor, including:
[0020] According to the opcode code in the coprocessing instruction, there are four opcode codes, each corresponding to a coprocessor, to determine the coprocessor to which the coprocessing instruction belongs;
[0021] According to the opcode code judgment result, the coprocessing instruction, processing data and status signal are transmitted to the instruction queue in the corresponding coprocessor interface, and when the corresponding coprocessor is idle, they are transmitted from the instruction queue to the corresponding coprocessor for processing.
[0022] Optionally, the return queue module stores the processing results returned by the coprocessor, including:
[0023] The return queue module includes four coprocessor processing result return queues, each of which corresponds to one coprocessor. The results processed by the coprocessor and the processing result storage address are transmitted from the processed coprocessor to the corresponding coprocessor processing result return queue and wait for output in the queue.
[0024] Optionally, the return arbitration module processes the return order of the coprocessor processing results, including:
[0025] The results returned in the four coprocessor processing result return queues are processed according to the configured order, and the coprocessor processing results and processing result storage addresses are returned to the Shim module according to the configured order, and then returned to the main processor by the Shim module.
[0026] In the high-performance coprocessor interface provided by the present invention, up to four coprocessors can be connected. Under the premise of low cost, i.e., less impact on the processor core and less use of hardware resources, efficient data transmission between the two can be achieved, and the connection of different coprocessors can be completed quickly. The coprocessor expands the core processing function by extending the instruction set or providing configuration registers; one or more coprocessors can be connected to the core through the coprocessor interface. During the execution of the program, each coprocessor only executes its own coprocessing instructions and ignores the instructions of the processor and other coprocessors. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is an architectural diagram of a high-performance coprocessor interface provided by the present invention connected to four coprocessor interfaces;
[0028] Figure 2 It is a method flow chart of the method for processing coprocessor commands by the coprocessor interface provided by the present invention;
[0029] Figure 3 It is an architectural diagram of the coprocessor interface when connecting vector coprocessors provided by the present invention. DETAILED DESCRIPTION
[0030] The following is a further detailed description of a high-performance coprocessor interface proposed by the present invention in conjunction with the accompanying drawings and specific embodiments. The advantages and features of the present invention will become more apparent from the following description and claims. It should be noted that the accompanying drawings are in a very simplified form and are not in precise proportions, and are only used to conveniently and clearly assist in explaining the purpose of the embodiments of the present invention.
[0031] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0032] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0033] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0034] Embodiment 1
[0035] The present invention provides a high-performance coprocessor interface, the structure of which is as follows Figure 1As shown, it includes a Shim module (Shim), an instruction routing module (Command Router), a return queue module (Queue) and a return arbitration module (RRArbiter); the Shim module obtains micro-op codes, status signals, co-processing instructions and processing data, stores the input micro-op codes in the queue in sequence according to the index, transmits the status signals, co-processing instructions and processing data to the instruction routing module in sequence, and transmits the results returned by the return arbitration module and the micro-op codes stored in the queue back to the main processor in sequence; the instruction routing module transmits the co-processing instructions, processing data and status signals to the instruction queue of the corresponding co-processor interface according to the opcode code in the co-processing instructions, and then the co-processor processes the processing data input to the co-processor according to the status signal and the co-processing instructions; the return queue module waits the processing results fed back by the co-processor and the address of the storage results in the queue, waiting for the arbitration of the next return arbitration module; the return arbitration module arbitrates the results in multiple return queue modules and determines the order in which the return results and return addresses waiting in the queue are returned.
[0036] The method for processing the coprocessing instruction by the high performance coprocessor interface is as follows: Figure 2 As shown, the Shim module processes micro-op codes, status signals, co-processing instructions and processing data, including: decoding the input signal, judging whether it contains multiple micro-op codes, control signals of co-processing instructions, empty and full execution queues, and indexes according to the input signal; three instructions are input in each cycle, and the index of the co-processing instruction and the control signal of the queue input are obtained according to the three control signals input in each cycle, and then the micro-op codes, co-processing instructions and processing data output in each cycle are determined according to the index of the co-processing instruction and the index of the queue and other indexes, and the micro-op codes are transmitted to the corresponding coprocessor micro-op code return queue, and the co-processing instructions and processing data are transmitted to the instruction routing module.
[0037] The Shim module judges the coprocessing instruction and saves the micro-op code in the corresponding queue, including: according to the opcode code in the coprocessing instruction, the opcode code corresponds to a coprocessor respectively, and the micro-op code is transmitted to the corresponding queue in the four coprocessor micro-op code return queues according to the judgment result of the coprocessing instruction; the micro-op code is transmitted to the queue and outputted when waiting for the coprocessor result to be returned in the queue. The Shim module processes the return result and address, as well as the micro-op code return queue, including: according to the return result of the return arbitration module, the micro-op code stored in the corresponding coprocessor micro-op code return queue is taken out in sequence, and the micro-op code, the returned coprocessor processing result and the destination address to be stored are returned to the main processor together.
[0038] The command routing module distributes the coprocessing instruction and the processing data to the corresponding coprocessor, including: judging the coprocessor to which the coprocessing instruction belongs according to the opcode code in the coprocessing instruction, where there are four opcode codes, each corresponding to a coprocessor; transmitting the coprocessing instruction, the processing data and the status signal to the instruction queue of the corresponding coprocessor interface according to the opcode code judgment result, and transmitting them from the instruction queue to the corresponding coprocessor for processing when the corresponding coprocessor is idle.
[0039] The return queue module stores the processing results returned by the coprocessor, including: the return queue module includes four coprocessor processing result return queues, the four coprocessor processing result return queues correspond to one coprocessor, the results processed by the coprocessor and the processing result storage address are transmitted from the processed coprocessor to the corresponding coprocessor processing result return queue, and wait for output in the queue.
[0040] The return arbitration module processes the return order of the coprocessor processing results, including: processing the results returned in the four coprocessor processing result return queues according to the configured order, returning the coprocessor processing results and the processing result storage addresses to the Shim module according to the configured order, and then returning them to the main processor by the Shim module.
[0041] Next, a vector coprocessor is attached to the coprocessor interface, such as Figure 3 As shown, the above process is further combined to describe the execution process of a co-processing instruction. The general process of the co-processing instruction execution is as follows:
[0042] (1) The main processor's decoding unit decodes the opcode of the coprocessor instruction during the execution phase and determines whether it belongs to any custom instruction group based on uopc === 7'h6c. If it does, it transmits the relevant signal to the coprocessor interface.
[0043] (2) Multiple modules on the main processor pipeline interact with the coprocessor interface module through signals, including control signals, micro-op signals, index signals in the renaming module, exception signals, status signals, data signals, etc. The micro-op codes involved in the vector coprocessor include whether it is a coprocessing instruction micro-op code, instruction micro-op code, branch prediction mask micro-op code, renaming index micro-op code, physical target register address micro-op code, logical target register address micro-op code, whether it is an atomic operation, etc.
[0044] (3) The Shim module processes the input signal. A maximum of three co-processing instructions can be input in each cycle. The index of the co-processing instruction can be obtained based on the control signal of the input co-processing instruction, and then combined with the renaming index, etc. Under the corresponding conditions, the value of the input signal will be assigned to one of the four instructions. These four instructions will only output one instruction per cycle under the condition of multiple indexes.
[0045] (4) The output of each cycle in the Shim module consists of two parts. One part includes the coprocessor instruction signal, the coprocessor processed data signal and the status signal, which will be transmitted to the command routing module; the other part is the micro-operation code. This group of micro-operation code signals is transmitted to the corresponding coprocessor micro-operation code return queue. This group of signals waits in the queue. When the result processed by the coprocessor and the return address are returned, they are output to the main processor together with the group of micro-operation code signals.
[0046] (5) The Shim module transmits the coprocessor instruction signal, the data signal and the status signal processed by the coprocessor to the command routing module, which first waits in the queue and determines whether it is the opcode code corresponding to the vector coprocessor according to the opcode code in the instruction signal. Then, the above signal is transmitted to the vector coprocessor transmission queue. When the vector coprocessor is idle, the coprocessor instruction signal, the data signal and the status signal processed by the coprocessor are transmitted to the coprocessor for processing.
[0047] (6) After the vector coprocessor processes the data, it returns the processed result data and the address where the result is to be stored to the result return queue module, where it waits for the next module to return to the arbitration module to arbitrate the result order.
[0048] (7) Since only one vector coprocessor is connected, the processing results of the vector coprocessor returned by the arbitration module will be passed to the Shim module in sequence.
[0049] (8) The return arbitration module returns the result data and storage address to the Shim module, and the micro-operation code signal stored in the corresponding coprocessor micro-operation code return queue is returned to the main processor together with the result data and storage address.
[0050] The above description is only a description of the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention. Any changes or modifications made by a person skilled in the art in the field of the present invention based on the above disclosure shall fall within the scope of protection of the claims.
Claims
1. A high-performance coprocessor interface, It is characterized in that Includes Shim module, instruction routing module, return queue module and return arbitration module; The Shim module acquires micro-op codes, status signals, co-processing instructions and processing data, stores the input micro-op codes in a queue in order according to the index, transmits the status signals, co-processing instructions and processing data to the instruction routing module in order, and transmits the results returned by the return arbitration module and the micro-op codes stored in the queue back to the main processor in order; The instruction routing module transmits the coprocessing instruction, processing data and status signal to the corresponding coprocessor connected to the coprocessor interface according to the opcode code in the coprocessing instruction, and the coprocessor processes the processing data input to the coprocessor according to the status signal and the coprocessing instruction; The return queue module waits the processing result and the address of the storage result fed back by the coprocessor in the queue, waiting for arbitration by the next return arbitration module; The return arbitration module arbitrates the results in multiple return queue modules and determines the order in which the return results and return addresses waiting in the queue are returned; The Shim module processes micro-op codes, status signals, co-processing instructions and processing data, including: decoding the input signal, judging from the input signal whether it contains a plurality of micro-op codes, control signals of co-processing instructions, empty and full execution queues, and indexes; Three instructions are input in each cycle, and the index of the coprocessing instruction and the control signal of the queue input are obtained according to the three control signals input in each cycle. Then, the micro-operation code, coprocessing instruction and processing data output in each cycle are determined according to the index of the coprocessing instruction, the index of the queue and other indexes. The micro-operation code is transmitted to the corresponding coprocessor micro-operation code return queue, and the coprocessing instruction and processing data are transmitted to the instruction routing module; The Shim module judges the co-processing instruction and saves the micro-op code in the corresponding queue, including: according to the opcode code in the co-processing instruction, the opcode code corresponds to a coprocessor respectively, and the micro-op code is transmitted to the corresponding queue in the micro-op code return queue of the four coprocessors according to the judgment result of the co-processing instruction; The micro-op is transferred to the queue and output while waiting in the queue for the coprocessor result to be returned.
2. The high performance coprocessor interface of claim 1, It is characterized in that The Shim module processes the return result and address, as well as the micro-op code return queue, including: According to the return result of the return arbitration module, the micro-operation codes stored in the corresponding coprocessor micro-operation code return queue are taken out in sequence, and the micro-operation codes, the returned coprocessor processing results and the destination address to be stored are returned to the main processor together.
3. The high performance coprocessor interface of claim 2, It is characterized in that The instruction routing module distributes the coprocessing instructions and processing data to the corresponding coprocessors, including: According to the opcode code in the coprocessing instruction, there are four opcode codes, each corresponding to a coprocessor, to determine the coprocessor to which the coprocessing instruction belongs; According to the opcode code judgment result, the coprocessing instruction, processing data and status signal are transmitted to the instruction queue in the corresponding coprocessor interface, and when the corresponding coprocessor is idle, they are transmitted from the instruction queue to the corresponding coprocessor for processing.
4. The high performance coprocessor interface of claim 1, It is characterized in that The return queue module stores the processing results returned by the coprocessor, including: The return queue module includes four coprocessor processing result return queues, each of which corresponds to one coprocessor. The results processed by the coprocessor and the processing result storage address are transmitted from the processed coprocessor to the corresponding coprocessor processing result return queue and wait for output in the queue.
5. The high performance coprocessor interface of claim 4, It is characterized in that The return arbitration module processes the return order of the coprocessor processing results, including: The results returned in the four coprocessor processing result return queues are processed according to the configured order, and the coprocessor processing results and processing result storage addresses are returned to the Shim module according to the configured order, and then returned to the main processor by the Shim module.
Citation Information
Patent Citations
Data processing circuit with arbitration between a plurality of queues
CN102203752A
Coprocessor
CN102750127A
