Test circuit and test method of embedded memory in FPGA
By using logic gates to connect the embedded memory output in the test circuit of the embedded memory in the FPGA, the problem of test vector length being related to FPGA size and integration is solved, and the stability of test time and cost is achieved.
Patent Information
- Application Number
- CN202210050052.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-17
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-01-17
AI Technical Summary
In existing technologies, the test vector length of embedded memory in FPGA is closely related to the size and integration level of FPGA, which leads to an increase in test time as the size and integration level increase, thus increasing test costs.
By using logic gates (such as OR gates, AND gates, XOR gates, and XNOR gates) in the test circuit of the embedded memory in the FPGA to connect the outputs of each embedded memory to the pins of the FPGA, the test vector length does not change with the size and integration level of the FPGA, and the test time remains constant.
This achieves test vector length and time independence from FPGA size and integration level, reducing testing costs.
Smart Images

Figure CN114388045B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of integrated circuits, and in particular to a testing technology for an embedded memory in an FPGA. Background Art
[0002] Usually, the test of embedded memory (eram) in FPGA is to connect each output of each embedded memory with a shift register. When the embedded memory is read out, the read result is shifted out through the shift register. The test vector of this method is closely related to the scale and integration of FPGA. The larger the scale and the higher the integration of FPGA, the longer the corresponding test vector is and the longer the test time is. The advantage of the above test method is that the output value of each output terminal of each embedded memory can be observed every time the embedded memory is read out. If the number of test vectors of a single embedded memory is E, and F read vectors are included in a single embedded memory test vector; assuming that N embedded memories are integrated in the FPGA and each embedded memory has M bits of data output, the length of the test vector for testing the embedded memory using this method = (EF) + N × M × F (number of write vectors + number of read shifts of N embedded memories).
[0003] From the above formula, it can be seen that the test vector of this shift test method is proportional to the number of integrated embedded memories in the FPGA and the number of output digits of the embedded memory.
[0004] Therefore, there is an urgent need for an embedded memory testing technology that makes the length of the test vector of the embedded memory in the FPGA independent of the scale and integration of the FPGA, and keeps the overall test time unchanged regardless of how the scale and integration of the FPGA grow. Summary of the invention
[0005] The purpose of the present invention is to provide a test circuit and a test method for an embedded memory in an FPGA, so that the length of the test vector of the embedded memory in the FPGA is independent of the scale and integration of the FPGA. No matter how the scale and integration of the FPGA increase, the overall test time remains unchanged.
[0006] To solve the above technical problems, an embodiment of the present invention discloses a test circuit of an embedded memory in an FPGA, wherein N embedded memories are integrated in the FPGA, wherein the input end of each embedded memory receives the same input signal, and the output end of each embedded memory outputs M bits of data, and the test circuit comprises:
[0007] M groups of first logic gates and M groups of second logic gates, wherein the number of each group is N, and both M and N are integers greater than or equal to 1;
[0008] The first logic gate and the second logic gate both have two input terminals and one output terminal;
[0009] The first input end of the Lth first logic gate of the Kth group is connected to the Kth bit output of the Lth embedded memory, the second input end of the Lth first logic gate of the Kth group is connected to the output end of the L-1th first logic gate of the Kth group, the output of the Nth first logic gate of the Kth group is the output of the Kth first logic gate, and the output of the Kth first logic gate is connected to the Kth pin of the FPGA, wherein K is an integer greater than or equal to 1 and less than or equal to M; L is an integer greater than or equal to 1 and less than or equal to N;
[0010] The first input end of the Sth second logic gate of the Rth group is connected to the Rth bit output of the Sth embedded memory, the second input end of the Sth second logic gate of the Rth group is connected to the output end of the S-1th second logic gate of the Rth group, the output of the Nth second logic gate of the Rth group is the output of the Rth second logic gate, and the output of the Rth second logic gate is connected to the M+Rth pin of the FPGA, wherein R is an integer greater than or equal to 1 and less than or equal to M; and S is an integer greater than or equal to 1 and less than or equal to N.
[0011] The embodiment of the present invention further discloses a test circuit of an embedded memory in an FPGA, wherein N embedded memories are integrated in the FPGA, wherein the input end of each embedded memory receives the same input signal, and the output end of each embedded memory outputs M bits of data, and the test circuit comprises:
[0012] M first logic gates and M second logic gates;
[0013] The first logic gate and the second logic gate both have N input terminals and 1 output terminal, wherein M and N are both integers greater than or equal to 1;
[0014] The N input ends of the Gth first logic gate are respectively connected to the Gth bit outputs of the N embedded memories, and the output end of the Gth first logic gate is connected to the Gth pin of the FPGA, where G is an integer greater than or equal to 1 and less than or equal to M;
[0015] The N input ends of the Hth second logic gate are respectively connected to the Hth bit outputs of the N embedded memories, and the output end of the Hth second logic gate is connected to the M+Hth pin of the FPGA, where H is an integer greater than or equal to 1 and less than or equal to M.
[0016] In another preferred example, the first logic gate is an OR gate, and the second logic gate is an AND gate.
[0017] The embodiment of the present invention further discloses a test circuit of an embedded memory in an FPGA, wherein N embedded memories are integrated in the FPGA, wherein the input end of each embedded memory receives the same input signal, and the output end of each embedded memory outputs M bits of data, and the test circuit comprises:
[0018] M groups of logic gates, wherein each group has N logic gates, each logic gate has 2 input terminals and 1 output terminal, and M and N are both integers greater than or equal to 1;
[0019] The first input end of the U-th logic gate of the T-th group is connected to the T-th bit output of the U-th embedded memory, the second input end of the U-th logic gate of the T-th group is connected to the output end of the U-1-th logic gate of the T-th group, the output of the N-th logic gate of the T-th group is the output of the T-th group logic gate, and the output of the T-th group logic gate is connected to the T-th pin of the FPGA, wherein T is an integer greater than or equal to 1 and less than or equal to M; and U is an integer greater than or equal to 1 and less than or equal to N.
[0020] The embodiment of the present invention further discloses a test circuit of an embedded memory in an FPGA, wherein N embedded memories are integrated in the FPGA, wherein the input end of each embedded memory receives the same input signal, and the output end of each embedded memory outputs M bits of data, and the test circuit comprises:
[0021] M logic gates, each of which has N input terminals and 1 output terminal, wherein M and N are integers greater than or equal to 1;
[0022] The N input ends of the Jth logic gate are respectively connected to the Jth outputs of the N embedded memories, and the output end of the Jth logic gate is connected to the Jth pin of the FPGA, where J is an integer greater than or equal to 1 and less than or equal to M.
[0023] In another preferred embodiment, the logic gate is an XOR gate or an XNOR gate.
[0024] The embodiment of the present invention further discloses a method for testing an embedded memory in an FPGA, which is suitable for adding a test circuit for the embedded memory in the FPGA as described above to the FPGA, and the method comprises the following steps:
[0025] Connect the input of each embedded memory to the same input signal;
[0026] Respectively receiving the output of each group of first logic gates and the output of each group of second logic gates;
[0027] Compare the output of each group of first logic gates with the memory output generated by the corresponding input signal after being input into the first logic gate for operation;
[0028] The output of each group of second logic gates is respectively compared with the result of the memory output generated by the corresponding input signal being input into the second logic gate for operation;
[0029] According to the comparison result, it is determined whether the embedded memory in the FPGA has a fault.
[0030] The embodiment of the present invention further discloses a method for testing an embedded memory in an FPGA, which is suitable for adding a test circuit for the embedded memory in the FPGA as described above to the FPGA, and the method comprises the following steps:
[0031] Connect the input of each embedded memory to the same input signal;
[0032] Receiving the output of each first logic gate and the output of each second logic gate respectively;
[0033] Compare the output of each first logic gate with the memory output generated by the corresponding input signal after being input into the first logic gate for operation;
[0034] Compare the output of each second logic gate with the memory output generated by the corresponding input signal after being input into the second logic gate for operation;
[0035] According to the comparison result, it is determined whether the embedded memory in the FPGA has a fault.
[0036] The embodiment of the present invention further discloses a method for testing an embedded memory in an FPGA, which is suitable for adding a test circuit for the embedded memory in the FPGA as described above to the FPGA, and the method comprises the following steps:
[0037] Connect the input of each embedded memory to the same input signal;
[0038] Receive the output of each group of logic gates respectively;
[0039] Compare the output of each group of logic gates with the memory output generated by the corresponding input signal after being input into the logic gate for operation;
[0040] According to the comparison result, it is determined whether the embedded memory in the FPGA has a fault.
[0041] The embodiment of the present invention further discloses a method for testing an embedded memory in an FPGA, which is suitable for adding a test circuit for the embedded memory in the FPGA as described above to the FPGA, and the method comprises the following steps:
[0042] Connect the input of each embedded memory to the same input signal;
[0043] Receive the output of each logic gate respectively;
[0044] Compare the output of each logic gate with the result of the memory output generated by the corresponding input signal input into the logic gate for operation;
[0045] According to the comparison result, it is determined whether the embedded memory in the FPGA has a fault.
[0046] It should be understood that within the scope of the present invention, the above-mentioned technical features of the present invention and the technical features specifically described below (such as implementation methods) can be combined with each other to form a new or preferred technical solution. Due to space limitations, they will not be described one by one here.
[0047] Compared with the prior art, the main differences and effects of the embodiments of the present invention are:
[0048] The present invention connects the corresponding outputs of each embedded memory with an AND gate and an OR gate, or connects them with an XOR gate or an XOR gate, and finally outputs them to the pin of the FPGA. The length of the test vector does not change with the scale of the FPGA and the integration of the FPGA. No matter how the scale and integration of the FPGA increase, the test vector is equal to the test vector of an embedded memory, and the test time does not change with the scale and integration, thereby reducing the test cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 is a schematic structural diagram of a test circuit for an embedded memory in an FPGA according to a first embodiment of the present invention;
[0050] Figure 2 is a flowchart of a method for testing an embedded memory in an FPGA according to a fifth embodiment of the present invention;
[0051] Figure 3 is a flow chart of a method for testing an embedded memory in an FPGA according to a sixth embodiment of the present invention;
[0052] Figure 4 is a flow chart of a method for testing an embedded memory in an FPGA according to a seventh embodiment of the present invention;
[0053] Figure 5It is a flowchart of a method for testing an embedded memory in an FPGA according to an eighth embodiment of the present invention. DETAILED DESCRIPTION
[0054] In the following description, many technical details are provided to help readers better understand the present application. However, those skilled in the art can understand that even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in the claims of the present application can be implemented.
[0055] Explanation of some terms:
[0056] Test vector: The stimulus and output expected value added when testing an integrated circuit;
[0057] Test vector length: the number of vectors added during integrated circuit testing;
[0058] Eram: embedded ram in FPGA;
[0059] Shift register: In digital circuits, a shift register is a flip-flop-based device that operates on a number of identical time pulses. Data is input into the device in parallel or serial form, and then each time pulse shifts one bit to the left or right in turn and is output at the output end.
[0060] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0061] A first embodiment of the present invention relates to a test circuit for an embedded memory in an FPGA.
[0062] Specifically, N embedded memories are integrated in the FPGA, wherein the input end of each embedded memory receives the same input signal, and the output end of each embedded memory outputs M bits of data. The test circuit includes:
[0063] There are M groups of first logic gates and M groups of second logic gates, wherein the number of each group is N, and both M and N are integers greater than or equal to 1.
[0064] That is, the number of groups of first logic gates and second logic gates is equal to the number of bits of data output from the output end of each embedded memory, and the number of logic gates in each group of logic gates is equal to the number of embedded memories integrated in the FPGA.
[0065] In this implementation, preferably, both the first logic gate and the second logic gate have two input terminals and one output terminal.
[0066] The first input end of the Lth first logic gate of the Kth group is connected to the Kth bit output of the Lth embedded memory, the second input end of the Lth first logic gate of the Kth group is connected to the output end of the L-1th first logic gate of the Kth group, the output of the Nth first logic gate of the Kth group is the output of the Kth first logic gate, and the output of the Kth first logic gate is connected to the Kth pin of the FPGA, wherein K is an integer greater than or equal to 1 and less than or equal to M; and L is an integer greater than or equal to 1 and less than or equal to N.
[0067] Specifically,
[0068] The first input end of the first first logic gate of the first group is connected to the first bit output of the first embedded memory; the first input end of the second first logic gate of the first group is connected to the first bit output of the second embedded memory, and the second input end of the second first logic gate of the first group is connected to the output end of the first first logic gate of the first group; the first input end of the third first logic gate of the first group is connected to the first bit output of the third embedded memory, and the second input end of the third first logic gate of the first group is connected to the output end of the second first logic gate of the first group; and so on, ..., until the first input end of the Nth first logic gate of the first group is connected to the first bit output of the Nth embedded memory, and the second input end of the Nth first logic gate of the first group is connected to the output end of the N-1th first logic gate of the first group. The output of the Nth first logic gate of the first group is used as the output of the first logic gate of the first group, and the output of the first logic gate of the first group is connected to the first pin of the FPGA.
[0069] Similarly, the first input end of the first first logic gate of the second group is connected to the second bit output of the first embedded memory; the first input end of the second first logic gate of the second group is connected to the second bit output of the second embedded memory, and the second input end of the second first logic gate of the second group is connected to the output end of the first first logic gate of the second group; the first input end of the third first logic gate of the second group is connected to the second bit output of the third embedded memory, and the second input end of the third first logic gate of the second group is connected to the output end of the second first logic gate of the second group; and so on, ..., until the first input end of the Nth first logic gate of the second group is connected to the second bit output of the Nth embedded memory, and the second input end of the Nth first logic gate of the second group is connected to the output end of the N-1th first logic gate of the second group. The output of the Nth first logic gate of the second group is used as the output of the first logic gate of the second group, and the output of the first logic gate of the second group is connected to the second pin of the FPGA.
[0070] And so on, ..., until
[0071] The first input end of the first first logic gate of the Mth group is connected to the Mth bit output of the first embedded memory; the first input end of the second first logic gate of the Mth group is connected to the Mth bit output of the second embedded memory, and the second input end of the second first logic gate of the Mth group is connected to the output end of the first first logic gate of the Mth group; the first input end of the third first logic gate of the Mth group is connected to the Mth bit output of the third embedded memory, and the second input end of the third first logic gate of the Mth group is connected to the output end of the second first logic gate of the Mth group; and so on, ..., until the first input end of the Nth first logic gate of the Mth group is connected to the Mth bit output of the Nth embedded memory, and the second input end of the Nth first logic gate of the Mth group is connected to the output end of the N-1th first logic gate of the Mth group. The output of the Nth first logic gate of the Mth group is used as the output of the first logic gate of the Mth group, and the output of the first logic gate of the Mth group is connected to the Mth pin of the FPGA.
[0072] The first input end of the Sth second logic gate of the Rth group is connected to the Rth bit output of the Sth embedded memory, the second input end of the Sth second logic gate of the Rth group is connected to the output end of the S-1th second logic gate of the Rth group, the output of the Nth second logic gate of the Rth group is the output of the Rth second logic gate, and the output of the Rth second logic gate is connected to the M+Rth pin of the FPGA, wherein R is an integer greater than or equal to 1 and less than or equal to M; and S is an integer greater than or equal to 1 and less than or equal to N.
[0073] Specifically,
[0074] The first input end of the first second logic gate of the first group is connected to the first bit output of the first embedded memory; the first input end of the second second logic gate of the first group is connected to the first bit output of the second embedded memory, and the second input end of the second second logic gate of the first group is connected to the output end of the first second logic gate of the first group; the first input end of the third second logic gate of the first group is connected to the first bit output of the third embedded memory, and the second input end of the third second logic gate of the first group is connected to the output end of the second second logic gate of the first group; and so on, ..., until the first input end of the Nth second logic gate of the first group is connected to the first bit output of the Nth embedded memory, and the second input end of the Nth second logic gate of the first group is connected to the output end of the N-1th second logic gate of the first group. The output of the Nth second logic gate of the first group is used as the output of the second logic gate of the first group, and the output of the second logic gate of the first group is connected to the M+1th pin of the FPGA.
[0075] Similarly, the first input end of the first second logic gate of the second group is connected to the second bit output of the first embedded memory; the first input end of the second second logic gate of the second group is connected to the second bit output of the second embedded memory, and the second input end of the second second logic gate of the second group is connected to the output end of the first second logic gate of the second group; the first input end of the third second logic gate of the second group is connected to the second bit output of the third embedded memory, and the second input end of the third second logic gate of the second group is connected to the output end of the second second logic gate of the second group; and so on, ..., until the first input end of the Nth second logic gate of the second group is connected to the second bit output of the Nth embedded memory, and the second input end of the Nth second logic gate of the second group is connected to the output end of the N-1th second logic gate of the second group. The output of the Nth second logic gate of the second group is used as the output of the second logic gate of the second group, and the output of the second logic gate of the second group is connected to the M+2th pin of the FPGA.
[0076] And so on, ..., until
[0077] The first input end of the first second logic gate of the Mth group is connected to the Mth bit output of the first embedded memory; the first input end of the second second logic gate of the Mth group is connected to the Mth bit output of the second embedded memory, and the second input end of the second second logic gate of the Mth group is connected to the output end of the first second logic gate of the Mth group; the first input end of the third second logic gate of the Mth group is connected to the Mth bit output of the third embedded memory, and the second input end of the third second logic gate of the Mth group is connected to the output end of the second second logic gate of the Mth group; and so on, ..., until the first input end of the Nth second logic gate of the Mth group is connected to the Mth bit output of the Nth embedded memory, and the second input end of the Nth second logic gate of the Mth group is connected to the output end of the N-1th second logic gate of the Mth group. The output of the Nth second logic gate of the Mth group is used as the output of the second logic gate of the Mth group, and the output of the second logic gate of the Mth group is connected to the 2Mth pin of the FPGA.
[0078] In this implementation, preferably, the first logic gate is an OR gate, and the second logic gate is an AND gate.
[0079] Of course, this is only a preferred implementation of the present invention. In other implementations of the present invention, the first logic gate and the second logic gate may also be other types of logic gates, and the present invention is not limited thereto.
[0080] Those skilled in the art will appreciate that when different first logic gates and second logic gates are selected, when performing a test, it is only necessary to make corresponding changes to the output portion of the test vector to achieve the purpose of the test.
[0081] Figure 1 The figure shows a schematic diagram of the structure of a test circuit for an embedded memory in an FPGA. Figure 1 In the embedded memory test circuit shown in the figure, N embedded memories are integrated in the FPGA, wherein the input end of each embedded memory receives the same input signal, and the output end of each embedded memory outputs 3-bit data. The first logic gate is an OR gate, and the second logic gate is an AND gate. Therefore, Figure 1 The test circuit of the embedded memory shown in the figure includes 3 groups of OR gates and 3 groups of AND gates. Each group of OR gates includes N OR gates in total, and each group of AND gates also includes N AND gates in total.
[0082] It should be noted that in Figure 1 In the circuit shown, for the convenience of drawing and wiring, the connection relationship between each group of OR gates and the N embedded memories is slightly different from the above description, and the output direction of each group of OR gates is changed.
[0083] Specifically, the first group of OR gates is taken as an example to explain as follows:
[0084] The first input end of the Nth OR gate of the first group is connected to the first bit output of the Nth embedded memory; the first input end of the N-1th OR gate of the first group is connected to the first bit output of the N-1th embedded memory, and the second input end of the N-1th OR gate of the first group is connected to the output end of the Nth OR gate of the first group; the first input end of the N-2th OR gate of the first group is connected to the first bit output of the N-2th embedded memory, and the second input end of the N-2th OR gate of the first group is connected to the output end of the N-1th OR gate of the first group; and so on, ..., until the first input end of the first OR gate of the first group is connected to the first bit output of the first embedded memory, and the second input end of the first OR gate of the first group is connected to the output end of the second OR gate of the first group. The output of the first OR gate of the first group is used as the output of the first OR gate, and the output of the first OR gate is connected to the first pin of the FPGA.
[0085] In summary, the input signals of each embedded memory in the FPGA of the present invention are from the same source (i.e., the address, data and control signal of the input signal are the same), and the corresponding outputs of each embedded memory are connected in turn by AND gates and OR gates, and finally output to the pins of the FPGA. The length of the test vector does not change with the scale of the FPGA and the integration (density) of the FPGA. No matter how the scale and integration of the FPGA increase, the test vector is equal to the test vector of an eram, and the test time does not change with the scale and integration, thereby reducing the test cost.
[0086] A second embodiment of the present invention relates to a test circuit for an embedded memory in an FPGA.
[0087] Specifically, N embedded memories are integrated in the FPGA, wherein the input end of each embedded memory receives the same input signal, and the output end of each embedded memory outputs M bits of data. The test circuit includes:
[0088] M first logic gates and M second logic gates;
[0089] The first logic gate and the second logic gate both have N input terminals and 1 output terminal, wherein M and N are both integers greater than or equal to 1;
[0090] The N input ends of the Gth first logic gate are respectively connected to the Gth bit outputs of the N embedded memories, and the output end of the Gth first logic gate is connected to the Gth pin of the FPGA, where G is an integer greater than or equal to 1 and less than or equal to M;
[0091] The N input ends of the Hth second logic gate are respectively connected to the Hth bit outputs of the N embedded memories, and the output end of the Hth second logic gate is connected to the M+Hth pin of the FPGA, where H is an integer greater than or equal to 1 and less than or equal to M.
[0092] That is to say, in this embodiment, preferably, the number of the first logic gates and the second logic gates is equal to the number of bits of data outputted from the output end of each embedded memory, and the input end of each first logic gate and the second logic gate is equal to the number of embedded memories integrated in the FPGA.
[0093] In this implementation, preferably, the first logic gate is an OR gate, and the second logic gate is an AND gate.
[0094] Of course, this is only a preferred implementation of the present invention. In other implementations of the present invention, the first logic gate and the second logic gate may also be other types of logic gates, and the present invention is not limited thereto.
[0095] Those skilled in the art will appreciate that when different first logic gates and second logic gates are selected, when performing a test, it is only necessary to make corresponding changes to the output portion of the test vector to achieve the purpose of the test.
[0096] In summary, the input signals of each embedded memory in the FPGA of the present invention are from the same source (i.e., the address, data and control signal of the input signal are the same), and the corresponding outputs of each embedded memory are connected in turn by AND gates and OR gates, and finally output to the pins of the FPGA. The length of the test vector does not change with the scale and integration of the FPGA. No matter how the scale and integration of the FPGA increase, the test vector is equal to the test vector of an embedded memory, and the test time does not change with the scale and integration, thereby reducing the test cost.
[0097] The first embodiment is a circuit structure embodiment corresponding to the present embodiment. The technical details in the first embodiment can be applied to the present embodiment, and the technical details in the present embodiment can also be applied to the first embodiment.
[0098] A third embodiment of the present invention relates to a test circuit for an embedded memory in an FPGA.
[0099] Specifically, N embedded memories are integrated in the FPGA, wherein the input end of each embedded memory receives the same input signal, and the output end of each embedded memory outputs M bits of data. The test circuit includes:
[0100] There are M groups of logic gates, wherein the number of each group is N, each logic gate has 2 input terminals and 1 output terminal, and M and N are both integers greater than or equal to 1.
[0101] That is to say, the number of groups of logic gates is equal to the number of bits of data output from the output end of each embedded memory, and the number of logic gates in each group of logic gates is equal to the number of embedded memories integrated in the FPGA.
[0102] In this implementation, preferably, both the first logic gate and the second logic gate have two input terminals and one output terminal.
[0103] The first input end of the U-th logic gate of the T-th group is connected to the T-th bit output of the U-th embedded memory, the second input end of the U-th logic gate of the T-th group is connected to the output end of the U-1-th logic gate of the T-th group, the output of the N-th logic gate of the T-th group is the output of the T-th group logic gate, and the output of the T-th group logic gate is connected to the T-th pin of the FPGA, wherein T is an integer greater than or equal to 1 and less than or equal to M; and U is an integer greater than or equal to 1 and less than or equal to N.
[0104] In this implementation, preferably, the logic gate is an XOR gate or an XNOR gate.
[0105] Of course, this is only a preferred implementation of the present invention. In other implementations of the present invention, the logic gate may also be other types of logic gates, and the present invention is not limited thereto.
[0106] Those skilled in the art will appreciate that when different logic gates are selected, when performing a test, it is only necessary to make corresponding changes to the output portion of the test vector to achieve the purpose of the test.
[0107] In summary, the input signals of each embedded memory in the FPGA of the present invention are from the same source (i.e., the address, data and control signal of the input signal are the same), and the corresponding outputs of each embedded memory are connected in turn by an XOR gate or an XOR gate, and finally output to the pin of the FPGA. The length of the test vector does not change with the scale and integration of the FPGA. No matter how the scale and integration of the FPGA increase, the test vector is equal to the test vector of an embedded memory, and the test time does not change with the scale and integration, thereby reducing the test cost.
[0108] The first embodiment is a circuit structure embodiment corresponding to the present embodiment. The technical details in the first embodiment can be applied to the present embodiment, and the technical details in the present embodiment can also be applied to the first embodiment.
[0109] A fourth embodiment of the present invention relates to a test circuit for an embedded memory in an FPGA.
[0110] Specifically, N embedded memories are integrated in the FPGA, wherein the input end of each embedded memory receives the same input signal, and the output end of each embedded memory outputs M bits of data. The test circuit includes:
[0111] M logic gates, each of which has N input terminals and 1 output terminal, wherein M and N are integers greater than or equal to 1;
[0112] That is to say, in this embodiment, preferably, the number of logic gates is equal to the number of bits of data output by the output end of each embedded memory, and the number of input ends in each logic gate is equal to the number of embedded memories integrated in the FPGA.
[0113] In this implementation, preferably, the logic gate is an XOR gate or an XNOR gate.
[0114] The N input ends of the Jth logic gate are respectively connected to the Jth outputs of the N embedded memories, and the output end of the Jth logic gate is connected to the Jth pin of the FPGA, where J is an integer greater than or equal to 1 and less than or equal to M.
[0115] Of course, this is only a preferred implementation of the present invention. In other implementations of the present invention, the logic gate may also be other types of logic gates, and the present invention is not limited thereto.
[0116] Those skilled in the art will appreciate that when different logic gates are selected, when performing a test, it is only necessary to make corresponding changes to the output portion of the test vector to achieve the purpose of the test.
[0117] In summary, the input signals of each embedded memory in the FPGA of the present invention are from the same source (i.e., the address, data and control signal of the input signal are the same), and the corresponding outputs of each embedded memory are connected in turn by an XOR gate or an XOR gate, and finally output to the pin of the FPGA. The length of the test vector does not change with the scale and integration of the FPGA. No matter how the scale and integration of the FPGA increase, the test vector is equal to the test vector of an embedded memory, and the test time does not change with the scale and integration, thereby reducing the test cost.
[0118] The second embodiment is a circuit structure embodiment corresponding to the present embodiment. The technical details in the second embodiment can be applied to the present embodiment, and the technical details in the present embodiment can also be applied to the first embodiment.
[0119] It should be noted that, in each embodiment of the present invention, the cases of OR gates, AND gates, XOR gates and XNOR gates with 2 input terminals and N input terminals are respectively listed. However, those skilled in the art can understand that in the test circuit of the embedded memory in the above-mentioned FPGA, logic gates with 2, 3, 4, ..., N-1, N input terminals can be implemented, and are not limited to 2 input terminals and N input terminals. Similarly, the logic gate is not limited to the four types of OR gates, AND gates, XOR gates and XNOR gates, and can also be other types of logic gates. When logic gates with different input terminals are selected, when testing, it is only necessary to make corresponding changes to the connection mode of each input and output terminal; similarly, when different types of logic gates are selected, when testing, it is only necessary to make corresponding changes to the output part of the test vector to achieve the purpose of the test. Due to space limitations, they are not described in detail one by one here. It should be noted that, in order to highlight the innovative part of the present invention, the circuit structure of the present invention does not introduce circuit components that are not closely related to solving the technical problems proposed by the present invention, which does not mean that there are no other circuit components in the above-mentioned circuit.
[0120] It should be noted that the various structures or modules mentioned in the embodiments of the present application are all logical modules. Physically, a logical module can be a physical module, or a part of a physical module, or can be implemented as a combination of multiple physical modules. The physical implementation of these logical modules themselves is not the most important. The combination of functions implemented by these logical modules is the key to solving the technical problems raised by this application. In addition, in order to highlight the innovative part of this application, the above-mentioned device implementation methods of this application do not introduce modules that are not closely related to solving the technical problems raised by this application, which does not mean that there are no other modules in the above-mentioned device implementation methods.
[0121] A fifth embodiment of the present invention relates to a method for testing an embedded memory in an FPGA. Figure 2 It is a flowchart of a testing method for the embedded memory in the FPGA.
[0122] The method for testing an embedded memory in an FPGA is suitable for adding a test circuit for the embedded memory in an FPGA as described in the first embodiment to the FPGA.
[0123] Specifically, if Figure 2 As shown, the test method of the embedded memory in the FPGA includes the following steps:
[0124] In step 201, the input terminals of each embedded memory are connected to the same input signal.
[0125] Then, the process proceeds to step 202 to receive the output of each group of first logic gates and the output of each group of second logic gates respectively.
[0126] Then, the process proceeds to step 203, where the output of each group of first logic gates is compared with the result of the memory output generated by the corresponding input signal being input to the first logic gate for operation.
[0127] Then, the process proceeds to step 204, where the output of each group of second logic gates is compared with the result of the memory output generated by the corresponding input signal being input to the second logic gate for operation.
[0128] It should be noted that the memory output here refers to the output of a memory without faults.
[0129] Then, the process proceeds to step 205 to determine whether the embedded memory in the FPGA is faulty based on the comparison result.
[0130] This process ends thereafter.
[0131] It should be noted that steps 203 and 204 may be performed simultaneously, or step 204 may be performed first and then step 203.
[0132] In this implementation, preferably, the first logic gate is an OR gate, and the second logic gate is an AND gate.
[0133] Of course, this is only a preferred implementation of the present invention. In other implementations of the present invention, the first logic gate and the second logic gate may also be other types of logic gates, and the present invention is not limited thereto.
[0134] Those skilled in the art will appreciate that when different first logic gates and second logic gates are selected, when performing a test, it is only necessary to make corresponding changes to the output portion of the test vector to achieve the purpose of the test.
[0135] For example, when the first logic gate is an OR gate and the second logic gate is an AND gate, if the Kth bit output of a normal embedded memory is a low level, but the output of the Kth group of OR gates is a high level, it indicates that there is a fault in the Kth bit output of the M embedded memories in the FPGA, where K is an integer greater than or equal to 1 and less than or equal to M; if the Rth bit output of a normal embedded memory is a high level, but the output of the Rth group of AND gates is a low level, it indicates that there is a fault in the Rth bit output of the M embedded memories in the FPGA, where R is an integer greater than or equal to 1 and less than or equal to M.
[0136] In summary, the input signals of each embedded memory in the FPGA of the present invention are from the same source (i.e., the address, data and control signal of the input signal are the same), and the corresponding outputs of each embedded memory are connected in turn by AND gates and OR gates, and finally output to the pins of the FPGA. The length of the test vector does not change with the scale and integration of the FPGA. No matter how the scale and integration of the FPGA increase, the test vector is equal to the test vector of an embedded memory, and the test time does not change with the scale and integration, thereby reducing the test cost.
[0137] The first embodiment is a circuit structure embodiment corresponding to the present embodiment. The technical details in the first embodiment can be applied to the present embodiment, and the technical details in the present embodiment can also be applied to the first embodiment.
[0138] A sixth embodiment of the present invention relates to a method for testing an embedded memory in an FPGA. Figure 3 It is a flowchart of a testing method for the embedded memory in the FPGA.
[0139] The method for testing an embedded memory in an FPGA is suitable for adding a test circuit for the embedded memory in an FPGA as described in the second embodiment to the FPGA.
[0140] Specifically, if Figure 3As shown, the test method of the embedded memory in the FPGA includes the following steps:
[0141] In step 301, the input terminals of each embedded memory are connected to the same input signal.
[0142] Then, the process proceeds to step 302 to receive the output of each first logic gate and the output of each second logic gate respectively.
[0143] Then, the process proceeds to step 303 to compare the output of each first logic gate with the result of the memory output generated by the corresponding input signal being input to the first logic gate for operation.
[0144] Then, the process proceeds to step 304, where the output of each second logic gate is compared with the result of the memory output generated by the corresponding input signal being input to the second logic gate for operation.
[0145] It should be noted that the memory output here refers to the output of a memory without faults.
[0146] Then, the process proceeds to step 305 to determine whether the embedded memory in the FPGA is faulty based on the comparison result.
[0147] This process ends thereafter.
[0148] It should be noted that steps 303 and 304 may be performed simultaneously, or step 304 may be performed first and then step 303.
[0149] In this implementation, preferably, the first logic gate is an OR gate, and the second logic gate is an AND gate.
[0150] Of course, these are just two preferred implementations of the present invention. In other implementations of the present invention, the first logic gate and the second logic gate may also be other types of logic gates, and the present invention is not limited thereto.
[0151] Those skilled in the art will appreciate that when different first logic gates and second logic gates are selected, when performing a test, it is only necessary to make corresponding changes to the output portion of the test vector to achieve the purpose of the test.
[0152] For example, when the first logic gate is an OR gate and the second logic gate is an AND gate, if the G-th bit output of a normal embedded memory is a low level, but the output of the G-th OR gate is a high level, it indicates that there is a fault in the G-th bit output of the M embedded memories in the FPGA, where G is an integer greater than or equal to 1 and less than or equal to M; if the H-th bit output of a normal embedded memory is a high level, but the output of the H-th AND gate is a low level, it indicates that there is a fault in the H-th bit output of the M embedded memories in the FPGA, where H is an integer greater than or equal to 1 and less than or equal to M.
[0153] In summary, the input signals of each embedded memory in the FPGA of the present invention are from the same source (i.e., the address, data and control signal of the input signal are the same), and the corresponding outputs of each embedded memory are connected in turn by AND gates and OR gates, and finally output to the pins of the FPGA. The length of the test vector does not change with the scale and integration of the FPGA. No matter how the scale and integration of the FPGA increase, the test vector is equal to the test vector of an embedded memory, and the test time does not change with the scale and integration, thereby reducing the test cost.
[0154] The second embodiment is a circuit structure embodiment corresponding to the present embodiment. The technical details in the second embodiment can be applied to the present embodiment, and the technical details in the present embodiment can also be applied to the second embodiment.
[0155] A seventh embodiment of the present invention relates to a method for testing an embedded memory in an FPGA. Figure 4 It is a flowchart of a testing method for the embedded memory in the FPGA.
[0156] The method for testing an embedded memory in an FPGA is applicable to adding a test circuit for the embedded memory in an FPGA as described in the third embodiment to the FPGA.
[0157] Specifically, if Figure 4 As shown, the test method of the embedded memory in the FPGA includes the following steps:
[0158] In step 401, the input terminals of each embedded memory are connected to the same input signal.
[0159] Then, the process proceeds to step 402 to receive the output of each group of logic gates respectively.
[0160] Then, the process proceeds to step 403, where the output of each group of logic gates is compared with the result of the memory output generated by the corresponding input signal being input to the logic gate for operation.
[0161] It should be noted that the memory output here refers to the output of a memory without faults.
[0162] Then, the process proceeds to step 404 to determine whether the embedded memory in the FPGA is faulty based on the comparison result.
[0163] This process ends thereafter.
[0164] In this implementation, preferably, the logic gate is an XOR gate or an XNOR gate.
[0165] Of course, this is only a preferred implementation of the present invention. In other implementations of the present invention, the logic gate may also be other types of logic gates, and the present invention is not limited thereto.
[0166] Those skilled in the art will appreciate that when different logic gates are selected, when performing a test, it is only necessary to make corresponding changes to the output portion of the test vector to achieve the purpose of the test.
[0167] For example, if all embedded memories are normal (i.e., there are no faults), the T-th bit outputs of the tested embedded memories are the same. When the logic gates are XOR gates, if the outputs of the T-th group of XOR gates are high, it indicates that there is a fault in the T-th bit outputs of the M embedded memories in the FPGA; when the logic gates are XOR gates, if the outputs of the T-th group of XOR gates are low, it indicates that there is a fault in the T-th bit outputs of the M embedded memories in the FPGA; wherein T is an integer greater than or equal to 1 and less than or equal to M.
[0168] In summary, the input signals of each embedded memory in the FPGA of the present invention are from the same source (i.e., the address, data and control signal of the input signal are the same), and the corresponding outputs of each embedded memory are connected in turn by AND gates and OR gates, and finally output to the pins of the FPGA. The length of the test vector does not change with the scale and integration of the FPGA. No matter how the scale and integration of the FPGA increase, the test vector is equal to the test vector of an embedded memory, and the test time does not change with the scale and integration, thereby reducing the test cost.
[0169] The third embodiment is a circuit structure embodiment corresponding to the present embodiment. The technical details in the third embodiment can be applied to the present embodiment, and the technical details in the present embodiment can also be applied to the third embodiment.
[0170] An eighth embodiment of the present invention relates to a method for testing an embedded memory in an FPGA. Figure 5 It is a flowchart of a testing method for the embedded memory in the FPGA.
[0171] The method for testing an embedded memory in an FPGA is applicable to adding a test circuit for the embedded memory in an FPGA as described in the fourth embodiment to the FPGA.
[0172] Specifically, if Figure 5 As shown, the test method of the embedded memory in the FPGA includes the following steps:
[0173] In step 501, the input terminals of each embedded memory are connected to the same input signal.
[0174] Then, the process proceeds to step 502 to receive the output of each logic gate respectively.
[0175] Then, the process proceeds to step 503, where the output of each logic gate is compared with the result of the memory output generated by the corresponding input signal being input to the logic gate for operation.
[0176] It should be noted that the memory output here refers to the output of a memory without faults.
[0177] Then, the process proceeds to step 504 to determine whether the embedded memory in the FPGA is faulty based on the comparison result.
[0178] This process ends thereafter.
[0179] In this implementation, preferably, the logic gate is an XOR gate or an XNOR gate.
[0180] Of course, this is only a preferred implementation of the present invention. In other implementations of the present invention, the logic gate may also be other types of logic gates, and the present invention is not limited thereto.
[0181] Those skilled in the art will appreciate that when different logic gates are selected, when performing a test, it is only necessary to make corresponding changes to the output portion of the test vector to achieve the purpose of the test.
[0182] For example, if all embedded memories are normal (i.e., there is no fault), the J-th bit output of the tested embedded memories is the same. When the logic gate is an XOR gate, if the output of the J-th XOR gate is a high level, it means that there is a fault in the J-th bit output of the M embedded memories in the FPGA; when the logic gate is an XOR gate, if the output of the J-th XOR gate is a low level, it means that there is a fault in the J-th bit output of the M embedded memories in the FPGA; where J is an integer greater than or equal to 1 and less than or equal to M.
[0183] In summary, the input signals of each embedded memory in the FPGA of the present invention are from the same source (i.e., the address, data and control signal of the input signal are the same), and the corresponding outputs of each embedded memory are connected in turn by AND gates and OR gates, and finally output to the pins of the FPGA. The length of the test vector does not change with the scale and integration of the FPGA. No matter how the scale and integration of the FPGA increase, the test vector is equal to the test vector of an embedded memory, and the test time does not change with the scale and integration, thereby reducing the test cost.
[0184] The fourth embodiment is a circuit structure embodiment corresponding to the present embodiment. The technical details in the fourth embodiment can be applied to the present embodiment, and the technical details in the present embodiment can also be applied to the fourth embodiment.
[0185] It should be noted that the method implementation methods of the present invention can be implemented in software, hardware, firmware, etc. Regardless of whether the present invention is implemented in software, hardware, or firmware, the instruction code can be stored in any type of computer-accessible memory (e.g., permanent or modifiable, volatile or non-volatile, solid or non-solid, fixed or replaceable media, etc.). Similarly, the memory can be, for example, a programmable array logic (PAL), a random access memory (RAM), a programmable read-only memory (PROM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic disk, an optical disk, a digital versatile disc (DVD), etc.
[0186] It should be noted that in the claims and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0187] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be apparent to those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.
Claims
1. A test circuit for an embedded memory in an FPGA, characterized in that: N embedded memories are integrated in the FPGA, wherein the input end of each embedded memory receives the same input signal, and the output end of each embedded memory outputs M bits of data. The test circuit includes: M groups of first logic gates and M groups of second logic gates, wherein the number of each group is N, and M and N are both integers greater than or equal to 1; The first logic gate and the second logic gate both have two input terminals and one output terminal; The first input end of the Lth first logic gate of the Kth group is connected to the Kth output of the Lth embedded memory, the second input end of the Lth first logic gate of the Kth group is connected to the output end of the L-1th first logic gate of the Kth group, the output of the Nth first logic gate of the Kth group is the output of the Kth first logic gate, and the output of the Kth first logic gate is connected to the Kth pin of the FPGA, wherein K is an integer greater than or equal to 1 and less than or equal to M; L is an integer greater than or equal to 1 and less than or equal to N; The first input end of the S-th second logic gate of the R-th group is connected to the R-th bit output of the S-th embedded memory, the second input end of the S-th second logic gate of the R-th group is connected to the output end of the S-1-th second logic gate of the R-th group, the output of the N-th second logic gate of the R-th group is the output of the R-th group second logic gate, and the output of the R-th group second logic gate is connected to the M+R-th pin of the FPGA, where R is an integer greater than or equal to 1 and less than or equal to M; and S is an integer greater than or equal to 1 and less than or equal to N.
2. The test circuit for embedded memory in FPGA according to claim 1, wherein: The first logic gate is an OR gate, and the second logic gate is an AND gate.
3. A test circuit for an embedded memory in an FPGA, characterized in that: N embedded memories are integrated in the FPGA, wherein the input end of each embedded memory receives the same input signal, and the output end of each embedded memory outputs M bits of data. The test circuit includes: M first logic gates and M second logic gates; The first logic gate and the second logic gate both have N input terminals and 1 output terminal, wherein M and N are integers greater than or equal to 1; The N input ends of the Gth first logic gate are respectively connected to the Gth bit outputs of the N embedded memories, and the output end of the Gth first logic gate is connected to the Gth pin of the FPGA, where G is an integer greater than or equal to 1 and less than or equal to M; The N input ends of the Hth second logic gate are respectively connected to the Hth bit output of the N embedded memories, and the output end of the Hth second logic gate is connected to the M+Hth pin of the FPGA, where H is an integer greater than or equal to 1 and less than or equal to M.
4. The test circuit for embedded memory in FPGA according to claim 3, characterized in that: The first logic gate is an OR gate, and the second logic gate is an AND gate.
5. A test circuit for an embedded memory in an FPGA, characterized in that: N embedded memories are integrated in the FPGA, wherein the input end of each embedded memory receives the same input signal, and the output end of each embedded memory outputs M bits of data. The test circuit includes: M groups of logic gates, wherein each group has N logic gates, each logic gate has two input terminals and one output terminal, and M and N are integers greater than or equal to 1; The first input end of the U-th logic gate of the T-th group is connected to the T-th bit output of the U-th embedded memory, the second input end of the U-th logic gate of the T-th group is connected to the output end of the U-1-th logic gate of the T-th group, the output of the N-th logic gate of the T-th group is the output of the T-th group logic gate, and the output of the T-th group logic gate is connected to the T-th pin of the FPGA, wherein T is an integer greater than or equal to 1 and less than or equal to M; U is an integer greater than or equal to 1 and less than or equal to N.
6. The test circuit for embedded memory in FPGA according to claim 5, characterized in that: The logic gate is an XOR gate or an XNOR gate.
7. A test circuit for an embedded memory in an FPGA, characterized in that: N embedded memories are integrated in the FPGA, wherein the input end of each embedded memory receives the same input signal, and the output end of each embedded memory outputs M bits of data. The test circuit includes: M logic gates, each of which has N input terminals and 1 output terminal, where M and N are integers greater than or equal to 1; The N input ends of the J-th logic gate are respectively connected to the J-th output of the N embedded memories, and the output end of the J-th logic gate is connected to the J-th pin of the FPGA, where J is an integer greater than or equal to 1 and less than or equal to M.
8. The test circuit for embedded memory in FPGA according to claim 7, characterized in that: The logic gate is an XOR gate or an XNOR gate.
9. A method for testing an embedded memory in an FPGA, characterized in that: A method for adding a test circuit for an embedded memory in an FPGA as claimed in claim 1 to an FPGA, the method comprising the following steps: Connect the input of each embedded memory to the same input signal; Receiving the output of each group of first logic gates and the output of each group of second logic gates respectively; Comparing the output of each group of first logic gates with the memory output generated by the corresponding input signal after inputting the output to the first logic gate for operation; Comparing the output of each group of second logic gates with the memory output generated by the corresponding input signal after inputting the output to the second logic gate for operation; According to the comparison result, it is determined whether the embedded memory in the FPGA is faulty.
10. A method for testing an embedded memory in an FPGA, characterized in that: The method is suitable for adding a test circuit for the embedded memory in the FPGA as claimed in claim 3 to the FPGA, the method comprising the following steps: Connect the input of each embedded memory to the same input signal; receiving an output of each first logic gate and an output of each second logic gate respectively; Comparing the output of each first logic gate with the result of the memory output generated by the corresponding input signal inputted into the first logic gate for operation; Comparing the output of each second logic gate with the result of the memory output generated by the corresponding input signal inputted into the second logic gate for operation; According to the comparison result, it is determined whether the embedded memory in the FPGA is faulty.
11. A method for testing an embedded memory in an FPGA, characterized in that: The method is suitable for adding a test circuit for the embedded memory in the FPGA as claimed in claim 5 to the FPGA, the method comprising the following steps: Connect the input of each embedded memory to the same input signal; Receive the output of each group of logic gates respectively; Comparing the output of each group of logic gates with the memory output generated by the corresponding input signal after inputting the output to the logic gate for operation; According to the comparison result, it is determined whether the embedded memory in the FPGA is faulty.
12. A method for testing an embedded memory in an FPGA, characterized in that: The method is suitable for adding a test circuit for the embedded memory in the FPGA as claimed in claim 7 to the FPGA, the method comprising the following steps: Connect the input of each embedded memory to the same input signal; Receive the output of each logic gate separately; Comparing the output of each logic gate with the result of the memory output generated by the corresponding input signal inputted into the logic gate for operation; According to the comparison result, it is determined whether the embedded memory in the FPGA is faulty.
