[go: up one dir, main page]

CN101826025A - Device for upgrading firmware of field programmable logic device and method thereof - Google Patents

Device for upgrading firmware of field programmable logic device and method thereof Download PDF

Info

Publication number
CN101826025A
CN101826025A CN201010132534A CN201010132534A CN101826025A CN 101826025 A CN101826025 A CN 101826025A CN 201010132534 A CN201010132534 A CN 201010132534A CN 201010132534 A CN201010132534 A CN 201010132534A CN 101826025 A CN101826025 A CN 101826025A
Authority
CN
China
Prior art keywords
programmable logic
field programmable
logic device
firmware
data
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.)
Pending
Application number
CN201010132534A
Other languages
Chinese (zh)
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.)
Taicang T&W Electronics Co Ltd
Original Assignee
Taicang T&W Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Taicang T&W Electronics Co Ltd filed Critical Taicang T&W Electronics Co Ltd
Priority to CN201010132534A priority Critical patent/CN101826025A/en
Publication of CN101826025A publication Critical patent/CN101826025A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a device for upgrading the firmware of a field programmable logic device, which comprises a microcontroller and a host connected with the microcontroller, and is characterized in that the microcontroller is connected with the field programmable logic device in a passive serial mode, after the host sends a firmware upgrading instruction, the microcontroller reads in the firmware upgrading data and configures the firmware upgrading data for the field programmable logic devices in passive serial mode. When upgrading the CPLD firmware, the device is simple to operate, and not only can eliminate the hardware problems caused by artificially welding or inserting/pulling the chip CPLD, but also can avoid the inconvenience caused by using the ISP.

Description

现场可编程逻辑器件固件升级装置及其方法 Field Programmable Logic Device Firmware Upgrading Device and Method

技术领域technical field

本发明属于计算机技术领域,具体涉及一种现场简易现场可编程逻辑器件(CPLD)固件升级装置及其升级的方法。The invention belongs to the technical field of computers, and in particular relates to a simple on-site programmable logic device (CPLD) firmware upgrade device and an upgrade method thereof.

背景技术Background technique

当今社会是一个数字化及数字集成电路广泛应用的社会。数字集成电路本身在不断地进行更新换代。它由早期的电子管、晶体管、小中规模集成电路、发展到超大规模集成电路(VLSIC,几万门以上)以及许多具有特定功能的专用集成电路。但是,随着微电子技术的发展,设计与制造集成电路的任务已不完全由半导体厂商来独立承担。系统设计师们更愿意自己设计专用集成电路(ASIC)芯片,而且希望ASIC的设计周期尽可能短,最好是在实验室里就能设计出合适的ASIC芯片,并且立即投入实际应用之中,因而出现了现场可编程逻辑器件(FPLD),其中应用最广泛的当属复杂可编程逻辑器件(CPLD)。Today's society is a society where digitization and digital integrated circuits are widely used. Digital integrated circuits themselves are constantly being updated. It has developed from early tubes, transistors, small and medium-scale integrated circuits, to very large-scale integrated circuits (VLSIC, more than tens of thousands of gates), and many application-specific integrated circuits with specific functions. However, with the development of microelectronics technology, the task of designing and manufacturing integrated circuits is not completely undertaken by semiconductor manufacturers independently. System designers prefer to design application-specific integrated circuit (ASIC) chips by themselves, and hope that the ASIC design cycle is as short as possible. It is best to design a suitable ASIC chip in the laboratory and put it into practical application immediately. As a result, Field Programmable Logic Devices (FPLDs) have emerged, and the most widely used ones are Complex Programmable Logic Devices (CPLDs).

但是由于产品的功能不但要满足用户的需求,还要加快产品的研发速度,尽快抢占市场,这就需要在硬件不大改的情况下,通过CPLD固件升级来实现更多的逻辑功能。目前现有技术进行CPLD固件升级的方法主要有下面2种:1.ISP在线升级,其优点在于能够通过JTAG10来升级CPLD,简单方便。但其缺点也很明显,由于电路板必须要有JTAG口,不但增加了成本,而且现场升级必须要带下载线以及下载工具。2.使用烧写器。向芯片中烧写程序的时候,必须把芯片放在烧写器的插座里。其优点在于成本低,操作简单。缺点是频繁插拔或者重新焊接芯片CPLD,容易引起硬件的损坏,人为的增大不可靠性。However, since the function of the product must not only meet the needs of users, but also speed up product development and seize the market as soon as possible, it is necessary to implement more logic functions through CPLD firmware upgrades without major hardware changes. At present, the methods for upgrading CPLD firmware in the prior art mainly contain the following two kinds: 1. ISP online upgrade, which has the advantage of being able to upgrade CPLD through JTAG10, which is simple and convenient. But its shortcomings are also obvious. Because the circuit board must have a JTAG port, it not only increases the cost, but also requires a download cable and a download tool for on-site upgrades. 2. Use a writer. When programming the program into the chip, the chip must be placed in the socket of the programmer. Its advantages are low cost and simple operation. The disadvantage is that frequent plugging or re-soldering of the chip CPLD is likely to cause hardware damage and artificially increase unreliability.

为了提供一种操作既简单、不但消除人为焊接或者插拔芯片CPLD引起的硬件问题,而且又能避免使用ISP带来的不便,现有技术并没有很好的解决,给工作人员带来不便。本发明由此而来。In order to provide a method that is easy to operate, not only eliminates the hardware problems caused by manual welding or plugging and unplugging the chip CPLD, but also avoids the inconvenience caused by using the ISP, the prior art does not solve it well, which brings inconvenience to the staff. The present invention comes from this.

发明内容Contents of the invention

本发明目的在于提供一种现场可编程逻辑器件固件升级装置,解决了现有技术中进行CPLD固件升级操作复杂、需要人为焊接或者插拔芯片CPLD,常产生硬件问题以及ISP升级具有诸多不便等问题。The purpose of the present invention is to provide a field programmable logic device firmware upgrade device, which solves the complicated operation of CPLD firmware upgrade in the prior art, the need for manual welding or plugging and unplugging of chips CPLD, hardware problems often occur, and ISP upgrades have many inconveniences and other problems. .

为了解决现有技术中的这些问题,本发明提供的技术方案是:In order to solve these problems in the prior art, the technical solution provided by the invention is:

一种现场可编程逻辑器件固件升级装置,包括微控制器和与微控制器连接的主机,其特征在于所述微控制器通过被动串行方式与现场可编程逻辑器件连接,所述主机发出固件升级指令后,所述微控制器读入固件升级数据,并将固件升级数据通过被动串行方式配置现场可编程逻辑器件。A field programmable logic device firmware upgrade device, including a microcontroller and a host connected to the microcontroller, is characterized in that the microcontroller is connected to the field programmable logic device in a passive serial manner, and the host issues firmware After the upgrade instruction, the microcontroller reads the firmware upgrade data, and configures the field programmable logic device through the passive serial mode with the firmware upgrade data.

优选的,所述装置还包括内部存储器,所述内部存储器与微控制器连接,储存现场可编程逻辑器件的固件升级数据。Preferably, the device further includes an internal memory, which is connected to the microcontroller and stores firmware upgrade data of the Field Programmable Logic Device.

优选的,所述内部存储器选用可擦写只读存储器,主机发出固件数据传输指令后,微处理器接受指令后将固件升级数据读入后存入内部存储器。Preferably, the internal memory is an erasable read-only memory, and after the host issues a firmware data transmission instruction, the microprocessor receives the instruction and reads the firmware upgrade data into the internal memory.

优选的,所述现场可编程逻辑器件的DCONFIG、DCLK、DATA、INT_DONE、nSTATUS、CONF_DONE连接到微处理器的I/O接口,其中DCONFIG、DCLK、DATA引脚设置成输出态,由微处理器对现场可编程逻辑器件进行操作;nSTATUS、CONF_DONE、INT_DONE引脚设置成输入态,由微处理器对现场可编程逻辑器件的配置状态进行检测。Preferably, the DCONFIG, DCLK, DATA, INT_DONE, nSTATUS, CONF_DONE of the field programmable logic device are connected to the I/O interface of the microprocessor, wherein DCONFIG, DCLK, DATA pins are set to output states, and are controlled by the microprocessor Operate the field programmable logic device; nSTATUS, CONF_DONE, INT_DONE pins are set to input state, and the configuration state of the field programmable logic device is detected by the microprocessor.

优选的,所述微处理器的I/O接口包括CF、CON、INT、DL、CLK、DAT引脚,所述现场可编程逻辑器件的DCONFIG、nSTATUS、INT_DONE、CONF_DONE、DCLK、DATA引脚与CF、CON、INT、DL、CLK、DAT引脚一一匹配连接,所述微处理器通过内部寄存器将CF、DCLK、DATA引脚设置成输出口,将CON、INT、DL引脚设置成输入口。Preferably, the I/O interface of the microprocessor includes CF, CON, INT, DL, CLK, DAT pins, and the DCONFIG, nSTATUS, INT_DONE, CONF_DONE, DCLK, DATA pins of the field programmable logic device and CF, CON, INT, DL, CLK, and DAT pins are matched and connected one by one. The microprocessor sets CF, DCLK, and DATA pins as output ports through internal registers, and sets CON, INT, and DL pins as input ports. mouth.

在具体使用时,所述装置上电后,微控器将新的CPLD二进制配读入内部存储器,通过被动串行配置,把代码传送到CPLD、并运行;断电,重新启动电路板后如果CPLD所预期的逻辑功能正确实现,则完成调试过程,如果程序错误,则查找程序中的错误,重新编译后,重复上述步骤,直到CPLD所预期的逻辑功能正确实现为止。In specific use, after the device is powered on, the microcontroller reads the new CPLD binary configuration into the internal memory, and through passive serial configuration, the code is sent to the CPLD and runs; power off, restart the circuit board if If the logic function expected by CPLD is realized correctly, the debugging process will be completed. If the program is wrong, find the error in the program. After recompiling, repeat the above steps until the logic function expected by CPLD is realized correctly.

本发明的另一目的在于提供一种现场简易升级现场可编程逻辑器件固件的方法,其特征在于所述方法包括以下步骤:Another object of the present invention is to provide a method for easily upgrading the firmware of field programmable logic devices on the spot, characterized in that the method includes the following steps:

(1)在现场可编程逻辑器件固件升级装置上通过被动串行方式连接现场可编程逻辑器件;(1) On the field programmable logic device firmware upgrade device, connect the field programmable logic device through passive serial mode;

(2)主机生成现场可编程逻辑器件固件的二进制配置数据;(2) The host computer generates binary configuration data of the field programmable logic device firmware;

(3)主机发出指令,微控器将二进制配置数据读入内部存储器后,通过被动串行方式将二进制配置数据发送到现场可编程逻辑器件。(3) The host issues an instruction, and after the microcontroller reads the binary configuration data into the internal memory, it sends the binary configuration data to the field programmable logic device through a passive serial method.

优选的,所述方法步骤(3)包括微处理器在现场可编程逻辑器件的DCONFIG上产生一个由低到高的跳变,使现场可编程逻辑器件进入配置状态,等待现场可编程逻辑器件释放nSTATUS,nSTATuS变高之后,通过DCLK上升沿将配置数据逐位送到DATA上;现场可编程逻辑器件接收完所有配置数据后,释放CONF_DONE,变成高电平,DCLK上输出脉冲来初始化现场可编程逻辑器件,直到INT_DONE被释放变成高电平,表示现场可编程逻辑器件初始化完毕,进入用户状态,配置过程结束的步骤。Preferably, the method step (3) comprises that the microprocessor generates a jump from low to high on the DCONFIG of the field programmable logic device, so that the field programmable logic device enters the configuration state, and waits for the field programmable logic device to release After nSTATUS and nSTATuS become high, the configuration data is sent to DATA bit by bit through the rising edge of DCLK; after the field programmable logic device receives all the configuration data, it releases CONF_DONE and becomes high level, and outputs a pulse on DCLK to initialize the field programmable logic device. Program the logic device until INT_DONE is released and becomes high level, indicating that the field programmable logic device is initialized, enters the user state, and the configuration process ends.

优选的,所述方法中还包括配置结束后进行调试的步骤,所述调试的步骤包括重新启动现场可编程逻辑器件固件升级装置后如果现场可编程逻辑器件所预期的逻辑功能未能正确实现,则进行重新修改固件代码、编译成二进制配置数据后重新被动串行配置。Preferably, the method also includes a step of debugging after the configuration is completed, and the debugging step includes restarting the firmware upgrade device of the field programmable logic device. If the expected logic function of the field programmable logic device fails to be correctly realized, Then re-modify the firmware code, compile it into binary configuration data, and then re-passive serial configuration.

优选的,所述方法中还包括成功配置后进行现场可编程逻辑器件上现场可编程逻辑器件固件升级装置拆除的步骤。Preferably, the method further includes the step of dismantling the firmware upgrade device of the FPGA on the FPGA after successful configuration.

该方法遵循JTAG协议;微处理器首先在DCONFIG信号线上产生一个宽度大于8μs的负脉冲,然后开始检测nSTATUS信号的状态。CPLD检测到DCONFIG信号的下降沿后会迫使nSTATUS和CONF_DONE信号拉低,并且在DCONFIG信号重新抬高之间保持为低电平。DCONFIG信号抬高后,nSTATUS将在1μs之内随之抬高,微处理器检测到此变化后就认为CPLD已经做好准备可以开始配置。配置第一个上升沿与nSTATUS的上升沿之间要求至少有1μs的时间间隔。由于配置数据是与配置上升沿同步的,在配置时钟的上升沿来之间应当将1bit的配置数据在数据线上准备好,配置数据按低位在先高位在后的顺序从数据线上送出。当全部配置数据送出以后,CONF_DONE信号将被抬高,表明配置结束。微处理器检测到CONF_DONE信号抬高,就结束配置过程。如果配置过程中出错,CPLD将迫使nSTATUS信号拉低,微处理器检测到此变化将重新开始配置。This method follows the JTAG protocol; the microprocessor first generates a negative pulse with a width greater than 8μs on the DCONFIG signal line, and then begins to detect the state of the nSTATUS signal. After the CPLD detects the falling edge of the DCONFIG signal, it will force the nSTATUS and CONF_DONE signals to be pulled low, and they will remain low until the DCONFIG signal is raised again. After the DCONFIG signal is raised, nSTATUS will be raised within 1μs. After the microprocessor detects this change, it thinks that the CPLD is ready to start configuration. Configure the time interval between the first rising edge and the rising edge of nSTATUS to be at least 1 μs. Since the configuration data is synchronized with the rising edge of the configuration, 1-bit configuration data should be prepared on the data line between the rising edges of the configuration clock, and the configuration data is sent out from the data line in the order of low order first and high order. When all the configuration data is sent, the CONF_DONE signal will be raised to indicate the end of the configuration. The microprocessor detects that the CONF_DONE signal is raised, and ends the configuration process. If an error occurs during the configuration process, the CPLD will force the nSTATUS signal to be low, and the microprocessor will restart the configuration when it detects this change.

本发明的原理在于借助微控器和被动串行配置将CPLD升级所需的二进制代码发送到CPLD,进而实现所需的逻辑功能,优选的具体升级步骤可以是:The principle of the present invention is to send the binary code required for CPLD upgrade to CPLD by means of microcontroller and passive serial configuration, and then realize the required logic function. The preferred specific upgrade steps can be:

A、在电路板上增设被动串行配置;A. Add a passive serial configuration on the circuit board;

B、在MAX+PLUSII环境下生成新的CPLD二进制配置数据;B. Generate new CPLD binary configuration data in the MAX+PLUSII environment;

C、电路板上电,微控器将配置数据读入内部存储器,然后,在DCONFIG上产生一个由低到高的跳变,使CPLD进入配置状态,等待CPLD释放nSTATUS,nSTATUS变高之后,通过DCLK上升沿将配置数据逐位送到DATA上;CPLD接收完所有配置数据后,会释放CONF_DONE,变成高电平,之后DCLK上输出脉冲来初始化CPLD器件,直到INT_DONE被释放变成高电平,表示CPLD器件初始化完毕,进入用户状态,配置过程结束;C. The circuit board is powered on, the microcontroller reads the configuration data into the internal memory, and then generates a transition from low to high on DCONFIG to make the CPLD enter the configuration state, wait for the CPLD to release nSTATUS, and after nSTATUS becomes high, pass The rising edge of DCLK sends the configuration data to DATA bit by bit; after CPLD receives all the configuration data, it releases CONF_DONE and becomes high level, and then outputs pulses on DCLK to initialize the CPLD device until INT_DONE is released and becomes high level , indicating that the CPLD device is initialized, enters the user state, and the configuration process ends;

D、重新启动电路板后如果CPLD所预期的逻辑功能正确实现,则进行步骤E;否则重新修改代码、编译,再重复进行步骤B、C;D. After restarting the circuit board, if the expected logic function of CPLD is realized correctly, proceed to step E; otherwise, re-modify the code, compile, and repeat steps B and C;

E、完成调试。E. Finish debugging.

这些步骤中,步骤E当完成调试后,可将被动串行配置拆除。步骤A中,被动串行配置是根据芯片手册管脚自己定义设置。所述的步骤B中,CPLD二进制配置数据是实现逻辑功能的代码。Among these steps, in step E, after the debugging is completed, the passive serial configuration can be removed. In step A, the passive serial configuration is defined and set according to the chip manual pins. In the step B, the CPLD binary configuration data is the code for realizing logic functions.

通过上述的升级过程,本发明得到一种操作既简单、不但消除人为焊接或者插拔芯片CPLD引起的硬件问题,而且又能避免使用ISP带来的不便的调试方法,设计了一种现场简易CPLD固件升级的方法,使用被动串行配置,将升级所需的二进制代码发送到CPLD,操作简单,不但解决了由于频繁插拔或者重新焊接CPLD,容易引起硬件损坏的技术问题,而且避免了使用ISP带来的不便。Through the above-mentioned upgrading process, the present invention obtains a debugging method that is simple to operate, not only eliminates hardware problems caused by manual welding or plugging and unplugging chip CPLD, but also avoids the inconvenience caused by using ISP, and designs a simple on-site CPLD The firmware upgrade method uses passive serial configuration to send the binary code required for the upgrade to the CPLD. The operation is simple. It not only solves the technical problem of hardware damage caused by frequent plugging or re-soldering of the CPLD, but also avoids the use of ISP Inconvenience caused.

相对于现有技术中的方案,本发明的优点是:Compared with the scheme in the prior art, the advantages of the present invention are:

本发明技术方案中借助微控器和被动串行配置将CPLD升级所需的二进制代码发送到CPLD,进而实现所需的逻辑功能;不但解决了由于频繁插拔或者重新焊接CPLD,容易引起硬件损坏的技术问题,而且避免了使用ISP带来的不便。In the technical solution of the present invention, the binary code required for CPLD upgrade is sent to the CPLD by means of the microcontroller and passive serial configuration, and then the required logic functions are realized; it not only solves the problem of hardware damage caused by frequent plugging and unplugging or re-welding of the CPLD technical issues, and avoid the inconvenience of using an ISP.

综上所述,本发明提供了一种现场简易CPLD固件升级的方法,该方法操作既简单、不但消除人为焊接或者插拔芯片CPLD引起的硬件问题,而且又能避免使用ISP带来的不便,采用的技术方案是借助微控器和被动串行配置将CPLD升级所需的二进制代码发送到CPLD,进而实现所需的逻辑功能。本方法具体步骤是:在电路板上增设被动串行配置,电路板上电后,微控器将新的CPLD二进制配读入内部存储器,通过被动串行配置,把代码传送到CPLD、并运行;断电,重新启动电路板后如果CPLD所预期的逻辑功能正确实现,则完成调试过程,如果程序错误,则查找程序中的错误,重新编译后,重复上述步骤,直到CPLD所预期的逻辑功能正确实现为止。In summary, the present invention provides a method for on-site simple CPLD firmware upgrade, the method is simple to operate, not only eliminates the hardware problems caused by manual welding or plugging and unplugging the chip CPLD, but also avoids the inconvenience caused by using ISP, The technical solution adopted is to send the binary code required for CPLD upgrade to CPLD with the help of microcontroller and passive serial configuration, and then realize the required logic functions. The specific steps of this method are: add a passive serial configuration on the circuit board, after the circuit board is powered on, the microcontroller reads the new CPLD binary configuration into the internal memory, transmits the code to the CPLD through the passive serial configuration, and runs ; Power off, restart the circuit board, if the expected logic function of CPLD is realized correctly, then complete the debugging process, if the program is wrong, then find the error in the program, after recompiling, repeat the above steps until the expected logic function of CPLD until it is implemented correctly.

附图说明Description of drawings

下面结合附图及实施例对本发明作进一步描述:The present invention will be further described below in conjunction with accompanying drawing and embodiment:

图1为本发明实施例装置的结构示意图。Fig. 1 is a schematic structural diagram of a device according to an embodiment of the present invention.

具体实施方式Detailed ways

以下结合具体实施例对上述方案做进一步说明。应理解,这些实施例是用于说明本发明而不限于限制本发明的范围。实施例中采用的实施条件可以根据具体厂家的条件做进一步调整,未注明的实施条件通常为常规实验中的条件。The above solution will be further described below in conjunction with specific embodiments. It should be understood that these examples are used to illustrate the present invention and not to limit the scope of the present invention. The implementation conditions used in the examples can be further adjusted according to the conditions of specific manufacturers, and the implementation conditions not indicated are usually the conditions in routine experiments.

实施例  如图1所示,该现场可编程逻辑器件固件升级装置,包括BCM5836芯片的微控制器、A3S56D30ETP芯片的内部存储器和与微控制器连接的PC机,其特征在于所述微控制器通过被动串行方式与现场可编程逻辑器件连接,所述主机发出固件升级指令后,所述微控制器读入固件升级数据,并将固件升级数据通过被动串行方式配置现场可编程逻辑器件。所述内部存储器与微控制器连接,储存现场可编程逻辑器件的固件升级数据。所述内部存储器选用可擦写只读存储器,主机发出固件数据传输指令后,微处理器接受指令后将固件升级数据读入后存入内部存储器。所述现场可编程逻辑器为Lattice公司的LCM640C。Embodiment As shown in Figure 1, this field programmable logic device firmware upgrade device, comprises the microcontroller of BCM5836 chip, the internal memory of A3S56D30ETP chip and the PC machine that is connected with microcontroller, it is characterized in that described microcontroller passes The passive serial mode is connected with the field programmable logic device, and after the host sends out a firmware upgrade command, the microcontroller reads in the firmware upgrade data, and configures the field programmable logic device with the firmware upgrade data through the passive serial mode. The internal memory is connected with the microcontroller and stores the firmware upgrade data of the Field Programmable Logic Device. The internal memory is an erasable read-only memory. After the host computer sends a firmware data transmission instruction, the microprocessor receives the instruction and reads the firmware upgrade data into the internal memory. The field programmable logic device is LCM640C of Lattice Company.

现场可编程逻辑器件的DCONFIG、DCLK、DATA、INT_DONE、nSTATUS、CONF_DONE连接到微处理器的I/O接口,其中DCONFIG、DCLK、DATA引脚设置成输出态,由微处理器对现场可编程逻辑器件进行操作;nSTATUS、CONF_DONE、INT_DONE引脚设置成输入态,由微处理器对现场可编程逻辑器件的配置状态进行检测。所述微处理器的I/O接口包括CF、CON、INT、DL、CLK、DAT引脚,所述现场可编程逻辑器件的DCONFIG、nSTATUS、INT_DONE、CONF_DONE、DCLK、DATA引脚与CF、CON、INT、DL、CLK、DAT引脚一一匹配连接,所述微处理器通过内部寄存器将CF、DCLK、DATA引脚设置成输出口,将CON、INT、DL引脚设置成输入口。The DCONFIG, DCLK, DATA, INT_DONE, nSTATUS, CONF_DONE of the field programmable logic device are connected to the I/O interface of the microprocessor, wherein the DCONFIG, DCLK, and DATA pins are set to output states, and the field programmable logic is controlled by the microprocessor. The device operates; the nSTATUS, CONF_DONE, and INT_DONE pins are set to input states, and the configuration status of the field programmable logic device is detected by the microprocessor. The I/O interface of described microprocessor comprises CF, CON, INT, DL, CLK, DAT pin, and the DCONFIG of described field programmable logic device, nSTATUS, INT_DONE, CONF_DONE, DCLK, DATA pin and CF, CON , INT, DL, CLK, and DAT pins are matched and connected one by one, and the microprocessor sets CF, DCLK, and DATA pins as output ports through internal registers, and sets CON, INT, and DL pins as input ports.

当对CPLD进行固件升级时,可以按照如下步骤进行:When upgrading the firmware of the CPLD, you can follow the steps below:

A、在电路板上增设被动串行配置;A. Add a passive serial configuration on the circuit board;

B、在MAX+PLUSII环境下生成新的CPLD二进制配置数据;B. Generate new CPLD binary configuration data in the MAX+PLUSII environment;

C、电路板上电,微控器将配置数据读入内部存储器。然后,在DCONFIG上产生一个由低到高的跳变,使CPLD进入配置状态,等待CPLD释放nSTATUS,nSTATuS变高之后,通过DCLK上升沿将配置数据逐位送到DATA上;CPLD接收完所有配置数据后,会释放CONF_DONE,变成高电平,之后DCLK上输出脉冲来初始化CPLD器件,直到INT_DONE被释放变成高电平,表示CPLD器件初始化完毕,进入用户状态,配置过程结束;C. The circuit board is powered on, and the microcontroller reads the configuration data into the internal memory. Then, a transition from low to high is generated on DCONFIG, so that CPLD enters the configuration state, waits for CPLD to release nSTATUS, after nSTATuS becomes high, the configuration data is sent to DATA bit by bit through the rising edge of DCLK; CPLD receives all configurations After the data is released, CONF_DONE will be released and become high level, and then output pulses on DCLK to initialize the CPLD device until INT_DONE is released and become high level, indicating that the CPLD device is initialized and enters the user state, and the configuration process ends;

D、重新启动电路板后如果CPLD所预期的逻辑功能正确实现,则进行步骤E;否则重新修改代码、编译,再重复进行步骤B、C;D. After restarting the circuit board, if the expected logic function of CPLD is realized correctly, proceed to step E; otherwise, re-modify the code, compile, and repeat steps B and C;

E、完成调试。E. Finish debugging.

完成调试后,可将被动串行配置去除。After commissioning is complete, the passive serial configuration can be removed.

在进行升级配置前,微处理器响应串口中断并且接收到一个数据,微处理器首先判断该数据所表示的命令类型,若是配置命令,微处理器就进入配置状态。在配置状态下,微处理器一边接收配置数据,一边将这些数据写到CPLD器件中;若是写内部储存器命令,微处理器就进入写内部储存器状态,此时微处理器会一边接收配置数据,一边将这些数据写到配置用内部储存器中(注意此时这些数据并没有被配置到CPLD器件中);若是读内部储存器命令,微处理器就进入读内部储存器并配置CPLD器件状态,此时微处理器会一边读内部储存器中的配置数据,一边将读出的配置数据写到CPLD器件中。Before the upgrade configuration, the microprocessor responds to the serial port interrupt and receives a data, the microprocessor first judges the command type represented by the data, if it is a configuration command, the microprocessor enters the configuration state. In the configuration state, the microprocessor writes the data to the CPLD device while receiving the configuration data; if it is the command to write the internal memory, the microprocessor enters the state of writing the internal memory, and the microprocessor will receive the configuration at the same time. Data, while writing these data to the internal memory for configuration (note that these data are not configured into the CPLD device at this time); if the command is to read the internal memory, the microprocessor will enter the read internal memory and configure the CPLD device At this time, the microprocessor will read the configuration data in the internal storage, and write the read configuration data to the CPLD device.

上述实例只为说明本发明的技术构思及特点,其目的在于让熟悉此项技术的人是能够了解本发明的内容并据以实施,并不能以此限制本发明的保护范围。凡根据本发明精神实质所做的等效变换或修饰,都应涵盖在本发明的保护范围之内。The above examples are only to illustrate the technical conception and characteristics of the present invention, and its purpose is to allow people familiar with this technology to understand the content of the present invention and implement it accordingly, and cannot limit the protection scope of the present invention. All equivalent changes or modifications made according to the spirit of the present invention shall fall within the protection scope of the present invention.

Claims (9)

1. device for upgrading firmware of field programmable logic device, comprise microcontroller and the main frame that is connected with microcontroller, it is characterized in that described microcontroller is connected with field programmable logic device by the passive serial mode, after described main frame sends the firmware upgrade instruction, described microcontroller reads in the firmware upgrade data, and the firmware upgrade data are disposed field programmable logic device by the passive serial mode.
2. device for upgrading firmware of field programmable logic device according to claim 1 is characterized in that described device also comprises internal storage, and described internal storage is connected with microcontroller, stores the firmware upgrade data of field programmable logic device.
3. device for upgrading firmware of field programmable logic device according to claim 2, it is characterized in that described internal storage selects EROM for use, after main frame sent the firmware data transfer instruction, microprocessor deposited internal storage in after accepting after the instruction firmware upgrade data are read in.
4. device for upgrading firmware of field programmable logic device according to claim 1, it is characterized in that DCONFIG, DCLK, DATA, INT_DONE, nSTATUS, the CONF_DONE of described field programmable logic device are connected to the I/O interface of microprocessor, wherein DCONFIG, DCLK, DATA pin are arranged to output state, by microprocessor field programmable logic device are operated; NSTATUS, CONF_DONE, INT_DONE pin are arranged to import attitude, are detected by the configuration status of microprocessor to field programmable logic device.
5. device for upgrading firmware of field programmable logic device according to claim 4, the I/O interface that it is characterized in that described microprocessor comprises CF, CON, INT, DL, CLK, DAT pin, the DCONFIG of described field programmable logic device, nSTATUS, INT_DONE, CONF_DONE, DCLK, DATA pin mate one by one and are connected with CF, CON, INT, DL, CLK, DAT pin, described microprocessor is arranged to delivery outlet by internal register with CF, DCLK, DATA pin, and CON, INT, DL pin are arranged to the input port.
6. the method for simple on-site upgrading field programmable logic device firmware is characterized in that said method comprising the steps of:
(1) connects field programmable logic device by the passive serial mode on the programmable logic device (PLD) device for upgrading firmware at the scene;
(2) main frame generates the scale-of-two configuration data of field programmable logic device firmware;
(3) main frame sends instruction, and micro controller sends to field programmable logic device by the passive serial mode with the scale-of-two configuration data after the scale-of-two configuration data is read in internal storage.
7. method according to claim 6, it is characterized in that described method step (3) comprises microprocessor upward saltus step from low to high of generation of DCONFIG of programmable logic device (PLD) at the scene, make field programmable logic device enter configuration status, wait for that field programmable logic device discharges nSTATUS, after nSTATuS uprises, deliver to configuration data on the DATA by turn by the DCLK rising edge; After field programmable logic device is received all configuration datas, discharge CONF_DONE, become high level, the last output of DCLK pulse comes the initialization field programmable logic device, be released up to INT_DONE and become high level, the initialization of expression field programmable logic device finishes, and enters User Status, the step that layoutprocedure finishes.
8. method according to claim 6, it is characterized in that also comprising in the described method step of debugging after configuration finishes, if the step of described debugging comprises that restarting behind the device for upgrading firmware of field programmable logic device the desired logic function of field programmable logic device fails correct the realization, then remodify firmware code, be compiled into passive serial configuration again behind the scale-of-two configuration data.
9. method according to claim 6 is characterized in that also comprising in the described method step of carrying out device for upgrading firmware of field programmable logic device dismounting on the field programmable logic device after the successfully configuration.
CN201010132534A 2010-03-22 2010-03-22 Device for upgrading firmware of field programmable logic device and method thereof Pending CN101826025A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010132534A CN101826025A (en) 2010-03-22 2010-03-22 Device for upgrading firmware of field programmable logic device and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010132534A CN101826025A (en) 2010-03-22 2010-03-22 Device for upgrading firmware of field programmable logic device and method thereof

Publications (1)

Publication Number Publication Date
CN101826025A true CN101826025A (en) 2010-09-08

Family

ID=42689956

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010132534A Pending CN101826025A (en) 2010-03-22 2010-03-22 Device for upgrading firmware of field programmable logic device and method thereof

Country Status (1)

Country Link
CN (1) CN101826025A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103605547A (en) * 2013-11-25 2014-02-26 北京象开科技有限公司 Method for online upgrading bar-code image scanning system software
CN104331300A (en) * 2014-09-23 2015-02-04 英业达科技有限公司 Server capable of directly updating setting by using substrate management controller
US9152544B2 (en) 2011-07-21 2015-10-06 Huawei Technologies Co., Ltd. Method and system for upgrading a firmware of a chip and baseboard management controller by waiting until an idle state of a connected system to finish upgrade
CN106445544A (en) * 2016-10-08 2017-02-22 中国科学院微电子研究所 Device and method for configuring or updating programmable logic device
CN108132811A (en) * 2017-12-15 2018-06-08 杭州迪普科技股份有限公司 A kind of loading method and device of FPGA program datas
US9996334B2 (en) 2016-09-21 2018-06-12 International Business Machines Corporation Deploying and utilizing a software library and corresponding field programmable device binary
US10355945B2 (en) 2016-09-21 2019-07-16 International Business Machines Corporation Service level management of a workload defined environment
US10417012B2 (en) 2016-09-21 2019-09-17 International Business Machines Corporation Reprogramming a field programmable device on-demand
US10572310B2 (en) 2016-09-21 2020-02-25 International Business Machines Corporation Deploying and utilizing a software library and corresponding field programmable device binary
US10599479B2 (en) 2016-09-21 2020-03-24 International Business Machines Corporation Resource sharing management of a field programmable device
CN113535213A (en) * 2021-07-21 2021-10-22 联想长风科技(北京)有限公司 Firmware updating method and system for programmable logic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1464421A (en) * 2002-06-28 2003-12-31 华为技术有限公司 Online loading process for on site programmable gate array
US6842858B2 (en) * 2001-03-19 2005-01-11 Funai Electric Co., Ltd. Mechanism for updating firmware of an electronic device
CN1996244A (en) * 2006-01-04 2007-07-11 中兴通讯股份有限公司 Download method and device using personal computer
CN101127027A (en) * 2007-09-12 2008-02-20 中兴通讯股份有限公司 A kind of FPGA loading method and its device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6842858B2 (en) * 2001-03-19 2005-01-11 Funai Electric Co., Ltd. Mechanism for updating firmware of an electronic device
CN1464421A (en) * 2002-06-28 2003-12-31 华为技术有限公司 Online loading process for on site programmable gate array
CN1996244A (en) * 2006-01-04 2007-07-11 中兴通讯股份有限公司 Download method and device using personal computer
CN101127027A (en) * 2007-09-12 2008-02-20 中兴通讯股份有限公司 A kind of FPGA loading method and its device

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9152544B2 (en) 2011-07-21 2015-10-06 Huawei Technologies Co., Ltd. Method and system for upgrading a firmware of a chip and baseboard management controller by waiting until an idle state of a connected system to finish upgrade
CN103605547A (en) * 2013-11-25 2014-02-26 北京象开科技有限公司 Method for online upgrading bar-code image scanning system software
CN104331300A (en) * 2014-09-23 2015-02-04 英业达科技有限公司 Server capable of directly updating setting by using substrate management controller
US9996334B2 (en) 2016-09-21 2018-06-12 International Business Machines Corporation Deploying and utilizing a software library and corresponding field programmable device binary
US10355945B2 (en) 2016-09-21 2019-07-16 International Business Machines Corporation Service level management of a workload defined environment
US10417012B2 (en) 2016-09-21 2019-09-17 International Business Machines Corporation Reprogramming a field programmable device on-demand
US10572310B2 (en) 2016-09-21 2020-02-25 International Business Machines Corporation Deploying and utilizing a software library and corresponding field programmable device binary
US10599479B2 (en) 2016-09-21 2020-03-24 International Business Machines Corporation Resource sharing management of a field programmable device
US11061693B2 (en) 2016-09-21 2021-07-13 International Business Machines Corporation Reprogramming a field programmable device on-demand
US11095530B2 (en) 2016-09-21 2021-08-17 International Business Machines Corporation Service level management of a workload defined environment
US11294660B2 (en) 2016-10-08 2022-04-05 Institute of Microelectronics, Chinese Academy of Sciences Apparatus and method for configuring or updating programmable logic device
CN106445544A (en) * 2016-10-08 2017-02-22 中国科学院微电子研究所 Device and method for configuring or updating programmable logic device
CN108132811A (en) * 2017-12-15 2018-06-08 杭州迪普科技股份有限公司 A kind of loading method and device of FPGA program datas
CN108132811B (en) * 2017-12-15 2021-09-21 杭州迪普科技股份有限公司 FPGA program data loading method and device
CN113535213A (en) * 2021-07-21 2021-10-22 联想长风科技(北京)有限公司 Firmware updating method and system for programmable logic device
CN113535213B (en) * 2021-07-21 2024-03-29 联想长风科技(北京)有限公司 Firmware updating method and system for programmable logic device

Similar Documents

Publication Publication Date Title
CN101826025A (en) Device for upgrading firmware of field programmable logic device and method thereof
CN101604244B (en) Device and method for realizing that FPGA can be used when being electrified and remote upgrade of FPGA
CN102087606A (en) FPGA configuration file update device
CN107368441B (en) Configurable and power optimization integrated grid driver and Type-C SoC for USB transmission of electricity
CN102609287B (en) A kind of devices and methods therefor by CPU remote update FPGA
CN102609286B (en) A kind of FPGA configurator remote update system based on processor control and method thereof
CN104461624B (en) A kind of remote upgrade method of the nearly probe measurement module of three-dimensional acoustic wave logging instrument
US20100161309A1 (en) Apparatus and Methods Thereof for Configuration and Control of a System-On-Chip Emulation Platform
CN101004707A (en) Embedded type software debugging device, and method for implementing debugging
CN111897749B (en) FLASH communication control system and method based on Quad-SPI controller and expansion
CN109542478A (en) A kind of system and method updating FPGA program in SPI Flash
CN105320531A (en) Online FPGA software upgrading method based on MicroBlaze soft core
CN104077166B (en) EPCS and EPCQ memory online upgrading methods based on IP kernel in FPGA
CN102436385A (en) Online updating device for configuration files of programmable logic device
CN107656882A (en) A kind of USB controller verification method, system and equipment
CN113127264B (en) Data storage device repairing method
CN102520961B (en) Off-chip online programmable SOC (system on a chip) and control method for same
CN106406967A (en) STM32-based USB online upgrade method and system
CN104200846B (en) Embedded-type PROM test system and achieving method
CN115344105A (en) Interface multiplexing chip and chip debugging system
CN116150064A (en) A hot-swapping method, backplane and computing equipment of NVME storage device
CN107291647A (en) The method that DSP reads receiving channel data in extended serial port
CN103116512A (en) Method for upgrading firmware of CPLD (complex programmable logic device)
CN108920197B (en) Loading circuit and loading method for improving serial passive loading rate of FPGA (field programmable Gate array)
CN205620994U (en) Embedded equipment processing apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20100908