[go: up one dir, main page]

CN100468335C - Method and device for on-line programming logic device - Google Patents

Method and device for on-line programming logic device Download PDF

Info

Publication number
CN100468335C
CN100468335C CNB2007100864916A CN200710086491A CN100468335C CN 100468335 C CN100468335 C CN 100468335C CN B2007100864916 A CNB2007100864916 A CN B2007100864916A CN 200710086491 A CN200710086491 A CN 200710086491A CN 100468335 C CN100468335 C CN 100468335C
Authority
CN
China
Prior art keywords
programming
logic device
jtag
chain
chained
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
CNB2007100864916A
Other languages
Chinese (zh)
Other versions
CN101030147A (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.)
New H3C Information Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CNB2007100864916A priority Critical patent/CN100468335C/en
Publication of CN101030147A publication Critical patent/CN101030147A/en
Application granted granted Critical
Publication of CN100468335C publication Critical patent/CN100468335C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

本发明涉及一种逻辑器件在线编程的方法及装置,该方法将不同和/或相同厂家的逻辑器件成一条JTAG链;对JTAG链上任一逻辑器件进行在线编程,包括:生成一个包含JTAG链上所有逻辑器件信息的串行向量格式的成链编程文件或包含JTAG链上各逻辑器件位置信息、JTAG指令寄存器长度和相同厂家逻辑器件编程内容的不同格式的成链编程文件,对上述成链编程文件进行解析,对JTAG链上各逻辑器件进行在线编程。本发明具有增强在线编程的灵活性,减少文档管理成本、占有较少的物理资源,系统布局布线和编程过程简单及解除厂家私有移植代码的有益效果,适用于嵌入式编程,进行远程升级和维护。

Figure 200710086491

The present invention relates to a method and device for online programming of logic devices. The method forms logic devices from different and/or the same manufacturer into a JTAG chain; online programming of any logic device on the JTAG chain includes: generating a JTAG chain containing A chained programming file in serial vector format of all logic device information or a chained programming file in a different format containing the position information of each logic device on the JTAG chain, the length of the JTAG instruction register, and the programming content of the logic device of the same manufacturer, for the above-mentioned chained programming The file is analyzed, and each logic device on the JTAG chain is programmed online. The invention has the advantages of enhancing the flexibility of online programming, reducing document management costs, occupying less physical resources, simplifying the system layout and wiring and programming process, and removing the manufacturer's private transplant code, and is suitable for embedded programming and remote upgrade and maintenance. .

Figure 200710086491

Description

逻辑器件在线编程的方法及装置 Method and device for online programming of logic devices

技术领域 technical field

本发明涉及数据通信领域,尤其涉及一种对可编程逻辑器件进行嵌入式在线编程的方法及装置。The invention relates to the field of data communication, in particular to a method and device for embedded online programming of programmable logic devices.

背景技术 Background technique

现有的中高端数通设备中,为实现各种功能、满足成本方面的要求,可能同时使用不同或者相同厂家多种类型的逻辑器件。大多数逻辑器件支持在线编程,在设备运行过程中更新逻辑器件的内容或者上电期间对逻辑器件进行配置。现有逻辑器件,如:复杂可编程逻辑器件(Complex ProgrammableLogic Device,简称CPLD)、可擦除编程逻辑器件(Erasable ProgrammableLogic Device,简称EPLD)、现场可编程阵列(Field Programmable GateArray,简称FPGA)等都支持通过联合测试组织接口(Joint Test ActionGroup,简称JTAG接口)进行编程或配置的方式(JTAG接口符合IEEE 1149.1标准)。对逻辑器件的JTAG编程目前主要存在的技术方案是:In existing mid-to-high-end digital communication equipment, in order to realize various functions and meet cost requirements, multiple types of logic devices from different or the same manufacturers may be used at the same time. Most logic devices support in-circuit programming, which updates the contents of the logic device while the device is running or configures the logic device during power-up. Existing logic devices, such as: Complex Programmable Logic Device (CPLD for short), Erasable Programmable Logic Device (EPLD for short), Field Programmable Gate Array (Field Programmable GateArray, FPGA for short), etc. Supports programming or configuration via Joint Test Action Group (JTAG interface for short) (JTAG interface complies with IEEE 1149.1 standard). The current main technical solutions for JTAG programming of logic devices are:

不同厂家的逻辑器件组成不同的JTAG链,同一厂家的逻辑器件共用一条JTAG链进行在线编程。如图1所示,A厂家的逻辑器件1-4组成上面的JTAG1链,B厂家的逻辑器件1-4组成下面的JTAG2链。图1中不同JTAG链上的4个逻辑器件可以为相同或不同类型的CPLD、EPLD、FPGA等。Logic devices from different manufacturers form different JTAG chains, and logic devices from the same manufacturer share one JTAG chain for online programming. As shown in Figure 1, logic devices 1-4 of manufacturer A form the upper JTAG1 chain, and logic devices 1-4 of manufacturer B form the lower JTAG2 chain. The four logic devices on different JTAG chains in Figure 1 can be the same or different types of CPLD, EPLD, FPGA, etc.

相同厂家的逻辑器件形成的一条JTAG链上,对各个逻辑器件进行在线编程时,要先用该厂家编程工具生成对应格式的编程文件,把JTAG链上每个逻辑器件的信息包含在该对应格式的编程文件中,然后再调用该厂家的移植代码将编程文件加载到JTAG链上的各个逻辑器件中。On a JTAG chain formed by logic devices of the same manufacturer, when performing online programming for each logic device, first use the manufacturer’s programming tool to generate a programming file in the corresponding format, and include the information of each logic device on the JTAG chain in the corresponding format. In the programming file of the JTAG chain, the porting code of the manufacturer is then called to load the programming file into each logic device on the JTAG chain.

举例说明,如图1所示,A厂家的逻辑器件1-4形成的JTAG链,需要先用A厂家提供的编程工具(如:A为ALTERA公司,提供QUARTUS编程工具)生成对应格式的一个编程文件(如:QUARTUS编程工具生成对应格式为.jbc的编程文件),将逻辑器件1-4的编程内容包括进去,然后调用A厂家的移植代码(如:ALTERA公司对应的移植代码为JAM PLAYER)将对应格式的编程文件加载到对应的逻辑器件1-4中,对各个逻辑器件进行编程或配置。B厂家的逻辑器件1-4形成的JTAG链,需要先用B厂家提供的编程工具(如:B为LATTICE公司,提供ispVM编程工具)生成对应格式的一个编程文件(如:ispVM编程工具生成对应格式为.vme的编程文件),将B厂家的逻辑器件1-4的编程内容包括进去,然后调用B厂家的移植代码(如:LATTICE公司对应的移植代码为ispVMEmbedded)将对应格式的编程文件加载到B厂家JTAG链上对应的逻辑器件中,对逻辑器件进行编程或配置。For example, as shown in Figure 1, the JTAG chain formed by the logic devices 1-4 of manufacturer A needs to use the programming tool provided by manufacturer A (such as: A is ALTERA company, which provides QUARTUS programming tool) to generate a programming tool in the corresponding format. file (such as: QUARTUS programming tool generates a programming file corresponding to the format of .jbc), include the programming content of logic device 1-4, and then call the porting code of manufacturer A (such as: the porting code corresponding to ALTERA company is JAM PLAYER) Load the programming file in the corresponding format into the corresponding logic device 1-4, and program or configure each logic device. For the JTAG chain formed by logic devices 1-4 of manufacturer B, it is necessary to use the programming tool provided by manufacturer B (for example: B is LATTICE company, which provides ispVM programming tool) to generate a programming file in the corresponding format (for example: ispVM programming tool generates corresponding The format is .vme programming file), include the programming content of the logic device 1-4 of manufacturer B, and then call the transplant code of manufacturer B (for example: the corresponding transplant code of LATTICE company is ispVMEmbedded) to load the programming file of the corresponding format Go to the corresponding logic device on the JTAG chain of manufacturer B to program or configure the logic device.

现有对逻辑器件进行编程的方案需要用占用不同的JTAG物理连接链、增加了单板布局布线的复杂度;对不同类型JTAG链上的各个逻辑器件进行编程时,需要生成不同格式的编程文件,并调用对应的移植代码,不同的移植代码只能识别固定格式的编程文件(如:移植代码JAM PLAYER可以识别格式为.jbc的编程文件,不能识别格式为.vme的编程文件),不同格式的编程文件是互不兼容的,编程过程复杂。Existing solutions for programming logic devices need to use different JTAG physical connection chains, which increases the complexity of board layout and wiring; when programming each logic device on different types of JTAG chains, it is necessary to generate programming files in different formats , and call the corresponding porting code, different porting codes can only recognize programming files in a fixed format (for example: the porting code JAM PLAYER can recognize programming files in the format of .jbc, but not in the format of .vme), different formats The programming files are incompatible with each other, and the programming process is complicated.

发明内容 Contents of the invention

本发明的目的是提出一种逻辑器件在线编程的方法和装置,有效解决现有技术中不同的JTAG链占用过多物理资源导致系统单板布局布线复杂的缺陷。同时,还可有效解决现有技术中编程文件多导致编程过程复杂的缺陷。The object of the present invention is to propose a method and device for online programming of logic devices, which can effectively solve the defect in the prior art that different JTAG chains occupy too many physical resources and cause complex layout and wiring of the system single board. At the same time, it can also effectively solve the defect in the prior art that the programming process is complicated due to many programming files.

为了实现上述目的,本发明提供了一种逻辑器件在线编程的方法,包括:将不同厂家或不同和相同厂家的各个逻辑器件形成一条JTAG链;In order to achieve the above object, the present invention provides a method for online programming of logic devices, comprising: forming a JTAG chain with logic devices from different manufacturers or from different and same manufacturers;

生成包括所述JTAG链各个逻辑器件的位置信息、JTAG指令寄存器长度信息及各个逻辑器件编程内容的一个串行向量格式的成链编程文件或生成包括所述JTAG链各个逻辑器件的位置信息、JTAG指令寄存器长度信息及JTAG链上相同厂家逻辑器件编程内容的几种不同格式的成链编程文件或分别生成包括所述JTAG链各个逻辑器件编程内容和JTAG指令寄存器长度信息的单个编程文件;Generate a chained programming file in a serial vector format that includes the position information of each logic device of the JTAG chain, the JTAG instruction register length information, and the programming content of each logic device or generate the position information that includes each logic device of the JTAG chain, JTAG Instruction register length information and several different formats of chained programming files of the same manufacturer's logic device programming content on the JTAG chain or generate a single programming file including each logic device programming content of the JTAG chain and JTAG instruction register length information;

对所述JTAG链上的任一逻辑器件进行在线编程。In-circuit programming of any logic device on the JTAG chain.

对所述JTAG链上的任一逻辑器件进行在线编程包括:对所述一个串行向量格式的成链编程文件进行解析,获取JTAG链上各个逻辑器件的位置信息、JTAG指令寄存器长度信息及各个逻辑器件编程内容,对JTAG链上各个逻辑器件进行在线编程;对所述几种不同格式的成链编程文件进行解析,获取JTAG链上各个逻辑器件的位置信息、JTAG指令寄存器长度信息及各个逻辑器件编程内容,对JTAG链上各个逻辑器件进行在线编程或分别调用其对应的移植代码,对JTAG链上各个逻辑器件进行在线编程。On-line programming of any logic device on the JTAG chain includes: parsing the chained programming file in a serial vector format, obtaining the position information of each logic device on the JTAG chain, the length information of the JTAG instruction register and each Logic device programming content, online programming of each logic device on the JTAG chain; analyze the chained programming files in several different formats, and obtain the position information of each logic device on the JTAG chain, the length information of the JTAG instruction register and each logic device. Device programming content, perform online programming for each logic device on the JTAG chain or call its corresponding transplant code separately, and perform online programming for each logic device on the JTAG chain.

上述技术方案中,生成包含JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度信息、各个逻辑器件编程内容的一个串行向量格式的成链编程文件包括:分别生成包含JTAG链上单个逻辑器件编程内容和JTAG指令寄存器长度信息的单个串行向量格式的编程文件;根据各单个串行向量格式的编程文件及JTAG链上各个逻辑器件的位置,用任一厂家的编程工具生成或者对各单个器件编程文件手工编辑生成一个串行向量格式的成链编程文件。In the above-mentioned technical solution, generating a chained programming file in a serial vector format that includes the position information of each logic device on the JTAG chain, the length information of the JTAG instruction register, and the programming content of each logic device includes: respectively generating a programming file containing a single logic device on the JTAG chain. A single serial vector format programming file with content and JTAG instruction register length information; according to each single serial vector format programming file and the position of each logic device on the JTAG chain, use any manufacturer's programming tool to generate or program each single device Manually edit the programming file to generate a chained programming file in serial vector format.

对JTAG链上各个逻辑器件进行在线编程可包括:根据各个逻辑器件在JTAG链上的位置信息、JTAG指令寄存器长度信息对指令进行处理,将需要编程的逻辑器件选定编程状态,将编程内容加入需要编程的逻辑器件。The online programming of each logic device on the JTAG chain may include: processing instructions according to the position information of each logic device on the JTAG chain and the length information of the JTAG instruction register, selecting the programming state of the logic device to be programmed, and adding the programming content to the Logic devices that need to be programmed.

为了实现上述目的,本发明还提供了一种逻辑器件在线编程的装置,包括:获取模块,与编程模块连接,用于获取包含JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度信息和相同厂家逻辑器件编程内容的几种不同格式的成链编程文件或包含JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度信息、各个逻辑器件编程内容的串行向量格式的成链编程文件;编程模块,与获取模块连接,用于解析成链编程文件,利用所述成链编程文件对JTAG链上任一逻辑器件进行在线编程。In order to achieve the above object, the present invention also provides a device for on-line programming of logic devices, including: an acquisition module connected with the programming module for obtaining position information of each logic device on the JTAG chain, JTAG instruction register length information and the same manufacturer A chained programming file in several different formats of logic device programming content or a chained programming file in serial vector format containing the position information of each logic device on the JTAG chain, the length information of the JTAG instruction register, and the programming content of each logic device; the programming module, It is connected with the acquisition module, and is used for parsing the chained programming file, and using the chained programming file to perform online programming on any logic device on the JTAG chain.

编程模块包括:接口模块,与解析模块连接,读入成链编程文件,控制可编程器件的JTAG接口,执行编程操作;解析模块,与接口模块连接,根据获取的成链编程文件解析逻辑器件的位置信息、JTAG指令寄存器长度信息及各个逻辑器件编程内容;并对某一逻辑器件进行在线编程时将解析结果传入接口模块。编程模块还可以包括:调用模块,与接口模块连接,用于根据接口模块获取的包含JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度信息和相同厂家逻辑器件编程内容的不同格式的成链编程文件调用对应的移植代码,将编程内容传入接口模块。The programming module includes: an interface module, which is connected with the analysis module, reads in the chain programming file, controls the JTAG interface of the programmable device, and performs programming operations; the analysis module is connected with the interface module, and analyzes the logic device according to the obtained chain programming file Location information, JTAG instruction register length information and programming content of each logic device; and when a logic device is programmed online, the analysis result is transmitted to the interface module. The programming module can also include: a calling module, connected with the interface module, used for chain programming in different formats including the location information of each logic device on the JTAG chain, the length information of the JTAG instruction register and the programming content of the logic device of the same manufacturer obtained according to the interface module The file calls the corresponding porting code, and transfers the programming content to the interface module.

所述解析模块进一步还可包括:校验子模块,与格式解析子模块连接,对成链编程文件进行校验,校验通过时将成链编程文件发送给格式解析子模块;格式解析子模块,与校验子模块及存储子模块连接,根据成链编程文件的格式,对成链编程文件进行解析,获取JTAG链上各个逻辑器件的位置信息、JTAG指令寄存器长度信息及各个逻辑器件的编程数据内容;存储子模块,与格式解析子模块连接,保存解析的各个逻辑器件的编程数据内容。The parsing module may further include: a verification sub-module, connected to the format parsing sub-module, to verify the chained programming file, and send the chained programming file to the format parsing sub-module when the verification is passed; the format parsing sub-module, Connect with the check sub-module and the storage sub-module, analyze the chained programming file according to the format of the chained programming file, and obtain the position information of each logic device on the JTAG chain, the length information of the JTAG instruction register and the programming data of each logic device Content; the storage sub-module is connected with the format analysis sub-module, and stores the analyzed programming data content of each logic device.

本发明提供了一种在一条JTAG链上,对JTAG链上不同厂家的逻辑器件进行在线编程的方法及装置。对不同厂家的逻辑器件形成的一条JTAG链,生成不同格式的只包含相同厂家逻辑器件编程内容的成链编程文件或一个包含所有逻辑器件编程内容的串行向量格式的成链编程文件,并且用生成的成链编程文件可对JTAG链上所有的逻辑器件进行在线编程。本发明增强了逻辑器件编程的灵活性,减少了文档管理的成本、占有较少的物理资源,并且大大简化了不同厂家多个逻辑器件成一条JTAG链时对逻辑器件进行在线编程的复杂程度,通过解析对各个逻辑器件进行在线编程,不受厂家移植代码的私有保护,并有效解决现有技术中不同的JTAG链占用过多物理资源导致系统单板布局布线复杂和编程文件多导致编程过程复杂的缺陷,适用于嵌入式编程,进行远程升级和维护。The invention provides a method and device for online programming of logic devices of different manufacturers on a JTAG chain. For a JTAG chain formed by logic devices from different manufacturers, generate a chained programming file in different formats that only contains the programming content of the logic device from the same manufacturer or a chained programming file in serial vector format that contains all the programming content of the logic device, and use The generated chain programming file can perform in-circuit programming for all logic devices on the JTAG chain. The invention enhances the flexibility of logic device programming, reduces the cost of document management, occupies less physical resources, and greatly simplifies the complexity of online programming of logic devices when multiple logic devices from different manufacturers form a JTAG chain. Perform online programming for each logic device through analysis, without the private protection of the manufacturer's transplanted code, and effectively solve the problem that different JTAG chains occupy too many physical resources in the prior art, which leads to complex layout and wiring of the system single board and complicated programming process caused by many programming files. Defects, suitable for embedded programming, remote upgrade and maintenance.

下面通过附图和实施例,对本发明的技术方案做进一步的详细描述。The technical solutions of the present invention will be described in further detail below with reference to the accompanying drawings and embodiments.

附图说明 Description of drawings

图1为现有不同厂家逻辑器件组成不同JTAG编程链框图;Figure 1 is a block diagram of different JTAG programming chains composed of logic devices from different manufacturers;

图2为本发明中逻辑器件组成一条JTAG编程链实施例框图;Fig. 2 forms a JTAG programming chain embodiment block diagram for logic device among the present invention;

图3为本发明逻辑器件在线编程的方法实施例一流程图;3 is a flow chart of Embodiment 1 of a method for online programming of a logic device of the present invention;

图4为本发明逻辑器件在线编程的方法实施例二流程图;FIG. 4 is a flow chart of Embodiment 2 of the method for online programming of logic devices according to the present invention;

图5为图4中对生成的不同格式的成链编程文件进行解析,获取逻辑器件的编程内容实施例流程图;Fig. 5 is that in Fig. 4, the chained programming files of different formats generated are parsed to obtain a flow chart of an embodiment of the programming content of the logic device;

图6为本发明逻辑器件在线编程的方法实施例三流程图;FIG. 6 is a flow chart of Embodiment 3 of the method for online programming of logic devices according to the present invention;

图7为图6中步骤1实施例流程图;Fig. 7 is the flowchart of step 1 embodiment in Fig. 6;

图8为本发明对JTAG链上一逻辑器件进行在线编程实施例一流程图;Fig. 8 is that the present invention carries out online programming embodiment one flow chart to a logic device on the JTAG chain;

图9为图8实施例解析示意图;Fig. 9 is a schematic diagram of the analysis of the embodiment of Fig. 8;

图10为本发明对JTAG链上一逻辑器件进行在线编程实施例二流程图;Fig. 10 is the flow chart of the present invention carrying out online programming embodiment 2 to a logic device on the JTAG chain;

图11为本发明逻辑器件在线编程的装置实施例一示意图;FIG. 11 is a schematic diagram of Embodiment 1 of an apparatus for in-circuit programming of logic devices according to the present invention;

图12为本发明编程模块内部结构实施例示意图;Fig. 12 is a schematic diagram of an embodiment of the internal structure of the programming module of the present invention;

图13为本发明逻辑器件在线编程的装置实施例二示意图。FIG. 13 is a schematic diagram of Embodiment 2 of an apparatus for in-circuit programming of logic devices according to the present invention.

具体实施方式 Detailed ways

图2为本发明中逻辑器件组成一条JTAG编程链实施例框图。如图2所示,将不同和/或相同类型厂家的逻辑器件1-8组成一条JTAG链进行在线编程。本发明主要将不同和/或相同厂家的各个逻辑器件成一条JTAG链,并对所述JTAG链上的各个逻辑器件进行在线编程。Fig. 2 is a block diagram of an embodiment of logic devices forming a JTAG programming chain in the present invention. As shown in FIG. 2 , logic devices 1-8 of different and/or same types of manufacturers form a JTAG chain for online programming. The present invention mainly forms each logic device of different and/or the same manufacturer into a JTAG chain, and performs online programming for each logic device on the JTAG chain.

将各个逻辑器件形成一条JTAG链后,可以采用四种方式对各个逻辑器件进行在线编程:After each logic device is formed into a JTAG chain, each logic device can be programmed online in four ways:

第一种在线编程方式,分别生成包含JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度和JTAG链上单个逻辑器件编程内容的单个编程文件;所述各单个编程文件分别调用对应的移植代码,对相应逻辑器件进行在线编程;The first kind of online programming method generates a single programming file containing the position information of each logic device on the JTAG chain, the length of the JTAG instruction register and the programming content of a single logic device on the JTAG chain respectively; each of the single programming files calls the corresponding transplant code respectively, In-circuit programming of corresponding logic devices;

图2包括8个逻辑器件,假设逻辑器件1为ALTERA公司的器件,逻辑器件3为LATTICE的器件;则逻辑器件1对应的1.pof编程文件需要调用ALTERA公司的编程工具生成移植代码JAMPLAYER识别的格式为.jbc的单个编程文件(包含JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度和JTAG链上逻辑器件1的编程内容),同理,逻辑器件3对应的3.jed编程文件需要调用LATTICE公司的编程工具生成移植代码ispVMEmdedded识别的格式为.vme的单个编程文件(包含JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度和JTAG链上逻辑器件3的编程内容)。这种编程方式需要生成对应器件的八个编程文件,通过调用不同厂家的移植代码把生成的包含单个器件编程内容的编程文件加载到相应逻辑器件中。Figure 2 includes 8 logic devices, assuming that logic device 1 is a device of ALTERA company, and logic device 3 is a device of LATTICE; then the 1.pof programming file corresponding to logic device 1 needs to call the programming tool of ALTERA company to generate the transplant code JAMPLAYER recognition A single programming file in the format of .jbc (including the location information of each logic device on the JTAG chain, the length of the JTAG instruction register and the programming content of logic device 1 on the JTAG chain), similarly, the 3.jed programming file corresponding to logic device 3 needs to be called The programming tool of LATTICE Company generates a single programming file in the form of .vme recognized by the porting code ispVMEmdedded (including the location information of each logic device on the JTAG chain, the length of the JTAG instruction register and the programming content of the logic device 3 on the JTAG chain). This programming method needs to generate eight programming files corresponding to the device, and load the generated programming file containing the programming content of a single device into the corresponding logic device by calling the transplant code of different manufacturers.

第二种在线编程方式,JTAG链上不同厂家编程工具分别生成几种不同格式的成链编程文件;所述成链编程文件包含JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度和JTAG链上相同厂家逻辑器件编程内容;各成链编程文件分别调用对应的移植代码,对JTAG链上的各个逻辑器件进行在线编程;In the second online programming method, programming tools from different manufacturers on the JTAG chain generate several chained programming files in different formats; The programming content of logic devices of the same manufacturer; each chained programming file calls the corresponding transplant code respectively, and performs online programming for each logic device on the JTAG chain;

如图3所示,为第二种在线编程方式流程图:As shown in Figure 3, it is the flow chart of the second online programming method:

步骤1’:JTAG链上不同厂家逻辑器件利用厂家工具分别生成几个不同格式的成链编程文件;所述成链编程文件包含JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度和JTAG链上相同厂家逻辑器件的编程内容及位置信息;Step 1': Logic devices from different manufacturers on the JTAG chain use manufacturer tools to generate several chained programming files in different formats; the chained programming files include position information of each logic device on the JTAG chain, the length of the JTAG instruction register and the The programming content and location information of logic devices from the same manufacturer;

步骤2’:不同格式的成链编程文件分别调用对应的移植代码,对JTAG链上的对应的逻辑器件进行在线编程。Step 2': The chained programming files in different formats call the corresponding transplantation codes respectively, and perform online programming on the corresponding logic devices on the JTAG chain.

现结合图2下面对第二种在线编程方式的过程举例说明:The process of the second online programming mode is now described with an example in conjunction with Figure 2:

如图2所示的一条JTAG链中,逻辑器件1、3为ALTERA公司的器件,逻辑器件2、4为LATTICE公司的器件;下面对编程过程进行描述:In a JTAG chain as shown in Figure 2, logic devices 1 and 3 are devices of ALTERA Company, and logic devices 2 and 4 are devices of LATTICE Company; the programming process is described below:

a)分别生成包含单个器件编程内容的单个编程文件。如逻辑器件1和3利用ALTERA公司的编程工具分别生成对应格式的单个编程文件1.pof、3.pof;逻辑器件2和4利用LATTICE公司的编程工具分别生成对应格式的单个编程文件2.jed、4.jed;a) Generate a single programming file containing the programming content of a single device respectively. For example, logic devices 1 and 3 use the programming tool of ALTERA company to generate a single programming file 1.pof and 3.pof in the corresponding format; logic devices 2 and 4 use the programming tool of LATTICE company to generate a single programming file 2.jed in the corresponding format respectively 、 4. jed;

b)生成包含JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度及逻辑器件1、3编程内容的.jbc格式的成链编程文件,生成包含JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度和逻辑器件2、4编程内容的.vme格式的成链编程文件;b) Generate a chained programming file in .jbc format containing the location information of each logic device on the JTAG chain, the length of the JTAG instruction register and the programming content of logic devices 1 and 3, and generate the location information of each logic device on the JTAG chain, the length of the JTAG instruction register A chained programming file in .vme format with the programming content of logic devices 2 and 4;

1.pof、3.pof单个编程文件需要调用ALTERA公司的编程工具生成移植代码JAMPLAYER识别的格式为.jbc的成链编程文件(只包含器件1、3的编程内容和JTAG链上各个逻辑器件位置、JTAG指令寄存器长度信息),同理,逻辑器件2、4对应的2.jed、4.jed单个编程文件需要调用LATTICE公司的编程工具生成移植代码ispVMEmdedded识别的格式为.vme的编程文件(只包含器件2、4的编程内容和JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度信息);1.pof, 3.pof A single programming file needs to call the programming tool of ALTERA company to generate the transplant code JAMPLAYER recognizes the format as a chained programming file of .jbc (only contains the programming content of devices 1 and 3 and the positions of each logic device on the JTAG chain , JTAG instruction register length information), similarly, the 2.jed and 4.jed single programming files corresponding to logic devices 2 and 4 need to call the programming tool of LATTICE company to generate the transplantation code. Including the programming content of devices 2 and 4, the location information of each logic device on the JTAG chain, and the length information of the JTAG instruction register);

c)各种格式的成链编程文件分别调用对应的移植代码,对JTAG链上的逻辑器件进行在线编程:c) The chained programming files in various formats call the corresponding transplant codes respectively, and perform online programming on the logic devices on the JTAG chain:

只包含JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度和器件1、3的编程内容信息的.jbc格式的成链编程文件调用对应的移植代码JAMPLAYER对逻辑器件1、3进行在线编程;只包含JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度和器件2、4的编程内容的.vme格式的成链编程文件调用对应的移植代码ispVMEmdedded对逻辑器件2、4进行在线编程。The chained programming file in .jbc format that only contains the location information of each logic device on the JTAG chain, the length of the JTAG instruction register, and the programming content information of devices 1 and 3 calls the corresponding transplant code JAMPLAYER to program logic devices 1 and 3 online; only The chained programming file in .vme format, which contains the location information of each logic device on the JTAG chain, the length of the JTAG instruction register, and the programming content of devices 2 and 4, calls the corresponding transplant code ispVMEmdedded to perform online programming of logic devices 2 and 4.

由上可知,一条JTAG链上有几个不同的厂家,需要生成几个只包含相同厂家逻辑器件编程内容的成链编程文件,通过调用不同厂家的移植代码把生成的成链编程文件加载到对应逻辑器件中。It can be seen from the above that there are several different manufacturers in a JTAG chain, and several chained programming files containing only the programming content of logic devices of the same manufacturer need to be generated, and the generated chained programming files are loaded to the corresponding in logic devices.

第三种在线编程方式,JTAG链上不同厂家逻辑器件利用厂家工具分别生成几种不同格式的成链编程文件;所述成链编程文件包含JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度和JTAG链上相同厂家逻辑器件的编程内容;对生成的不同格式的成链编程文件进行解析,获取JTAG链上各个逻辑器件的编程内容,对JTAG链上的各个逻辑器件进行在线编程;In the third online programming mode, logic devices of different manufacturers on the JTAG chain utilize manufacturer tools to generate several chained programming files in different formats; The programming content of logic devices from the same manufacturer on the JTAG chain; analyze the generated chained programming files in different formats, obtain the programming content of each logic device on the JTAG chain, and perform online programming on each logic device on the JTAG chain;

如图4所示,为第三种在线编程方式流程图:As shown in Figure 4, it is the flow chart of the third online programming method:

步骤1”:利用JTAG链上不同厂家编程工具分别生成几个不同格式的成链编程文件;Step 1": Use the programming tools of different manufacturers on the JTAG chain to generate several chained programming files in different formats;

步骤2”:对生成的不同格式的成链编程文件进行解析,获取相应逻辑器件的编程内容,对JTAG链上的相应逻辑器件进行在线编程。Step 2": Analyze the generated chained programming files in different formats, obtain the programming content of the corresponding logic device, and perform online programming on the corresponding logic device on the JTAG chain.

利用JTAG链上不同厂家的编程工具分别生成几种不同格式的成链编程文件的具体生成过程可参见第二种在线编程方式中a)和b)部分的描述。The specific generation process of using the programming tools of different manufacturers on the JTAG chain to generate several chained programming files in different formats can refer to the description of parts a) and b) in the second online programming mode.

下面对生成的不同格式的成链编程文件进行解析,获取相应逻辑器件的编程内容进行说明,参见图5,对成链编程文件解析获取相应逻辑器件的编程内容包括:The generated chained programming files in different formats are analyzed below to obtain the programming content of the corresponding logic device. See Figure 5. The programming content of the corresponding logic device obtained by parsing the chained programming file includes:

步骤21:根据成链编程文件的格式,执行对应格式的循环冗余(CRC)校验;如:输入的成链编程文件格式为.jbc,则执行jbc格式对应的校验,jbc_crc_check;Step 21: According to the format of the chained programming file, perform the cyclic redundancy (CRC) check of the corresponding format; such as: the input chained programming file format is .jbc, then execute the corresponding check of the jbc format, jbc_crc_check;

步骤22:判断循环冗余校验是否正确,当循环冗余校验正确时,执行步骤23;否则结束;Step 22: Determine whether the cyclic redundancy check is correct, and when the cyclic redundancy check is correct, perform step 23; otherwise, end;

步骤23:根据成链编程文件的格式,解析JTAG链上各个逻辑器件的位置信息、JTAG指令寄存器长度信息及相应逻辑器件的编程内容。Step 23: According to the format of the chained programming file, analyze the position information of each logic device on the JTAG chain, the length information of the JTAG instruction register and the programming content of the corresponding logic device.

生成所述的成链编程文件后,根据各个成链编程文件的格式(.jbc、.vme等格式)设置不同格式的解析过程,解析出具体的JTAG链上的逻辑器件信息、指令长度和编程内容等,完成对JTAG链上逻辑器件的加载和编程。After generating the described chain programming file, according to the format of each chain programming file (. content, etc., to complete the loading and programming of the logic devices on the JTAG chain.

具体的:在获得成链编程文件后,根据成链编程文件的格式,如.jbc格式、vme格式执行对应格式的解析。每种格式的成链编程文件在固定位置会存储有固定的信息,表1所示为.jbc格式的成链编程文件格式:Specifically: after obtaining the chained programming file, perform parsing of the corresponding format according to the format of the chained programming file, such as .jbc format and vme format. Each format of the chained programming file will store fixed information in a fixed location. Table 1 shows the format of the chained programming file in the .jbc format:

         表1    .jbc格式的成链编程文件格式表Table 1 Format table of chained programming files in .jbc format

上表只是对.jbc文件的格式进行了一些简单分析,左边一列标的是地址。First_word(4A414D01)是固定的,还有可能是4A414D00,一个成链编程文件的首地址中如果是这两个值,则可以解析出为.jbc格式的成链编程文件,并且是由QUARTUS编程工具生成。接下来的action_table,procdure_table,string_table等存储的是变量的地址,这些变量都是指针形式,根据指针所指的地址从成链编程文件的相应位置检索出对应的信息值。因此.jbc格式的成链编程文件基本上是按照这种指针的一种排列结构组成的,把所有的有用信息全包含在内。根据这种格式的成链编程文件在对应位置读取相应的信息后,会获得文件的格式、版本信息、编译工具、JTAG链上各个逻辑器件的位置信息、相应逻辑器件的编程的数据内容等。The above table is just a simple analysis of the format of the .jbc file, and the left column is marked with the address. First_word (4A414D01) is fixed, and it may be 4A414D00. If there are these two values in the first address of a chained programming file, it can be parsed as a chained programming file in .jbc format, and it is used by the QUARTUS programming tool generate. The following action_table, procdure_table, string_table, etc. store the addresses of variables. These variables are in the form of pointers, and the corresponding information values are retrieved from the corresponding positions of the chained programming files according to the addresses pointed by the pointers. Therefore, the chained programming file in the .jbc format is basically composed according to an arrangement structure of such pointers, including all useful information. According to the chained programming file in this format, after reading the corresponding information at the corresponding position, the file format, version information, compilation tools, location information of each logic device on the JTAG chain, and programming data content of the corresponding logic device will be obtained. .

本实施例步骤22中,成链编程文件格式如果为.jbc格式,执行的jbc_crc_check校验结果与成链编程文件中的循环冗余数据Crc_section进行比较,如表1中0x28-0x2b位置处存放循环冗余数据Crc_section,为后续解析和在线编程提供了准确性保证。其它如。vme等格式的成链编程文件与.jbc格式的成链编程文件数据的存放位置和每个位置中数据的含义虽然不同,但只是存放格式不同,解析过程相似,在此不再一一例举。In step 22 of this embodiment, if the format of the chained programming file is .jbc format, the executed jbc_crc_check verification result is compared with the cyclic redundancy data Crc_section in the chained programming file, such as the 0x28-0x2b position in Table 1 where the cycle is stored Redundant data Crc_section provides accuracy guarantee for subsequent analysis and online programming. Other such as. Although the data storage location and the meaning of the data in each location are different between the chained programming files in the vme format and the chained programming files in the .jbc format, only the storage formats are different, and the parsing process is similar, so I won’t give examples here. .

在对不同格式成链编程文件的编程内容解析后,获得各个逻辑器件的位置信息、JTAG指令长度及各个逻辑器件的编程内容,然后对各个逻辑器件进行在线编程,后续会对逻辑器件进行编程内容加载的过程进行具体说明。After analyzing the programming content of the chained programming files in different formats, the location information of each logic device, the length of the JTAG instruction, and the programming content of each logic device are obtained, and then each logic device is programmed online, and the logic device will be programmed later. The loading process is described in detail.

第四种在线编程方式,生成一个包含JTAG链上所有逻辑器件信息的串行向量格式的成链编程文件,利用所述成链编程文件对JTAG链上任一逻辑器件进行在线编程。The fourth online programming method is to generate a chained programming file in serial vector format containing information of all logic devices on the JTAG chain, and use the chained programming file to perform online programming on any logic device on the JTAG chain.

下面结合图2和图6对逻辑器件第四种在线编程的方法进行说明。The fourth method for in-circuit programming of logic devices will be described below with reference to FIG. 2 and FIG. 6 .

图6为本发明逻辑器件在线编程的方法实施例三流程图。如图6所示,本实施例包括:FIG. 6 is a flow chart of Embodiment 3 of the method for in-circuit programming of a logic device according to the present invention. As shown in Figure 6, this embodiment includes:

步骤1:生成包含一条JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度、各个逻辑器件编程内容的一个串行向量格式的成链编程文件;Step 1: Generate a chained programming file in a serial vector format that includes the position information of each logic device on a JTAG chain, the length of the JTAG instruction register, and the programming content of each logic device;

步骤2:对所述成链编程文件进行解析,获取各个逻辑器件的编程内容,对JTAG链上各个逻辑器件进行在线编程。Step 2: Analyze the chained programming file, obtain the programming content of each logic device, and perform online programming for each logic device on the JTAG chain.

本实施例步骤1需要生成一个成链编程文件,将一条JTAG链上不同或相同厂家的所有逻辑器件编程内容、JTAG指令寄存器长度和位置信息等包括在内。步骤1生成满足要求的一个成链编程文件的过程参见图7,包括:Step 1 of this embodiment needs to generate a chained programming file, which includes the programming content of all logic devices from different or the same manufacturers on a JTAG chain, the length and location information of the JTAG instruction register, and the like. Refer to Figure 7 for the process of generating a chained programming file that meets the requirements in step 1, including:

步骤11:生成包含JTAG链上单个逻辑器件编程内容和JTAG指令寄存器长度的单个串行向量格式的编程文件;Step 11: Generate a programming file in a single serial vector format that includes the programming content of a single logic device on the JTAG chain and the length of the JTAG instruction register;

步骤12:根据上述单个串行向量格式的编程文件及JTAG链上各个逻辑器件的位置,用任一编程工具生成或者对各个单个编程文件手工编辑生成一个串行向量格式的成链编程文件。Step 12: According to the above-mentioned single programming file in serial vector format and the position of each logic device on the JTAG chain, use any programming tool to generate or manually edit each single programming file to generate a chained programming file in serial vector format.

下面结合图2对串行向量格式成链编程文件的生成过程举例说明:例如,图2中1、3为ALTERA公司的器件,2、4为LATTICE公司的器件;生成一个包含逻辑器件1-4的串行向量格式的成链编程文件包括:Below in conjunction with Figure 2, the generation process of the serial vector format into a chain programming file is illustrated: for example, 1 and 3 in Figure 2 are devices of ALTERA Company, and 2 and 4 are devices of LATTICE Company; generate a program containing logic devices 1-4 The chained programming files in serial vector format include:

a)分别生成包含单个器件编程内容和JTAG指令寄存器长度的单个编程文件。如逻辑器件1和3利用ALTERA公司的编程工具分别生成对应格式的单个编程文件1.pof、3.pof;逻辑器件2和4利用LATTICE公司的编程工具分别生成对应格式的单个编程文件2.jed、4.jed;a) Generate a single programming file containing the programming content of a single device and the length of the JTAG instruction register respectively. For example, logic devices 1 and 3 use the programming tool of ALTERA company to generate a single programming file 1.pof and 3.pof in the corresponding format; logic devices 2 and 4 use the programming tool of LATTICE company to generate a single programming file 2.jed in the corresponding format respectively 、 4. jed;

b)要将JTAG链上各个逻辑器件不同格式的单个编程文件生成一个成链编程文件,需要先将不同格式的单个编程文件生成串行向量格式的编程文件,如:利用LATTICE公司的编程工具将2.jed和4.jed转换成串行向量格式(Serial Vector Format,简写为svf)的编程文件2.svf、4.svf。串行向量格式是不同编程工具都可以生成的文件格式,并且所有逻辑器件都支持这种格式的编程文件;b) To generate a chained programming file from individual programming files of different formats for each logic device on the JTAG chain, it is necessary to first generate a programming file in serial vector format from a single programming file in different formats, such as: use the programming tool of LATTICE company to 2.jed and 4.jed are converted into serial vector format (Serial Vector Format, abbreviated as svf) programming files 2.svf, 4.svf. The serial vector format is a file format that can be generated by different programming tools, and all logic devices support programming files in this format;

c)用任一编程工具,如:LATTICE公司的编程工具ispVM,将4个串行向量格式的单个编程文件生成一个包含器件1-4串行向量格式的成链编程文件,或者对各个单个编程文件手工编辑生成一个包含器件1-4串行向量格式的成链编程文件:c) Use any programming tool, such as: LATTICE's programming tool ispVM, to generate 4 single programming files in serial vector format into a chained programming file containing device 1-4 serial vector format, or program each individual Manual editing of the file generates a chained programming file containing devices 1-4 in serial vector format:

利用编程工具的链编辑功能,按照逻辑器件的位置先后,将4个单个串行向量格式的单个编程文件生成一个串行向量格式的成链编程文件,或者按照JTAG链上各个逻辑器件的位置次序,对各个单个串行向量格式编程文件手工编辑合并生成一个串行向量格式的成链编程文件。Use the chain editing function of the programming tool to generate a chained programming file in serial vector format from four single programming files in serial vector format according to the position of the logic devices, or according to the position order of each logic device on the JTAG chain , manually editing and merging individual serial vector format programming files to generate a chained programming file in serial vector format.

因此,利用任一编程工具或者手工编辑可以生成一个串行向量格式的成链编程文件,该成链编程文件中包含JTAG链上各个逻辑器件的位置,编程内容和JTAG指令寄存器长度。在生成一个串行向量格式的成链编程文件之后,对所述成链编程文件进行解析,获得各个逻辑器件的编程内容,然后对JTAG链上任一逻辑器件进行在线编程。Therefore, any programming tool or manual editing can be used to generate a chained programming file in serial vector format, which includes the position of each logic device on the JTAG chain, programming content and the length of the JTAG instruction register. After generating a chained programming file in serial vector format, the chained programming file is analyzed to obtain the programming content of each logic device, and then online programming is performed on any logic device on the JTAG chain.

串行向量格式定义了一套语法,用以描述JTAG指令和数据的扫描顺序和过程,以及指令和数据的内容,是JTAG通道链路动作的描述性语言。与.jbc或者.vme格式的成链编程文件不同(如表一所例举的.jbc格式的成链编程文件是难于识读的二进制代码,不易识读),串行向量格式的文件类似于C语言文件一样可读性比较高,这种格式的成链编程文件的内容是可读的,甚至可以根据需要进行编辑,从中可以直接解析出各个逻辑器件的编程指令、数据内容及位置信息等,获得各个逻辑器件信息后再对各个逻辑器件加载相应的编程内容。The serial vector format defines a set of syntax to describe the scanning sequence and process of JTAG instructions and data, as well as the content of instructions and data, and is a descriptive language for JTAG channel link actions. Different from the chained programming files in .jbc or .vme format (as listed in Table 1, the chained programming files in .jbc format are binary codes that are difficult to read), and the files in serial vector format are similar to The readability of the C language file is relatively high. The content of the chained programming file in this format is readable, and can even be edited as needed, from which the programming instructions, data content and location information of each logic device can be directly analyzed. After obtaining the information of each logic device, load the corresponding programming content to each logic device.

第一种和第二种在线编程方式需要生成几个单个编程文件或成链编程文件;并分别调用对应的移植代码,对JTAG链上的各个逻辑器件进行在线编程,这两种编程方式和编程过程比较简单,但受到各厂家移植代码的限制;第三种在线编程方式也需要生成几个不同格式的成链编程文件,但后续编程时不调用厂家移植代码,对生成的不同格式的成链编程文件进行解析,解除了厂家对移植代码的私有保护;第四种在线编程方式同样实现了对一条JTAG链上逻辑器件的在线编程,生成一个串行向量格式的成链编程文件,并对所述串行向量格式的成链编程文件解析,用一个成链编程文件即可完成对所有逻辑器件的加载和编程。The first and second online programming methods need to generate several single programming files or chained programming files; and call the corresponding transplanted codes to perform online programming on each logic device on the JTAG chain. These two programming methods and programming The process is relatively simple, but it is limited by the codes transplanted by various manufacturers; the third online programming method also needs to generate several chained programming files in different formats, but the subsequent programming does not call the factory’s transplanted codes, and the generated chained programming files in different formats The programming file is analyzed, and the manufacturer’s private protection of the transplanted code is released; the fourth online programming method also realizes online programming of logic devices on a JTAG chain, generates a chained programming file in serial vector format, and The analysis of the chained programming file in the serial vector format can complete the loading and programming of all logic devices with one chained programming file.

第三种和第四种在线编程方式中,对成链编程文件解析获取各个逻辑器件的编程内容、指令长度和位置信息后,即可对JTAG链上各个逻辑器件进行在线编程,参见图8,对JTAG链上各个逻辑器件进行在线编程包括:In the third and fourth online programming methods, after analyzing the chained programming file to obtain the programming content, instruction length and location information of each logic device, the online programming of each logic device on the JTAG chain can be performed, as shown in Figure 8. In-circuit programming of each logic device on the JTAG chain includes:

步骤31:根据各个逻辑器件位置信息、JTAG指令寄存器长度对指令进行处理,将需要编程的逻辑器件选定编程状态;Step 31: Process the instruction according to the location information of each logic device and the length of the JTAG instruction register, and select the programming state of the logic device to be programmed;

步骤32:将数据内容加入需要编程的逻辑器件。Step 32: Add data content to the logic device to be programmed.

步骤31中根据各个逻辑器件位置信息、JTAG指令寄存器长度对需要编程的逻辑器件送出编程指令,不需要编程的逻辑器件送出旁路指令,将对各个逻辑器件的指令按照位置依次发送,则只对需要编程的逻辑器件选定编程状态。In step 31, according to the position information of each logic device and the length of the JTAG instruction register, the programming instructions are sent to the logic devices that need to be programmed, and the bypass instructions are sent to the logic devices that do not need to be programmed, and the instructions to each logic device are sent in sequence according to the position. The logic device to be programmed selects the programming state.

图9为图8实施例解析示意图。如图9所示,三个器件成一条JTAG链,从测试数据输入(Test Data Input,简称TDI)口输入数据,从测试数据输出(Test Data Out put,简称TDO)口输出数据。对器件2进行编程,假设对成链编程文件解析后获知器件1的JTAG指令寄存器长度为6;器件3的JTAG指令寄存器长度为8;器件2的JTAG指令寄存器长度是10,在线编程(ISC_PROGRAM)的二进制指令是“0000010010”。在对器件2编程时,需要把在线编程(ISC_PROGRAM)指令送给器件2的指令寄存器,器件1和3都需要旁路(根据IEEE1149.1标准,旁路指令全为“1”),因此在扫描指令周期,从TDI送入的二进制指令应该是“111111000001001011111111”,共24位。器件1接收到的指令就是“111111”,器件2接收到的指令就是“0000010010”,器件3接收到的指令就是“11111111”。器件1和3执行旁路操作,器件2开始执行在线编程操作,编程数据内容从TDI送给器件2,器件1和3处于旁路状态。Fig. 9 is a schematic analysis diagram of the embodiment in Fig. 8 . As shown in Figure 9, three devices form a JTAG chain, input data from the test data input (Test Data Input, referred to as TDI) port, and output data from the test data output (Test Data Output, referred to as TDO) port. Program device 2, assuming that the length of the JTAG instruction register of device 1 is 6 after parsing the chained programming file; the length of the JTAG instruction register of device 3 is 8; the length of the JTAG instruction register of device 2 is 10. The binary instruction is "0000010010". When programming device 2, the in-circuit programming (ISC_PROGRAM) instruction needs to be sent to the instruction register of device 2, and both devices 1 and 3 need to be bypassed (according to the IEEE1149.1 standard, the bypass instructions are all "1"), so in Scan instruction cycle, the binary instruction sent from TDI should be "111111000001001011111111", a total of 24 bits. The command received by device 1 is "111111", the command received by device 2 is "0000010010", and the command received by device 3 is "11111111". Devices 1 and 3 perform bypass operations, device 2 starts to perform in-circuit programming operations, programming data content is sent from TDI to device 2, and devices 1 and 3 are in a bypass state.

同理,将编程内容加入需要编程的逻辑器件过程为:对不需要编程的逻辑器件送出旁路数据(根据IEEE 1149.1和IEEE 1532标准,旁路数据送一位“0”即可)。对需要编程的逻辑器件,此逻辑器件的数据内容通过JTAG接口的TDI口串行地移入器件,获得编程内容。如器件2的编程数据为97位“****....**”,共97位数据,则对器件2写入编程内容时,需要把编程内容送给器件2的数据寄存器,器件1和3都需要旁路(只需要送出一位“0”即可),因此从TDI送入的二进制数据应该是“0****....**0”,共99位,器件1和器件3是旁路数据,只有器件2收到97位的编程数据。具体操作参照IEEE1149.1和IEEE 1532标准,在IEEE1149.1标准规范中,规定了串行移位和旁路的操作,在此不再详述。In the same way, the process of adding programming content to logic devices that need to be programmed is as follows: send bypass data to logic devices that do not need programming (according to IEEE 1149.1 and IEEE 1532 standards, just send a bit "0" for bypass data). For the logic device that needs to be programmed, the data content of the logic device is serially transferred into the device through the TDI port of the JTAG interface to obtain the programming content. For example, the programming data of device 2 is 97-bit "****....**", a total of 97-bit data, when writing programming content to device 2, the programming content needs to be sent to the data register of device 2, and the device Both 1 and 3 need to be bypassed (only one "0" needs to be sent), so the binary data sent from TDI should be "0****....**0", a total of 99 bits, the device 1 and device 3 are data bypassed, only device 2 receives 97 bits of programming data. The specific operation refers to the IEEE1149.1 and IEEE 1532 standards. In the IEEE1149.1 standard specification, the serial shift and bypass operations are specified, and will not be described in detail here.

图10为本发明对JTAG链上一逻辑器件进行在线编程的实施例二流程图。在生成包含JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度、各个逻辑器件编程内容的一个串行向量格式的成链编程文件或生成包含JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度和相同厂家逻辑器件编程内容的几个不同格式的成链编程文件后,通过对成链编程文件的解析,获得JTAG链上各个逻辑器件的位置、编程数据、指令长度后,在对JTAG链上某一逻辑器件进行编程时,包括:FIG. 10 is a flow chart of Embodiment 2 of in-circuit programming of a logic device on the JTAG chain according to the present invention. When generating a chained programming file in a serial vector format containing the position information of each logic device on the JTAG chain, the length of the JTAG instruction register, and the programming content of each logic device, or generating the position information of each logic device on the JTAG chain, the length of the JTAG instruction register and After several chained programming files of different formats for the same manufacturer’s logic device programming content, the position, programming data, and instruction length of each logic device on the JTAG chain are obtained by analyzing the chained programming file. When a logic device is programmed, it includes:

步骤310:调用JTAG控制函数,使整个JTAG链处于编程状态;Step 310: call the JTAG control function, so that the entire JTAG chain is in the programming state;

步骤311:对编程指令进行处理,非编程器件用旁路指令替代;Step 311: Process the programming instruction, and replace the non-programming device with a bypass instruction;

步骤312:输出附加后的指令,选定需要编程的逻辑器件;Step 312: Outputting additional instructions to select logic devices to be programmed;

步骤32:输出编程数据,进行编程;Step 32: output programming data, and perform programming;

步骤4:对逻辑器件串行移位读出的编程数据进行校验,判断是否正确,是则结束,否则判断是否超过预设的次数,本实施例设定为3次,如果不超过3次则执行步骤310,重新编程,否则结束,表示编程失败。Step 4: Verify the programming data read by the serial shift of the logic device, and judge whether it is correct, and then end, otherwise judge whether it exceeds the preset number of times, which is set to 3 times in this embodiment, if not more than 3 times Then execute step 310 to reprogram, otherwise end, indicating programming failure.

在对某一逻辑器件进行在线编程后,对逻辑器件串行移位读出的编程数据进行校验,判断编程的数据内容是否与要加载的数据内容一致,保证对逻辑器件在线加载的准确性。After online programming of a certain logic device, check the programming data read out by the serial shift of the logic device, and judge whether the programmed data content is consistent with the data content to be loaded, so as to ensure the accuracy of online loading of the logic device .

图11为本发明逻辑器件在线编程的装置实施例一示意图。如图10所示,本实施例包括:FIG. 11 is a schematic diagram of Embodiment 1 of an apparatus for in-circuit programming of a logic device according to the present invention. As shown in Figure 10, this embodiment includes:

获取模块1,与编程模块2连接,用于获取包含JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度和相同厂家逻辑器件编程内容的不同格式的成链编程文件或包含JTAG链上所有逻辑器件位置信息、JTAG指令寄存器长度、逻辑器件编程内容的串行向量格式的成链编程文件;Obtaining module 1, connected with programming module 2, used to obtain chained programming files in different formats including the location information of each logic device on the JTAG chain, the length of the JTAG instruction register, and the programming content of the same manufacturer's logic devices or including all logic devices on the JTAG chain Linked programming files in serial vector format for location information, JTAG instruction register length, and logic device programming content;

编程模块2,与获取模块1连接,用于解析成链编程文件,获得各个逻辑器件的编程内容并对JTAG链上任一逻辑器件进行在线编程。The programming module 2 is connected with the obtaining module 1, and is used for parsing the chain programming file, obtaining the programming content of each logic device and performing online programming for any logic device on the JTAG chain.

图11实施例为实现本发明中逻辑器件在线编程方法的装置,可以实现在一条JTAG链上,用一个成链编程文件对JTAG链上不同厂家的逻辑器件进行在线编程,增强了逻辑器件编程的灵活性,占有较少的物理资源,减少文档管理的成本和编程复杂度。The embodiment of Fig. 11 is the device for realizing the online programming method of logic devices in the present invention, which can be implemented on a JTAG chain, and use a chained programming file to carry out online programming of logic devices of different manufacturers on the JTAG chain, which enhances the logic device programming. Flexibility, occupies less physical resources, reduces document management cost and programming complexity.

图12为本发明编程模块内部结构实施例示意图。如图12所示,本实施例中,编程模块包括:Fig. 12 is a schematic diagram of an embodiment of the internal structure of the programming module of the present invention. As shown in Figure 12, in this embodiment, the programming module includes:

接口模块21,与解析模块22连接,读入成链编程文件,控制逻辑器件的JTAG接口,完成编程操作;所述接口模块21与可编程器件的JTAG接口连接,以输出并控制编程数据内容;The interface module 21 is connected with the parsing module 22, reads in the chain programming file, controls the JTAG interface of the logic device, and completes the programming operation; the interface module 21 is connected with the JTAG interface of the programmable device to output and control the programming data content;

解析模块22,与接口模块21连接,根据获取的成链编程文件解析各个逻辑器件的编程内容;并对某一逻辑器件进行在线编程时将解析结果传入接口模块21;解析模块22进一步包括:Analysis module 22 is connected with interface module 21, and analyzes the programming content of each logic device according to the obtained chain programming file; and when a certain logic device is programmed online, the analysis result is imported into interface module 21; analysis module 22 further includes:

校验子模块221,与格式解析子模块222连接,对成链编程文件进行校验,通过时将成链编程文件传入格式解析子模块222;Checking sub-module 221, connected with format analysis sub-module 222, checks the chained programming file, and passes the chained programming file into the format analysis sub-module 222;

格式解析子模块222,与校验子模块221及存储子模块223连接,根据成链编程文件的格式,对成链编程文件进行解析,获取JTAG链上各个逻辑器件的位置信息、JTAG指令寄存器长度信息及各个逻辑器件编程的数据内容;The format parsing submodule 222 is connected with the verification submodule 221 and the storage submodule 223, and analyzes the chain programming file according to the format of the chain programming file to obtain the position information of each logic device on the JTAG chain and the length of the JTAG instruction register Information and data content of each logic device programming;

存储子模块223,与格式解析子模块222连接,保存解析的各个逻辑器件编程的数据内容。The storage sub-module 223 is connected with the format analysis sub-module 222 and stores the analyzed data content programmed by each logic device.

本实施例中校验子模块可以对成链编程文件进行校验,增加了准确性;格式解析模块可以根据成链编程文件不同的格式执行对应的解析,具体操作可参见本发明方法实施例的说明。In this embodiment, the verification sub-module can verify the chained programming file, which increases the accuracy; the format analysis module can perform corresponding analysis according to different formats of the chained programming file, and the specific operation can refer to the method embodiment of the present invention. illustrate.

图12实施例中,所述编程模块还可以包括:调用模块23,与接口模块21连接,用于根据接口模块获取的包含JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度和相同厂家逻辑器件编程内容的不同格式的成链编程文件调用对应的移植代码,将编程内容传入接口模块21。In Fig. 12 embodiment, described programming module can also comprise: call module 23, be connected with interface module 21, be used to comprise each logic device location information on the JTAG chain, JTAG instruction register length and the logic device of the same manufacturer according to interface module acquisition The chained programming files in different formats of the programming content call the corresponding transplant code, and transfer the programming content to the interface module 21 .

在生成满足只包含相同厂家逻辑器件编程内容的成链编程文件后,可以调用厂家的移植代码对链上逻辑器件进行在线编程,或者对不同格式的成链编程文件进行解析,然后对链上逻辑器件进行在线编程,所以编程模块可以包括解析模块或调用模块,也可以两者均包括,实现灵活的编程方式。After generating a chained programming file that only contains the programming content of the same manufacturer's logic device, you can call the manufacturer's ported code to program the chained logic device online, or analyze the chained programming file in different formats, and then perform on-chain logic The device is programmed online, so the programming module can include the analysis module or the calling module, or both, so as to realize a flexible programming method.

图13为本发明逻辑器件在线编程的装置实施例二示意图。图13中解析模块内部结构与图12类似,不同之处在于,解析模块中还包括:数据处理子模块224,与存储子模块223连接,根据各个逻辑器件位置信息、JTAG指令寄存器长度对编程指令或数据进行处理,将处理后的指令或数据发送给接口模块21。其它与图12中相同具体功能模块不再详述。FIG. 13 is a schematic diagram of Embodiment 2 of an apparatus for in-circuit programming of logic devices according to the present invention. The internal structure of the analysis module in Fig. 13 is similar to that of Fig. 12, and the difference is that the analysis module also includes: a data processing sub-module 224, connected with the storage sub-module 223, and programming instructions according to each logic device position information, JTAG instruction register length or data, and send the processed instruction or data to the interface module 21. Other specific functional modules that are the same as those in Fig. 12 will not be described in detail.

本发明实施例对于不同厂家的逻辑器件形成一条JTAG链,不需要移植不同厂家提供的编程代码,即可对JTAG链上的逻辑器件进行在线编程,增强了逻辑器件编程的灵活性;可以生成一个包含所有逻辑器件信息的串行向量格式的成链编程文件,利用一个成链编程文件对逻辑器件进行编程,减少了文档管理的成本、占有较少的物理资源,并且大大简化了不同厂家多个逻辑器件成链时对逻辑器件进行在线编程的复杂程度,特别适用于嵌入式编程,进行远程升级和维护。The embodiments of the present invention form a JTAG chain for logic devices of different manufacturers, without transplanting the programming codes provided by different manufacturers, the logic devices on the JTAG chain can be programmed online, which enhances the flexibility of logic device programming; can generate a A chained programming file in serial vector format that contains all logic device information, uses a chained programming file to program logic devices, reduces the cost of document management, occupies less physical resources, and greatly simplifies multiple The complexity of online programming of logic devices when logic devices are chained is especially suitable for embedded programming, remote upgrades and maintenance.

最后应说明的是:以上实施例仅用以说明本发明的技术方案而非限制,尽管参照较佳实施例对本发明进行了详细说明,本领域的普通技术人员应当理解,可以对本发明的技术方案进行修改或者等同替换,而不脱离本发明技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention without limitation, although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be Modifications or equivalent replacements can be made without departing from the spirit and scope of the technical solutions of the present invention.

Claims (16)

1.一种逻辑器件在线编程的方法,其特征在于,包括:1. a method for logic device online programming, is characterized in that, comprises: 将不同厂家或不同和相同厂家的各个逻辑器件形成一条JTAG链;Form a JTAG chain of logic devices from different manufacturers or different and same manufacturers; 生成包括所述JTAG链各个逻辑器件的位置信息、JTAG指令寄存器长度信息及各个逻辑器件编程内容的一个串行向量格式的成链编程文件或生成包括所述JTAG链各个逻辑器件的位置信息、JTAG指令寄存器长度信息及JTAG链上相同厂家逻辑器件编程内容的几种不同格式的成链编程文件或分别生成包含所述JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度信息和JTAG链上单个逻辑器件编程内容的单个编程文件;对所述JTAG链上的任一逻辑器件进行在线编程。Generate a chained programming file in a serial vector format that includes the position information of each logic device of the JTAG chain, the JTAG instruction register length information, and the programming content of each logic device or generate the position information that includes each logic device of the JTAG chain, JTAG Instruction register length information and several different formats of chained programming files of the same manufacturer’s logic device programming content on the JTAG chain or respectively generate the position information of each logic device on the JTAG chain, the JTAG instruction register length information and the single logic on the JTAG chain. A single programming file for device programming content; in-circuit programming of any logic device on the JTAG chain. 2.根据权利要求1所述的逻辑器件在线编程的方法,其特征在于,所述对所述JTAG链上的任一逻辑器件进行在线编程包括:2. the method for logic device in-circuit programming according to claim 1, is characterized in that, described in-line programming comprises to any logic device on the described JTAG chain: 对所述一个串行向量格式的成链编程文件进行解析,获取JTAG链上各个逻辑器件的位置信息、JTAG指令寄存器长度信息及各个逻辑器件编程内容;Analyzing the chained programming file in the serial vector format to obtain the position information of each logic device on the JTAG chain, the length information of the JTAG instruction register and the programming content of each logic device; 对JTAG链上各个逻辑器件进行在线编程。In-circuit programming of each logic device on the JTAG chain. 3.根据权利要求1所述的逻辑器件在线编程的方法,其特征在于,所述对所述JTAG链上的任一逻辑器件进行在线编程包括:3. the method for logic device in-circuit programming according to claim 1, is characterized in that, described in-line programming comprises to any logic device on the described JTAG chain: 对所述几种不同格式的成链编程文件进行解析,获取JTAG链上各个逻辑器件的位置信息、JTAG指令寄存器长度信息及各个逻辑器件编程内容,对JTAG链上各个逻辑器件进行在线编程。Analyze the chained programming files in several different formats, obtain the position information of each logic device on the JTAG chain, the length information of the JTAG instruction register and the programming content of each logic device, and perform online programming on each logic device on the JTAG chain. 4.根据权利要求1所述的逻辑器件在线编程的方法,其特征在于,所述对所述JTAG链上的任一逻辑器件进行在线编程包括:4. the method for logic device in-circuit programming according to claim 1, is characterized in that, described in-line programming comprises to any logic device on the described JTAG chain: 对所述几种不同格式的成链编程文件分别调用其对应的移植代码,对JTAG链上各个逻辑器件进行在线编程。Call the corresponding porting codes for the chained programming files in several different formats, and perform online programming for each logic device on the JTAG chain. 5.根据权利要求1所述的逻辑器件在线编程的方法,其特征在于,所述对所述JTAG链上的任一逻辑器件进行在线编程包括:5. the method for logic device in-circuit programming according to claim 1, is characterized in that, described in-line programming comprises to any logic device on the described JTAG chain: 调用各单个编程文件对应的移植代码,对JTAG链上各个逻辑器件进行在线编程。Call the transplant code corresponding to each individual programming file, and perform online programming on each logic device on the JTAG chain. 6.根据权利要求2所述的逻辑器件在线编程的方法,其特征在于,所述生成包括所述JTAG链各个逻辑器件位置信息、JTAG指令寄存器长度信息及各个逻辑器件编程内容的一个串行向量格式的成链编程文件包括:6. the method for logic device in-circuit programming according to claim 2, is characterized in that, described generation comprises each logic device location information of described JTAG chain, JTAG instruction register length information and each logic device programming content a serial vector Formatted chained programming files include: 分别生成包含JTAG链上单个逻辑器件编程内容和JTAG指令寄存器长度信息的单个串行向量格式的编程文件;Generate a programming file in a single serial vector format containing the programming content of a single logic device on the JTAG chain and the length information of the JTAG instruction register; 根据各单个串行向量格式的编程文件及JTAG链上各个逻辑器件的位置,用任一编程工具生成或者对各单个串行向量格式的编程文件手工编辑生成一个串行向量格式的成链编程文件。According to each programming file in serial vector format and the position of each logic device on the JTAG chain, use any programming tool to generate or manually edit each programming file in serial vector format to generate a chained programming file in serial vector format . 7.根据权利要求3所述的逻辑器件在线编程的方法,其特征在于,所述对所述几种不同格式的成链编程文件进行解析,获取JTAG链上各个逻辑器件的位置信息、JTAG指令寄存器长度信息及各个逻辑器件编程内容包括:7. the method for logic device on-line programming according to claim 3 is characterized in that, described described several different formats chain programming files are analyzed, obtain the positional information of each logic device on the JTAG chain, JTAG instruction Register length information and programming content of each logic device include: 根据所述几种不同格式的成链编程文件的格式,执行对应格式的循环冗余校验;According to the format of the chained programming files in several different formats, perform the cyclic redundancy check of the corresponding format; 判断所述的循环冗余校验是否正确,当校验正确时,执行所述几种不同格式的成链编程文件对应格式的解析,获得JTAG链上各个逻辑器件的位置信息、JTAG指令寄存器长度信息及各个逻辑器件的编程内容。Judging whether the cyclic redundancy check is correct, when the check is correct, execute the parsing of the corresponding formats of the chained programming files in several different formats to obtain the position information of each logic device on the JTAG chain, the length of the JTAG instruction register Information and programming content of each logic device. 8.根据权利要求2、3或6所述的逻辑器件在线编程的方法,其特征在于,所述对JTAG链上各个逻辑器件进行在线编程包括:8. according to the method for the logic device online programming described in claim 2,3 or 6, it is characterized in that, described each logic device on the JTAG chain is carried out online programming comprises: 根据各个逻辑器件在JTAG链上的位置信息、JTAG指令寄存器长度信息对指令进行处理,将需要编程的逻辑器件选定编程状态,将编程内容加入需要编程的逻辑器件。According to the position information of each logic device on the JTAG chain and the length information of the JTAG instruction register, the instructions are processed, the programming state of the logic device to be programmed is selected, and the programming content is added to the logic device to be programmed. 9.根据权利要求8所述的逻辑器件在线编程的方法,其特征在于,所述根据各个逻辑器件在JTAG链上的位置信息、JTAG指令寄存器长度信息对指令进行处理,将需要编程的逻辑器件选定编程状态为:9. the method for logic device in-circuit programming according to claim 8, is characterized in that, described according to the position information of each logic device on the JTAG chain, JTAG instruction register length information instructions are processed, will need the logic device of programming The selected programming states are: 根据各个逻辑器件在JTAG链上的位置信息、JTAG指令寄存器长度信息对需要编程的逻辑器件送出编程指令,不需要编程的逻辑器件送出旁路指令,将对各个逻辑器件的指令按照位置依次发送。According to the position information of each logic device on the JTAG chain and the length information of the JTAG instruction register, programming instructions are sent to logic devices that need to be programmed, and bypass instructions are sent to logic devices that do not need programming, and the instructions to each logic device are sent sequentially according to their positions. 10.根据权利要求9所述的逻辑器件在线编程的方法,其特征在于,所述将编程内容加入需要编程的逻辑器件为:10. the method for logic device online programming according to claim 9, is characterized in that, described programming content is added to the logic device that needs programming to be: 对不需要编程的逻辑器件送出旁路数据,对需要编程的逻辑器件送出编程数据,将对各个逻辑器件的数据内容按照位置依次发送。Send bypass data to logic devices that do not need programming, send programming data to logic devices that need programming, and send the data content of each logic device in sequence according to the position. 11.根据权利要求2、3、6、9或10所述的逻辑器件在线编程的方法,其特征在于,所述对JTAG链上任一逻辑器件进行在线编程之后还包括:11. according to the method for the logic device online programming described in claim 2,3,6,9 or 10, it is characterized in that, after described any logic device on the JTAG chain is carried out online programming, also comprise: 对在线编程的逻辑器件的编程内容进行校验,判断校验是否正确,当校验不通过且小于预设的次数时,重新对逻辑器件进行在线编程。Verify the programming content of the logic device for online programming, and judge whether the verification is correct. When the verification fails and is less than the preset number of times, perform online programming for the logic device again. 12.一种逻辑器件在线编程的装置,其特征在于,包括:12. A device for online programming of logic devices, characterized in that, comprising: 获取模块,与编程模块连接,用于获取包含JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度信息和相同厂家逻辑器件编程内容的几种不同格式的成链编程文件或包含JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度信息和各个逻辑器件编程内容的串行向量格式的成链编程文件;The acquisition module is connected with the programming module, and is used to obtain chained programming files in several different formats including the location information of each logic device on the JTAG chain, the length information of the JTAG instruction register, and the programming content of the logic device of the same manufacturer, or include each logic on the JTAG chain Device position information, JTAG instruction register length information and serial vector format chained programming files of each logic device programming content; 编程模块,与获取模块连接,用于解析成链编程文件,对JTAG链上任一逻辑器件进行在线编程。The programming module is connected with the acquisition module, and is used for parsing into a chain programming file, and performing online programming for any logic device on the JTAG chain. 13.根据权利要求12所述的逻辑器件在线编程的装置,其特征在于,所述编程模块包括:13. the device of logic device online programming according to claim 12, is characterized in that, described programming module comprises: 接口模块,与解析模块连接,读入成链编程文件,控制逻辑器件的JTAG接口,执行编程操作;The interface module is connected with the analysis module, reads into the chain programming file, controls the JTAG interface of the logic device, and executes the programming operation; 解析模块,与接口模块连接,根据获取的成链编程文件解析逻辑器件的位置信息、JTAG指令寄存器长度信息及各个逻辑器件编程内容;并对某一逻辑器件进行在线编程时将解析结果传入接口模块。The analysis module is connected with the interface module, and analyzes the position information of the logic device, the length information of the JTAG instruction register and the programming content of each logic device according to the obtained chained programming file; and transmits the analysis result to the interface when performing online programming of a certain logic device module. 14.根据权利要求13所述的逻辑器件在线编程的装置,其特征在于,所述编程模块进一步包括:14. the device of logic device online programming according to claim 13, is characterized in that, described programming module further comprises: 调用模块,与接口模块连接,用于根据接口模块获取的包含JTAG链上各个逻辑器件位置信息、JTAG指令寄存器长度信息和相同厂家逻辑器件编程内容的不同格式的成链编程文件调用对应的移植代码,将编程内容传入接口模块。The calling module is connected with the interface module, and is used to call the corresponding porting code according to the chain programming files in different formats including the position information of each logic device on the JTAG chain, the length information of the JTAG instruction register, and the programming content of the logic device of the same manufacturer obtained by the interface module , transfer the programming content to the interface module. 15.根据权利要求13或14所述的逻辑器件在线编程的装置,其特征在于,所述解析模块包括:15. according to the device of claim 13 or 14 described logic device online programming, it is characterized in that, described parsing module comprises: 校验子模块,与格式解析子模块连接,对成链编程文件进行校验,校验通过时将成链编程文件发送给格式解析子模块;The verification sub-module is connected with the format analysis sub-module to verify the chained programming file, and when the verification is passed, the chained programming file is sent to the format analysis sub-module; 格式解析子模块,与校验子模块及存储子模块连接,根据成链编程文件的格式,对成链编程文件进行解析,获取JTAG链上各个逻辑器件的位置信息、JTAG指令寄存器长度信息及各个逻辑器件的编程内容;The format parsing sub-module is connected with the verification sub-module and the storage sub-module. According to the format of the chain programming file, the chain programming file is analyzed to obtain the position information of each logic device on the JTAG chain, the length information of the JTAG instruction register and each programming content of logic devices; 存储子模块,与格式解析子模块连接,保存解析的各个逻辑器件的编程内容。The storage sub-module is connected with the format parsing sub-module, and stores the parsed programming content of each logic device. 16.根据权利要求15所述的逻辑器件在线编程的装置,其特征在于,所述解析模块进一步包括:16. the device of logic device online programming according to claim 15, is characterized in that, described parsing module further comprises: 数据处理子模块,与存储子模块连接,根据各个逻辑器件位置信息、JTAG指令寄存器长度信息对编程指令或数据进行处理,将处理后的指令或数据发送给接口模块。The data processing sub-module is connected with the storage sub-module, processes the programming instructions or data according to the location information of each logic device and the length information of the JTAG instruction register, and sends the processed instructions or data to the interface module.
CNB2007100864916A 2007-03-13 2007-03-13 Method and device for on-line programming logic device Expired - Fee Related CN100468335C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007100864916A CN100468335C (en) 2007-03-13 2007-03-13 Method and device for on-line programming logic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007100864916A CN100468335C (en) 2007-03-13 2007-03-13 Method and device for on-line programming logic device

Publications (2)

Publication Number Publication Date
CN101030147A CN101030147A (en) 2007-09-05
CN100468335C true CN100468335C (en) 2009-03-11

Family

ID=38715519

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007100864916A Expired - Fee Related CN100468335C (en) 2007-03-13 2007-03-13 Method and device for on-line programming logic device

Country Status (1)

Country Link
CN (1) CN100468335C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508777A (en) * 2011-11-04 2012-06-20 杭州中天微系统有限公司 In-circuit emulator device supporting multiple lower layer interfaces

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101894029A (en) * 2010-06-21 2010-11-24 中兴通讯股份有限公司 Method and device for upgrading complex programmable logic device on line
CN103680608A (en) * 2012-09-18 2014-03-26 英业达科技有限公司 System and method for improving chip burning speed of boundary scan technology
CN112540766B (en) * 2020-12-24 2024-10-18 山东高云半导体科技有限公司 Method, device and system for encoding field programmable gate array

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
CPLD器件的在系统动态配置. 陈德军,李小兵.单片机与嵌入式系统应用. 2005
CPLD器件的在系统动态配置. 陈德军,李小兵.单片机与嵌入式系统应用. 2005 *
边界扫描板级链路测试性设计方法研究. 刘明云,李桂祥,张贤志,杨江平.半导体技术,第29卷第11期. 2004
边界扫描板级链路测试性设计方法研究. 刘明云,李桂祥,张贤志,杨江平.半导体技术,第29卷第11期. 2004 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508777A (en) * 2011-11-04 2012-06-20 杭州中天微系统有限公司 In-circuit emulator device supporting multiple lower layer interfaces

Also Published As

Publication number Publication date
CN101030147A (en) 2007-09-05

Similar Documents

Publication Publication Date Title
US8103992B1 (en) Rapid rerouting based runtime reconfigurable signal probing
CN108595342A (en) Unit test method and device
CN100468335C (en) Method and device for on-line programming logic device
CN110658438B (en) Scanning test system, control device and control method thereof
CN102306122A (en) Automated testing method and equipment
CN1549119A (en) Logic emulation testing system and method
CN102981882B (en) Analytic method and device
CN114661615B (en) FPGA software testing method and device
CN100549978C (en) A kind of data-driven unit test method
CN106560797A (en) Debugger-based unit testing system and method
CN114968202A (en) Register conversion circuit code integration method, system, device and medium
CN114239459A (en) Processing method, device, equipment and medium for FPGA prototype design file
CN105518475A (en) Flexible interface
CN109753277A (en) The automatically generating device and method of CAN bus code
CN111104276A (en) Chip testing system and method
CN113051158B (en) A system-level and link-level multi-index synchronous automatic testing method and system
CN111142861A (en) Method and device for integrating structured comprehensive control system
CN115268862A (en) Method for realizing SVF file for verifying chip debugging function based on python
CN114417779A (en) Chip connection method and device, computer equipment and computer readable storage medium
CN112714015B (en) Communication data fault injection method and system, communication device and storage medium
CN101290640B (en) Integrated circuit design verification method and device
CN100362817C (en) Software module testing method
CN102736976B (en) Debugging system and debugging method thereof
CN114675624B (en) A FPGA circuit fault injection method and IP core
CN116738912B (en) EDA software reconfigurable function automation method and electronic equipment

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
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Patentee after: NEW H3C TECHNOLOGIES Co.,Ltd.

Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base

Patentee before: HANGZHOU H3C TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230529

Address after: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: H3C INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 310052 Changhe Road, Binjiang District, Hangzhou, Zhejiang Province, No. 466

Patentee before: NEW H3C TECHNOLOGIES Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090311