CN1467631A - Method for dynamic loading program - Google Patents
Method for dynamic loading program Download PDFInfo
- Publication number
- CN1467631A CN1467631A CNA021411794A CN02141179A CN1467631A CN 1467631 A CN1467631 A CN 1467631A CN A021411794 A CNA021411794 A CN A021411794A CN 02141179 A CN02141179 A CN 02141179A CN 1467631 A CN1467631 A CN 1467631A
- Authority
- CN
- China
- Prior art keywords
- program
- section
- load
- loading
- loaded
- 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.)
- Granted
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention relates to a method for proceeding dynamic program loading for chip arrays characterized by that the method comprises, dividing the program to be loaded into sections, loading each section of the program one by one at a predetermined time interval, after all the programs have been loaded, recombining into complete program file to realize the dynamic loading of the program. The invention can prevent the long time occupation of the bus line during the program loading, thus eliminating the influence to the normal service communication.
Description
Technical field
The present invention relates to the communications field, relate in particular to the dynamic load of chip array being carried out program.
Technical background
Because development of semiconductor and user are increasing to the demand of place capacity, arrange that on veneer chip array becomes a kind of trend.Chip array is made up of a plurality of chips, may realize identical functions between the chip, also may realize different functions but works in coordination or complementary, relies on the bus composition array that links together between the chip.
For simplified design, a lot of chip arrays adopt the implementation of business interface and the shared cover physical bus of program loading interface, and promptly the data stream of business data flow and loading procedure is all transmitted and communication by same set of bus.Therefore, for fear of the influence of bus conflict to the business datum communication, loading procedure must just can not carry out under the business transferring data conditions at chip array, otherwise, will cause bus contention, cause chaotic and wrong appearance.Even the some chips in the chip array are loaded, also certainly will interrupt or have a strong impact on the newsletter of entire chip array.
Summary of the invention
The present invention is exactly at above situation, proposes a kind of method of dynamic load program, overcomes competition bus and treats next drawback:
A kind of method of program dynamic load is characterized in that comprising:
The program section of being divided into desire loads loads each section program at interval one by one according to certain hour when loading, when all programs all load finish after, be reassembled into complete program file, thus the dynamic load of the program of realization.
Described program dynamic loading method also comprises a primary control program is set, and before loading described program, needs to load earlier this primary control program, and described primary control program carries program and loads required configuration information, and finishes control and Message Processing to loading procedure.
Described loading, (HOST) finishes input by main frame.
Described program dynamic loading method, also be included as each section program a paragraph header sign is set, the segment information of the section of comprising sequence number information and program in the described paragraph header sign, can be according to the next segmentation of present segment sequence number information index, after program segment is loaded into chip array, the paragraph header sign is dismantled.
Described program dynamic loading method can judge whether the section that loads is legal, whether correct by relevant informations such as paragraph header stage casing sequence numbers.
Described program dynamic loading method can be judged whether loaded of whole procedure by the segment information of program in the paragraph header.
Described program dynamic loading method, in paragraph header, can add Error Control information, by main frame (HOST) and the handshaking information that is loaded between the chip whether program segment is loaded correct information notification main frame (HOST), when if a certain section loading is correct, main frame (HOST) continues to load next section, otherwise reloads this section.
Described reloading can be to resend segment section, also can be to reload whole sections.
Described program dynamic loading method, this time interval can be controlled by timing mechanism is set.
Described program dynamic loading method, this timing mechanism can be to control by the timing mechanism on the main frame (HOST), then begin to load next section program when the time one.
Described program dynamic loading method, this timing mechanism can be controlled by the timing mechanism on the chip that is loaded, send message to main frame (HOST) and require to load next section when being loaded chip that the chip judgement time then is loaded, main frame (HOST) begins to load next section after receiving this message.
Described program dynamic loading method can load failure according to each the number of times that a counter records is reloaded is set, if surpass certain threshold value, then stops to load, and then handles as error event.
Described program dynamic loading method also comprises a timeout mechanism is set, if not corresponding response in the certain hour in loading procedure is then handled as error event.
Program the be divided into section of the present invention by loading, by paragraph header stage casing each section of sequence number information identification index, the method that loads at interval each section one by one according to certain hour during loading procedure avoids program to load taking for a long time bus, can eliminate influence to the regular traffic communication, thereby the dynamic load of the program of realization can not interrupted regular traffic communication when promptly program loads.
Description of drawings
Fig. 1 is a veneer synoptic diagram of the embodiment of the invention;
Fig. 2 is a process flow diagram of the present invention;
Embodiment
Below in conjunction with Figure of description the specific embodiment of the present invention is described.
As shown in Figure 1, be a common veneer model, in the communications field, arrange that on this veneer chip array has become the technology of comparatively popularizing.
Core concept of the present invention, it is the program section of being divided into by loading, by paragraph header stage casing each section of sequence number information identification index, the method that loads at interval each section one by one according to certain hour during loading procedure is avoided program loaded with traffic taking for a long time bus, to eliminate influence, after loading is finished, be reassembled into complete program file to newsletter, thereby the dynamic load of the program of realization can non-interrupting service communication when promptly program loads.
As shown in Figure 2, be the process flow diagram that the present invention loads.
The present invention is before loading, can load a very short primary control program, this primary control program carries program and loads required configuration information, loads which file such as needs, program start address or the like, and mainly finish control and message processing function to the process that loads.
The loading of this program, (HOST) finishes input by main frame, and this main frame can be the LOCAL CPU on the chip array veneer, also can be the master control veneer in the system, even can be the backstage of a system.
When loading this primary control program, except using the main frame loading, can also load by BIOS.
In the process that primary control program loads, if primary control program loads successfully, then return correct message, reload otherwise return error message and require.If when the number of times that reloads surpasses certain threshold value, then stop to load and reporting error event message.Such as, we are set to 3 at threshold value, when then surpassing 3 times, stop to load and reporting wrong time message.
For the program of desire loading, we cut apart big program earlier with its segmentation, are beneficial to data and transmit, and the size of section is big or small similar to normal business data packet, can differently according to concrete business decide.
Then to dividing good data segment to handle, added paragraph header before each data segment, the section of comprising sequence number information in this paragraph header also comprises the information of whole file fragmentation in the paragraph header, in the process that data transmit, can be according to the next segmentation of the section sequence number information index of present segment.
Load this program to chip then, when loading, load piecemeal, guaranteeing has certain time interval between section and the section, and this time interval size is similar with the time interval of business data packet, and this also is the influence that brings for fear of bus contention.In this time interval, can come the control time at interval by this timing mechanism by a timing mechanism is set.Such as controlling by the timer on the HOST, arrive when the time one, then begin to load next segment file; This timing mechanism also can be controlled by the chip timer that is loaded, when the time then, the chip that is loaded sends message to HOST and requires to load next section, HOST begins to load next section program after receiving this message.
In the process that loads, can judge whether the loaded data section is legal by information such as paragraph header stage casing sequence numbers, whether continuous etc.
When the file fragmentation of desire loading all was loaded on the chip, the paragraph header of dismantling sign also reassembled into complete program file.Dismantling of this paragraph header sign can be determined according to the difference of actual conditions, can all dismantle after the loaded at whole program segmentings, also can dismantle while loading, load the paragraph header sign of this section program of promptly dismantling after one section program, like this after loading all program segments, directly make up and get final product.
After the success of whole procedure file load, send load document to HOST and load success message; Otherwise then reporting file loads failed message, and requires to reload.
In actual the use, this loads the transmission of success message, it might not be necessary step, promptly not necessarily leave no choice but report by successful loading messages, can also detect whether load success by modes such as inquiry registers, same reason, above-mentioned failed message, also the mode that not necessarily sends by message obtains.
In practical operation, can a counter be set according to each situation that loads failure, be used for writing down the number of times that reloads, if surpass certain threshold value, then stop to load, and report error message.One side produces loop error.Setting up of this threshold value can be grasped flexibly, also can change setting in the threshold value of reloading counter.
When the business model (comprising the size of business data packet, the transmission time interval of business data packet etc.) of chip array when changing, the load time of the size of the section of adjustment and section at interval thereupon.
The above just loads the process of a program, in actual applications, may need to load many programs, at this moment, can be according to said method segmentation of the present invention, loading, control, principle is identical.
See a concrete loading example below.
As shown in Figure 1, be a speech processes veneer scheme, can realize the packet voice communication.The chip array that this scheme is made up of a HOST, some voice process chip, converge logic and packet processing unit is formed.Wherein, chip array converges to by service bus and converges logic, HOST also have one with converge configuration and the loading interface that logic is connected.The voice packet of each pronounciation processing chip is delivered to by service bus and converges logic, is delivered to packet processing unit again; HOST loads chip array via converging logic by the configuration loading interface, and loading data also is to be delivered to each pronounciation processing chip by service bus.
The loading of present embodiment may further comprise the steps:
1. will need the program file section of being divided into that loads, and be divided into the program segment that every segment length is 300BYTES, with the G.711 speech data packet length of 30ms similar (240 BYTES), the section of not enough 300BYTES can be filled slack byte.
Increase paragraph header in each section then, its form is:
Segment identification 8 bits | End-of-file identifies 1 bit | Section sequence number 16 bits | Section effective length 15 bits | CRC check 8 bits | Section content 1-294 byte | Byte of padding 0-293 byte |
Wherein:
Segment identification: 01111110
End-of-file sign: 0: non-end-of-file; 1: end-of-file
The section sequence number: the section sequence number of first of each file section is 0, increases by 1 successively later on.
CRC check; Use the CRC-8 check polynomial
Section content: the program file content that needs loading
If byte of padding: 0XFF is during less than 300 bytes, in order to fill.
2. load the primary control program of about 250 bytes of length before loading earlier, this primary control program carries program and loads configuration information needed, and mainly finishes control and message processing function to the process that loads.If primary control program loads successfully, then return primary control program and load success message, primary control program loads failed message and requirement is reloaded otherwise return.
3. according to section sequence number loading procedure piecemeal, and every 30ms loads one section.A timer is set in pronounciation processing chip, and every 30ms sends a message to HOST, sends next section when HOST detects this message.
4. the every reception of speech processes then judges according to segment identification, section sequence number, section effective length and CRC check whether this section loading is correct for one section, if correct, then feedback section loads success message; As mistake, then feedback section loads failed message.When HOST receives the loading success message, then continue to load next section; Otherwise reload the preceding paragraph.
5. speech processes judges whether loaded whole procedure file according to the end-of-file sign, if whole file load is correct, then feedback file loads success message; As mistake, then feedback file loads failed message.When HOST receives the file load success message, then continue to load next file; Otherwise reload a file.
6. behind the All Files loaded, the program that brings into operation, if operation is normal, then feedback process loads normal messages; As mistake, then feedback process loads failed message.When the HOST program that receives loads success message, then begin normal operation; Otherwise reload one time.
7. after the number of times that reloads that causes because of section loading, file load and procedure failure surpasses 3 times, then stop to load, and report error event message.
8. when chip array uses 5ms G.711 encoding and decoding speech is professional, the size of each file fragmentation is decided to be 50 bytes (G.711 speech data size 40 bytes are similar to 5ms), and revises a section effective length information; Section is loaded the interval become 5ms.
Program the be divided into section of the present invention by loading, by paragraph header stage casing each section of sequence number information identification index, the method that loads at interval each section one by one according to certain hour during loading procedure is avoided program loaded with traffic taking for a long time bus, eliminated the influence of program loading to newsletter, thereby the dynamic load of the program of realization, program can non-interrupting service communication when loading, and effect is very obvious.
The above; only for the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, and anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claims.
Claims (13)
1, a kind of method of program dynamic load, it is characterized in that comprising: the program section of being divided into desire loads, when loading, load each section program at interval one by one according to certain hour, when all programs all load finish after, be reassembled into complete program file, thus the dynamic load of the program of realization.
2, program dynamic loading method as claimed in claim 1, it is characterized in that also comprising a primary control program is set, before loading described program, need to load earlier this primary control program, described primary control program carries program and loads required configuration information, and finishes control and Message Processing to loading procedure.
3, program dynamic loading method as claimed in claim 2 is characterized in that, described loading, and (HOST) finishes input by main frame.
4, as claim 1,2 or 3 described program dynamic loading methods, it is characterized in that also being included as each section program a paragraph header sign is set, the segment information of the section of comprising sequence number information and program in the described paragraph header sign, can be according to the next segmentation of present segment sequence number information index, after program segment is loaded into chip array, the paragraph header sign is dismantled.
5, program dynamic loading method as claimed in claim 4 is characterized in that and can judge whether the section that loads is legal, whether correct by relevant informations such as paragraph header stage casing sequence numbers.
6, program dynamic loading method as claimed in claim 4 is characterized in that and can judge whether loaded of whole procedure by the segment information of program in the paragraph header.
7, program dynamic loading method as claimed in claim 5, it is characterized in that in paragraph header, can adding Error Control information, by main frame (HOST) and the handshaking information that is loaded between the chip whether program segment is loaded correct information notification main frame (HOST), when if a certain section loading is correct, main frame (HOST) continues to load next section, otherwise reloads this section.
8, program dynamic loading method as claimed in claim 7 is characterized in that described reloading, can be to resend segment section, and also can be to reload whole sections.
9,, it is characterized in that this time interval can control by timing mechanism is set as claim 1,2 or 3 described program dynamic loading methods.
10, program dynamic loading method as claimed in claim 9 is characterized in that, this timing mechanism can be to control by the timing mechanism on the main frame (HOST), then begins to load next section program when the time one.
11, program dynamic loading method as claimed in claim 9, it is characterized in that, this timing mechanism can be controlled by the timing mechanism on the chip that is loaded, send message to main frame (HOST) and require to load next section when being loaded chip that the chip judgement time then is loaded, main frame (HOST) begins to load next section after receiving this message.
12, as claim 1,2 or 3 described program dynamic loading methods, it is characterized in that can load failure according to each is provided with the number of times that a counter records is reloaded, if surpass certain threshold value, then stop to load, then handle as error event.
13,, it is characterized in that also comprising a timeout mechanism is set, if not corresponding response in the certain hour in loading procedure is then handled as error event as claim 1,2 or 3 described program dynamic loading methods.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 02141179 CN1225691C (en) | 2002-07-08 | 2002-07-08 | Method for dynamic loading program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 02141179 CN1225691C (en) | 2002-07-08 | 2002-07-08 | Method for dynamic loading program |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1467631A true CN1467631A (en) | 2004-01-14 |
CN1225691C CN1225691C (en) | 2005-11-02 |
Family
ID=34147733
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 02141179 Expired - Fee Related CN1225691C (en) | 2002-07-08 | 2002-07-08 | Method for dynamic loading program |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1225691C (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2006032196A1 (en) * | 2004-09-23 | 2006-03-30 | Huawei Technologies Co., Ltd. | A chip program loading method |
CN100451962C (en) * | 2004-08-31 | 2009-01-14 | 朗迅科技公司 | Adaptive control of loading a program in a disk-based operating system |
CN100462956C (en) * | 2006-04-06 | 2009-02-18 | 国际商业机器公司 | Method and system for loading programme on computer system |
CN1834911B (en) * | 2005-03-14 | 2010-04-28 | 华为技术有限公司 | Method of realizing program loading operation |
CN102158561A (en) * | 2011-04-26 | 2011-08-17 | 中兴通讯股份有限公司 | Single board component batch-downloading method, device and system |
CN102520995A (en) * | 2011-12-06 | 2012-06-27 | 北京航空航天大学 | Software remote stream type loading method and system |
CN103064703A (en) * | 2011-12-15 | 2013-04-24 | 微软公司 | Staged rapid application stream transmission using on-demand |
CN103235728A (en) * | 2013-03-20 | 2013-08-07 | 青岛海信移动通信技术股份有限公司 | Mounting method and device for presetting third party appliances in Android terminal |
-
2002
- 2002-07-08 CN CN 02141179 patent/CN1225691C/en not_active Expired - Fee Related
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100451962C (en) * | 2004-08-31 | 2009-01-14 | 朗迅科技公司 | Adaptive control of loading a program in a disk-based operating system |
WO2006032196A1 (en) * | 2004-09-23 | 2006-03-30 | Huawei Technologies Co., Ltd. | A chip program loading method |
CN1834911B (en) * | 2005-03-14 | 2010-04-28 | 华为技术有限公司 | Method of realizing program loading operation |
CN100462956C (en) * | 2006-04-06 | 2009-02-18 | 国际商业机器公司 | Method and system for loading programme on computer system |
CN102158561A (en) * | 2011-04-26 | 2011-08-17 | 中兴通讯股份有限公司 | Single board component batch-downloading method, device and system |
CN102158561B (en) * | 2011-04-26 | 2015-09-16 | 中兴通讯股份有限公司 | Method, Apparatus and system that single board component batch is downloaded |
CN102520995A (en) * | 2011-12-06 | 2012-06-27 | 北京航空航天大学 | Software remote stream type loading method and system |
CN102520995B (en) * | 2011-12-06 | 2014-11-12 | 北京航空航天大学 | Software remote stream type loading method and system |
CN103064703A (en) * | 2011-12-15 | 2013-04-24 | 微软公司 | Staged rapid application stream transmission using on-demand |
CN103064703B (en) * | 2011-12-15 | 2016-05-18 | 微软技术许可有限责任公司 | Use quick application flow transmission stage by stage as required |
US9870372B2 (en) | 2011-12-15 | 2018-01-16 | Microsoft Technology Licensing, Llc | Fast application streaming using on-demand staging |
CN103235728A (en) * | 2013-03-20 | 2013-08-07 | 青岛海信移动通信技术股份有限公司 | Mounting method and device for presetting third party appliances in Android terminal |
Also Published As
Publication number | Publication date |
---|---|
CN1225691C (en) | 2005-11-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1030882C (en) | Method and apparatus for batching the receipt of data packets | |
CN1031025C (en) | Method and apparatus for communicating variable length messages between register modeled radio devices | |
CN1225691C (en) | Method for dynamic loading program | |
CN1096763C (en) | Message fragmenting in time diversity radio system | |
CN108512785B (en) | Data transmission protocol method | |
CN1282155A (en) | Channel programming wireless user terminal controlled by broadcast | |
EP2192715A2 (en) | System including transmitter and receiver | |
CN101047714A (en) | Apparatus and method for processing network data | |
CN1534877A (en) | Encoder/decoder and encoding/decoding method | |
US20120088471A1 (en) | Call list transmission processing method and system of charging system | |
CN1756108A (en) | Master/backup system data synchronizing method | |
US6327688B1 (en) | Data bus with automatic data integrity verification and verification method | |
CN101060338A (en) | A convolutional code rate matching method and device | |
CN1136685C (en) | Rlp communication device and method for mobile communication system | |
CN109688208B (en) | Data loading method based on FC-AE-ASM message | |
US20040117549A1 (en) | Control method for distributed storage system | |
CN1617121A (en) | Method for transmitting and processing command and data | |
CN101449539B (en) | Connection configuration in a wireless telecommunications system using hash values | |
CN1144429C (en) | Data transmission method with packet check | |
CN1908925A (en) | Method for improving PCI communication credibility and efficiency | |
CN105354110A (en) | Cloud server data backup method and apparatus | |
CN109547310B (en) | Modular bus data receiving method | |
CN1845535A (en) | Message matching method and system | |
CN1842050A (en) | Uplink macrodiversity incorporating method | |
CN1901724A (en) | Dispatching method for mobile communication system software version updating |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
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 | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20051102 Termination date: 20130708 |