Multi-core chip and communication method thereof

By designing kernel reading, inter-core arbitration and in-core arbitration devices in multi-core chips, orderly access to shared storage space is achieved, and the problem of large power consumption of traditional multi-core chips is solved, reducing the size of shared storage space and improving performance and efficiency.

CN113886104BActive Publication Date: 2024-11-22HUNAN ADVANCECHIP ELECTRONICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111164225.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-30
Publication Date
2024-11-22
Estimated Expiration
2041-09-30

AI Technical Summary

Technical Problem

Traditional multi-core chips consume a large power due to their exclusive memory allocation method, requiring large shared storage space, and there is a read and write access conflict on the program bus when multi-core read and write registers compete, making it difficult to effectively reduce power consumption.

Method used

Design a multi-core chip, including a kernel reading device, an inter-nuclear arbitration device and an in-nuclear arbitration device, to achieve orderly access to the shared storage space through the adjustment of the working mode, and the inter-nuclear arbitration device performs inter-nuclear data interaction timing in the conventional working mode Arbitration, the in-core arbitration device determines the communication link in the lower computer operating mode, reduces the size of the shared storage device and reduces power consumption.

Benefits of technology

Through the cooperation of different devices, orderly access to shared storage space is achieved, the size of shared storage devices is reduced, power consumption is reduced, and the performance and efficiency of multi-core chips are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113886104B_ABST
    Figure CN113886104B_ABST
Patent Text Reader

Abstract

The present application relates to a multi-core chip and a communication method thereof, wherein the multi-core chip includes at least two cores, a core reading device corresponding to the number of cores, a shared storage device, an inter-core arbitration device, an intra-core arbitration device and an interface device; the interface device connects the intra-core arbitration device and the host computer; the core reading device connects the shared storage device and the corresponding core; the inter-core arbitration device connects each core; the intra-core arbitration device connects each core, the interface device and the shared storage device. Among them, the inter-core arbitration device is used to perform access control according to the timing of the inter-core interaction instructions when different cores interact with each other; the intra-core arbitration device is used to arbitrate the timing of related instructions when the multi-core chip interacts with the host computer, and determine the communication link based on the arbitration result. The above-mentioned multi-core chip can realize orderly access to the shared storage space through the cooperation of different devices, which is conducive to reducing the size of the shared storage device and reducing power consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of multi-core chips, and in particular to a multi-core chip and a communication method thereof. Background Art

[0002] A multi-core chip is a chip that contains two or more cores. The same task can be decomposed into threads or processes of multiple cores and run in parallel. Multi-core chips usually adopt a multi-core shared memory design.

[0003] Traditional multi-core chips allocate different address spaces in shared memory to different cores and set up the MMU (Memory Management Unit) inside the core to limit each core to access only its own address space to avoid access contention. However, this exclusive memory allocation method requires a larger shared memory space, so traditional multi-core chips have the disadvantage of high power consumption. Summary of the invention

[0004] Based on this, it is necessary to provide a multi-core chip and a communication method thereof to reduce power consumption in response to the above technical problems.

[0005] A multi-core chip includes at least two cores, core reading devices corresponding to the number of cores, and a shared storage device, an inter-core arbitration device, an intra-core arbitration device, and an interface device;

[0006] The interface device is connected to the arbitration device in the core and the host computer, and is used to receive the mode information sent by the host computer, and adjust the working mode according to the mode information; the working mode includes the lower computer working mode and the normal working mode;

[0007] The core reading device is connected to the shared storage device and the corresponding core; when the working mode is the normal working mode, each core reads the data in the shared storage device through the corresponding reading device respectively;

[0008] The inter-core arbitration device is connected to each core and is used for performing inter-core interaction instruction timing arbitration when data is exchanged between different cores when the working mode is a normal working mode, and performing inter-core communication control based on the arbitration result;

[0009] The intra-core arbitration device connects each core, the interface device and the shared storage device, and is used to arbitrate the timing of related instructions when the working mode is the lower computer working mode, and determine the communication link based on the arbitration result; the communication link is used for data interaction between the upper computer and the multi-core chip.

[0010] In one of the embodiments, the multi-core chip further includes a multiplexing device; the multiplexing device connects the intra-core arbitration device, the interface device, the shared storage device and each core.

[0011] In one embodiment, the multiplexing device includes an egress multiplexer, a first memory bus multiplexer, and a second memory bus multiplexer; the interface device includes a first peripheral interface, a second peripheral interface, and an HPI interface; the in-core arbitration device includes an egress arbitrator, a first memory bus arbitrator, and a second memory bus arbitrator;

[0012] The egress multiplexer is connected to the egress arbiter, the HPI interface and each core; the shared storage device is connected to the first memory bus multiplexer via a first access memory bus, and is connected to the second memory bus multiplexer via a second access memory bus; the first memory bus multiplexer is also connected to the first peripheral interface, the first memory bus arbiter, the second memory bus arbiter, the second memory bus multiplexer and the HPI interface; the second memory bus multiplexer is also connected to the second peripheral interface, the first memory bus arbiter, the second memory bus arbiter and the HPI interface;

[0013] The HPI interface is used to connect to the host computer.

[0014] In one of the embodiments, the HPI interface includes a first HPI port, a second HPI port and an HPI multiplexer;

[0015] The HPI multiplexer is connected to the first HPI port, the second HPI port, the export multiplexer and the host computer; the first HPI port is connected to the first memory bus multiplexer; the second HPI port is connected to the second memory bus multiplexer.

[0016] In one of the embodiments, the multi-core chip further includes an in-core cache device, and the in-core cache device is connected to the shared storage device and the multiplexing device.

[0017] In one of the embodiments, the multi-core chip further includes an inter-core cache device and tri-state gates corresponding to the number of cores; each tri-state gate connects the inter-core arbitration device, the inter-core cache device and the corresponding core.

[0018] In one embodiment, the core reading device includes a reading controller and a buffer; the buffer is connected to the reading controller and the corresponding core; the reading controller is connected to the shared storage device and the corresponding core.

[0019] In one of the embodiments, the multi-core chip is a DSP chip.

[0020] A multi-core chip communication method is implemented based on the multi-core chip, including:

[0021] Receive mode information sent by the upper computer, and adjust the working mode according to the mode information; the working mode includes the lower computer working mode and the normal working mode;

[0022] When the working mode is a normal working mode, each core reads data in the shared storage device through a corresponding reading device, and performs inter-core data interaction based on an inter-core arbitration device; the inter-core arbitration device is used to perform inter-core interaction instruction timing arbitration, and performs inter-core communication control based on the arbitration result;

[0023] When the working mode is the lower computer working mode, the timing of the relevant instructions is arbitrated by the arbitration device in the core, and the communication link is determined based on the arbitration result; the communication link is used for data exchange between the upper computer and the multi-core chip.

[0024] In one embodiment, the multi-core chip is a dual-core chip including a first core and a second core; the inter-core data interaction based on the inter-core arbitration device includes:

[0025] The inter-core arbitration device receives a first write data enable signal sent by the first core, and determines whether the second write data enable signal is in an enabled state at this time; the second write data enable signal is sent by the second core to the inter-core arbitration device;

[0026] If the second write data enable signal is in the enabled state, the inter-core arbitration device waits for a preset time and returns to the step of determining whether the second write data enable signal is in the enabled state;

[0027] If the second write data enable signal is in a non-enabled state, the inter-core arbitration device opens the write data path and writes the data to be written into the inter-core cache device; the first write data enable signal is also used to open the second tri-state gate when the write data path is opened so that the second core can read the data in the inter-core cache device.

[0028] In one embodiment, the data interaction between the host computer and the multi-core chip includes data interaction between the host computer and the shared storage device, and data interaction between the host computer and each core. When the working mode is the lower computer working mode, the timing of the relevant instructions is arbitrated by the arbitration device in the core, and the communication link is determined based on the arbitration result, including:

[0029] When the working mode is the lower computer working mode, the first memory bus arbitrator and the second memory bus arbitrator respectively arbitrate the timing of the corresponding instructions for accessing the memory bus and the HPI port, determine the busy state of the corresponding access memory bus and the HPI port, and determine the first communication link based on the busy state; the first communication link is used for the upper computer to exchange data with the shared storage device;

[0030] When the working mode is the lower computer working mode, the export arbitrator arbitrates each core, determines the timing of the corresponding instructions of different cores, and determines the communication core based on the timing; the first memory bus arbitrator and the second memory bus arbitrator respectively arbitrate the timing of the relevant instructions of the corresponding interface, and determine the communication interface based on the arbitration result; the second communication link is determined based on the communication core and the communication interface; the second communication link is used for data exchange between the upper computer and the communication core.

[0031] The multi-core chip is configured with a core reading device for different cores to read data in a shared storage device; an inter-core arbitration device is configured to perform access control according to the timing of the inter-core interaction instructions when different cores interact with each other; and an intra-core arbitration device is configured to arbitrate the timing of related instructions when the multi-core chip interacts with the host computer, and determine the communication link based on the arbitration result. That is, through the cooperation of different devices, orderly access to the shared storage space can be achieved, which is conducive to reducing the size of the shared storage device and reducing power consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 is a block diagram of a multi-core chip in one embodiment;

[0033] Figure 2 is a block diagram of a multi-core chip in another embodiment;

[0034] Figure 3 This is a structural principle diagram of a multi-core chip in a lower computer working mode in an embodiment;

[0035] Figure 4 A schematic diagram of the structure of a multi-core chip in a normal working mode in an embodiment;

[0036] Figure 5 Flow chart of a multi-core chip communication method in one embodiment. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0038] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0039] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various components, but these components are not limited by these terms. These terms are only used to distinguish a first component from another component. For example, "a first memory bus multiplexer" and "a second memory bus multiplexer" are both memory bus multiplexers, but they are not the same memory bus multiplexer.

[0040] It should be noted that when an element is considered to be "connected" to another element, it can be directly connected to the other element, or connected to the other element through an intermediate element. In addition, the "connection" in the following embodiments should be understood as "electrical connection", "communication connection", etc. if there is transmission of electrical signals or data between the connected objects.

[0041] When used herein, the singular forms "a", "an", and "said / the" may also include plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "include / comprise" or "have" etc. specify the presence of stated features, wholes, steps, operations, components, parts or combinations thereof, but do not exclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts or combinations thereof.

[0042] With the development of integrated circuits and the needs of my country's industrialization, the performance of chips required by the market is getting stronger and stronger. In order to reduce the area and power consumption of chips while improving chip performance, the design concept of multi-core shared storage chips came into being. However, when multiple cores share data, there will be competition for multi-core read and write registers. Taking the DSP (Digital Signal Process) chip as an example, it adopts an improved Harvard bus architecture. When accessing shared storage space, it is necessary to pay extra attention to the read and write access conflicts on the program bus. The multi-core access control method based on the von Neumann architecture is not applicable. Based on this, the present application proposes a multi-core chip and its communication method, which can realize orderly access to shared storage space, which is conducive to reducing the size of shared storage devices and reducing power consumption.

[0043] In a first aspect of the present application, a multi-core chip is provided. In one embodiment, Figure 1As shown, the multi-core chip includes at least two cores 100, core reading devices 200 corresponding to the number of cores, and a shared storage device 300, an inter-core arbitration device 400, an intra-core arbitration device 500, and an interface device 600. The interface device 600 connects the intra-core arbitration device 500 and the host computer, and is used to receive the mode information sent by the host computer, and adjust the working mode according to the mode information; the working mode includes the lower computer working mode and the normal working mode. The core reading device 200 connects the shared storage device 300 and the corresponding core 100; when the working mode is the normal working mode, each core reads the data in the shared storage device 300 through the corresponding reading device. The inter-core arbitration device 400 is connected to each core, and is used to perform inter-core interaction instruction timing arbitration when data is exchanged between different cores when the working mode is the normal working mode, and perform inter-core communication control based on the arbitration result. The intra-core arbitration device 500 connects each core, the shared storage device 300 and the interface device 600, and is used to arbitrate the timing of related instructions when the working mode is the lower computer working mode, and determine the communication link based on the arbitration result; the communication link is used for data exchange between the upper computer and the multi-core chip.

[0044] The type of multi-core chip is not unique, for example, it can be an FPGA (Field Programmable Gate Array) chip or a DSP chip. The number of cores 100 can be two or more. The number of core reading devices 200 is consistent with the number of cores 100. For ease of understanding, the following description is based on the case where the number of cores 100 is two. Figure 1 In the embodiment, the core 100 includes a first core 110 and a second core 120, and the core reading device 200 includes a first core reading device 210 and a second core reading device 220. The first core 110 is connected to the first core reading device 210, and the second core 120 is connected to the second core reading device 220.

[0045] Furthermore, the core 100 is a hardware module with logic operation functions, for example, it can be a CPU (Central Processing Unit) or a COP (Co-Processor). The cores can have completely the same structure and performance and can serve as backup for each other; or they can have unequal structure and performance and are not backup for each other, but are responsible for different functions. In one embodiment, the multi-core chip is a DSP chip, the first core 110 is a CPU responsible for fixed-point data operations, and the second core 120 is a COP responsible for floating-point data operations. In addition, the specific composition of the shared storage device 300 is not unique, for example, it can include one or more of a read-only memory, a static random access memory, and a flash memory.

[0046] Specifically, the host computer sends mode information to the multi-core chip through the interface device 600, and the interface device 600 receives the mode information and adjusts the working mode according to the mode information. Furthermore, the interface device is not the only one that adjusts the working mode according to the mode information. For example, the communication type supported by the multi-core chip can be changed by controlling the level state of the interface device itself, thereby changing the working mode of the multi-core chip.

[0047] When the working mode is the slave mode, the host computer and the multi-core chip are supported to perform data interaction, including data interaction between the host computer and the shared storage device 300, and data interaction between the host computer and each core. At this time, there will be a variety of related instructions associated with the interaction, such as read and write instructions from the host computer, or read and write instructions from the core and the shared storage device 300. After these related instructions arrive at the intra-core arbitration device 500, the intra-core arbitration device 500 arbitrates the timing of the related instructions, determines the timing of each related instruction, sorts the related instructions according to the timing, judges the timing of the instructions on each communication link, and then determines the busy state of each communication link, and determines the relatively idle communication link as the standby communication link.

[0048] When the working mode is the normal working mode, the multi-core chip performs internal data interaction, including data interaction between each core and the shared storage device 300, and data interaction between each core. At this time, each core reads the data in the shared storage device 300 through the corresponding reading device; and when data interaction is performed between different cores, the inter-core arbitration device 400 performs inter-core interaction instruction timing arbitration, determines the timing of each inter-core interaction instruction, sorts the inter-core interaction instructions according to the timing, processes the inter-core interaction instructions according to the order of the timing, and performs inter-core communication control.

[0049] The multi-core chip is configured with a core reading device 200 for different cores to read data in a shared storage device; an inter-core arbitration device 400 is configured to perform access control according to the timing of the inter-core interaction instructions when different cores interact with each other; and an intra-core arbitration device 500 is configured to arbitrate the timing of related instructions when the multi-core chip interacts with the host computer, and determine the communication link based on the arbitration result. That is, through the cooperation of different devices, orderly access to the shared storage space can be achieved, which is conducive to reducing the size of the shared storage device 300 and reducing power consumption.

[0050] In one embodiment, Figure 2 As shown, the multi-core chip further includes a multiplexing device 700; the multiplexing device 700 connects the intra-core arbitration device 500, the interface device 600, the shared storage device 300 and each core.

[0051] Among them, the multiplexing device 700 is a device that can use one channel to transmit multiple signals at the same time. The multiplexing device 700 can be a frequency division multiplexing device, a wavelength division multiplexing device or a time division multiplexing device. In short, the present application does not limit the specific type of the multiplexing device 700. Specifically, the multiplexing device 700 connects the intra-core arbitration device 500, the interface device 600, the shared storage device 300 and each core, and is used to support multiple data interactions between the host computer and each core, and between the host computer and the shared storage device 300, which can not only meet the transmission of multiple signals, but also help save the installation and maintenance costs of transmission cables, and can also improve the data transmission rate.

[0052] In one embodiment, please continue to refer to Figure 2 The multi-core chip further includes an in-core cache device 800 , which is connected to the shared storage device 300 and the multiplexing device 700 .

[0053] The cache device refers to a memory that can perform high-speed data exchange. Specifically, an in-core cache device 800 is configured between the shared storage device 300 and the multiplexing device 700. When the host computer and the shared storage device 300 perform data exchange, the shared storage device 300 first writes the corresponding data into the in-core cache device 800, and then the host computer reads the data in the in-core cache device 800 through the interface device 600 and the multiplexing device 700, thereby realizing data exchange between the host computer and the shared storage device 300.

[0054] In the above embodiment, the in-core cache device 800 is configured between the shared storage device 300 and the multiplexing device 700 , which can improve the data transmission efficiency between the host computer and the shared storage device 300 .

[0055] In one embodiment, Figure 3As shown, the multiplexing device 700 includes an egress multiplexer 710, a first memory bus multiplexer 720 and a second memory bus multiplexer 730; the interface device 600 includes a first peripheral interface 610, a second peripheral interface 620 and an HPI (Host Port Interface) interface 630; the in-core arbitration device 500 includes an egress arbiter 510, a first memory bus arbiter 520 and a second memory bus arbiter 530. The egress multiplexer 710 connects the egress arbiter 510, the HPI interface 630 and each core; the shared storage device 300 is connected to the first memory bus multiplexer 720 via the first access memory bus M1, and is connected to the second memory bus multiplexer 730 via the second access memory bus M2. The first memory bus multiplexer 720 is also connected to the first peripheral interface 610, the first memory bus arbiter 520, the second memory bus arbiter 530, the second memory bus multiplexer 730 and the HPI interface 630; the second memory bus multiplexer 730 is also connected to the second peripheral interface 620, the first memory bus arbiter 520, the second memory bus arbiter 530 and the HPI interface 630. The HPI interface 630 is used to connect to the host computer.

[0056] During use, the multi-core chip will be packaged as a semiconductor device that provides multiple pins or leads, which are used to connect the chip to external devices. In the present application, the first peripheral interface 610, the second peripheral interface 620 and the HPI interface 630 are used to connect external devices, such as a host computer. Among them, the first peripheral interface 610 and the second peripheral interface 620 include one or more serial communication interfaces, which can be configured by the kernel as high-speed, full-duplex, double-buffered serial communication and support direct connection with existing serial protocols, and each serial interface supports multi-channel transmission and reception of 128 channels. Further, each memory bus multiplexer connects the in-core cache device 800 through the corresponding access memory bus, and then establishes a connection with the shared storage device 300 through the in-core cache device 800. The in-core cache device 800 is configured to work in a first-in-first-out mode. The host computer can read and write the in-core cache device 800 through the first access memory bus M1 and the second access memory bus M2. That is, data can be written to the in-core cache device 800 through the first access memory bus M1 while data in the in-core cache device 800 can be read through the second access memory bus M2 to improve data interaction efficiency.

[0057] like Figure 3As shown, the host computer sends a MODE signal to the HPI interface 630 to access the multi-core chip as a memory mapping device. Specifically, the first memory bus arbiter 520 and the second memory bus arbiter 530 arbitrate the timing of the relevant instructions on the first access memory bus M1 and the second access memory bus M2 through the corresponding multiplexer, and determine the busyness of each memory bus based on the arbitration result, and then determine the communication link.

[0058] When the host computer releases the MODE signal, the kernel initiates external access. Figure 3 As shown, the export arbitrator first arbitrates based on the timing of the relevant instructions issued by each core, determines which core's instructions are to be processed first, and sets the export multiplexer 710. Then, each memory bus arbitrator arbitrates the corresponding interface to determine the busyness of the corresponding interface, and finally determines the interface used for the interaction between the core and the host computer, thereby determining the communication link.

[0059] It can be understood that when all access memory buses are in a busy state, the HPI interface 630 feeds back a busy signal to the host computer to prompt the host computer to stop accessing.

[0060] Furthermore, when the multi-core chip is in the lower computer working mode, the upper computer can directly access the core registers in the kernel through the HPI interface 630. Specifically, the upper computer sends an address to the HPI interface 630, and the HPI interface 630 reads the demand information corresponding to the address from the core register and feeds the demand information back to the upper computer. In addition, in one embodiment, the interface device 600 also includes a scan mode interface for controlling the scan registers inside the multi-core chip.

[0061] In one embodiment, please continue to refer to Figure 3 The HPI interface 630 includes a first HPI port 631, a second HPI port 632 and an HPI multiplexer 633. The HPI multiplexer 633 connects the first HPI port 631, the second HPI port 632, the export multiplexer 710 and the host computer. The first HPI port 631 is connected to the first memory bus multiplexer 720; the second HPI port 632 is connected to the second memory bus multiplexer 730.

[0062] Specifically, the host computer sends mode information to the HPI multiplexer 633, and the HPI multiplexer 633 adjusts the working mode according to the mode information. The communication link for data interaction between the host computer and the shared storage device 300 includes: HPI multiplexer 633-first HPI port 631-first memory bus multiplexer 720-in-core cache device 800-shared storage device 300, or HPI multiplexer 633-second HPI port 632-second memory bus multiplexer 730-in-core cache device 800-shared storage device 300. The data link for the kernel to read the host computer includes: the first peripheral interface 610-the first memory bus multiplexer 720-the first HPI port 631-HPI multiplexer 633-the export multiplexer 710-the kernel, or the second peripheral interface 620-the second memory bus multiplexer 730 the second HPI port 632-HPI multiplexer 633-the export multiplexer 710-the kernel.

[0063] In addition, in other embodiments, more than two memory bus multiplexers and memory bus arbiters may be configured, each memory bus multiplexer is connected to a shared storage device through a corresponding access memory bus, and a corresponding number of HPI ports are configured to connect each memory bus multiplexer. Each memory bus arbiter determines a relatively idle access memory bus and HPI port as a communication bus and communication interface based on the busyness of each access memory bus and HPI port, and then determines a communication link.

[0064] In the above embodiment, a specific device structure of a multi-core chip for communicating with a host computer in a lower computer working mode is provided. By adopting the above structure, various types of data interaction can be realized, which is beneficial to improving the communication efficiency between the multi-core chip and the host computer.

[0065] In one embodiment, the multi-core chip further includes an inter-core cache device and tri-state gates corresponding to the number of cores; each tri-state gate connects the inter-core arbitration device 400, the inter-core cache device and the corresponding core.

[0066] The inter-core cache device is similar to the intra-core cache device 800 mentioned above, and is a storage device capable of high-speed data exchange. The capacity of the inter-core cache device is not unique, for example, it can be 128 bits or 256 bits. The tri-state gate is also called a tri-state output circuit, which can provide three different output values: logic "0", logic "1" and high impedance state.

[0067] Take a multi-core chip with two cores as an example. Figure 4As shown, the two cores are respectively the first core 110 and the second core 120. The inter-core arbitration device 400 is connected to the first core 110, the second core 120 and the inter-core cache device 900. The enable end of the first tri-state gate 1010 is connected to the second core 120, the input end is connected to the inter-core cache device 900, and the output end is connected to the first core 110; the enable end of the second tri-state gate 1020 is connected to the first core 110, the input end is connected to the inter-core cache device 900, and the output end is connected to the second core 120.

[0068] Specifically, the specific process of the first core 110 writing data to the second core 120 is as follows: the inter-core arbitration device 400 receives the first write data enable signal EN1 sent by the first core 110, and determines whether the second write data enable signal EN2 is in an enabled state at this time; the second write data enable signal EN2 is sent by the second core 120 to the inter-core arbitration device 400; if the second write data enable signal EN2 is in an enabled state, the inter-core arbitration device 400 waits for a preset time, and returns to the step of determining whether the second write data enable signal EN2 is in an enabled state; if the second write data enable signal EN2 is in a non-enabled state, the inter-core arbitration device 400 opens the write data path and writes the data to be written into the inter-core cache device 900; the first write data enable signal EN1 is also used to open the second tri-state gate 1020 when the write data path is opened, so that the second core 120 can read the data in the inter-core cache device 900. The specific process of the second core 120 writing data to the first core 110 is similar to the above-mentioned process of the first core 110 writing data to the second core 120, and will not be repeated here.

[0069] In the above embodiment, a specific device structure for communication between cores in a normal working mode is provided. Based on the above structure, data interaction between cores is performed in a manner similar to a ping-pong mechanism, which is beneficial to improving the inter-core communication efficiency of a multi-core chip.

[0070] In one embodiment, the core reading device 200 includes a reading controller and a buffer; the buffer connects the reading controller and the corresponding core; the reading controller connects the shared storage device 300 and the corresponding core.

[0071] The cache is similar to the inter-core cache device mentioned above, and is a storage device that can perform high-speed data exchange. Specifically, a multi-core chip with two cores is taken as an example. Figure 4As shown, the first core reading device 210 includes a first reading controller 211 and a first buffer 212, the first buffer 212 is connected to the first reading controller 211 and the first core 110; the first reading controller 211 is connected to the shared storage device 300 and the first core 110. The second core reading device 220 includes a second reading controller 221 and a second buffer 222, the second buffer 222 is connected to the second reading controller 221 and the second core 120; the second reading controller 221 is connected to the shared storage device 300 and the second core 120.

[0072] When the first core 110 needs to read data in the shared storage device 300, it first sends a read instruction to the first read controller 211, and the first read controller 211 reads the corresponding data from the shared storage device 300 and stores it in the first buffer 212, and then the first core 110 extracts the required data from the first buffer 212. Similarly, when the second core 120 needs to read data in the shared storage device 300, it first sends a read instruction to the second read controller 221, and the second read controller 221 reads the corresponding data from the shared storage device 300 and stores it in the second buffer 222, and then the second core 120 extracts the required data from the second buffer 222.

[0073] Furthermore, the capacity of the buffer can meet the requirement of storing instructions of at least two clock cycles. For example, when the instruction data in the shared storage device 300 read by the kernel in each clock cycle is 32 bits, the capacity of the buffer can be 128 bits or 256 bits. Since the buffer can store instruction data of at least two clock cycles, there will be no conflict when the kernel executes the instruction of the current clock cycle.

[0074] In the above embodiment, configuring a buffer for data interaction between the kernel and the shared storage device can improve the data reading efficiency of the kernel, thereby improving the operating efficiency of the multi-core chip.

[0075] In a second aspect of the present application, a multi-core chip communication method is provided, which is implemented based on the multi-core chip described above. Figure 5 As shown, the method includes steps S200 to S600.

[0076] Step S200: receiving mode information sent by the host computer, and adjusting the working mode according to the mode information.

[0077] Among them, the working mode includes the lower machine working mode and the normal working mode. When the working mode is the lower machine mode, the upper machine and the multi-core chip are supported to perform data interaction, including data interaction between the upper machine and the shared storage device, and data interaction between the upper machine and each core. When the working mode is the normal working mode, the multi-core chip performs internal data interaction, including data interaction between each core and the shared storage device, and data interaction between each core.

[0078] Specifically, the interface device receives the mode information sent by the host computer and adjusts the working mode according to the mode information. Furthermore, the interface device is not limited to adjusting the working mode according to the mode information. For example, the communication type supported by the multi-core chip can be changed by controlling the level state of the interface device itself, thereby changing the working mode of the multi-core chip.

[0079] Step S400: When the working mode is the normal working mode, each core reads data in the shared storage device through a corresponding reading device, and performs inter-core data exchange based on the inter-core arbitration device.

[0080] Specifically, as described above, when the working mode is the normal working mode, the multi-core chip performs internal data interaction, including data interaction between each core and the shared storage device, and data interaction between each core. At this time, each core reads the data in the shared storage device through the corresponding reading device; and when data is interacted between different cores, the inter-core arbitration device performs inter-core interaction instruction timing arbitration, determines the timing of each inter-core interaction instruction, sorts the inter-core interaction instructions according to the timing, processes the inter-core interaction instructions according to the order of the timing, and performs inter-core communication control.

[0081] In one embodiment, the multi-core chip is a dual-core chip including a first core and a second core. Inter-core data interaction is performed based on an inter-core arbitration device, including: the inter-core arbitration device receives a first write data enable signal sent by the first core, and determines whether the second write data enable signal is in an enabled state at this time; the second write data enable signal is sent by the second core to the inter-core arbitration device. If the second write data enable signal is in an enabled state, the inter-core arbitration device waits for a preset time and returns to the step of determining whether the second write data enable signal is in an enabled state; if the second write data enable signal is in a non-enabled state, the inter-core arbitration device opens a write data path and writes the data to be written into the inter-core cache device; the first write data enable signal is also used to open the second tri-state gate when the write data path is opened, so that the second core can read the data in the inter-core cache device.

[0082] Step S600: When the working mode is the lower computer working mode, the arbitration device in the core arbitrates the timing of related instructions and determines the communication link based on the arbitration result.

[0083] Among them, the communication link is a data transmission path for data interaction between the host computer and the multi-core chip. Specifically, when the working mode is the slave working mode, the host computer and the multi-core chip are supported to interact with each other, including data interaction between the host computer and the shared storage device, and data interaction between the host computer and each core. At this time, there will be a variety of related instructions associated with the interaction, such as read and write instructions from the host computer, or read and write instructions from the core and the shared storage device. After these related instructions arrive at the arbitration device in the core, the arbitration device in the core arbitrates the timing of the related instructions, determines the timing of each related instruction, sorts the related instructions according to the timing, judges the timing of the instructions on each communication link, and then determines the busy state of each communication link, and determines the relatively idle communication link as the standby communication link.

[0084] In one embodiment, the data interaction between the host computer and the multi-core chip includes the data interaction between the host computer and the shared storage device, and the data interaction between the host computer and each core. Step S600 specifically includes:

[0085] When the working mode is the lower computer working mode, the first memory bus arbitrator and the second memory bus arbitrator respectively arbitrate the timing of the corresponding instructions for accessing the memory bus and the HPI port, determine the busy state of the corresponding access memory bus and the HPI port, and determine the first communication link based on the busy state; the first communication link is used for the upper computer to exchange data with the shared storage device;

[0086] When the working mode is the lower computer working mode, the export arbitrator arbitrates each core, determines the timing of the corresponding instructions of different cores, and determines the communication core based on the timing; the first memory bus arbitrator and the second memory bus arbitrator respectively arbitrate the timing of the relevant instructions of the corresponding communication interface, and determine the communication interface based on the arbitration result; finally, the second communication link is determined based on the communication core and the communication interface; the second communication link is used for data exchange between the upper computer and the communication core.

[0087] Specifically, Figure 3As shown, the communication link for data interaction between the host computer and the shared storage device 300 includes: HPI multiplexer 633-first HPI port 631-first memory bus multiplexer 720-in-core cache device 800-shared storage device 300, or HPI multiplexer 633-second HPI port 632-second memory bus multiplexer 730-in-core cache device 800-shared storage device 300. The data link for the kernel to read the host computer includes: first peripheral interface 610-first memory bus multiplexer 720-first HPI port 631-HPI multiplexer 633-exit multiplexer 710-core, or second peripheral interface 620-second memory bus multiplexer 730 second HPI port 632-HPI multiplexer 633-exit multiplexer 710-core.

[0088] For the specific limitations of the multi-core chip communication method, please refer to the limitations of the multi-core chip in the above text, which will not be repeated here. The above multi-core chip communication method configures a core reading device for different cores to read data in a shared storage device; configures an inter-core arbitration device to perform access control according to the timing of the inter-core interaction instructions when different cores interact with each other; and configures an intra-core arbitration device to arbitrate the timing of related instructions when the multi-core chip interacts with the host computer, and determines the communication link based on the arbitration result. That is, through the cooperation of different devices, orderly access to the shared storage space can be achieved, which is conducive to reducing the size of the shared storage device and reducing power consumption.

[0089] It should be understood that, although the various steps in the flow chart involved in the above-mentioned embodiment are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flow chart involved in the above-mentioned embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.

[0090] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0091] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A multi-core chip, characterized in that: It includes at least two cores, core reading devices corresponding to the number of cores, and shared storage devices, inter-core arbitration devices, intra-core arbitration devices, multiplexing devices and interface devices; The interface device is connected to the arbitration device in the core and the host computer, and is used to receive the mode information sent by the host computer, and adjust the working mode according to the mode information; the working mode includes the lower computer working mode and the normal working mode; The core reading device is connected to the shared storage device and the corresponding core; when the working mode is the normal working mode, each core reads the data in the shared storage device through the corresponding reading device respectively; The inter-core arbitration device is connected to each core and is used for performing inter-core interaction instruction timing arbitration when data is exchanged between different cores when the working mode is a normal working mode, and performing inter-core communication control based on the arbitration result; The intra-core arbitration device is connected to each core, the interface device and the shared storage device, and is used to arbitrate the timing of related instructions when the working mode is the lower computer working mode, and determine the communication link based on the arbitration result; the communication link is used for the upper computer to exchange data with the multi-core chip; The multiplexing device includes an egress multiplexer, a first memory bus multiplexer and a second memory bus multiplexer; the interface device includes a first peripheral interface, a second peripheral interface and an HPI interface; the in-core arbitration device includes an egress arbitrator, a first memory bus arbitrator and a second memory bus arbitrator; The egress multiplexer is connected to the egress arbiter, the HPI interface and each core; the shared storage device is connected to the first memory bus multiplexer via a first access memory bus, and is connected to the second memory bus multiplexer via a second access memory bus; the first memory bus multiplexer is also connected to the first peripheral interface, the first memory bus arbiter, the second memory bus arbiter, the second memory bus multiplexer and the HPI interface; the second memory bus multiplexer is also connected to the second peripheral interface, the first memory bus arbiter, the second memory bus arbiter and the HPI interface; The HPI interface is used to connect to the host computer.

2. The multi-core chip according to claim 1, characterized in that: The core includes a first core and a second core; the core reading device includes a first core reading device connected to the first core, and a second core reading device connected to the second core.

3. The multi-core chip according to claim 2, characterized in that: The first core is a CPU responsible for fixed-point data operations; the second core is a COP responsible for floating-point data operations.

4. The multi-core chip according to claim 3, characterized in that: The HPI interface includes a first HPI port, a second HPI port and an HPI multiplexer; The HPI multiplexer is connected to the first HPI port, the second HPI port, the export multiplexer and the host computer; the first HPI port is connected to the first memory bus multiplexer; the second HPI port is connected to the second memory bus multiplexer.

5. The multi-core chip according to claim 2, characterized in that: It also includes an in-core cache device, which is connected to the shared storage device and the multiplexing device.

6. The multi-core chip according to any one of claims 1 to 5, characterized in that: It also includes an inter-core cache device and three-state gates corresponding to the number of cores; each three-state gate connects the inter-core arbitration device, the inter-core cache device and the corresponding core.

7. The multi-core chip according to any one of claims 1 to 5, characterized in that: The core reading device includes a reading controller and a buffer; the buffer is connected to the reading controller and the corresponding core; The read controller is connected to the shared storage device and the corresponding core.

8. The multi-core chip according to claim 1, characterized in that: The shared storage device includes one or more of a read-only memory, a static random access memory and a flash memory.

9. A multi-core chip communication method, characterized in that: The multi-core chip is implemented based on any one of claims 1 to 8, comprising: Receive mode information sent by the upper computer, and adjust the working mode according to the mode information; the working mode includes the lower computer working mode and the normal working mode; When the working mode is a normal working mode, each core reads the data in the shared storage device through the corresponding reading device, and performs inter-core data interaction based on the inter-core arbitration device; the inter-core arbitration device is used to perform inter-core interaction instruction timing arbitration, and perform inter-core communication control based on the arbitration result; the data interaction between the host computer and the multi-core chip includes data interaction between the host computer and the shared storage device, and data interaction between the host computer and each core; When the working mode is the lower computer working mode, the first memory bus arbitrator and the second memory bus arbitrator respectively arbitrate the timing of the corresponding instructions for accessing the memory bus and the HPI port, determine the busy state of the corresponding access memory bus and the HPI port, and determine the first communication link based on the busy state; the first communication link is used for the upper computer to exchange data with the shared storage device; When the working mode is the lower computer working mode, the export arbitrator arbitrates each core, determines the timing of the corresponding instructions of different cores, and determines the communication core based on the timing; the first memory bus arbitrator and the second memory bus arbitrator respectively arbitrate the timing of the relevant instructions of the corresponding interface, and determine the communication interface based on the arbitration result; the second communication link is determined based on the communication core and the communication interface; the second communication link is used for data exchange between the upper computer and the communication core.

10. The multi-core chip communication method according to claim 9, characterized in that: The multi-core chip is a dual-core chip including a first core and a second core; the inter-core data interaction based on the inter-core arbitration device includes: The inter-core arbitration device receives a first write data enable signal sent by the first core, and determines whether the second write data enable signal is in an enabled state at this time; the second write data enable signal is sent by the second core to the inter-core arbitration device; If the second write data enable signal is in the enabled state, the inter-core arbitration device waits for a preset time and returns to the step of determining whether the second write data enable signal is in the enabled state; If the second write data enable signal is in a non-enabled state, the inter-core arbitration device opens the write data path and writes the data to be written into the inter-core cache device; the first write data enable signal is also used to open the second tri-state gate when the write data path is opened, so that the second core can read the data in the inter-core cache device.