WO2018209673A1 - Field programmable gate circuit and online testing method therefor - Google Patents

Field programmable gate circuit and online testing method therefor Download PDF

Info

Publication number
WO2018209673A1
WO2018209673A1 PCT/CN2017/085020 CN2017085020W WO2018209673A1 WO 2018209673 A1 WO2018209673 A1 WO 2018209673A1 CN 2017085020 W CN2017085020 W CN 2017085020W WO 2018209673 A1 WO2018209673 A1 WO 2018209673A1
Authority
WO
WIPO (PCT)
Prior art keywords
sampling
trigger
memory
data
signal source
Prior art date
Application number
PCT/CN2017/085020
Other languages
French (fr)
Chinese (zh)
Inventor
李晓亮
Original Assignee
深圳配天智能技术研究院有限公司
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 深圳配天智能技术研究院有限公司 filed Critical 深圳配天智能技术研究院有限公司
Priority to CN201780036353.9A priority Critical patent/CN109416385B/en
Priority to PCT/CN2017/085020 priority patent/WO2018209673A1/en
Publication of WO2018209673A1 publication Critical patent/WO2018209673A1/en

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/28Testing of electronic circuits, e.g. by signal tracer

Definitions

  • the invention relates to the technical field of circuit testing, in particular to a field programmable gate circuit and an online testing method thereof.
  • FPGA Field-Programmable Gate Array, Field Programmable Gate Array
  • MCU Microcontroller
  • Micro Control Unit Micro Control Unit
  • the mainstream mode of debugging and simulation of field programmable gate circuits is analyzed by using an embedded logic analyzer and an external logic analyzer.
  • the object of the present invention is to provide a field programmable gate circuit and an online test method thereof for the complicated debugging mode of the field programmable gate circuit in the prior art, the development efficiency is low, and the accuracy of the problem location is not high.
  • the technical solution adopted by the present invention to solve the above technical problem is to provide an on-line test method for a field programmable gate circuit, comprising: receiving configuration information of a host computer through a hardware interface on the field programmable gate circuit; Determining configuration information from the field programmable gate circuit to select a corresponding signal source and configuring sampling parameters; sampling the signal source according to the sampling parameter to obtain sampling data; writing the sampling data to a field programmable gate a memory internal to the circuit; and transmitting the sampled data in the memory to the host computer through the hardware interface to analyze the sampled data.
  • a field programmable gate circuit comprising: a hardware interface, a configuration circuit, a sampling circuit and a memory, wherein the hardware interface is connected to a host computer, and the hardware interface And the sampling circuit is further connected to the sampling circuit, the sampling circuit is further connected to the memory, the memory is further connected to the hardware interface; the hardware interface receives configuration information of the upper computer; the configuration circuit Selecting a corresponding signal source from the field programmable gate circuit according to the configuration information and configuring a sampling parameter; the sampling circuit samples the signal source according to the sampling parameter to obtain sampling data, and samples the sampling Data is written into the memory, and the sample data in the memory is sent to the host computer through the hardware interface to analyze the sampled data.
  • the invention has the beneficial effects that the hardware interface receives the configuration information of the upper computer, and then samples the signal source in the circuit according to the configuration information, completes the problem location, makes the problem location simple and accurate, and the memory sends the sample data through the hardware interface.
  • the hardware interface receives the configuration information of the upper computer, and then samples the signal source in the circuit according to the configuration information, completes the problem location, makes the problem location simple and accurate, and the memory sends the sample data through the hardware interface.
  • the hardware interface receives the configuration information of the upper computer, and then samples the signal source in the circuit according to the configuration information, completes the problem location, makes the problem location simple and accurate, and the memory sends the sample data through the hardware interface.
  • FIG. 1 is a flow chart of an embodiment of an in-circuit test method for a field programmable gate circuit of the present invention
  • FIG. 2 is a schematic structural diagram of an embodiment of an in-circuit test device of a field programmable gate circuit of the present invention
  • FIG. 3 is a schematic diagram of a sampling process of an in-circuit test device of a field programmable gate circuit of the present invention
  • FIG. 4 is a schematic block diagram of an embodiment of a field programmable gate circuit of the present invention.
  • FIG. 1 is a flowchart of an embodiment of an online test method for a field programmable gate circuit of the present invention, the method comprising:
  • S102 Receive configuration information of the host computer through a hardware interface on the field programmable gate circuit.
  • the hardware interface is a serial interface.
  • the signal source comes from a functional module internal to the field programmable gate.
  • S106 Sample the signal source according to sampling parameters to obtain sampling data.
  • step S106 includes: first, receiving a sampling instruction of the upper computer through the hardware interface, and then sampling the signal source according to the sampling parameter in response to the sampling instruction to obtain sampling data.
  • the sampling parameter includes at least one of a sampling frequency, an overall sampling quantity, a trigger signal, and a maximum number of pre-trigger samples. Further, when the sampling parameter includes the sampling frequency, step S106 includes sampling the signal source according to the sampling frequency.
  • the memory is a register.
  • S110 Send sampling data in the memory to the host computer through a hardware interface, to analyze the sampled data.
  • the analysis of the sampled data by the host computer depends on the actual use of the host computer, and will not be described in detail within the understanding of those skilled in the art.
  • the configuration information of the host computer is received through the hardware interface, and then the signal source in the circuit is sampled according to the configuration information to complete the problem location, so that the problem location is simple and accurate, and the memory sends the sample data through the hardware interface.
  • the upper computer no need to cooperate with a specific JTAP cable, simple and practical, at the same time, easy to debug, especially on-site debugging, no need to set up a special hardware environment, developers do not need to test instruments at hand.
  • step S106 when the sampling parameter includes the trigger signal in step S106, step S106 includes triggering the signal source by using the trigger signal during the sampling process, and dividing the sampling process by triggering the signal source.
  • step S108 includes dividing the sampling data written into the memory into pre-trigger sampling data and post-trigger sampling data according to the trigger signal.
  • the sampled data to be written into the memory according to the trigger signal Distinguishing between pre-trigger sample data and post-trigger sample data includes: when the trigger signal is triggered to the signal source, if the number of sample data that has been written into the memory is less than the maximum number of samples before the trigger, the sample data that has been written into the memory is recorded.
  • the quantity uses the number of records to distinguish between the pre-trigger sample data and the post-trigger sample data.
  • the pre-trigger sample data and the post-trigger sample data are distinguished by the quantity value of the written sample data, so as to ensure that the sampled data before the trigger reaches a certain number, thereby improving the sampling precision and thereby improving. The accuracy of the test.
  • the sampling data written in the memory is divided into the pre-trigger sampling data and the post-trigger sampling data according to the trigger signal, including: before the trigger signal is triggered to the signal source, if the memory is written The number of sampled data is equal to the maximum number of samples before the trigger, and the sampled data written to the memory is replaced by the sampled data of the subsequent sampling until the trigger signal triggers the signal source, and after the trigger signal triggers the signal source, the subsequent sampling is performed. The sampled data is written to the remaining space of the memory.
  • replacing the sampled data that has been written into the memory with the sampled data that is subsequently sampled until the trigger signal triggers the signal source includes reading and writing the memory in a shift storage manner, so that the sampled data in the memory The sampled data of the most recent sample for the maximum number of samples before the trigger.
  • the number of sampled data that has been written into the memory is equal to the maximum number of samples before the trigger, and the sampled data obtained by the subsequent sampling replaces the sampled data that has been written into the memory to ensure that the sample sampled before the trigger is sampled.
  • the number of sampled data is not greater than the maximum number of samples before the triggering, so that the sampled data after the triggering and written to the memory reaches a certain number, thereby improving the sampling precision, thereby improving the accuracy of the test.
  • step S106 includes determining whether the number of sampled data stored in the memory is equal to the total number of samples, and if equal to the total number of samples, stopping sampling.
  • the sampling is completed, and this step is real-time, that is, when one sampled data is written into the memory, the number of sampled data in the memory is determined. Whether it is equal to the total number of samples, if not equal, continue sampling, get a sample data, and write the sample data to the memory.
  • the data in the memory is cleared to provide a storage space for the sampled data.
  • the memory is emptied, preparation is made for sampling, and the accuracy of the sampled data is improved.
  • the hardware interface 210 includes a hardware interface 210, a sampling circuit 230, and a memory 240.
  • the hardware interface 210 is connected to the upper computer.
  • the hardware interface 210 is also connected to the sampling circuit 230 via the configuration circuit 220.
  • the sampling circuit 230 is also connected to the memory 240. Connected to the hardware interface 210.
  • the configuration circuit 220, the sampling circuit 230, and the memory 240 can be implemented by a whole integrated circuit, such as an MCU. In this case, the memory 240 can be a register in the MCU.
  • the hardware interface 210 is configured to receive configuration information of the upper computer; wherein the hardware interface 210 is a serial interface.
  • the configuration circuit 220 is configured to select a corresponding signal source from the field programmable gate circuit according to the configuration information and configure the sampling parameter; wherein the selected signal source is from an internal functional module in the field programmable gate circuit, and can be connected through a signal interface
  • the sampling circuit 230 is connected.
  • the sampling circuit 230 is configured to sample the signal source according to the sampling parameters to obtain sampling data, and write the sampling data into the memory 240. Further, when the host computer reads the sample data in the memory 240, the sample data in the memory 240 is sent to the host computer through the hardware interface 210 to analyze the sample data.
  • the configuration information of the host computer is received through the hardware interface, and then the signal source in the circuit is sampled according to the configuration information to complete the problem location, so that the problem location is simple and accurate, and the memory sends the sample data through the hardware interface.
  • the upper computer no need to cooperate with a specific JTAP cable, simple and practical, at the same time, easy to debug, especially on-site debugging, no need to set up a special hardware environment, developers do not need to test instruments at hand.
  • the sampling parameter includes at least one of a sampling frequency, an overall sampling number, a trigger signal, and a maximum number of pre-trigger samples.
  • the sampling circuit 230 triggers the signal source by using a trigger signal during the sampling process, and further divides the sampling process into pre-trigger sampling and post-trigger sampling, thereby improving the accuracy of the sampling data and facilitating the completion of the problem. Positioning. Thus, the sampled data is divided into pre-trigger sample data and post-trigger sample data.
  • sampling process and working state of the sampling module will be described in detail below with reference to FIG.
  • the configuration circuit 220 When the sampling circuit 230 is in the sampling waiting state, the configuration circuit 220 has selected the signal source according to the configuration information, and configures the sampling parameter. At this time, the hardware interface 210 waits to receive the sampling instruction of the upper computer, and clears the memory 240 inside the field programmable gate circuit. I thought I would prepare for the sampling below. Then, when the hardware interface 210 receives the sampling instruction of the upper computer, the sampling circuit 230 responds to the sampling instruction, and then samples the signal source according to the sampling parameter, and at this time, enters the pre-trigger sampling state.
  • the sampling circuit 230 When the sampling circuit 230 is in the pre-trigger sampling state, the signal source is sampled according to the sampling frequency, and the sampling data is written into the memory 240. Thereafter, the trigger signal triggers the signal source, and the number of sampled data written into the memory 240 is less than the configuration.
  • the maximum number of pre-trigger samples configured by the information, the number of sampled data that has been written into the memory 240 is recorded, and the recorded quantity value indicates the number of sampled data before the trigger, and then the sampling circuit 230 enters the post-trigger sampling state.
  • the sampling circuit 230 When the sampling circuit 230 is in the pre-trigger sampling state, the signal source is sampled according to the sampling frequency, and the sampling data is written into the memory 240. At this time, the trigger signal does not trigger the signal source, that is, before the trigger signal triggers the signal source.
  • the number of sampled data that has been written into the memory 240 is equal to the maximum number of pre-trigger samples configured by the configuration information, and the sampling circuit 230 enters the trigger sampling state, and replaces the sampled data that has been written into the memory 240 by using the sampled data of the subsequent sampling, that is, the subsequent sampling is
  • the memory 240 is synchronously read and written until the trigger signal triggers the signal source. At this time, the sampling circuit 230 enters the post-trigger sampling state.
  • the sampling circuit 230 When the sampling circuit 230 is in the post-trigger sampling state, the signal source continues to be sampled. At this time, the sampling data is the post-trigger sampling data, and the post-trigger sampling data is written into the remaining space of the memory 240, that is, after the trigger signal is triggered to the signal source. , is in the sampling state after the trigger. Subsequently, the sampling circuit 230 enters a sampling end state.
  • the number of sampling data in the memory 240 is equal to the total sampling number configured by the configuration information.
  • sampling circuit 230 samples the signal source
  • the sampling circuit 230 restarts sampling, that is, shifts to the sampling waiting state, and starts sampling again.
  • the sampling circuit 230 is further connected to the hardware interface 210, and the working state of the sampling circuit 230 is sent to the upper computer through the hardware interface, so that the upper computer can connect the sampling progress at any time.
  • the field programmable circuit 400 includes a hardware interface 410, a configuration circuit 420, a sampling circuit 430, a memory 440, and a function circuit 450.
  • the hardware interface 410 and The upper computer is connected, the hardware interface 410 is also connected to the sampling circuit 430 via the configuration circuit 420, the sampling circuit 430 is also connected to the memory 440, the memory 440 is also connected to the hardware interface 410, and the sampling circuit 430 is also connected to the functional circuit 450 through a signal interface.
  • there is more than one function circuit 450 inside the field programmable circuit and only one function circuit is shown in the figure for illustration.
  • the hardware interface 410 is configured to receive configuration information of the upper computer; wherein the hardware interface 410 is a serial interface.
  • the configuration circuit 420 is configured to select a corresponding signal source from the field programmable gate circuit according to the configuration information and configure the sampling parameter; wherein the selected signal source is from the function circuit 450 inside the field programmable gate circuit.
  • the sampling circuit 430 is configured to sample the signal source according to the sampling parameters to obtain sampling data, and write the sampling data to the memory 440. Further, when the host computer reads the sample data in the memory 440, the sample data in the memory 440 is sent to the host computer through the hardware interface 410 to analyze the sampled data. The sampling circuit 430 samples the signal source according to the sampling parameters. For details, refer to the description in the foregoing embodiment, and details are not described herein again.

Abstract

An online testing method for a field programmable gate circuit, and the field programmable gate circuit. The method comprises: receiving configuration information of a host computer by means of a hardware interface on the field programmable gate circuit (S102); selecting, according to the configuration information, a corresponding signal source from the field programmable gate circuit and configuring sampling parameters (S104); sampling the signal source according to the sampling parameters to obtain sampling data (S106); writing the sampling data into a memory in the field programmable gate circuit (S108); and transmitting the sample data in the memory to the host computer by means of the hardware interface (S110). According to the configuration information, the problem positioning is simple and accurate to implement without requiring a specific JTAP cable. The method is simple and practical, and at the same time, debugging is convenient, especially on-site debugging. There is no need to set up a special hardware environment, and developers do not need to test instruments.

Description

一种现场可编程门电路及其在线测试方法 Field programmable gate circuit and online testing method thereof
【技术领域】[Technical Field]
本发明涉及电路测试技术领域,尤其涉及一种现场可编程门电路及其在线测试方法。The invention relates to the technical field of circuit testing, in particular to a field programmable gate circuit and an online testing method thereof.
【背景技术】 【Background technique】
FPGA(Field-Programmable Gate Array,现场可编程门阵列)是一种用户可编程的逻辑器件,不同于传统的MCU (Microcontroller Unit,微控制单元),其由硬件实现逻辑,是一种并行执行的硬件电路,因此,不能像开发MCU一样进行断点调试和仿真。FPGA (Field-Programmable Gate Array, Field Programmable Gate Array) is a user-programmable logic device that differs from traditional MCUs (Microcontroller) Unit, Micro Control Unit), which is implemented by hardware, is a hardware circuit that is executed in parallel. Therefore, it is not possible to perform breakpoint debugging and simulation just like developing an MCU.
目前现场可编程门电路的调试和仿真主流方式是通过使用嵌入式逻辑分析仪和外部逻辑分析仪进行分析。At present, the mainstream mode of debugging and simulation of field programmable gate circuits is analyzed by using an embedded logic analyzer and an external logic analyzer.
使用内嵌逻辑分析仪调试时,需要设计人员根据现象进行关键信号选取,然后重新编译和下载,如此反复,降低了开发效率,尤其设备出厂后,现场调试环境更加恶劣,传统方法的不足就更加明显。而且,占用较多的现场可编程门电路资源,当涉及的关键信号较多的情况下,设计人员不得不进行取舍,从而带来问题定位的困难。When debugging with the embedded logic analyzer, the designer needs to select the key signals according to the phenomenon, and then recompile and download. This is repeated, which reduces the development efficiency. Especially after the equipment leaves the factory, the on-site debugging environment is even worse, and the traditional methods are more inadequate. obvious. Moreover, it occupies more field programmable gate circuit resources, and when there are many key signals involved, the designer has to make trade-offs, which brings difficulties in problem location.
使用外部逻辑分析仪调试时,只能测试现场可编程门电路管脚的信号,不能测试内部信号,需要搭建特定的开发环境,配合特定的JTAG(Joint Test Action Group,联合测试工作组)线缆进行调试,并且需要通过硬件连接进行信号采集,这也对开发造成了障碍。而且很多情况下,开发者手头并不具备测试仪器。When debugging with an external logic analyzer, only the signals of the field programmable gate pins can be tested. The internal signals cannot be tested. It is necessary to set up a specific development environment with a specific JTAG (Joint). Test Action Group, Joint Test Working Group) Cables are commissioned and signal acquisition via hardware connections is required, which also creates obstacles to development. And in many cases, developers don't have test instruments at hand.
由此可见,目前现场可编程门电路的调试方式复杂,开发效率低,有些方式还需要搭建特定的开发环境,并且问题定位的准确性不高。It can be seen that the debugging mode of the field programmable gate circuit is complicated and the development efficiency is low. Some methods also need to set up a specific development environment, and the accuracy of problem location is not high.
【发明内容】 [Summary of the Invention]
本发明的目的在于,针对现有技术中现场可编程门电路的调试方式复杂,开发效率低,问题定位的准确性不高,提供一种现场可编程门电路及其在线测试方法。The object of the present invention is to provide a field programmable gate circuit and an online test method thereof for the complicated debugging mode of the field programmable gate circuit in the prior art, the development efficiency is low, and the accuracy of the problem location is not high.
本发明为解决上述技术问题所采用的技术方案是提供了一种现场可编程门电路的在线测试方法,包括:通过所述现场可编程门电路上的硬件接口接收上位机的配置信息;根据所述配置信息从所述现场可编程门电路中选择对应的信号源并配置采样参数;根据所述采样参数对所述信号源进行采样以得到采样数据;将所述采样数据写入现场可编程门电路内部的存储器;以及将所述存储器中的所述采样数据通过所述硬件接口发送至所述上位机,以对所述采样数据进行分析。The technical solution adopted by the present invention to solve the above technical problem is to provide an on-line test method for a field programmable gate circuit, comprising: receiving configuration information of a host computer through a hardware interface on the field programmable gate circuit; Determining configuration information from the field programmable gate circuit to select a corresponding signal source and configuring sampling parameters; sampling the signal source according to the sampling parameter to obtain sampling data; writing the sampling data to a field programmable gate a memory internal to the circuit; and transmitting the sampled data in the memory to the host computer through the hardware interface to analyze the sampled data.
本发明解决上述技术问题所采用的另一技术方案是提供了一种现场可编程门电路,包括:硬件接口、配置电路、采样电路和存储器,所述硬件接口与上位机连接,所述硬件接口还经过所述配置电路与所述采样电路连接,所述采样电路还与所述存储器连接,所述存储器还与所述硬件接口连接;所述硬件接口接收上位机的配置信息;所述配置电路根据所述配置信息从所述现场可编程门电路中选择对应的信号源并配置采样参数;所述采样电路根据所述采样参数对所述信号源进行采样以得到采样数据,并将所述采样数据写入所述存储器,进而将所述存储器中的所述采样数据通过所述硬件接口发送至所述上位机,以对所述采样数据进行分析。Another technical solution adopted by the present invention to solve the above technical problem is to provide a field programmable gate circuit, comprising: a hardware interface, a configuration circuit, a sampling circuit and a memory, wherein the hardware interface is connected to a host computer, and the hardware interface And the sampling circuit is further connected to the sampling circuit, the sampling circuit is further connected to the memory, the memory is further connected to the hardware interface; the hardware interface receives configuration information of the upper computer; the configuration circuit Selecting a corresponding signal source from the field programmable gate circuit according to the configuration information and configuring a sampling parameter; the sampling circuit samples the signal source according to the sampling parameter to obtain sampling data, and samples the sampling Data is written into the memory, and the sample data in the memory is sent to the host computer through the hardware interface to analyze the sampled data.
本发明的有益效果有:硬件接口接收上位机的配置信息,进而根据配置信息对电路中的信号源进行采样,完成问题的定位,使得问题定位简单而准确,并且存储器通过硬件接口将采样数据发送至上位机,无需配合特定的JTAP线缆,简单实用,同时,调试方便,特别是现场调试,无需搭建特殊的硬件环境,开发者手头上无需测试仪器。The invention has the beneficial effects that the hardware interface receives the configuration information of the upper computer, and then samples the signal source in the circuit according to the configuration information, completes the problem location, makes the problem location simple and accurate, and the memory sends the sample data through the hardware interface. Up to the upper computer, no need to cooperate with a specific JTAP cable, simple and practical, at the same time, easy to debug, especially on-site debugging, no need to set up a special hardware environment, developers do not need to test instruments at hand.
【附图说明】 [Description of the Drawings]
下面将结合附图及实施方式对本发明作进一步说明,附图中:The present invention will be further described below in conjunction with the accompanying drawings and embodiments, in which:
图1是本发明的现场可编程门电路的在线测试方法实施例的流程图;1 is a flow chart of an embodiment of an in-circuit test method for a field programmable gate circuit of the present invention;
图2是本发明的现场可编程门电路的在线测试装置实施例的结构示意图;2 is a schematic structural diagram of an embodiment of an in-circuit test device of a field programmable gate circuit of the present invention;
图3是本发明的现场可编程门电路的在线测试装置采样过程的示意图;3 is a schematic diagram of a sampling process of an in-circuit test device of a field programmable gate circuit of the present invention;
图4是本发明的现场可编程门电路实施例的结构示意图。4 is a schematic block diagram of an embodiment of a field programmable gate circuit of the present invention.
【具体实施方式】【detailed description】
为使本领域的技术人员更好地理解本发明的技术方案,下面结合附图和具体实施方式对本发明的技术方案做进一步详细描述。The technical solutions of the present invention are further described in detail below in conjunction with the accompanying drawings and specific embodiments.
如图1所示,是本发明的现场可编程门电路的在线测试方法实施例的流程图,该方法包括:FIG. 1 is a flowchart of an embodiment of an online test method for a field programmable gate circuit of the present invention, the method comprising:
S102、通过现场可编程门电路上的硬件接口接收上位机的配置信息;S102. Receive configuration information of the host computer through a hardware interface on the field programmable gate circuit.
在此步骤中,硬件接口为串行接口。In this step, the hardware interface is a serial interface.
S104、根据配置信息从现场可编程门电路中选择对应的信号源并配置采样参数;S104. Select a corresponding signal source from the field programmable gate circuit according to the configuration information, and configure sampling parameters.
在此步骤中,信号源来自于现场可编程门电路中内部的功能模块。In this step, the signal source comes from a functional module internal to the field programmable gate.
S106、根据采样参数对信号源进行采样以得到采样数据;S106. Sample the signal source according to sampling parameters to obtain sampling data.
具体地,在本实施例中,步骤S106包括:首先,通过硬件接口接收上位机的采样指令,随后,响应采样指令根据采样参数对信号源进行采样,以得到采样数据。可以看出,通过硬件接口接收上位机的采样指令,即可对信号源进行采样,现场操作方便。其中,采样参数包括采样频率、总体采样数量、触发信号以及最大触发前采样数量中的至少一者。进一步,采样参数包括采样频率时,步骤S106包括根据采样频率对信号源进行采样。Specifically, in this embodiment, step S106 includes: first, receiving a sampling instruction of the upper computer through the hardware interface, and then sampling the signal source according to the sampling parameter in response to the sampling instruction to obtain sampling data. It can be seen that the sampling source of the host computer can be sampled through the hardware interface, and the signal source can be sampled, and the field operation is convenient. The sampling parameter includes at least one of a sampling frequency, an overall sampling quantity, a trigger signal, and a maximum number of pre-trigger samples. Further, when the sampling parameter includes the sampling frequency, step S106 includes sampling the signal source according to the sampling frequency.
S108、将采样数据写入现场可编程门电路内部的存储器;S108. Write sampling data into a memory inside the field programmable gate circuit;
在此步骤中,存储器为寄存器。In this step, the memory is a register.
S110、将存储器中的采样数据通过硬件接口发送至上位机,以对采样数据进行分析。S110: Send sampling data in the memory to the host computer through a hardware interface, to analyze the sampled data.
在此步骤中,上位机对采样数据进行分析取决于上位机的实际使用,在本领域技术人员的理解范围之内,不作详细说明。In this step, the analysis of the sampled data by the host computer depends on the actual use of the host computer, and will not be described in detail within the understanding of those skilled in the art.
在本实施例中,通过硬件接口接收上位机的配置信息,进而根据配置信息对电路中的信号源进行采样,完成问题的定位,使得问题定位简单而准确,并且存储器通过硬件接口将采样数据发送至上位机,无需配合特定的JTAP线缆,简单实用,同时,调试方便,特别是现场调试,无需搭建特殊的硬件环境,开发者手头上无需测试仪器。In this embodiment, the configuration information of the host computer is received through the hardware interface, and then the signal source in the circuit is sampled according to the configuration information to complete the problem location, so that the problem location is simple and accurate, and the memory sends the sample data through the hardware interface. Up to the upper computer, no need to cooperate with a specific JTAP cable, simple and practical, at the same time, easy to debug, especially on-site debugging, no need to set up a special hardware environment, developers do not need to test instruments at hand.
具体地,在本实施例中,在步骤S106中,采样参数包括触发信号时,步骤S106包括在采样过程中利用触发信号对信号源进行触发,通过对信号源进行触发是否发生来将采样过程分为触发前采样和触发后采样,进而,由于采样过程分为触发前采样和触发后采样,步骤S108包括根据触发信号将写入存储器的采样数据区分为触发前采样数据和触发后采样数据。通过对信号源进行触发来进行采样,提高采样数据的准确性,方便完成问题的定位,将采样数据分为触发前采样数据和触发后采样数据,有利于对采样数据的分析,以方便对现场可编程门电路中内部的功能模块进行测试,提高测试的准确性。Specifically, in this embodiment, when the sampling parameter includes the trigger signal in step S106, step S106 includes triggering the signal source by using the trigger signal during the sampling process, and dividing the sampling process by triggering the signal source. For pre-trigger sampling and post-trigger sampling, further, since the sampling process is divided into pre-trigger sampling and post-trigger sampling, step S108 includes dividing the sampling data written into the memory into pre-trigger sampling data and post-trigger sampling data according to the trigger signal. By sampling the signal source to perform sampling, the accuracy of the sampled data is improved, and the positioning of the problem is conveniently completed. The sampled data is divided into pre-trigger sampled data and post-trigger sampled data, which is beneficial to analyzing the sampled data to facilitate on-site The internal functional modules in the programmable gate circuit are tested to improve the accuracy of the test.
进一步地,具体地,在本实施例中,由于触发前采样中已写入的采样数据的数量是否满足配置信息所配置的最大采样触发前采样数量,则根据触发信号将写入存储器的采样数据区分为触发前采样数据和触发后采样数据包括:在触发信号对信号源进行触发时,若已写入存储器的采样数据的数量小于最大触发前采样数量,则记录已写入存储器的采样数据的数量,进而利用记录的数量值区分触发前采样数据和触发后采样数据。Further, specifically, in this embodiment, since the number of sampled data that has been written in the pre-trigger sampling satisfies the maximum number of samples before the triggering configured by the configuration information, the sampled data to be written into the memory according to the trigger signal Distinguishing between pre-trigger sample data and post-trigger sample data includes: when the trigger signal is triggered to the signal source, if the number of sample data that has been written into the memory is less than the maximum number of samples before the trigger, the sample data that has been written into the memory is recorded. The quantity, in turn, uses the number of records to distinguish between the pre-trigger sample data and the post-trigger sample data.
可以看出,对信号源进行触发时,通过已写入的采样数据的数量值来区分触发前采样数据和触发后采样数据,保证触发前采样的采样数据到达一定数量,提高采样精度,进而提高测试的准确性。It can be seen that when the signal source is triggered, the pre-trigger sample data and the post-trigger sample data are distinguished by the quantity value of the written sample data, so as to ensure that the sampled data before the trigger reaches a certain number, thereby improving the sampling precision and thereby improving. The accuracy of the test.
进一步地,在本发明的其他实施例中,根据触发信号将写入存储器的采样数据区分为触发前采样数据和触发后采样数据包括:在触发信号对信号源进行触发之前,若已写入存储器的采样数据的数量等于最大触发前采样数量,则利用后续采样的采样数据替代已写入存储器的采样数据直到触发信号对信号源进行触发,并在触发信号对信号源进行触发后,将后续采样的采样数据写入存储器的剩余空间。具体地,在本实施例中,利用后续采样的采样数据替换已写入存储器的采样数据直到触发信号对信号源进行触发包括以移位存储方式对存储器进行读写,以使得存储器内的采样数据为最大触发前采样数量的最新采样的采样数据。Further, in other embodiments of the present invention, the sampling data written in the memory is divided into the pre-trigger sampling data and the post-trigger sampling data according to the trigger signal, including: before the trigger signal is triggered to the signal source, if the memory is written The number of sampled data is equal to the maximum number of samples before the trigger, and the sampled data written to the memory is replaced by the sampled data of the subsequent sampling until the trigger signal triggers the signal source, and after the trigger signal triggers the signal source, the subsequent sampling is performed. The sampled data is written to the remaining space of the memory. Specifically, in this embodiment, replacing the sampled data that has been written into the memory with the sampled data that is subsequently sampled until the trigger signal triggers the signal source includes reading and writing the memory in a shift storage manner, so that the sampled data in the memory The sampled data of the most recent sample for the maximum number of samples before the trigger.
可以看出,在对信号源进行触发前,已写入存储器的采样数据的数量等于最大触发前采样数量,后续采样得到的采样数据替代已写入存储器的采样数据,保证触发采样前所采样的采样数据的数量不大于最大触发前采样数量,进而使得触发后采样且写入到存储器的采样数据到达一定数量,提高采样精度,进而提高测试的准确性。It can be seen that before the signal source is triggered, the number of sampled data that has been written into the memory is equal to the maximum number of samples before the trigger, and the sampled data obtained by the subsequent sampling replaces the sampled data that has been written into the memory to ensure that the sample sampled before the trigger is sampled. The number of sampled data is not greater than the maximum number of samples before the triggering, so that the sampled data after the triggering and written to the memory reaches a certain number, thereby improving the sampling precision, thereby improving the accuracy of the test.
进一步地,在本实施例中,步骤S106包括判断存储器内存储的采样数据的数量是否等于总体采样数量,若等于总体采样数量,则停止采样。当写入存储器中的采样数据的数量达到根据配置信息所配置的总体采样数量时,采样完成,此步骤是实时的,即一个采样数据写入到存储器内时,判断存储器内的采样数据的数量是否等于总体采样数量,若不等于,继续采样,得到一个采样数据,并将该采样数据写入到存储器。Further, in this embodiment, step S106 includes determining whether the number of sampled data stored in the memory is equal to the total number of samples, and if equal to the total number of samples, stopping sampling. When the number of sampled data written in the memory reaches the total number of samples configured according to the configuration information, the sampling is completed, and this step is real-time, that is, when one sampled data is written into the memory, the number of sampled data in the memory is determined. Whether it is equal to the total number of samples, if not equal, continue sampling, get a sample data, and write the sample data to the memory.
进一步地,在本实施例中,在步骤S108之前包括清空存储器中的数据,以给采样数据提供存储空间。在将步骤S106中所采样的采样数据写入存储器前,将存储器进行清空,为采样做准备工作,且提高采样数据的准确性。Further, in the embodiment, before the step S108, the data in the memory is cleared to provide a storage space for the sampled data. Before the sampling data sampled in step S106 is written into the memory, the memory is emptied, preparation is made for sampling, and the accuracy of the sampled data is improved.
如图2所示,是本发明的现场可编程门电路的在线测试装置实施例的结构示意图,该在线测试装置通过上述实施例中的方法对现场可编程门电路中内部的功能模块进行测试,包括硬件接口210、配置电路220、采样电路230和存储器240,硬件接口210与上位机连接,硬件接口210还经过配置电路220与采样电路230连接,采样电路230还与存储器240连接,存储器240还与硬件接口210连接。配置电路220、采样电路230和存储器240可以由某个整体电路来实现,例如MCU,此时,存储器240可以是该MCU内的寄存器2 is a schematic structural diagram of an embodiment of an in-circuit test device of a field programmable gate circuit of the present invention. The online test device tests an internal functional module in a field programmable gate circuit by the method in the above embodiment. The hardware interface 210 includes a hardware interface 210, a sampling circuit 230, and a memory 240. The hardware interface 210 is connected to the upper computer. The hardware interface 210 is also connected to the sampling circuit 230 via the configuration circuit 220. The sampling circuit 230 is also connected to the memory 240. Connected to the hardware interface 210. The configuration circuit 220, the sampling circuit 230, and the memory 240 can be implemented by a whole integrated circuit, such as an MCU. In this case, the memory 240 can be a register in the MCU.
硬件接口210用于接收上位机的配置信息;其中,硬件接口210为串行接口。The hardware interface 210 is configured to receive configuration information of the upper computer; wherein the hardware interface 210 is a serial interface.
配置电路220用于根据配置信息从现场可编程门电路中选择对应的信号源并配置采样参数;其中,所选择的信号源来自于现场可编程门电路中内部的功能模块,可通过信号接口与采样电路230连接。The configuration circuit 220 is configured to select a corresponding signal source from the field programmable gate circuit according to the configuration information and configure the sampling parameter; wherein the selected signal source is from an internal functional module in the field programmable gate circuit, and can be connected through a signal interface The sampling circuit 230 is connected.
采样电路230用于根据采样参数对信号源进行采样以得到采样数据,并将采样数据写入存储器240。进而,在上位机读取存储器240中的采样数据时,将存储器240中的采样数据通过硬件接口210发送至上位机,以对采样数据进行分析。The sampling circuit 230 is configured to sample the signal source according to the sampling parameters to obtain sampling data, and write the sampling data into the memory 240. Further, when the host computer reads the sample data in the memory 240, the sample data in the memory 240 is sent to the host computer through the hardware interface 210 to analyze the sample data.
在本实施例中,通过硬件接口接收上位机的配置信息,进而根据配置信息对电路中的信号源进行采样,完成问题的定位,使得问题定位简单而准确,并且存储器通过硬件接口将采样数据发送至上位机,无需配合特定的JTAP线缆,简单实用,同时,调试方便,特别是现场调试,无需搭建特殊的硬件环境,开发者手头上无需测试仪器。In this embodiment, the configuration information of the host computer is received through the hardware interface, and then the signal source in the circuit is sampled according to the configuration information to complete the problem location, so that the problem location is simple and accurate, and the memory sends the sample data through the hardware interface. Up to the upper computer, no need to cooperate with a specific JTAP cable, simple and practical, at the same time, easy to debug, especially on-site debugging, no need to set up a special hardware environment, developers do not need to test instruments at hand.
在本实施例中,采样参数包括采样频率、总体采样数量、触发信号以及最大触发前采样数量中的至少一者。In this embodiment, the sampling parameter includes at least one of a sampling frequency, an overall sampling number, a trigger signal, and a maximum number of pre-trigger samples.
进一步地,在本实施例中,采样电路230在采样过程中利用触发信号对信号源进行触发,进而将采样过程分为触发前采样和触发后采样,提高采样数据的准确性,方便完成问题的定位。从而采样数据分为触发前采样数据和触发后采样数据。Further, in this embodiment, the sampling circuit 230 triggers the signal source by using a trigger signal during the sampling process, and further divides the sampling process into pre-trigger sampling and post-trigger sampling, thereby improving the accuracy of the sampling data and facilitating the completion of the problem. Positioning. Thus, the sampled data is divided into pre-trigger sample data and post-trigger sample data.
下面结合图3对采样模块的采样过程及工作状态进行详细说明。The sampling process and working state of the sampling module will be described in detail below with reference to FIG.
采样电路230处于采样等待状态时,配置电路220已经根据配置信息选择信号源,并配置采样参数,此时,硬件接口210等待接收上位机的采样指令,清空现场可编程门电路内部的存储器240,以为下面采样做准备工作。随后,在硬件接口210接收到上位机的采样指令时,采样电路230响应采样指令,进而根据采样参数对信号源进行采样,此时,进入触发前采样状态。When the sampling circuit 230 is in the sampling waiting state, the configuration circuit 220 has selected the signal source according to the configuration information, and configures the sampling parameter. At this time, the hardware interface 210 waits to receive the sampling instruction of the upper computer, and clears the memory 240 inside the field programmable gate circuit. I thought I would prepare for the sampling below. Then, when the hardware interface 210 receives the sampling instruction of the upper computer, the sampling circuit 230 responds to the sampling instruction, and then samples the signal source according to the sampling parameter, and at this time, enters the pre-trigger sampling state.
采样电路230处于触发前采样状态时,根据采样频率对信号源进行采样,并将采样数据写入存储器240,之后,触发信号对信号源进行触发,已写入存储器240的采样数据的数量小于配置信息所配置的最大触发前采样数量,记录已写入存储器240的采样数据的数量,进而记录的数量值表示触发前采样数据的数量,随后,采样电路230进入触发后采样状态。When the sampling circuit 230 is in the pre-trigger sampling state, the signal source is sampled according to the sampling frequency, and the sampling data is written into the memory 240. Thereafter, the trigger signal triggers the signal source, and the number of sampled data written into the memory 240 is less than the configuration. The maximum number of pre-trigger samples configured by the information, the number of sampled data that has been written into the memory 240 is recorded, and the recorded quantity value indicates the number of sampled data before the trigger, and then the sampling circuit 230 enters the post-trigger sampling state.
采样电路230处于触发前采样状态时,根据采样频率对信号源进行采样,并将采样数据写入存储器240,此时,触发信号未对信号源进行触发,即触发信号对信号源进行触发前,而已写入存储器240的采样数据的数量等于配置信息所配置的最大触发前采样数量,采样电路230进入触发采样状态,利用后续采样的采样数据替代已写入存储器240的采样数据,即后续采样是同步读写存储器240,直到触发信号对信号源进行触发,此时,采样电路230进入触发后采样状态。When the sampling circuit 230 is in the pre-trigger sampling state, the signal source is sampled according to the sampling frequency, and the sampling data is written into the memory 240. At this time, the trigger signal does not trigger the signal source, that is, before the trigger signal triggers the signal source. The number of sampled data that has been written into the memory 240 is equal to the maximum number of pre-trigger samples configured by the configuration information, and the sampling circuit 230 enters the trigger sampling state, and replaces the sampled data that has been written into the memory 240 by using the sampled data of the subsequent sampling, that is, the subsequent sampling is The memory 240 is synchronously read and written until the trigger signal triggers the signal source. At this time, the sampling circuit 230 enters the post-trigger sampling state.
采样电路230处于触发后采样状态时,对信号源继续进行采样,此时,采样数据为触发后采样数据,将触发后采样数据写入存储器240的剩余空间,即触发信号对信号源进行触发后,处于触发后采样状态。随后,采样电路230进入采样结束状态。When the sampling circuit 230 is in the post-trigger sampling state, the signal source continues to be sampled. At this time, the sampling data is the post-trigger sampling data, and the post-trigger sampling data is written into the remaining space of the memory 240, that is, after the trigger signal is triggered to the signal source. , is in the sampling state after the trigger. Subsequently, the sampling circuit 230 enters a sampling end state.
采样电路230处于采样结束状态时,此时,存储器240中的采样数据的数量等于配置信息所配置的总体采样数量。When the sampling circuit 230 is in the sampling end state, at this time, the number of sampling data in the memory 240 is equal to the total sampling number configured by the configuration information.
需要说明的是,在采样电路230对信号源进行采样的采样过程中,硬件接口接收到上位机的新的采样指令时,采样电路230重新开始进行采样,即转入采样等待状态,重新开始采样。It should be noted that, during the sampling process in which the sampling circuit 230 samples the signal source, when the hardware interface receives the new sampling instruction of the upper computer, the sampling circuit 230 restarts sampling, that is, shifts to the sampling waiting state, and starts sampling again. .
进一步地,在本发明中,在线测试装置中,采样电路230还与所述硬件接口210连接,将采样电路230所处的工作状态通过硬件接口发送给上位机,以便上位机随时连接采样进度。Further, in the online testing device, the sampling circuit 230 is further connected to the hardware interface 210, and the working state of the sampling circuit 230 is sent to the upper computer through the hardware interface, so that the upper computer can connect the sampling progress at any time.
如图4所示,是本发明的现场可编程电路实施例的结构示意图,该现场可编程电路400包括硬件接口410、配置电路420、采样电路430、存储器440和功能电路450,硬件接口410与上位机连接,硬件接口410还经过配置电路420与采样电路430连接,采样电路430还与存储器440连接,存储器440还与硬件接口410连接,采样电路430还通过信号接口与功能电路450连接。需要说明的是,现场可编程电路的内部不止一个功能电路450,图中仅显示一个功能电路以示说明。4 is a schematic structural diagram of a field programmable circuit embodiment of the present invention. The field programmable circuit 400 includes a hardware interface 410, a configuration circuit 420, a sampling circuit 430, a memory 440, and a function circuit 450. The hardware interface 410 and The upper computer is connected, the hardware interface 410 is also connected to the sampling circuit 430 via the configuration circuit 420, the sampling circuit 430 is also connected to the memory 440, the memory 440 is also connected to the hardware interface 410, and the sampling circuit 430 is also connected to the functional circuit 450 through a signal interface. It should be noted that there is more than one function circuit 450 inside the field programmable circuit, and only one function circuit is shown in the figure for illustration.
硬件接口410用于接收上位机的配置信息;其中,硬件接口410为串行接口。The hardware interface 410 is configured to receive configuration information of the upper computer; wherein the hardware interface 410 is a serial interface.
配置电路420用于根据配置信息从现场可编程门电路中选择对应的信号源并配置采样参数;其中,所选择的信号源来自于现场可编程门电路内部的功能电路450。The configuration circuit 420 is configured to select a corresponding signal source from the field programmable gate circuit according to the configuration information and configure the sampling parameter; wherein the selected signal source is from the function circuit 450 inside the field programmable gate circuit.
采样电路430用于根据采样参数对信号源进行采样以得到采样数据,并将采样数据写入存储器440。进而,在上位机读取存储器440中的采样数据时,将存储器440中的采样数据通过硬件接口410发送至上位机,以对采样数据进行分析。采样电路430根据采样参数对信号源进行采样,详见上述实施例中的说明,在此不再赘述。The sampling circuit 430 is configured to sample the signal source according to the sampling parameters to obtain sampling data, and write the sampling data to the memory 440. Further, when the host computer reads the sample data in the memory 440, the sample data in the memory 440 is sent to the host computer through the hardware interface 410 to analyze the sampled data. The sampling circuit 430 samples the signal source according to the sampling parameters. For details, refer to the description in the foregoing embodiment, and details are not described herein again.
以上仅为本发明的实施方式,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围。The above is only the embodiment of the present invention, and is not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformation made by the specification and the drawings of the present invention may be directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present invention.

Claims (19)

  1. 一种现场可编程门电路的在线测试方法,其中,包括:An online test method for a field programmable gate circuit, comprising:
    通过所述现场可编程门电路上的硬件接口接收上位机发送的配置信息;Receiving configuration information sent by the host computer through a hardware interface on the field programmable gate circuit;
    根据所述配置信息从所述现场可编程门电路中选择对应的信号源并配置采样参数; Selecting a corresponding signal source from the field programmable gate circuit according to the configuration information and configuring sampling parameters;
    根据所述采样参数对所述信号源进行采样以得到采样数据;Sampling the signal source according to the sampling parameter to obtain sampling data;
    将所述采样数据写入现场可编程门电路内部的存储器;Writing the sampled data to a memory inside the field programmable gate circuit;
    将所述存储器中的所述采样数据通过所述硬件接口发送至所述上位机,以对所述采样数据进行分析。And sending the sampled data in the memory to the upper computer through the hardware interface to analyze the sampled data.
  2. 根据权利要求1所述的方法,其中,所述根据所述采样参数对所述信号源进行采样以得到采样数据的步骤包括:The method of claim 1 wherein said step of sampling said signal source based on said sampling parameters to obtain sampled data comprises:
    通过所述硬件接口接收所述上位机的采样指令;Receiving, by the hardware interface, a sampling instruction of the upper computer;
    响应所述采样指令根据所述采样参数对所述信号源进行采样以得到所述采样数据。The signal source is sampled according to the sampling parameter in response to the sampling instruction to obtain the sampled data.
  3. 根据权利要求1中所述的方法,其中,所述采样参数包括采样频率、总体采样数量、触发信号以及最大触发前采样数量中的至少一者。The method of claim 1 wherein the sampling parameter comprises at least one of a sampling frequency, an overall number of samples, a trigger signal, and a maximum number of pre-trigger samples.
  4. 根据权利要求3中所述的方法,其中,所述根据所述采样参数对所述信号源进行采样以得到采样数据的步骤包括:The method of claim 3 wherein said step of sampling said signal source based on said sampling parameters to obtain sampled data comprises:
    根据所述采样频率对所述信号源进行采样;Sampling the signal source according to the sampling frequency;
  5. 根据权利要求3中所述的方法,其中,所述根据所述采样参数对所述信号源进行采样以得到采样数据的步骤包括:The method of claim 3 wherein said step of sampling said signal source based on said sampling parameters to obtain sampled data comprises:
    在采样过程中利用所述触发信号对所述信号源进行触发。The signal source is triggered by the trigger signal during sampling.
  6. 根据权利要求5中所述的方法,其中,所述将所述采样数据写入现场可编程门电路内部的存储器的步骤包括:The method of claim 5 wherein said step of writing said sampled data to a memory internal to the field programmable gate circuit comprises:
    根据所述触发信号将写入所述存储器的所述采样数据区分为触发前采样数据和触发后采样数据。The sample data written in the memory is divided into pre-trigger sample data and post-trigger sample data according to the trigger signal.
  7. 根据权利要求6中所述的方法,其中,所述根据所述触发信号将写入所述存储器的所述采样数据区分为触发前采样数据和触发后采样数据包括:The method according to claim 6, wherein the distinguishing the sample data written in the memory into pre-trigger sample data and post-trigger sample data according to the trigger signal comprises:
    在所述触发信号对所述信号源进行触发时,若已写入所述存储器的所述采样数据的数量小于所述最大触发前采样数量,则记录所述已写入所述存储器的所述采样数据的数量,进而利用记录的数量值区分触发前采样数据和触发后采样数据。When the trigger signal is triggered to the signal source, if the number of the sampled data that has been written into the memory is less than the maximum number of pre-trigger samples, the recording of the written memory is recorded The number of sampled data, and then the number of records is used to distinguish between the pre-trigger sample data and the post-trigger sample data.
  8. 根据权利要求6中所述的方法,其中,所述根据所述触发信号将写入所述存储器的所述采样数据区分为触发前采样数据和触发后采样数据包括:The method according to claim 6, wherein the distinguishing the sample data written in the memory into pre-trigger sample data and post-trigger sample data according to the trigger signal comprises:
    在所述触发信号对所述信号源进行触发之前,若已写入所述存储器的所述采样数据的数量等于所述最大触发前采样数量,则利用后续采样的所述采样数据替代已写入所述存储器的所述采样数据直到所述触发信号对所述信号源进行触发,并在所述触发信号对所述信号源进行触发后,将后续采样的所述采样数据写入所述存储器的剩余空间。Before the trigger signal is triggered to the signal source, if the number of the sampled data that has been written into the memory is equal to the maximum number of samples before the trigger, the sampled data of the subsequent sample is used instead of the written The sampling data of the memory is triggered by the trigger signal to the signal source, and after the trigger signal is triggered by the signal source, the sampled data of the subsequent sampling is written into the memory remaining space.
  9. 根据权利要求8中所述的方法,其中,所述利用后续采样的所述采样数据替代已写入所述存储器的所述采样数据直到所述触发信号对所述信号源进行触发的步骤包括:The method according to claim 8, wherein said step of replacing said sampled data that has been written into said memory with said sampled data that has been subsequently sampled until said trigger signal triggers said signal source comprises:
    以移位存储方式对所述存储器进行读写,以使得所述存储器内的所述采样数据为最大触发前采样数量的最新采样的所述采样数据。The memory is read and written in a shift storage manner such that the sample data in the memory is the latest sampled sample data of the maximum number of pre-trigger samples.
  10. 根据权利要求6中所述的方法,其中,所述根据所述采样参数对所述信号源进行采样以得到采样数据的步骤包括:The method of claim 6 wherein said step of sampling said signal source based on said sampling parameters to obtain sampled data comprises:
    判断所述存储器内存储的所述采样数据的数量是否等于所述总体采样数量,若等于所述总体采样数量,则停止采样。It is determined whether the quantity of the sampled data stored in the memory is equal to the total number of samples, and if it is equal to the total number of samples, sampling is stopped.
  11. 根据权利要求1中所述的方法,其中,在所述将所述采样数据写入现场可编程门电路内部的存储器的步骤之前,进一步包括:The method of claim 1 further comprising: before said step of writing said sampled data to a memory internal to the field programmable gate circuit, further comprising:
    清空所述存储器中的数据,以给所述采样数据提供存储空间。The data in the memory is emptied to provide storage space for the sampled data.
  12. 一种现场可编程门电路,其中,包括:A field programmable gate circuit, comprising:
    硬件接口、配置电路、采样电路和存储器,所述硬件接口与上位机连接,所述硬件接口还经过所述配置电路与所述采样电路连接,所述采样电路还与所述存储器连接,所述存储器还与所述硬件接口连接;a hardware interface, a configuration circuit, a sampling circuit, and a memory, the hardware interface is connected to the upper computer, the hardware interface is further connected to the sampling circuit via the configuration circuit, and the sampling circuit is further connected to the memory, The memory is also interfaced with the hardware;
    所述硬件接口接收上位机的配置信息;所述配置电路根据所述配置信息从所述现场可编程门电路中选择对应的信号源并配置采样参数;所述采样电路根据所述采样参数对所述信号源进行采样以得到采样数据,并将所述采样数据写入所述存储器,进而将所述存储器中的所述采样数据通过所述硬件接口发送至所述上位机,以对所述采样数据进行分析。The hardware interface receives configuration information of the upper computer; the configuration circuit selects a corresponding signal source from the field programmable gate circuit according to the configuration information, and configures sampling parameters; the sampling circuit is based on the sampling parameter The signal source is sampled to obtain sample data, and the sample data is written into the memory, and the sample data in the memory is sent to the host computer through the hardware interface to Data is analyzed.
  13. 根据权利要求12中所述的电路,其中,所述采样参数包括采样频率、总体采样数量、触发信号以及最大触发前采样数量中的至少一者。The circuit of claim 12, wherein the sampling parameter comprises at least one of a sampling frequency, an overall number of samples, a trigger signal, and a maximum number of pre-trigger samples.
  14. 根据权利要求13中所述的电路,其中,所述采样电路进一步根据所述采样频率对所述信号源进行采样。The circuit of claim 13 wherein said sampling circuit further samples said signal source based on said sampling frequency.
  15. 根据权利要求13中所述的电路,其中,所述采样电路进一步在采样过程中利用所述触发信号对所述信号源进行触发。The circuit of claim 13 wherein said sampling circuit further triggers said signal source with said trigger signal during sampling.
  16. 根据权利要求15中所述的电路,其中,所述采样电路根据所述触发信号将写入所述存储器的所述采样数据区分为触发前采样数据和触发后采样数据。The circuit according to claim 15, wherein said sampling circuit distinguishes said sample data written in said memory into pre-trigger sample data and post-trigger sample data in accordance with said trigger signal.
  17. 根据权利要求16中所述的电路,其中,所述根据所述触发信号将写入所述存储器的所述采样数据区分为触发前采样数据和触发后采样数据包括:The circuit according to claim 16, wherein said distinguishing said sample data written in said memory into pre-trigger sample data and post-trigger sample data according to said trigger signal comprises:
    在所述触发信号对所述信号源进行触发时,若已写入所述存储器的所述采样数据的数量小于所述最大触发前采样数量,则记录所述已写入所述存储器的所述采样数据的数量,进而利用记录的数量值区分触发前采样数据和触发后采样数据。When the trigger signal is triggered to the signal source, if the number of the sampled data that has been written into the memory is less than the maximum number of pre-trigger samples, the recording of the written memory is recorded The number of sampled data, and then the number of records is used to distinguish between the pre-trigger sample data and the post-trigger sample data.
  18. 根据权利要求16中所述的电路,其中,所述根据所述触发信号将写入所述存储器的所述采样数据区分为触发前采样数据和触发后采样数据包括:The circuit according to claim 16, wherein said distinguishing said sample data written in said memory into pre-trigger sample data and post-trigger sample data according to said trigger signal comprises:
    在所述触发信号对所述信号源进行触发之前,若已写入所述存储器的所述采样数据的数量等于所述最大触发前采样数量,则利用后续采样的所述采样数据替代已写入所述存储器的所述采样数据直到所述触发信号对所述信号源进行触发,并在所述触发信号对所述信号源进行触发后,将后续采样的所述采样数据写入所述存储器的剩余空间。Before the trigger signal is triggered to the signal source, if the number of the sampled data that has been written into the memory is equal to the maximum number of samples before the trigger, the sampled data of the subsequent sample is used instead of the written The sampling data of the memory is triggered by the trigger signal to the signal source, and after the trigger signal is triggered by the signal source, the sampled data of the subsequent sampling is written into the memory remaining space.
  19. 根据权利要求16中所述的电路,其中,所述采样模块进一步判断所述存储器内存储的所述采样数据的数量是否等于所述总体采样数量,若等于所述总体采样数量,则停止采样。The circuit according to claim 16, wherein said sampling module further determines whether the number of said sampled data stored in said memory is equal to said total number of samples, and if equal to said total number of samples, stopping sampling.
PCT/CN2017/085020 2017-05-19 2017-05-19 Field programmable gate circuit and online testing method therefor WO2018209673A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201780036353.9A CN109416385B (en) 2017-05-19 2017-05-19 On-site programmable gate circuit and on-line testing method thereof
PCT/CN2017/085020 WO2018209673A1 (en) 2017-05-19 2017-05-19 Field programmable gate circuit and online testing method therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/085020 WO2018209673A1 (en) 2017-05-19 2017-05-19 Field programmable gate circuit and online testing method therefor

Publications (1)

Publication Number Publication Date
WO2018209673A1 true WO2018209673A1 (en) 2018-11-22

Family

ID=64273104

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/085020 WO2018209673A1 (en) 2017-05-19 2017-05-19 Field programmable gate circuit and online testing method therefor

Country Status (2)

Country Link
CN (1) CN109416385B (en)
WO (1) WO2018209673A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262380A (en) * 2008-04-17 2008-09-10 中兴通讯股份有限公司 A device and method for FPGA simulation
CN101980036A (en) * 2010-10-22 2011-02-23 福建鑫诺通讯技术有限公司 FPGA-based JTAG test method
CN102495359A (en) * 2011-12-13 2012-06-13 曙光信息产业(北京)有限公司 System and method for debugging FPGA (field programmable gate array)
CN103049361A (en) * 2013-01-11 2013-04-17 加弘科技咨询(上海)有限公司 FPGA (Field Programmable Gata Array) with embedded logical analysis function and logical analysis system
CN103197231A (en) * 2013-04-03 2013-07-10 湖南大学 Field programmable gate array (FPGA) device for diagnosing and predicting artificial circuit faults

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100445636B1 (en) * 2002-06-17 2004-08-25 삼성전자주식회사 Computer system test device using FPGA and programmable memory modules and the test method thereof
CN102541707B (en) * 2010-12-15 2014-04-23 中国科学院电子学研究所 Multiplex JTAG (Joint Test Action Group) interface-based FPGA (Field Programmable Gate Array) on-chip logic analyzer system and method
CN104598354B (en) * 2015-02-15 2016-05-25 浪潮电子信息产业股份有限公司 High-end fault-tolerant computer FPGA Special debugging method and device thereof based on soft or hard framework

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262380A (en) * 2008-04-17 2008-09-10 中兴通讯股份有限公司 A device and method for FPGA simulation
CN101980036A (en) * 2010-10-22 2011-02-23 福建鑫诺通讯技术有限公司 FPGA-based JTAG test method
CN102495359A (en) * 2011-12-13 2012-06-13 曙光信息产业(北京)有限公司 System and method for debugging FPGA (field programmable gate array)
CN103049361A (en) * 2013-01-11 2013-04-17 加弘科技咨询(上海)有限公司 FPGA (Field Programmable Gata Array) with embedded logical analysis function and logical analysis system
CN103197231A (en) * 2013-04-03 2013-07-10 湖南大学 Field programmable gate array (FPGA) device for diagnosing and predicting artificial circuit faults

Also Published As

Publication number Publication date
CN109416385B (en) 2021-12-07
CN109416385A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
CN102279830B (en) Multifunctional data acquisition module based on compact peripheral component interconnect (CPCI) bus
CN102541707B (en) Multiplex JTAG (Joint Test Action Group) interface-based FPGA (Field Programmable Gate Array) on-chip logic analyzer system and method
US10379158B2 (en) Real-time capture of traffic upon failure for protocol debug
CN105550119B (en) A kind of simulator based on JTAG protocol
WO2014015573A1 (en) Wireless automation test apparatus and method for mobile device
US8281280B2 (en) Method and apparatus for versatile controllability and observability in prototype system
CN105787164A (en) Debugging method and system for programmable logic device
CN109143034A (en) Chip ADC automatic performance test system and method
CN106787199A (en) A kind of portable substation simulated testing system and method
CN105067894A (en) Method and system of testing frequency conversion loss of mixer
CN102611836B (en) High-speed image collecting method based on Labview
CN112035302A (en) Real-time monitoring and analyzing method, device and system for bus data
CN100492315C (en) Embedded signal processor simulator
CN114184941A (en) Test system and method for module containing ADC chip
WO2018209673A1 (en) Field programmable gate circuit and online testing method therefor
CN102855338A (en) Field programmable gate array (FPGA) prototype verification device and method
CN103472387B (en) A kind of gpio line test macro and method of testing being applicable to anti-fuse type FPGA
CN105183954A (en) PXI based serial bus health monitoring platform
CN203101586U (en) Exploiting and debugging device
CN211318672U (en) Fault diagnosis system for multiport network nonlinear analog circuit
US7185248B2 (en) Failure analysis system and failure analysis method of logic LSI
CN104035422B (en) A kind of method for computing data based on intelligent mobile terminal
CN112557886A (en) Protocol conversion bridge circuit, intellectual property core and system-on-chip
CN104133174A (en) FPGA development board test method based on SignaltapII
CN111290743A (en) Computer software technology development and debugging system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17910056

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17910056

Country of ref document: EP

Kind code of ref document: A1