A kind of multiprocessor program charger and loading method
Technical field
The present invention relates to a kind of data-signal transmission technology, particularly relate to a kind of multiprocessor program charger and loading method.
Background technology
In digital processing field, usually have the processor of a plurality of different purposes on a veneer module, such as the master cpu processor of a control module peripheral hardware, a plurality of FPGA processor and a plurality of dsp processor for the image algorithm processing for logic realization and sensing data reception, usually the rear several processor that requires to power on is wanted rapid loading simultaneously, and collaborative work.
Existing technology adopts the independent reservoir of each controller chip design usually, and this design proposal has increased on the one hand and realizes cost, has strengthened the design area of veneer, also is unfavorable on the other hand data and the program management of whole module.
Simultaneously, according to disclosed Chinese invention patent application document CN102722390A October 10 in 2012, its mentality of designing is to add extra Flash management device between Flash storer, dsp processor, this three of FPGA processor, is used for the control of Flash data stream.There is following shortcoming in it: at first, this design can not satisfy when firmware program load complete after data communication requirement between dsp processor and FPGA processor, in addition, carry out with the method firmware program increase extra device: a Flash management device (programmable logic device (PLD) of integrated ROM module) and a plurality of gating gauge tap device, thus increased the single board design area and realized cost.
Summary of the invention
Purpose of the present invention will overcome the deficiencies in the prior art exactly, a kind of multiprocessor program charger and loading method are provided, on the basis that does not increase additional devices, realize a kind of scheme for the loading of multiprocessor program and data communication, solution need to be the problem of each controller chip independent reservoir of design and corresponding controllers part.
For solving above technical matters, the technical solution adopted in the present invention is: a kind of multiprocessor program charger, it is characterized in that, comprise a Flash storer, master cpu processor, at least one FPGA processor and at least one dsp processor, described Flash storer is connected with described master cpu processor, described master cpu processor is connected with at least one FPGA processor, and described each independent FPGA processor is connected with at least one dsp processor.
Further, described Flash storer is connected with described master cpu processor adopting parallel data line.
Further, when described FPGA processor quantity when being single, the GPIO mouth of described master cpu processor and the configurable port parallel join of the maximum quantity of described FPGA processor.
Further, when being a plurality of, the GPIO mouth of described master cpu processor is connected in series with the configurable port of the minimum number of described a plurality of FPGA processors respectively when described FPGA processor quantity.
Further, the HPI host interface parallel join of the FPGA (Field Programmable Gate Array) IO interface of described FPGA processor and described dsp processor
A kind of said apparatus that utilizes is realized the method that multiprocessor loads, and comprises the following steps:
1. after powering on, system directly loads described master cpu processor by the first paragraph bootloder boot of storing in described Flash storer;
2. after the second segment code CPU of described Flash storer processor application programs is loaded in the internal RAM of described master cpu processor, described master cpu processor passes through the GPIO mouth according to certain sequential, tranmitting data register and data, the FPGA configuration file of storing in described Flash storer is sent to the FPGA processor, thereby complete the loading of FPGA internal logic unit;
3. after described FPGA processor loading is completed, the internal logic unit of described FPGA processor receives the configuration data of described dsp processor on the one hand from the master cpu processor, the HPI interface of again these data being set by internal logic unit on the other hand sends to a plurality of dsp processors, loads when completing a plurality of dsp processor thereby walk abreast.
Further, when being single, described master cpu processor adopting parallel mode sends to described FPGA processor with the FPGA configuration file when described FPGA processor.
Further, when being a plurality of, described master cpu processor adopting serial mode sends to a plurality of described FPGA processors with the FPGA configuration file when described FPGA processor.
The present invention realizes completing the program loading of a plurality of processors and the design of data communication with a Flash chip in the situation that do not increase additional devices, has saved implementation space and cost.
Description of drawings
Fig. 1 is the overall connection diagram of each parts of the embodiment of the present invention;
Fig. 2 is a better connection diagram of master cpu processor and FPGA processor in the embodiment of the present invention;
Fig. 3 is another better connection diagram of master cpu processor and FPGA processor in the embodiment of the present invention;
Fig. 4 is a better connection diagram of FPGA processor and dsp processor in the embodiment of the present invention;
Fig. 5 loads data to deposit file storage form schematic diagram in the Flash storer in the embodiment of the present invention;
Fig. 6 is that in the embodiment of the present invention, multiprocessor loads schematic flow sheet.
In the accompanying drawings:
The 1-Flash storer; 2-master cpu processor; The 3-FPGA processor; The 4-DSP processor.
Embodiment
Below in conjunction with accompanying drawing, embodiments of the present invention are further described.
Shown in accompanying drawing 1, a kind of multiprocessor program charger, comprise a Flash storer 1, master cpu processor 2, at least one FPGA processor 3 and at least one dsp processor 4, described Flash storer 1 adopts the data line of parallel 16 to be connected with described master cpu processor 2, described master cpu processor 2 is connected with at least one FPGA processor 3, and described each independent FPGA processor 3 is connected with at least one dsp processor 4.
Described master cpu processor 2 has two kinds with the connected mode of FPGA processor 3:
Wherein, Fig. 2 is the High speed load pattern, adopts FPGA Parallel Boot pattern, and master cpu processor 2 utilizes at least 9 GPIO mouths, and wherein 8 GPIO mouths send parallel data signal, 1 GPIO mouth simulation clocking.Fig. 3 is multi-processor mode, adopt FPGA serial boot pattern, master cpu processor 2 utilizes at least 2 GPIO mouths, wherein 1 GPIO sends serial data signal, another GPIO sends serial clock signal, because guide two GPIO mouths of minimum use of a FPGA, the GPIO mouth of master cpu processor 2 is usually far away more than 2 GPIO, so this scheme may be used on loading the situation of many FPGA of configuration processor.
The HPI host interface parallel join of the FPGA (Field Programmable Gate Array) IO interface of described FPGA processor 3 and described dsp processor 4, as shown in Figure 4, dsp processor adopts enhanced HPI-8 (HPI-8) to design for example, this HPI interface is comprised of 8 bidirectional data lines and 10 control lines, the characteristic that has a large amount of programmable I/O mouths due to FPGA processor 3 is used for loading described dsp processor 4 so can use FPGA internal logic design HPI interface.
Below the loading method in the embodiment of the present invention is described further:
As shown in Figure 6, at first enter step 101, whole device begins energising.
Then enter step 102, in Flash storer 1 code file of storage as shown in Figure 5, the first paragraph storage space is the bootloder boot of CPU processor, directly loads described master cpu processor 2 by Flash after powering on.
In step 103, after the second segment code of described Flash storer 1 is loaded in the internal RAM of CPU processor 2, the CPU processor application programs passes through the GPIO mouth according to certain sequential, tranmitting data register and data, with the FPGA configuration file serial of Flash storer or parallelly send to FPGA processor 3, thereby complete the loading of FPGA internal logic.
In step 104, after described FPGA processor 3 loadings are completed, the internal logic unit of described FPGA processor 3 receives the configuration data of described dsp processor 4 on the one hand from master cpu processor 2, the HPI interface high-speed parallel of again these data being set by internal logic unit on the other hand sends to a plurality of dsp processors 4, thereby parallel loads when completing a plurality of dsp processor 4.
After the whole loading procedure of completing steps 105, master cpu processor 2, FPGA processor 3 and dsp processor 4 can also continue to use above-mentioned interface and carry out data communication.
The present invention is owing to adopting technique scheme, and the program that can complete master cpu processor 2, a plurality of FPGA processor 3, a plurality of dsp processor 4 loads.In the situation that the Flash storage space is enough large, the number that loads FPGA processor 3 only is subjected to the GPIO mouth restricted number of master cpu processor 2 in principle, and the number that loads dsp processor 4 only is subjected to the restriction of the programmable I/O mouth of FPGA processor 3.
The content that above-described embodiment is illustrated should be understood to these embodiment and only is used for being illustrated more clearly in the present invention, limit the scope of the invention and be not used in, after having read the present invention, those skilled in the art all fall within the application's claims limited range to the modification of the various equivalent form of values of the present invention.