CN103176941B - Communication method between cores and agent apparatus - Google Patents

Communication method between cores and agent apparatus Download PDF

Info

Publication number
CN103176941B
CN103176941B CN201310120633.1A CN201310120633A CN103176941B CN 103176941 B CN103176941 B CN 103176941B CN 201310120633 A CN201310120633 A CN 201310120633A CN 103176941 B CN103176941 B CN 103176941B
Authority
CN
China
Prior art keywords
core
access request
accessed
agent apparatus
access
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310120633.1A
Other languages
Chinese (zh)
Other versions
CN103176941A (en
Inventor
高素月
刘圹彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201310120633.1A priority Critical patent/CN103176941B/en
Publication of CN103176941A publication Critical patent/CN103176941A/en
Application granted granted Critical
Publication of CN103176941B publication Critical patent/CN103176941B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Multi Processors (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the present invention provides a kind of communication method between cores and agent apparatus.The method includes that agent apparatus receives the access request that the core initiating to access sends;Described agent apparatus according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core;Described agent apparatus is initiated the described communication being accessed for core, to realize the described core initiating to access and the described communication being accessed between core;Wherein, described agent apparatus between the described core initiating to access and described is accessed between core.The embodiment of the present invention can improve the process performance of multi-core communication.

Description

Communication method between cores and agent apparatus
Technical field
The present invention relates to communication technology, particularly relate to a kind of communication method between cores and agent apparatus.
Background technology
Polycaryon processor is referred to as on-chip multi-processor (ChipMulti-Processor, CMP), and its structure mainly simplifies superscalar architecture, is integrated on a chip by multiple relatively simple superscalar processor cores.In order to improve the performance of polycaryon processor, need the multi-processor core of different numbers and structure is used different interconnecting methods and technology, to reach best performance.The communication of multinuclear interconnection at present mainly has the modes such as core serial communication, shared bus structure, cross bar switch interconnection.
Core serial communication referred to core 1 after the communication of core 2, core 2 initiates communication to core 3 again, and the rest may be inferred, completes the communication of all appointment core, and communication uses the mode interrupted to report, and the structural advantages of this system is simple in construction, but processing speed is slow.Shared bus structure (ShareBusFabric, SBF) can be to use the bus interconnection mode of linear array, processing unit and memorizer, external equipment can be made to use bus in different section segmentations simultaneously, the time delay reducing competition use bus between each module and produce, substantially increase the service efficiency of bus, but when the processor core connected is more, competition still can be the most serious.Cross bar switch interconnection allows to be made up of cross bar switch (crossbar) and crossbar interface logic, and each crossbar is made up of some address wires, data wire, and crossbar interface logic is mainly made up of some load queue.Cross bar switch can make the node being connected on construction of switch carry out data exchange simultaneously, it is ensured that polycaryon processor spatially processes the concurrency of data, drastically increases the bandwidth of bus.But, its structure complexity is higher, and the most integrated nuclear volume is more, and performance then can decline.
Summary of the invention
In view of this, embodiments provide a kind of communication method between cores and agent apparatus, in order to solve the problem that processing speed is slow or structure is complicated, performance is relatively low present in prior art.
First aspect, it is provided that a kind of communication method between cores, including:
Agent apparatus receives the access request that the core initiating to access sends;
Described agent apparatus according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core;
Described agent apparatus is initiated the described communication being accessed for core, to realize the described core initiating to access and the described communication being accessed between core;
Wherein, described agent apparatus at the described core initiating to access and described is accessed between core.
In conjunction with first aspect, in the first possible implementation of first aspect, described agent apparatus according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core, including:
Described agent apparatus determines the hardware cell that described access request is corresponding, and wherein, described hardware cell is pre-configured in described agent apparatus;
Described agent apparatus according to the corresponding relation being pre-configured with in described hardware cell, determine described access request corresponding be accessed for core.
In conjunction with first aspect, in the implementation that the second of first aspect is possible, described agent apparatus according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core, including:
Described agent apparatus judges whether the number of times of triggering programmable unit reaches default number of times, and wherein, described programmable unit is pre-configured in described agent apparatus, and the most effective described access request triggers the most described programmable unit;
Described agent apparatus is when judged result is to reach default number of times, according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core.
In conjunction with the implementation that the first or the second of first aspect are possible, in the third possible implementation of first aspect, described access request is instruction, comprises processor core ID and/or the address information of the described core initiated and access in described instruction, and described method also includes:
According to described processor core ID and/or address information, described agent apparatus judges that described access request is the most effective, in order to when effective, according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core.
In conjunction with the implementation that the second of first aspect is possible, in the 4th kind of possible implementation of first aspect, described access request is message, and before whether the described number of times judging triggering programmable unit reaches default number of times, described method also includes:
The all or part of bit comprised in described message is carried out step-by-step or computing with the first Bit String pre-set;
Bit String after described step-by-step or computing is compared with the second Bit String pre-set, if identical, determines that described access request is effective.
Second aspect, it is provided that a kind of agent apparatus, described agent apparatus initiating the core that accesses and is being accessed between core, and described device includes:
Receiver module, for receiving the access request that the core initiating to access sends;
Processing module, for according to the corresponding relation that is pre-configured with, determine described access request that described receiver module receives corresponding be accessed for core;
Sending module, is accessed for the communication of core described in initiate to determine described processing module, to realize the described core initiating to access and the described communication being accessed between core.
In conjunction with second aspect, in the first possible implementation of second aspect, described processing module includes:
Determining unit, for determining the hardware cell that described access request is corresponding, wherein, described hardware cell is pre-configured in described agent apparatus;
Hardware cell, for the corresponding relation that is pre-configured with according to self, determine described access request corresponding be accessed for core.
In conjunction with second aspect, in the implementation that the second of second aspect is possible, described processing module includes:
Programmable unit, described programmable unit includes enumerator and determines unit;
Described enumerator is used for judging whether the number of times of triggering programmable unit reaches default number of times, and wherein, the most effective described access request triggers the most described programmable unit;
Described determine unit for when the judged result of described enumerator is to reach default number of times, according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core.
In conjunction with the implementation that the first or the second of second aspect are possible, in the third possible implementation of second aspect, described access request is instruction, comprises processor core ID and/or the address information of the described core initiated and access in described instruction, and described device also includes:
According to described processor core ID and/or address information, first judging module, for judging that described access request is the most effective, in order to when effective, according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core.
In conjunction with the implementation that the second of second aspect is possible, in the 4th kind of possible implementation of second aspect, described access request is message, and described device also includes:
Second judging module, for carrying out step-by-step or computing by all or part of bit comprised in described message with the first Bit String pre-set;Bit String after described step-by-step or computing is compared with the second Bit String pre-set, if identical, determines that described access request is effective.
Pass through technique scheme, initiate the core of access and be accessed between core arranging agent apparatus, this agent apparatus is pre-configured with corresponding relation, can realize initiating the core accessed and the communication being accessed between core according to this corresponding relation, processing speed can be improved and complexity can be reduced, and then improving the process performance of intercore communication.
Accompanying drawing explanation
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, in describing embodiment below, the required accompanying drawing used is briefly described, apparently, accompanying drawing in describing below is some embodiments of the present invention, for those of ordinary skill in the art, on the premise of not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
The schematic flow sheet of a kind of communication method between cores that Fig. 1 provides for the embodiment of the present invention;
The schematic flow sheet of the another kind of communication method between cores that Fig. 2 provides for the embodiment of the present invention;
When Fig. 3 a is to configure hardware cell in the embodiment of the present invention, 1 to using interrupt mode to carry out the schematic diagram of intercore communication under 1 scene;
When Fig. 3 b is to configure hardware cell in the embodiment of the present invention, 1 to using message mode to carry out the schematic diagram of intercore communication under 1 scene;
When Fig. 4 a is to configure hardware cell in the embodiment of the present invention, 1 to using interrupt mode to carry out the schematic diagram of intercore communication under many scenes;
When Fig. 4 b is to configure hardware cell in the embodiment of the present invention, 1 to using message mode to carry out the schematic diagram of intercore communication under many scenes;
Interrupt mode is used to carry out the schematic diagram of intercore communication under multipair 1 scene when Fig. 5 a is to configure hardware cell in the embodiment of the present invention;
Message mode is used to carry out the schematic diagram of intercore communication under multipair 1 scene when Fig. 5 b is to configure hardware cell in the embodiment of the present invention;
Interrupt mode is used to carry out the schematic diagram of intercore communication under multi-to-multi scene when Fig. 6 a is to configure hardware cell in the embodiment of the present invention;
Message mode is used to carry out the schematic diagram of intercore communication under multi-to-multi scene when Fig. 6 b is to configure hardware cell in the embodiment of the present invention;
The schematic flow sheet of the another kind of communication method between cores that Fig. 7 provides for the embodiment of the present invention;
Fig. 8 a is that in the embodiment of the present invention, configuration programmable unit and access request use interrupt mode to carry out the schematic diagram of intercore communication when being instruction;
Fig. 8 b is that in the embodiment of the present invention, configuration programmable unit and access request use message mode to carry out the schematic diagram of intercore communication when being instruction;
The schematic flow sheet of the another kind of communication method between cores that Fig. 9 provides for the embodiment of the present invention;
Schematic diagram when Figure 10 is that access request carries out in the embodiment of the present invention the validity judge when access request is message;
Figure 11 a is that in the embodiment of the present invention, configuration programmable unit and access request use interrupt mode to carry out the schematic diagram of intercore communication when being message;
Figure 11 b is that in the embodiment of the present invention, configuration programmable unit and access request use message mode to carry out the schematic diagram of intercore communication when being message;
The structural representation of a kind of agent apparatus that Figure 12 provides for the embodiment of the present invention;
The structural representation of the another kind of agent apparatus that Figure 13 provides for the embodiment of the present invention.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is a part of embodiment of the present invention rather than whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art are obtained under not making creative work premise, broadly fall into the scope of protection of the invention.
The schematic flow sheet of a kind of communication method between cores that Fig. 1 provides for the embodiment of the present invention, including:
11: agent apparatus receives the access request that the core initiating to access sends;
Wherein, this agent apparatus is the core being arranged at initiation access and the device being accessed between core newly increased.Can complete to initiate the core accessed and the communication being accessed between core by this agent apparatus.
Optionally, this access request can be instruction, does not the most comprise concrete content, and only comprises processor core ID and/or the address information of address to be accessed of the core initiating access.Or,
Optionally, this access request can be message, unlike instruction, comprises particular content, such as, comprise the Bit String of 32 bits in this message.
12: described agent apparatus according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core;
Optionally, this corresponding relation can be only fitted in hardware cell, and this hardware cell is pre-configured in agent apparatus.The core one_to_one corresponding that the number of hardware cell can access with initiation, such as, the core initiating to access is core 0, then corresponding hardware cell can be hardware cell 0, and the core that initiation accesses is core 1, then corresponding hardware cell can be hardware cell 1, the like.
Optionally, this corresponding relation can be only fitted in programmable unit, and this programmable unit is pre-configured in agent apparatus.This programmable unit can also configure enumerator, in order to when the numerical value of this enumerator reaches the number of times being pre-configured with, initiate corresponding communication according to this corresponding relation.
13: described agent apparatus is initiated the described communication being accessed for core, to realize the described core initiating to access and the described communication being accessed between core.
Optionally, described agent apparatus according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core, including:
Described agent apparatus determines the hardware cell that described access request is corresponding, and wherein, described hardware cell is pre-configured in described agent apparatus;
Described agent apparatus according to the corresponding relation being pre-configured with in described hardware cell, determine described access request corresponding be accessed for core.
Optionally, described agent apparatus according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core, including:
Described agent apparatus judges whether the number of times of triggering programmable unit reaches default number of times, and wherein, described programmable unit is pre-configured in described agent apparatus, and the most effective described access request triggers the most described programmable unit;
Described agent apparatus is when judged result is to reach default number of times, according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core.
Optionally, described access request is instruction, comprises processor core ID and/or the address information of the described core initiated and access in described instruction, and described method also includes:
According to described processor core ID and/or address information, described agent apparatus judges that described access request is the most effective, in order to when effective, according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core.
Optionally, described access request is message, and before whether the described number of times judging triggering programmable unit reaches default number of times, described method also includes:
The all or part of bit comprised in described message is carried out step-by-step or computing with the first Bit String pre-set;
Bit String after described step-by-step or computing is compared with the second Bit String pre-set, if identical, determines that described access request is effective.
The present embodiment is by initiating the core of access and being accessed between core arranging agent apparatus, this agent apparatus is pre-configured with corresponding relation, can realize initiating the core accessed and the communication being accessed between core according to this corresponding relation, processing speed can be improved and complexity can be reduced, and then improving the process performance of intercore communication.
The schematic flow sheet of the another kind of communication method between cores that Fig. 2 provides for the embodiment of the present invention, the present embodiment is as a example by the mode of configuration hardware cell, and the present embodiment includes:
21: the core initiating to access sends access request to agent apparatus;
This access request can be instruction, comprises processor core ID and/or the address information of the core initiating access in this instruction.
22: agent apparatus judges that this access request is the most effective, if so, perform 23, otherwise perform 25.
Wherein, according to the processor core ID comprised in access request and/or address information, agent apparatus can judge that access request is the most effective, such as, agent apparatus can be pre-configured with effective processor core ID list, when the processor core ID comprised in this access request belongs to the ID list of this processor core, then judged result is that this access request is effective;Or, agent apparatus can be pre-configured with effective address information list, when the address information comprised in this access request belongs to this address information list, then judged result is that this access request is effective;Or, agent apparatus can be pre-configured with effective processor core ID list and address information list, when the processor core ID comprised in this access request belongs to the ID list of this processor core, and the address information comprised in this access request is when belonging to this address information list, then judged result is that this access request is effective.
23: agent apparatus determines the hardware cell of correspondence according to access request.
After determining that access request is effectively, the hardware cell of correspondence can be determined according to the processor core ID carried in this access request and/or address information.For example, it is possible to be pre-configured with the corresponding relation of processor core and hardware cell, the such as corresponding hardware cell 0 of configuration processor core 0, the corresponding hardware cell 1 of processor core 1, therefore when processor core ID is 0, it is possible to determines that corresponding hardware cell is hardware cell 0.Or, for each hardware cell configuration address information, if the address information of hardware cell 0 is address 0, when the address information comprised in access request is address 0, it is possible to the hardware cell determining correspondence is hardware cell 0.It is of course also possible to combine processor ID and address information combines the corresponding corresponding relation of configuration.
24: the hardware cell of this correspondence according to the corresponding relation being pre-configured with, determine this access request corresponding be accessed for core, and initiate this is accessed for the communication of core.
Such as, when corresponding hardware cell is hardware cell 0, hardware cell 0 receives this access request, hardware cell 0 can be pre-configured with corresponding relation, such as corresponding with hardware cell 0 core that is accessed for is processor core 20, then just can initiate the access to processor core 20 after hardware cell 0 receives this access request.
It addition, when initiating the number of core of access and being multiple, id signal can be arranged in corresponding hardware cell, after the id signal of all corresponding hardware cells is all effective, initiate the communication being accessed for core.Wherein, each hardware cell can be to be designated as effectively by the id signal of each self-corresponding hardware cell after receiving access request.Such as, processor core 10 and processor core 11 initiate to access, hardware cell corresponding respectively is hardware cell 0 and hardware cell 1, so after hardware cell 0 receives the access request that processor core 10 sends, the id signal of self can be set to effectively by hardware cell 0, after hardware cell 1 receives the access request that processor core 11 sends, the id signal of self can be set to effectively by hardware cell 1, when the id signal of hardware cell 0 and hardware cell 1 id signal all effectively after, hardware cell 0 can be according to the corresponding relation of self configuration, communication is initiated to the corresponding core that is accessed for, and the corresponding relation that hardware cell 1 can configure according to self, communication is initiated to the corresponding core that is accessed for.
The above-mentioned id signal that arranges can be effectively that high level is effective, and the latter is Low level effective.
Communication that is that hardware cell is initiated and that be accessed between core can be interrupt mode, it is also possible to is message mode.When for message, agent apparatus and be accessed between core needing to arrange cross bar switch.
25: terminate.
In example below, initiating to access core is central processing unit (CentralProcessUnit, CPU), digital signal processor (DigitalSignalProcessor, DSP), hardware accelerator (HardwareAccelerator, and direct memory access (DirectMemoryAccess HAC), DMA) at least one in, being accessed for core is at least one in CPU0, CPU1, DSP0 and DSP1.
See Fig. 3 a and Fig. 3 b, respectively illustrate 1 when accessing 1 and uses interrupt mode and employing message mode to carry out the schematic diagram of intercore communication.In this embodiment, the core initiating to access is DMA.
The first step, DMA sends access request to agent apparatus.
Second step, after agent apparatus receives this access request, it can be determined that this access request is the most effective, and determines the hardware cell of correspondence.Concrete handling process may refer to above-mentioned 22 and 23.
Assume that corresponding hardware cell is hardware cell 0.
3rd step, hardware cell 0 receives this access request.
4th step, hardware cell 0 is according to the corresponding relation being pre-configured with, and what this corresponding relation was specified is accessed for processor core initiation communication.
Such as, the corresponding processor core that is accessed for being pre-configured with in hardware cell 0 is CPU0, then initiate communication to CPU0.
Fig. 3 a gives the mode interrupted that uses, and in this approach, agent apparatus can directly initiate to interrupt to CPU0 by interrupt interface.
Fig. 3 b gives the mode using message, usual message interface only one of which, namely the outgoing interface only one of which of agent apparatus, now can pass through cross bar switch (crossbar), realize sending message to corresponding processor core, such as, transmit the message to CPU0 by cross bar switch.
See Fig. 4 a and Fig. 4 b, respectively illustrate 1 to access more time uses interrupt mode and employing message mode to carry out the schematic diagram of intercore communication.Under this scene, the processor core initiating to access is 1, and for DMA, it is multiple for being accessed for processor core, respectively CPU0 and CPU1.From 1 to 1 scene different time, hardware cell 0 can be pre-configured with 1 many relations, the processor core that is accessed for such as configured are included CPU0 and CPU1, then initiate communication the core that is accessed for include CPU0 and CPU1.Remaining flow process may refer to 1 scene to 1.
See Fig. 5 a and Fig. 5 b, employing interrupt mode when respectively illustrating multipair 1 access and the schematic diagram using message mode to carry out intercore communication.Under this scene, the processor core initiating to access is multiple, and respectively DMA, HAC and DSP, being accessed for processor core is 1, for CPU0.From 1 to unlike 1 scene, owing to the processor initiating to access is multiple, then the hardware cell of triggering can also be multiple, the most respectively hardware cell 0, hardware cell 1 and hardware cell 2.It addition, the processor core that is accessed for corresponding to corresponding relation of each hard disk unit configuration is identical.Such as, the processor core that is accessed for of hardware cell 0 configuration is CPU0, and the processor core that is accessed for of hardware cell 1 configuration is also CPU0, and the processor core that is accessed for of hardware cell 2 configuration is also CPU0.Remaining flow process may refer to 1 scene to 1.
See Fig. 6 a and Fig. 6 b, respectively illustrate employing interrupt mode when multi-to-multi accesses and use message mode to carry out the schematic diagram of intercore communication.Under this scene, under this scene, the processor core initiating to access is multiple, and respectively DMA, HAC and DSP, it is multiple for being accessed for processor core, respectively CPU0, CPU1 and DSP0.From 1 to unlike 1 scene, owing to the processor core initiating to access is multiple, then the hardware cell of triggering can also be multiple, the most respectively hardware cell 0, hardware cell 1 and hardware cell 2.It addition, there is difference in the processor core that is accessed for corresponding to the corresponding relation of each hard disk unit configuration.Such as, the processor core that is accessed for of hardware cell 0 configuration is CPU0, and the processor core that is accessed for of hardware cell 1 configuration is CPU1, and the processor core that is accessed for of hardware cell 2 configuration is DSP0.Remaining flow process may refer to 1 scene to 1.
The present embodiment is by configuring hardware cell, after the core initiating to access sends access request, can determine according to the corresponding relation of configuration in hardware cell and be accessed for core, it is achieved intercore communication.Overall performance can be improved by agent apparatus, multiple cores initiating to access can improve processing speed with executed in parallel browsing process, by completing the state that intercore communication can ensure that internuclear understanding is mutual, by the way of using message, complete intercore communication, the treatment effeciency of core can be improved.
The schematic flow sheet of the another kind of communication method between cores that Fig. 7 provides for the embodiment of the present invention, the present embodiment to trigger programmable unit, and access request for instruction as a example by, the present embodiment includes:
71: the core initiating to access sends access request to agent apparatus;
This access request can be instruction, comprises processor core ID and/or the address information of the core initiating access in this instruction.
72: agent apparatus judges that this access request is the most effective, if so, perform 73, otherwise perform 75;
Wherein, according to the processor core ID comprised in access request and/or address information, agent apparatus can judge that access request is the most effective, such as, agent apparatus can be pre-configured with effective processor core ID list, when the processor core ID comprised in this access request belongs to the ID list of this processor core, then judged result is that this access request is effective;Or, agent apparatus can be pre-configured with effective address information list, when the address information comprised in this access request belongs to this address information list, then judged result is that this access request is effective;Or, agent apparatus can be pre-configured with effective processor core ID list and address information list, when the processor core ID comprised in this access request belongs to the ID list of this processor core, and the address information comprised in this access request is when belonging to this address information list, then judged result is that this access request is effective.
73: when access request is effective, trigger the programmable unit pre-set in agent apparatus.
Wherein, can be pre-configured with enumerator in programmable unit, this enumerator can be down counter or be count-up counter.When for down counter, the initial value of configuration is number of times set in advance, the most often triggers disposable programmable unit, and this count value subtracts 1 until being kept to 0.When for count-up counter, the initial value of configuration is 0, the most often triggers disposable programmable unit, and this count value increases 1 until increasing to number of times set in advance.
74: when the number of times that programmable unit is triggered reaches number of times set in advance, agent apparatus initiates communication according to the corresponding relation being pre-configured with to the corresponding processor core that is accessed for.
Such as, when using down counter, show that when count value is kept to 0 the number of times that programmable unit is triggered reaches number of times set in advance, or, when using count-up counter, show that when count value increases to number of times set in advance the number of times that programmable unit is triggered reaches number of times set in advance.
Initiate communication and equally use interrupt mode or message mode.
75: terminate.
See Fig. 8 a and Fig. 8 b, respectively illustrate and use interrupt mode and use message mode to carry out the schematic diagram of intercore communication.When specifically accessing, can be according to practical situation configuration corresponding relation to complete 1 to 1,1 scene to many, multipair 1 or multipair pair.Such as, can be pre-configured with the be accessed for core corresponding with DMA is CPU0, so when the core initiating to access is DMA, when the number of times of the effective access request that DMA sends reaches the number of times pre-set, the access to CPU0 can be initiated according to this corresponding relation, now can realize 1 scene to 1.Or, can be pre-configured with the be accessed for core corresponding with DMA is CPU0 and CPU1, when the core initiating to access is DMA, and the number of times of effective access request that sends of DMA is when reaching the number of times pre-set, the access to CPU0 and CPU1 can be initiated according to this corresponding relation, now can realize 1 to many scenes.Or, can be pre-configured with the be accessed for core corresponding with DMA and HAC is CPU0, when the core initiating to access is DMA and HAC, and the number of times sum of effective access request that sends of the number of times of effective access request that sends of DMA and HAC is when reaching the number of times pre-set, the access to CPU0 can be initiated according to this corresponding relation, now can realize the scene of multipair 1.Or, can be pre-configured with the be accessed for core corresponding with DMA and HAC is CPU0 and CPU1, when the core initiating to access is DMA and HAC, and the number of times sum of effective access request that sends of the number of times of effective access request that sends of DMA and HAC is when reaching the number of times pre-set, the access to CPU0 and CPU1 can be initiated according to this corresponding relation, now can realize the scene of multi-to-multi.
The present embodiment is by triggering programmable unit, after the core initiating to access sends access request, can determine according to the corresponding relation of configuration in hardware cell and be accessed for core, it is achieved intercore communication.Overall performance can be improved by agent apparatus, multiple cores initiating to access can improve processing speed with executed in parallel browsing process, by completing the state that intercore communication can ensure that internuclear understanding is mutual, by the way of using message, complete intercore communication, the treatment effeciency of core can be improved.
The schematic flow sheet of the another kind of communication method between cores that Fig. 9 provides for the embodiment of the present invention, the present embodiment is to trigger programmable unit, and as a example by access request is message, the present embodiment includes:
91: the core initiating to access sends access request to agent apparatus;
Unlike the embodiment shown in Fig. 7, in the present embodiment, access request is message, is i.e. possible not only in this access request comprise processor core ID and/or address information, it is also possible to comprise message content.This message content can be specially Bit String.
92: agent apparatus judges that this access request is the most effective, if so, perform 93, otherwise perform 95;
Unlike embodiment illustrated in fig. 7, the present embodiment judges whether effectively according to message content.
Can be pre-configured with two Bit Strings in the present embodiment, be called the first Bit String and the second Bit String, the first Bit String can be expressed as mask, and the second Bit String can be expressed as match.
See Figure 10, it is judged that the most effective flow process of access request may include that
It is possible, firstly, to all or part of bit and first Bit String of the message content comprised in access request are carried out step-by-step or budget, the bit that need not detection can be masked by this step.Wherein, the concrete whole bits using message content or partial bit can be pre-configured with.
Secondly, the Bit String after step-by-step or computing and the second Bit String are compared, if both are identical, i.e. both every the most identical, then show to access message effectively, the most invalid.
93: when access request is effective, trigger the programmable unit pre-set in agent apparatus.
94: when the number of times that programmable unit is triggered reaches number of times set in advance, agent apparatus initiates communication according to the corresponding relation being pre-configured with to the corresponding processor core that is accessed for.
The particular content of 93~94 may refer to 73~74, does not repeats them here.
95: terminate.
See Figure 11 a and Figure 11 b, respectively illustrate and use interrupt mode and use message mode to carry out the schematic diagram of intercore communication.When specifically accessing, can be according to practical situation configuration corresponding relation to complete 1 to 1,1 scene to many, multipair 1 or multipair pair.Such as, can be pre-configured with the be accessed for core corresponding with DMA is CPU0, so when the core initiating to access is DMA, when the number of times of the effective access request that DMA sends reaches the number of times pre-set, the access to CPU0 can be initiated according to this corresponding relation, now can realize 1 scene to 1.Or, can be pre-configured with the be accessed for core corresponding with DMA is CPU0 and CPU1, when the core initiating to access is DMA, and the number of times of effective access request that sends of DMA is when reaching the number of times pre-set, the access to CPU0 and CPU1 can be initiated according to this corresponding relation, now can realize 1 to many scenes.Or, can be pre-configured with the be accessed for core corresponding with DMA and HAC is CPU0, when the core initiating to access is DMA and HAC, and the number of times sum of effective access request that sends of the number of times of effective access request that sends of DMA and HAC is when reaching the number of times pre-set, the access to CPU0 can be initiated according to this corresponding relation, now can realize the scene of multipair 1.Or, can be pre-configured with the be accessed for core corresponding with DMA and HAC is CPU0 and CPU1, when the core initiating to access is DMA and HAC, and the number of times sum of effective access request that sends of the number of times of effective access request that sends of DMA and HAC is when reaching the number of times pre-set, the access to CPU0 and CPU1 can be initiated according to this corresponding relation, now can realize the scene of multi-to-multi.
The present embodiment is by triggering programmable unit, after the core initiating to access sends access request, can determine according to the corresponding relation of configuration in hardware cell and be accessed for core, it is achieved intercore communication.Overall performance can be improved by agent apparatus, multiple cores initiating to access can improve processing speed with executed in parallel browsing process, by completing the state that intercore communication can ensure that internuclear understanding is mutual, by the way of using message, complete intercore communication, the treatment effeciency of core can be improved.
The structural representation of a kind of agent apparatus that Figure 12 provides for the embodiment of the present invention, this device initiate access core and be accessed between core, this device 120 includes receiver module 121, processing module 122 and sending module 123;Receiver module 121 is for receiving the access request that the core initiating to access sends;Processing module 122 for according to the corresponding relation being pre-configured with, determine described access request that described receiver module receives corresponding be accessed for core;Sending module 123 is accessed for the communication of core described in initiate to determine described processing module, to realize the described core initiating to access and the described communication being accessed between core.
Optionally, described processing module 122 includes:
Determining unit, for determining the hardware cell that described access request is corresponding, wherein, described hardware cell is pre-configured in described agent apparatus;
Hardware cell, for the corresponding relation that is pre-configured with according to self, determine described access request corresponding be accessed for core.
Optionally, described processing module 122 includes:
Programmable unit, described programmable unit includes enumerator and determines unit;
Described enumerator is used for judging whether the number of times of triggering programmable unit reaches default number of times, and wherein, the most effective described access request triggers the most described programmable unit;
Described determine unit for when the judged result of described enumerator is to reach default number of times, according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core.
Optionally, described access request is instruction, comprises processor core ID and/or the address information of the described core initiated and access in described instruction, and described device also includes:
According to described processor core ID and/or address information, first judging module, for judging that described access request is the most effective, in order to when effective, according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core.
Optionally, described access request is message, and described device also includes:
Second judging module, for carrying out step-by-step or computing by all or part of bit comprised in described message with the first Bit String pre-set;Bit String after described step-by-step or computing is compared with the second Bit String pre-set, if identical, determines that described access request is effective.
Seeing Figure 13, for the structural representation of the another kind of agent apparatus that the embodiment of the present invention provides, this device 130 includes receptor 131, processor 132 and transmitter 133.Receptor 131 is for receiving the access request that the core initiating to access sends;Processor 132 for according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core;Transmitter 133 is for initiating the described communication being accessed for core, to realize the described core initiating to access and the described communication being accessed between core.
Optionally, the hardware cell that processor 132 is corresponding specifically for determining described access request;This device can also include hardware cell, described hardware cell for according to the corresponding relation being pre-configured with in described hardware cell, determine described access request corresponding be accessed for core.
Optionally, this device includes programmable unit, and this programmable unit includes enumerator and processor, and enumerator is used for judging whether the number of times of triggering programmable unit reaches default number of times, wherein, the most effective described access request triggers the most described programmable unit;Processor 132 is for when the judged result of enumerator is to reach default number of times, according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core.
Optionally, described access request is instruction, described instruction comprises processor core ID and/or the address information of the described core initiated and access, processor 132 is additionally operable to judge that described access request is the most effective according to described processor core ID and/or address information, so that when effective, according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core.
Optionally, described access request is message, and processor 132 is additionally operable to the first Bit String pre-set, all or part of bit comprised in described message is carried out step-by-step or computing;Bit String after described step-by-step or computing is compared with the second Bit String pre-set, if identical, determines that described access request is effective.
On implementing, above-mentioned receptor and transmitter can be specially receiving interface and transmission interface, and above-mentioned processor can be specially CPU (CPU), microprocessor, single-chip microcomputer etc..It addition, this device can also include the general modules such as bus, memorizer, intervalometer.
The present embodiment is by initiating the core of access and being accessed between core arranging agent apparatus, this agent apparatus is pre-configured with corresponding relation, can realize initiating the core accessed and the communication being accessed between core according to this corresponding relation, processing speed can be improved and complexity can be reduced, and then improving the process performance of intercore communication.
Those skilled in the art is it can be understood that arrive, for convenience and simplicity of description, only it is illustrated with the division of above-mentioned each functional module, in actual application, as desired above-mentioned functions distribution can be completed by different functional modules, the internal structure of device will be divided into different functional modules, to complete all or part of function described above.The specific works process of the system of foregoing description, device and unit, is referred to the corresponding process in preceding method embodiment, does not repeats them here.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method, can realize by another way.Such as, device embodiment described above is only schematically, such as, described module or the division of unit, be only a kind of logic function to divide, actual can have when realizing other dividing mode, the most multiple unit or assembly can in conjunction with or be desirably integrated into another system, or some features can ignore, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be the INDIRECT COUPLING by some interfaces, device or unit or communication connection, can be electrical, machinery or other form.
The described unit illustrated as separating component can be or may not be physically separate, and the parts shown as unit can be or may not be physical location, i.e. may be located at a place, or can also be distributed on multiple NE.Some or all of unit therein can be selected according to the actual needs to realize the purpose of the present embodiment scheme.
It addition, each functional unit in each embodiment of the application can be integrated in a processing unit, it is also possible to be that unit is individually physically present, it is also possible to two or more unit are integrated in a unit.Above-mentioned integrated unit both can realize to use the form of hardware, it would however also be possible to employ the form of SFU software functional unit realizes.
If described integrated unit is using the form realization of SFU software functional unit and as independent production marketing or use, can be stored in a computer read/write memory medium.Based on such understanding, completely or partially can embodying with the form of software product of part that prior art is contributed by the technical scheme of the application the most in other words or this technical scheme, this computer software product is stored in a storage medium, including some instructions with so that a computer equipment (can be personal computer, server, or the network equipment etc.) or processor (processor) perform all or part of step of method described in each embodiment of the application.And aforesaid storage medium includes: USB flash disk, portable hard drive, read only memory (ROM, Read-OnlyMemory), the various media that can store program code such as random access memory (RAM, RandomAccessMemory), magnetic disc or CD.
The above, above example only in order to the technical scheme of the application to be described, is not intended to limit;Although the application being described in detail with reference to previous embodiment, it will be understood by those within the art that: the technical scheme described in foregoing embodiments still can be modified by it, or wherein portion of techniques feature is carried out equivalent;And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of the application each embodiment technical scheme.

Claims (6)

1. a communication method between cores, it is characterised in that including:
Agent apparatus receives the access request that the core initiating to access sends;
Described agent apparatus according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core;
Described agent apparatus is initiated the described communication being accessed for core, to realize the described core initiating to access and the described communication being accessed between core;
Wherein, described agent apparatus at the described core initiating to access and described is accessed between core;
Described agent apparatus according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core, including:
Described agent apparatus judges whether the number of times of triggering programmable unit reaches default number of times, and wherein, described programmable unit is pre-configured in described agent apparatus, and the most effective described access request triggers the most described programmable unit;
Described agent apparatus is when judged result is to reach default number of times, according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core.
Method the most according to claim 1, it is characterized in that, described access request is instruction, described instruction comprises processor core ID and/or the address information of the described core initiated and access, described method also includes: according to described processor core ID and/or address information, described agent apparatus judges that described access request is the most effective, so that when effective, according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core.
Method the most according to claim 1, it is characterised in that described access request is message, before whether the described number of times judging triggering programmable unit reaches default number of times, described method also includes:
The all or part of bit comprised in described message is carried out step-by-step or computing with the first Bit String pre-set;
Bit String after described step-by-step or computing is compared with the second Bit String pre-set, if identical, determines that described access request is effective.
4. an agent apparatus, it is characterised in that described agent apparatus is being initiated the core of access and is being accessed between core, and described device includes:
Receiver module, for receiving the access request that the core initiating to access sends;
Processing module, for according to the corresponding relation that is pre-configured with, determine described access request that described receiver module receives corresponding be accessed for core;
Sending module, is accessed for the communication of core described in initiate to determine described processing module, to realize the described core initiating to access and the described communication being accessed between core;
Described processing module includes:
Programmable unit, described programmable unit includes enumerator and determines unit;
Described enumerator is used for judging whether the number of times of triggering programmable unit reaches default number of times, and wherein, the most effective described access request triggers the most described programmable unit;
Described determine unit for when the judged result of described enumerator is to reach default number of times, according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core.
Device the most according to claim 4, it is characterized in that, described access request is instruction, described instruction comprises processor core ID and/or the address information of the described core initiated and access, described device also includes: the first judging module, for judging that described access request is the most effective according to described processor core ID and/or address information, in order to when effective, according to the corresponding relation being pre-configured with, determine described access request corresponding be accessed for core.
Device the most according to claim 4, it is characterised in that described access request is message, described device also includes:
Second judging module, for carrying out step-by-step or computing by all or part of bit comprised in described message with the first Bit String pre-set;Bit String after described step-by-step or computing is compared with the second Bit String pre-set, if identical, determines that described access request is effective.
CN201310120633.1A 2013-04-09 2013-04-09 Communication method between cores and agent apparatus Active CN103176941B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310120633.1A CN103176941B (en) 2013-04-09 2013-04-09 Communication method between cores and agent apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310120633.1A CN103176941B (en) 2013-04-09 2013-04-09 Communication method between cores and agent apparatus

Publications (2)

Publication Number Publication Date
CN103176941A CN103176941A (en) 2013-06-26
CN103176941B true CN103176941B (en) 2016-08-03

Family

ID=48636828

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310120633.1A Active CN103176941B (en) 2013-04-09 2013-04-09 Communication method between cores and agent apparatus

Country Status (1)

Country Link
CN (1) CN103176941B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108780437A (en) * 2017-12-14 2018-11-09 深圳市大疆创新科技有限公司 Communication method between cores, processor and multiprocessor communication system
CN110046050B (en) * 2018-01-16 2024-03-01 华为技术有限公司 Device and method for inter-core data transmission
CN109298961A (en) * 2018-08-28 2019-02-01 迈普通信技术股份有限公司 Fault handling method, device and the network equipment of multi-core processor
CN113703958B (en) * 2021-07-15 2024-03-29 山东云海国创云计算装备产业创新中心有限公司 Method, device, equipment and storage medium for accessing data among multi-architecture processors

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1534504A (en) * 2003-03-31 2004-10-06 �ձ�������ʽ���� Paralled processing system using single processor operating system and parallel processing program
CN101043510A (en) * 2007-04-29 2007-09-26 中兴通讯股份有限公司 PCI-E bus distributed system intra-board and inter-board data communication method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9235455B2 (en) * 2011-03-16 2016-01-12 Microscan Systems, Inc. Multi-core distributed processing using shared memory and communication link

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1534504A (en) * 2003-03-31 2004-10-06 �ձ�������ʽ���� Paralled processing system using single processor operating system and parallel processing program
CN101043510A (en) * 2007-04-29 2007-09-26 中兴通讯股份有限公司 PCI-E bus distributed system intra-board and inter-board data communication method

Also Published As

Publication number Publication date
CN103176941A (en) 2013-06-26

Similar Documents

Publication Publication Date Title
KR101952562B1 (en) System and method for odd counting memory channel interleaving
CN102362464B (en) Memory access monitoring method and device
CN103970520A (en) Resource management method and device in MapReduce framework and framework system with device
US9489328B2 (en) System on chip and method for accessing device on bus
CN103176941B (en) Communication method between cores and agent apparatus
TW200304086A (en) Method and system for data flow control of execution nodes of an adaptive computing engine(ACE)
US8386908B2 (en) Data transmission methods and universal serial bus host controllers utilizing the same
EP3223162B1 (en) Configurable on-chip interconnection system and method and apparatus for implementing same, and storage medium
EP3379421B1 (en) Method, apparatus, and chip for implementing mutually-exclusive operation of multiple threads
US20160173413A1 (en) Architecture For On-Die Interconnect
WO2022227614A1 (en) Command distribution apparatus and method, chip, computer device, and storage medium
CN106489132A (en) The method of read-write data, device, storage device and computer system
CN109426623A (en) A kind of method and device reading data
CN103473188A (en) Method, device and system for data interaction between digital signal processor (DSP) and external memory
EP2759927B1 (en) Apparatus and method for sharing function logic between functional units, and reconfigurable processor thereof
CN104424142B (en) The method and apparatus of shared resource is accessed in a kind of multi-core processor system
CN104461957A (en) Method and device for heterogeneous multi-core CPU share on-chip caching
US20130311699A1 (en) Operations using direct memory access
CN110750210B (en) Storage system
WO2019223445A1 (en) Hard disk read-write control method and apparatus, electronic device and storage medium
CN107408071A (en) A kind of memory pool access method, device and system
TW202008172A (en) Memory system
US20220147097A1 (en) Synchronization signal generating circuit, chip and synchronization method and device, based on multi-core architecture
CN109710187A (en) Read command accelerated method, device, computer equipment and the storage medium of NVMe SSD main control chip
CN101241478B (en) Data transfer method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210427

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after: Honor Device Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.