Background technology
Along with to portable terminal intellectualities such as mobile phones, the requirement of multimedization is more and more higher, and is also more and more higher to the functional requirement of the processor in the mobile phone.In order to realize that a mobile phone can support many nets, support 2G and 3G simultaneously as mobile phone, the demand of multi mode terminal has been proposed.In the exploitation of multi mode terminal, for the application end exploitation that makes mobile phone get in touch still less with the exploitation of wireless side or correlation littler, promptly the software for same application end can mate more eurypalynous mobile phone wireless communication, as GSM (Global System for MobileCommunications, global system for mobile communications), WCDMA (Wideband Code DivisionMultiple Access, Wideband Code Division Multiple Access (WCDMA)), TD-SCDMA (Time Division-Synchronous CodeDivision Multiple Access, the code division multiple access that time-division is synchronous) etc., the mobile phone framework of dual processor or multiprocessor is more and more favored in design, but communication between the multiprocessor and power consumption become a key issue in this framework.
For example, double-core (dual processor) platform software framework at existing mobile phone can be divided into AP (ApplicationProcessor, application processor) and CP (Communication Processor, communication processor) two subsystems, AP mainly comprises multimedia and other related application modules, embedded OS (as Symbian, Windows mobile, Linux etc.).CP comprises the protocol stack communication module, as GPRS (General Packet Radio Service, GPRS), and EDGE (Enhanced DataRate for GSM Evolutio, enhanced data rates for gsm evolution), 3G ﹠amp; HSDPA (High SpeedDownlink Packages Access, high speed downlink packet inserts).
The implementation of existing multi mode terminal mainly contains two classes:
1. as shown in Figure 1, AP, CP are individual chips, undertaken alternately by the universal serial bus mode between AP and each CP, as USB (Universal Serial BUS, USB), UART (UniversalAsynchronous Receiver Transmitter, UART Universal Asynchronous Receiver Transmitter) etc., wherein AP is provided with master controller and links to each other with universal serial bus, links to each other with universal serial bus and each CP is provided with slave controller; This mode because the rate limit of serial communication can not satisfy the above handset demand of 3G and 3G, is the USB FS mode of 12M even adopt bandwidth, and its payload bandwidth can not meet the demands.Especially carry out communication for serial modes such as adopting USB,,, then can increase the stand-by power consumption of complete machine, shorten the stand-by time of mobile phone if USB does not sleep at holding state; If the USB sleep then when needs AP/CP carries out communication USB is waken up, and the time that USB wakes up can not be satisfied the requirement of user experience at present.
2. AP and one of them CP constitute a SoC (System on a Chip, system level chip) chip, for example Qualcomm MSM7200 as shown in Figure 2, other each CP are individual chips, communication modes between SoC chip and other each CP adopts the universal serial bus mode, USB for example, UART etc.Wherein SoC is provided with master controller and links to each other with universal serial bus, links to each other with universal serial bus and other each CP are provided with slave controller.Be to adopt serial mode equally between the multiprocessor of this framework, have the problem of above-mentioned framework shown in Figure 1 equally, and with AP as main equipment, and each CP can't directly carry out communication as slave unit between each CP, and must participate in by AP.
The inventor finds that there are the following problems at least in the prior art in realizing process of the present invention:
Adopt serial mode to connect between each processor, and need AP as main equipment, each CP is as slave unit, and the communication between each CP must be passed through AP, makes that the communication efficiency between each processor is low.
Summary of the invention
The technical problem to be solved in the present invention provides the means of communication of a kind of portable terminal and processing module thereof, make and to share memory module by one between each processing module of the terminal that comprises the multiprocessing module and communicate, improve the communication efficiency between each processing module of terminal.
For solving the problems of the technologies described above, embodiments of the invention provide technical scheme as follows:
On the one hand, provide a kind of portable terminal, comprising:
Sharing storage module is used for store access data;
Application processing module is used to produce first calling-on signal that described sharing storage module is conducted interviews;
At least one Communications Processor Module is used to produce second calling-on signal that described sharing storage module is conducted interviews;
Control module, be used for described first calling-on signal and described second calling-on signal are arbitrated, at synchronization, allow described application processing module according to described first calling-on signal, or described Communications Processor Module is monopolized the formula visit according to described second calling-on signal to described sharing storage module; Wherein,
Described application processing module and described at least one Communications Processor Module have outside parallel bus respectively, and described control module comprises:
The sequential matched sub-block, be used for the outside parallel bus of described application processing module and the accessing time sequence of described sharing storage module are mated, perhaps the outside parallel bus of described Communications Processor Module and the accessing time sequence of described sharing storage module mated;
The Route Selection submodule is used to the transfer of data between described application processing module or described Communications Processor Module and the described sharing storage module to select route;
The bus arbitration submodule, be used for second calling-on signal on the outside parallel bus of first calling-on signal on the outside parallel bus of described application processing module and described Communications Processor Module is arbitrated, at synchronization, allow described application processing module according to described first calling-on signal, or described Communications Processor Module is monopolized formula visit by outside parallel bus to described sharing storage module according to described second calling-on signal.
On the other hand, provide a kind of means of communication of portable terminal processing module, comprising:
Produce second calling-on signal that first calling-on signal that application processing module conducts interviews to the sharing storage module of portable terminal and at least one Communications Processor Module conduct interviews to described sharing storage module;
Described first calling-on signal and described second calling-on signal are arbitrated, at synchronization, allow described application processing module according to described first calling-on signal, or described Communications Processor Module is monopolized the formula visit according to described second calling-on signal to described sharing storage module; Wherein,
Described described first calling-on signal and described second calling-on signal are arbitrated, at synchronization, allow described application processing module according to described first calling-on signal, or described Communications Processor Module is monopolized formula visit according to described second calling-on signal to described sharing storage module and is comprised:
The outside parallel bus of described application processing module and the accessing time sequence of described sharing storage module are mated, perhaps the outside parallel bus of described Communications Processor Module and the accessing time sequence of described sharing storage module are mated;
For the transfer of data between described application processing module or described Communications Processor Module and the described sharing storage module is selected route;
Second calling-on signal on the outside parallel bus of first calling-on signal on the outside parallel bus of described application processing module and described Communications Processor Module is arbitrated, at synchronization, allow described Communications Processor Module or described application processing module described sharing storage module to be monopolized the formula visit by outside parallel bus.
Embodiments of the invention have following beneficial effect:
In the such scheme, by application processing module and Communications Processor Module the formula of monopolizing of sharing storage module is visited, communication between each Communications Processor Module needn't be passed through application processing module again, and just can finish by this sharing storage module, improve the communication efficiency between each processing module of multiprocessing module portable terminal (as multi mode terminal), can satisfy the requirement of the data communication of the above multiprocessing module of 3G and 3G portable terminal.
Embodiment
For technical problem, technical scheme and advantage that embodiments of the invention will be solved is clearer, be described in detail below in conjunction with the accompanying drawings and the specific embodiments.
Embodiments of the invention are at including in the prior art in the multiprocessor mobile terminal, adopt the universal serial bus mode to carry out communication between each processor, the problem that communication efficiency is low, the means of communication of a kind of portable terminal and processing module thereof are provided, the communication efficiency between each processing module in the portable terminal is improved.
As shown in Figure 3, the embodiments of the invention portable terminal comprises:
Sharing storage module 13 is used for store access data; This sharing storage module 13 can be for a read-write sharing storage module, as random access memory ram;
Application processing module (AP) 11 is used to produce first calling-on signal that described sharing storage module 13 is conducted interviews;
At least one Communications Processor Module (CP) 12 is used to produce second calling-on signal that described sharing storage module 13 is conducted interviews;
Control module 14, be used for described first calling-on signal and described second calling-on signal are arbitrated, at synchronization, allow described application processing module 11 according to described first calling-on signal, or described Communications Processor Module 12 is monopolized the formula visit according to described second calling-on signal to described sharing storage module 13.
In the such scheme, the formula of monopolizing visit by application processing module 11 and 12 pairs of sharing storage module 13 of Communications Processor Module, communication between each Communications Processor Module 12 needn't be passed through application processing module 11 again, and just can finish by this sharing storage module 13, during a plurality of Communications Processor Module 12 access application processing modules 11, also need not wait for, therefore improve the communication efficiency between each processor of portable terminal (as multi mode terminal), can satisfy the requirement of the adjustment data communication of 3G and the above multiprocessor mobile terminal of 3G.
As shown in Figure 4, on above-mentioned basis embodiment illustrated in fig. 3, described application processing module 11 and described at least one Communications Processor Module 12 have outside parallel bus respectively, control module 14 is connected respectively with the outside parallel bus of this application processing module 11 and the outside parallel bus of at least one Communications Processor Module 12, and connected in series with sharing storage module 13;
This application processing module 11 can conduct interviews to this sharing storage module 13 by its outside parallel bus under the control of this control module 11, and this at least one Communications Processor Module 12 also can conduct interviews to this sharing storage module 13 by its outside parallel bus under the control of this control module 14;
Above-mentioned control module 14 can be specially a programmable logic device, also can be one to have other logical device of bus controlled function, and this control module 14 can specifically comprise:
Sequential matched sub-block 141, be used for the outside parallel bus of described application processing module 11 and the accessing time sequence of described sharing storage module 13 are mated, perhaps the outside parallel bus of described Communications Processor Module 12 and the accessing time sequence of described sharing storage module 13 mated; For example, application processing module 11 is connected with sharing storage module 13 by bus 1 (BUS1), this sharing storage module 13, as RAM (RandomAccess Memory, random asccess memory), if the accessing time sequence of BUS1 and RAM does not match, can carry out the coupling of sequential by this control module 14, the sequential when the sequential here is meant hardware access; Sequential for Communications Processor Module 12 is mated too;
Route Selection submodule 142 is used to the transfer of data between described application processing module 11 or described Communications Processor Module 12 and the described sharing storage module 13 to select route; Promptly realize the correct route of data/address/control signal between RAM and each processing module, for example, first Communications Processor Module 12 sends the instruction of reading the RAM blocks of data, the data of returning so thus just should be sent to this first Communications Processor Module 12 by the bus that control module 14 is attached thereto by this first Communications Processor Module 12, and can not send to second communication processing module 12 or application processing module 11; For the processing mode of application processing module 11 too;
Bus arbitration submodule 143, be used for the outside parallel bus of described application processing module 11 and the outside parallel bus of described Communications Processor Module 12 are arbitrated, at synchronization, allow described application processing module 11 according to described first calling-on signal, or described Communications Processor Module 12 is monopolized formula visit by outside parallel bus to described sharing storage module 13 according to described second calling-on signal; Promptly realize the bus arbitration function, guarantee at synchronization, have only a processing module that RAM is conducted interviews, for example first Communications Processor Module 12 is wished the visit RAM Shared, if this moment, second communication processing module 12 or application processing module 11 were write RAM, control module 14 should be returned mistake to the accessing operation of first Communications Processor Module 12 so, first Communications Processor Module 12 is known can not visit RAM this moment, and its upper layer software (applications) might be initiated access request again after waiting for a period of time; Certainly, also can support the visit of a plurality of processing modules by the mode that adds buffering area, but in control module 14, to keep visiting synchronously, as in RAM, opening up a block buffer, store the data message that some are often used, if one of them processing module need be read data in this buffering area, and being content to the non-buffering area of this RAM, the another one processing module reads or writes, at this moment, allow these two processing modules simultaneously RAM to be conducted interviews, and this visit does not conflict yet, and can further improve the communication efficiency of each processing module like this.
As shown in Figure 5, in above-mentioned all embodiment, this portable terminal also comprises, particularly comprises respectively in application processing module 11 and each Communications Processor Module 12:
Storage drive module 111 is used to install the driving of described sharing storage module 13;
Described application processing module 11 or described Communications Processor Module 12 are monopolized the formula visit by the driving of described sharing storage module 13 and outside parallel bus separately to described sharing storage module 13.
As shown in Figure 6, this storage drive module 111 can specifically comprise:
Partition management submodule 1111 is used for described sharing storage module 13 is carried out partition management;
Synchronization Control submodule 1112 is used for Synchronization Control is carried out in the visit of described application processing module 11 and 12 pairs of described sharing storage module 13 of described Communications Processor Module; As adopt SPIN Lock or Memory Barrier that each processing module is carried out Synchronization Control to the visit of sharing storage module 13; Wherein, SPIN Lock is a spin lock, be used between each processor in the multiple processor structure synchronously; And MemoryBarrier can solve the out-of-sequence problem of instruction that the optimizational function owing to compiler and processor produces, be used to solve stationary problem too, can make and manage module everywhere the out-of-sequence problem of instruction that the concurrent execution of a plurality of buffering areas causes is resolved;
Debugging bottom most submodule 1113 is used for providing the communication function scheduling mechanism to the upper strata bitcom of described application processing module 11 and described Communications Processor Module 12.
Again as shown in Figure 5, for each processing module can be conducted interviews to this sharing storage module 13 more in an orderly manner, and the data between each processing module are carried out high efficiency communication by this sharing storage module 13, this portable terminal comprises that also especially above-mentioned application processing module 11 and at least one Communications Processor Module 12 also comprise respectively:
State machine module 112 is used to obtain and preserve the state of described application processing module 11 and described Communications Processor Module 12; The state of each processing module here can comprise: normal operating condition (Running), starting state (booting), reset mode (Resetting) etc.The record of state mainly is to make other processing module be correspondingly processed according to state information;
Described control module 14 also is used at synchronization, allow the state of described application processing module 11 according to described first calling-on signal and described application processing module 11, or allow the state of described Communications Processor Module 12 according to described second calling-on signal and described Communications Processor Module 12, described sharing storage module 13 is monopolized the formula visit.
As shown in Figure 7, this state machine module 112 can specifically comprise:
Preserve submodule 1121, be used to preserve the state of described application processing module 11 and described Communications Processor Module 12, and when described state changes, upgrade described state;
First processing sub 1122 is used for when the state that detects local processing module changes, and notifies other each processing module that the state of its preservation is upgraded by the driving of described sharing storage module 13;
Second processing sub 1123 is used for when the state that detects described application processing module 11 and described Communications Processor Module 12 arbitrary processing modules changes, and the notice upper layer software (applications) is handled; As, when this processing module and outside other process module state change, calling the call back function of upper layer software (applications) registration, the notice upper layer software (applications) is done corresponding processing.
Again as shown in Figure 5, can more high efficiency communication in order to make between each processor, this portable terminal comprises that also especially above-mentioned application processing module 11 and at least one Communications Processor Module 12 also comprise respectively:
Tunnel module 113 is used to transmit the visit data between described application processing module 11 and described Communications Processor Module 12 and the described sharing storage module 13; This tunnel module 113 is based on the storage drive module 111, and analog communication passage between each processing module is realized the basic function of each communication channel comprising flow control, data stream type passage, data packet mode passage etc.
As shown in Figure 8, this tunnel module 113 can comprise:
State-maintenance submodule 1131, be used to preserve the state of described tunnel module 113, as open (Open), open (Opening), close (Closed), close (Closing), (Reset) resets, Flushing etc., and the visit data of transmission is handled according to the state notifying upper layer software (applications) of described tunnel module 113 for example send data/accept data etc.
In addition, as shown in Figure 9, in actual applications, also above-mentioned application processing module 11 and one of them Communications Processor Module 12 can be made a SoC chip, Qualcomm MSM7200 for example, other Communications Processor Module 12 is independent of this SoC chip, but remaining Communications Processor Module 12 of this SoC chip and this all is connected with control module 14 respectively, realizes the data communication between each processing module.Therefore,
The number of described Communications Processor Module 12 can also be at least two, a Communications Processor Module in described application processing module 11 and described at least two Communications Processor Modules 12 is arranged in a SoC chip, described SoC chip is connected with described control module 14 by its outside parallel bus, the outside parallel bus that remaining Communications Processor Module passes through separately in described at least two Communications Processor Modules 12 is connected with described control module 14 respectively, and the communication modes between this SoC chip and other each Communications Processor Module adopts the mode of sharing storage module.
To sum up, embodiments of the invention comprise the portable terminal of multiprocessing module, do not adopt traditional universal serial bus mode to carry out communication between application processing module 11 in this portable terminal and each Communications Processor Module 12, but adopt the mechanism of sharing storage module 13 to carry out communication, visit by on hardware, guaranteeing the application processing module 11 and the formula of monopolizing of 12 pairs of sharing storage module 13 of each Communications Processor Module, and the synchronization mechanism on software, realize between application processing module 11 and each Communications Processor Module 12 communication mechanism efficiently, improve the communication speed between multi mode terminal application processing module 11 and each Communications Processor Module 12, thereby promote the whole communication efficiency of multi mode terminal, satisfy the requirement of the above multi mode terminal high-speed data communications of 3G and 3G; Reduce the work power consumption and the stand-by power consumption of the communication between multi mode terminal application processing module 11 and each Communications Processor Module 12 simultaneously, thus prolongs standby time.In addition, owing to can need not the participation of application processing module 11 between each Communications Processor Module 12 of multi mode terminal, and directly by sharing storage module 13, tunnel module 113 between the Communications Processor Module 12 is carried out communication, has further improved the communication efficiency between each processing module of portable terminal.
As shown in figure 10, embodiments of the invention also provide a kind of means of communication of portable terminal processing module, comprising:
Step S101 produces second calling-on signal that first calling-on signal that application processing module conducts interviews to the sharing storage module of portable terminal and at least one Communications Processor Module conduct interviews to described sharing storage module;
Step S102, described first calling-on signal and described second calling-on signal are arbitrated, at synchronization, allow described application processing module according to described first calling-on signal, or described Communications Processor Module is monopolized the formula visit according to described second calling-on signal to described sharing storage module.
This method embodiment visits the formula of monopolizing of sharing storage module by application processing module and Communications Processor Module, communication between each Communications Processor Module needn't be passed through application processing module again, and just can finish by this sharing storage module, during a plurality of Communications Processor Module access application processing module, also need not wait in line, therefore improve the communication efficiency between each processing module of portable terminal (as multi mode terminal), can satisfy the requirement of the data communication of 3G and the above portable terminal of 3G.
Idiographic flow with regard to said method is described in detail below:
Step S201 produces first calling-on signal that application processing module conducts interviews to the sharing storage module of portable terminal;
Step S202 produces second calling-on signal that at least one Communications Processor Module conducts interviews to described sharing storage module;
Step S203 mates the outside parallel bus of described application processing module and the accessing time sequence of described sharing storage module, perhaps the outside parallel bus of described Communications Processor Module and the accessing time sequence of described sharing storage module is mated;
Step S204 is for the transfer of data between described application processing module or described Communications Processor Module and the described sharing storage module is selected route;
Step S205 installs the driving of this sharing storage module; This driving can realize the partition management to this sharing storage module, and this application processing module and this at least one Communications Processor Module are carried out Synchronization Control to the visit of this sharing storage module and to the function debugging of the upper strata bitcom of each processing module;
Step S206 obtains and preserves the state of described application processing module and described Communications Processor Module, as normal operating condition (Running), starting state (booting), reset modes (Resetting) etc. when described state changes, upgrade described state; When the state that detects local processing module changes, notify other each processing module that the state of its preservation is upgraded by the driving of described sharing storage module, and preserve the state after upgrading;
Step S207, the outside parallel bus of described application processing module and the outside parallel bus of described Communications Processor Module are arbitrated, at synchronization, allow described Communications Processor Module or described application processing module described sharing storage module to be conducted interviews by outside parallel bus.
Specifically,, allow described application processing module, or described Communications Processor Module is monopolized the formula visit by described driving to described sharing storage module according to described second calling-on signal according to described first calling-on signal at synchronization; Perhaps at synchronization, allow the state of described application processing module according to described first calling-on signal and described application processing module, perhaps allow the state of described Communications Processor Module, described sharing storage module is monopolized the formula visit according to described second calling-on signal and described Communications Processor Module; The perhaps combination of both of these case;
Step S208, for described application processing module and described Communications Processor Module are created tunnel respectively, obtain and preserve the state of the tunnel of described application processing module and described Communications Processor Module, as open (Open), open (Opening), close (Closed), close (Closing), (Reset) resets, Flushing etc., according to the state notifying upper layer software (applications) of described tunnel the visit data of described tunnel transmission is handled, for example sent data/accept data etc.
In this method, do not adopt traditional universal serial bus mode to carry out communication between application processing module and each Communications Processor Module, memory module is parallel to be connected but each processing module and shared, adopt the mechanism of sharing storage module to carry out communication, by on hardware, guaranteeing the formula of the monopolizing visit of application processing module and each Communications Processor Module to sharing storage module, and the synchronization mechanism on software, realize between application processing module and each Communications Processor Module communication mechanism efficiently, improve the communication speed between multi mode terminal application processing module and each Communications Processor Module, thereby promote the whole communication efficiency of multi mode terminal, satisfy the requirement of the above multi mode terminal high-speed data communications of 3G and 3G; Reduce the work power consumption and the stand-by power consumption of the communication between multi mode terminal application processing module and each Communications Processor Module simultaneously, thus prolongs standby time.In addition, because participation that can application processing module between each Communications Processor Module of multi mode terminal, and directly by sharing storage module, the tunnel between the Communications Processor Module carries out communication, has further improved the communication efficiency between each processing module of portable terminal
One of ordinary skill in the art will appreciate that all or part of step that realizes among the said method embodiment is to instruct relevant hardware to finish by program, described program can be stored in the read/write memory medium of a portable terminal, this program is when carrying out, comprise step, described storage medium etc. as above-mentioned method embodiment.
The above is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from principle of the present invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.