CN100426233C - Method for automatically configurating programmable device by inlaid CPU - Google Patents

Method for automatically configurating programmable device by inlaid CPU Download PDF

Info

Publication number
CN100426233C
CN100426233C CNB2005101206407A CN200510120640A CN100426233C CN 100426233 C CN100426233 C CN 100426233C CN B2005101206407 A CNB2005101206407 A CN B2005101206407A CN 200510120640 A CN200510120640 A CN 200510120640A CN 100426233 C CN100426233 C CN 100426233C
Authority
CN
China
Prior art keywords
file
cpu
list item
information
pin
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.)
Expired - Fee Related
Application number
CNB2005101206407A
Other languages
Chinese (zh)
Other versions
CN1979415A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CNB2005101206407A priority Critical patent/CN100426233C/en
Publication of CN1979415A publication Critical patent/CN1979415A/en
Application granted granted Critical
Publication of CN100426233C publication Critical patent/CN100426233C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a method for automatically configuring programmable devices by embedded CPU, comprising the steps of: the CPU connects with a programmable device, where the programmable pin of the programmable device is used to indicate whether to configure, and a configured programmable device outputs low level at this pin, the universal I/O pin of the CPU detects the low level to express the programmable device has been configured; otherwise at power-on, automatically downloading configuration files; storing hardware configuration files in booting memory of the CPU, including file system information terms, file information terms and analysis processing program to generate booting memory mapping, stored in program space. By automatically downloading CPLD configuration files when single plate is power on, it reduces working procedures in production; can provide remote upgrading and updating functions, making updating and maintenance simple and easy to operate; the memory space is more reasonable to use, convenient to independent development and updating of software and hardware.

Description

A kind of method by the automatic configurating programmable device of embedded type CPU
Technical field
The present invention relates in a kind of Embedded Application by the method for CPU configurating programmable device (CPLD), in particular a kind ofly relate to the CPLD configuration file stores and download automatically and the method for remote update.
Background technology
Along with extensive, the deeply application of programming device, in order to reduce cost, reduce operation, to increase long-range configurable characteristic, the more and more configuration files that adopt veneer CPU download programming device of embedded device.General veneer in process of production, need at first the boot programming to bootstrap memory, then each piece veneer is downloaded the programming device logic, if programming device file in download and boot can be combined, power on and judge and download configuration file automatically by embedding CPU, then can save the manual operation of downloading FPGA (Field Programmable Gate Array) one.
Realize the CPLD download that powers on, prerequisite is that CPU can not rely on this CPLD independent operating, that is to say that the sheet of the reseting logic of CPU, bootstrap memory and DRAM is selected to read when writing on the CPLD pin for high resistant and can normally be used.Therefore configuration file should be left in the bootstrap memory, so that the automatic download of CPLD is to the dependence reduction of hardware.Bootstrap memory generally adopts the less NORFLASH of capacity, and this FLASH is called bootstrap memory BOOT FLASH.
Storage hardware configuration file on BOOT FLASH at present mainly is that two kinds of methods are arranged:
First kind is that configuration file is converted to static array, in its compilation process preface.The advantage of this method is that configuration file combines closely with the BOOT program, but shortcoming also clearly, and configuration file loses independence, and each upgrading configuration all needs to recompilate, and can not dynamically update.
Second kind is subregion in BOOT FLASH, and configuration file is placed in the distinct area.This method has satisfied the independence of configuration file, but combines more openly with the BOOT program, can not make full use of storage space, and the position of subregion, size are difficult to hold, and is easy to influence each other when BOOT program and configuration file stand-alone development, upgrading.
Therefore, there is defective in prior art, and awaits improving and development.
Summary of the invention
The object of the present invention is to provide a kind of method, behind Board Power up, can dispose CPLD automatically by the automatic configurating programmable device of embedded type CPU, but and by order remote update CPLD;
Further purpose of the present invention provides a kind of method by the automatic configurating programmable device of embedded type CPU, be fit to deposit hardware profile among the BOOT FLASH in the Embedded Application and unify scheme, a plurality of hardware profiles and CPU guiding reflection is combined closely, its occupation space is minimized;
Further object of the present invention is to provide a kind of method by the automatic configurating programmable device of embedded type CPU, realizes being stored in hardware profile integrity detection mechanism on the BOOT FLASH, file backup mechanism, compression mechanism, configuration information etc.
Technical scheme of the present invention comprises:
A kind of method by the automatic configurating programmable device of embedded type CPU, it may further comprise the steps:
Described CPU connects a programming device, the programmable pin of described programming device is used to indicate whether configuration, the programming device that has disposed is in this pin output low level, represents when the general input and output pin of described CPU detects low level that this programming device downloads; Otherwise automatic download configuration file when powering on;
In the bootstrap memory of described CPU, deposit hardware profile, comprise filesystem information list item, fileinfo list item that is stored in the program space and the analysis and processing program that generates the bootstrap memory reflection.
Described method, wherein, the analysis and processing program of described generation bootstrap memory reflection also comprises step:
A, read in the boot image file, and to whether having filesystem information to judge, as otherwise the output information, and process ends;
If B has filesystem information, then read in file and the filesystem information and the fileinfo that need leave in the bootstrap memory;
C, judge whether enough fileinfo list item and storage space,, then export information as not, and process ends; In this way, then generate new bootstrap memory image file; And judge whether alternative document in addition, if any then circulating successively each file is handled; Otherwise, process ends.
Described method, wherein, the programmable pin of described programming device is connected with a light emitting diode, is used to indicate the configuration file of described programming device to download situation.
Described method wherein, also comprises step:
B1, as need compressions, file is compressed, to reduce storage space; And calculation document CRC check value.
Described method, wherein, the list item of described filesystem information and the list item of fileinfo are positioned at the program space, and its table address can not change the position along with the recompility of program.
Described method, wherein, the list item of described filesystem information comprises the quantity and the first table address field information of fileinfo list item.
Described method, wherein, described method also comprises the remote upgrade procedure of described configuration file, comprising:
A1, described analysis and processing program generate new bootstrap memory reflection;
B1, described main frame are downloaded the programming device configuration file again by the remote network management order.
A kind of method by the automatic configurating programmable device of embedded type CPU provided by the present invention compared with prior art, owing to download the CPLD configuration file automatically behind Board Power up, has reduced the operation in producing; And the remote upgrade update functions can be provided, make upgrade maintenance simple to operation; It is more reasonable that storage space uses, and stored file and BOOT program are relatively independent, are convenient to software and hardware stand-alone development, standalone upgrade.
Description of drawings
Fig. 1 is the hardware connection diagram of the inventive method;
Fig. 2 is the BOOT FLASH storage organization synoptic diagram of the inventive method;
Fig. 3 is the host analysis processing flow chart of the inventive method.
Embodiment
Below in conjunction with accompanying drawing, will carry out comparatively detailed explanation to each preferred embodiment of the present invention.
The invention provides a kind of method, behind Board Power up, can dispose CPLD automatically by the automatic configurating programmable device of embedded type CPU, but and by order remote update CPLD; The inventive method is to be fit to deposit hardware profile among the bootstrap memory BOOT FLASH in the Embedded Application to unify scheme, is characterized in making a plurality of hardware profiles and CPU guiding reflection to combine closely, and its occupation space is minimized; Simultaneously, the inventive method provides contents such as the hardware profile integrity detection mechanism that is stored on the BOOT FLASH, file backup mechanism, compression mechanism, configuration information, keep the advantage of two kinds of methods of prior art, and overcome the defective of prior art.
The inventive method is fit to deposit hardware profile in the bootstrap memory, comprises filesystem information list item, fileinfo list item that is stored in the program space and the analysis and processing program that generates BOOT FLASH reflection.Described filesystem information list item and fileinfo list item are positioned at the program space, and table address can not change the position along with the recompility of program, comprise field informations such as the quantity of fileinfo list item and first table address.Described fileinfo list item comprises fields such as the effective field of file, file storage address, file size, file name, rise time, version, CRC check value, compressed format, hardware correlated identities.
Described filesystem information list item field determines as required that by when compiling the fileinfo list item is inserted according to institute's add file information by analysis and processing program.Described analysis and processing program is positioned at main frame, so that generate whole BOOT FLASH reflection.
Remote upgrade of the present invention upgrades and is divided into the operation of two steps: the one, and generate new BOOTFLASH image file with analysis and processing program, and arrive target single board, and upgrade BOOTFLASH by mode remote download such as FTP; The 2nd, download new CPLD configuration file again by the remote network management order.
As shown in Figure 1, in the ware circuit of the inventive method, the jtag interface of CPLD is connected on the GPIO pin of CPU, downloads the CPLD configuration file by CPU simulation JTAG sequential, and connecting line therebetween connects outside download circuit and connector simultaneously.Whether other has CPLD I/O pin to indicate this device to be configured, this pin is programmed to output low level, if therefore configuration successful, CPU can detect low level, otherwise because this resistance R 1 and light emitting diode HL1 as high resistant of this pin is connected in series on the VCC, CPU will detect high level.HL1 will light after normal the download, and HL1 does not work in download or the downloading process, thereby can be used to indicate download state, and the state of HL1 is shown to the veneer maintenance convenience is provided.
The inventive method indicates whether configuration with a CPLD programmable pin, the CPLD that has disposed is in this pin output low level, the light emitting diode conducting is luminous, the general input and output pin (GPIO) of CPU represents when detecting low level that CPLD downloads, otherwise when powering on automatic download configuration file.
Configuration file of the inventive method and BOOT program are combined closely, and have relative independentability simultaneously, have therefore defined the system information and the file information table of file, and be as shown in Figure 2, specific as follows:
Filesystem information and fileinfo must have a fixing address, and file could correctly be added, be revised, read to the embedding program of routine analyzer and realization file operation like this.Place JMP (unconditional transfer) in program segment BOOT entrance or after necessity operation for this reason, after this defined file system information and fileinfo, and the file of depositing corresponding each fileinfo, between All Files information and All Files, be set to the BOOT program.The BOOT entry address instructs this section program generally can not change easily to this JMP, so the also just fixing following formula in the address of filesystem information table:
Instruction space length before the first address of information table=BOOT entry address+information table
Because the BOOT entry program generally write as by assembly language, therefore the definition of file system table is also adopted the mode of compilation, here the instantiation of description field information only.
Described filesystem information literary name section can comprise:
1.FILE_SYS_VALID: the file system effective marker, different application systems can adopt different signs.
2.FILE_HEAD_NUM: the quantity that can hold the file table.
3.FIRST_FILEH_ADDR: the address of first file information table.
Described fileinfo field:
1.FILE_VALID: whether expression is file or catalogue, still empty information.
2.FILE_ADDR: the file address.
3.FILE_LENTH: file size.
4.FILE_NAME: file name.
5.FILE_CREATE_TIME: the document creation time.
6.FILE_VERSION: FileVersion.
7.FILE_COMPRESS: the File Compress mode, as be not compression of 0 expression.
8.FILE_CRC_VALUE:CRC proof test value.
9.FILE_HARDWARE: the hardware relevant information can be the item of configuration device correspondence.
The described filesystem information literary name section and the fileinfo field of the inventive method, as long as suitably additions and deletions as required are consistent just passable with the analysis and processing program definition.
Described filesystem information is adopting pseudo-assembly to define, and the fileinfo field only defines footprint in assembly routine, and specifying information is write when increasing file by analysis and processing program.The analysis and processing program of the inventive method on main frame exists as an instrument, if routine analyzer is positioned at target machine, and the BOOT space can write, and then can realize dynamically rewriting the file of storage.
Application program in the inventive method can comprise filesystem information and fileinfo by all information of file in the predefined function access storage space, and file content etc.
The inventive method can be expanded sub-directory by the mode of file, generally there is no need on the less BOOTFLASH of capacity, and it is just passable to define enough file information table.Also defined two files in the methods of the invention, can backup each other, to strengthen safety of data.
The remote upgrade of CPLD in the inventive method can adopt the identical method with the BOOT program upgrade, is convenient to unified management like this, and the remote update of CPLD can be assigned update command by webmaster.
The described host analysis flow process of the inventive method as shown in Figure 3, it comprises step:
After flow process begins, at first read in BOOT program image file, and to whether having filesystem information to judge, as otherwise the output information, and process ends.
If filesystem information is arranged, then read in the file and the information thereof that need leave among the BOOT FLASH, as the need compression, file is compressed, to reduce storage space; And calculation document CRC check value, in case document lending.
Judge whether enough fileinfo list item and storage space,, then export information as not, and process ends.In this way, then generate new BOOT FLASH image file; Judge whether alternative document in addition then, if any then successively each file being handled.Otherwise, process ends.
The present invention owing to download CPLD automatically behind Board Power up, has reduced the operation in producing by the method for the automatic configurating programmable device of embedded type CPU; And the remote upgrade update functions can be provided, make upgrade maintenance simple to operation; It is more reasonable that storage space uses, and stored file and BOOT program are relatively independent, are convenient to software and hardware stand-alone development, standalone upgrade.
Should be understood that above-mentioned description at specific embodiment is comparatively detailed, can not therefore think the restriction to scope of patent protection of the present invention, scope of patent protection of the present invention should be as the criterion with claims.

Claims (6)

1, a kind of method by the automatic configurating programmable device of embedded type CPU, it may further comprise the steps:
Described CPU connects a programming device, the programmable pin of described programming device is used to indicate whether configuration, the programming device that has disposed is in this pin output low level, represents when the general input and output pin of described CPU detects low level that this programming device downloads; Otherwise automatic download configuration file when powering on;
In the bootstrap memory of described CPU, deposit hardware profile, comprise filesystem information list item, fileinfo list item that is stored in the program space and the analysis and processing program that generates the bootstrap memory reflection;
Wherein, the analysis and processing program of described generation bootstrap memory reflection also comprises step:
A, read in the boot image file, and to whether having filesystem information to judge, as otherwise the output information, and process ends;
If B has filesystem information, then read in file and the filesystem information and the fileinfo that need leave in the bootstrap memory;
C, judge whether enough fileinfo list item and storage space,, then export information as not, and process ends; In this way, then generate new bootstrap memory image file; And judge whether alternative document in addition, if any then circulating successively each file is handled; Otherwise, process ends.
2, method according to claim 1 is characterized in that, the programmable pin of described programming device is connected with a light emitting diode, is used to indicate the configuration file of described programming device to download situation.
3, method according to claim 1 is characterized in that, after the described step B, also comprises step before the step C:
B1, as need compressions, file is compressed, to reduce storage space; And calculation document CRC check value.
4, method according to claim 1 is characterized in that, the list item of described filesystem information and the list item of fileinfo are positioned at the program space, and its table address can not change the position along with the recompility of program.
5, method according to claim 1 is characterized in that, the list item of described filesystem information comprises the quantity and the first table address field information of fileinfo list item.
6, method according to claim 1 is characterized in that, also comprises the remote upgrade procedure of described configuration file after the described step C, specifically comprises:
D1, described analysis and processing program generate new bootstrap memory reflection;
D2, described main frame are downloaded the programming device configuration file again by the remote network management order.
CNB2005101206407A 2005-12-09 2005-12-09 Method for automatically configurating programmable device by inlaid CPU Expired - Fee Related CN100426233C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005101206407A CN100426233C (en) 2005-12-09 2005-12-09 Method for automatically configurating programmable device by inlaid CPU

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005101206407A CN100426233C (en) 2005-12-09 2005-12-09 Method for automatically configurating programmable device by inlaid CPU

Publications (2)

Publication Number Publication Date
CN1979415A CN1979415A (en) 2007-06-13
CN100426233C true CN100426233C (en) 2008-10-15

Family

ID=38130595

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005101206407A Expired - Fee Related CN100426233C (en) 2005-12-09 2005-12-09 Method for automatically configurating programmable device by inlaid CPU

Country Status (1)

Country Link
CN (1) CN100426233C (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103077097B (en) * 2013-02-25 2015-08-12 国电南瑞科技股份有限公司 A kind of FLASH data programming method based on verifying under TCP mode
CN111694576B (en) * 2020-05-22 2023-06-13 中国航空工业集团公司西安航空计算技术研究所 Comprehensive avionics system software deployment control method
CN113407223A (en) * 2021-06-28 2021-09-17 新华三信息安全技术有限公司 Programmable logic device online upgrading method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002008888A2 (en) * 2000-07-20 2002-01-31 Celoxica Limited System, method, and article of manufacture for a reconfigurable hardware-based multimedia device
US6553491B1 (en) * 1999-12-29 2003-04-22 Intel Corporation Configuring devices in a computer system
CN1523510A (en) * 2003-02-18 2004-08-25 明基电通股份有限公司 Method and apparatus for repeated data downloading to in situ programmable gate array
CN1677346A (en) * 2004-04-01 2005-10-05 迈普(四川)通信技术有限公司 Programmable device program update method and board card capable of updating program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6553491B1 (en) * 1999-12-29 2003-04-22 Intel Corporation Configuring devices in a computer system
WO2002008888A2 (en) * 2000-07-20 2002-01-31 Celoxica Limited System, method, and article of manufacture for a reconfigurable hardware-based multimedia device
CN1523510A (en) * 2003-02-18 2004-08-25 明基电通股份有限公司 Method and apparatus for repeated data downloading to in situ programmable gate array
CN1677346A (en) * 2004-04-01 2005-10-05 迈普(四川)通信技术有限公司 Programmable device program update method and board card capable of updating program

Also Published As

Publication number Publication date
CN1979415A (en) 2007-06-13

Similar Documents

Publication Publication Date Title
EP1938200B1 (en) Initialization of flash storage via an embedded controller
US20060064576A1 (en) Boot systems and methods
CN101477471A (en) Embedded system firmware on-line upgrading system
CN101615128B (en) Online upgrade method and device of singlechip
US9058257B2 (en) Persistent block storage attached to memory bus
CN102426531A (en) Intelligent terminal and application program updating system and method
US20090037900A1 (en) Method for optimizing memory modules for user-specific environments
CN100426220C (en) Device for realizing software down loading using single-chip processor in communication system and its method
CN107690630B (en) Calculate the bridge configuration in equipment
US20060195833A1 (en) Data-burning method and system thereof based on auto-detection of computer platform
CN101620542B (en) Compatible updating method of ultrasonic imaging equipment software data
CN105824678A (en) Method and device for installing operating system
CN104965725A (en) SD-card based full-automatic firmware programming method for embedded equipment
CN105224309A (en) A kind of method and apparatus transferring function
CN106303707A (en) A kind of version method for burn-recording, system and terminal
CN108255510B (en) IAP-based transmission verification design method for online upgrading of firmware to be upgraded
CN100426233C (en) Method for automatically configurating programmable device by inlaid CPU
CN100361075C (en) Method and device for quickly developing embedded system using automatic compilation frame
CN100342335C (en) Chip program loading method
CN100498710C (en) Method for reading and electing read only memory program code on self-storing mechanism
CN112306536B (en) Main board, chip thereof and chip upgrading method
CN103136010A (en) Firmware update method and firmware update device capable of being used by firmware update method
CN1636171B (en) General-purpose functional circuit and general-purpose unit for programmable controller
CN108052337A (en) A kind of firmware upgrade method and device of eMMC production tools
CN107423075A (en) The register method and user terminal of driving

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
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20081015

Termination date: 20131209