Summary of the invention
Technical matters to be solved by this invention provides a kind of non-volatility memorizer gridiron pattern test circuit, can greatly simplify circuit and design, reduces circuit area.
For solving the problems of the technologies described above, it is 2 that non-volatility memorizer gridiron pattern test circuit provided by the invention is used for capacity
NThe non-volatility memorizer of individual storage unit carries out the gridiron pattern test, and the gridiron pattern test circuit comprises: gridiron pattern address production electric circuit, read control signal produce circuit, data comparison circuit.
Described gridiron pattern address production electric circuit is used for the output test address to described non-volatility memorizer, and described gridiron pattern address production electric circuit comprises the adding of N bit address register, the carry/borrow of N bit strip/subtracter and adds/the down control circuit.
Per 1 add/subtracter can both realize 1 bit data with one advance/borrow position or data add and subtract mutually, and export new data and new advancing/borrow position.
Described N bit address register and N position add/and the annexation of subtracter is:
The 0th add/subtracter is by the value of the 0th bit address register and 1 addition/subtract, and produces the 0th new bit address and delivers to described the 0th bit address register, produces simultaneously a carry/borrow position, delivers to the input end of the 1st totalizer.
The n position adds/and subtracter adds/the value addition of the carry of subtracter/borrow position and n bit address register by the n-1 position, produce new n bit address and deliver to described n bit address register, produce simultaneously n position carry/borrow position, wherein n is the value between 1 to N-1.
With the N-1 position add/carry of subtracter/borrow position is as detecting end signal, the detection that is used for controlling described gridiron pattern test circuit finishes.
Further be improved to, when described detection end signal was 1, the detection of described gridiron pattern test circuit finished.
Further be improved to, described read control signal produces circuit and produces a read control signal, is used for controlling the reading of data that described non-volatility memorizer is positioned at place, described test address; Described detection end signal is input to described read control signal and produces circuit, and when described detection end signal was 1, described read control signal produced the circuit power cut-off.
Further be improved to, whether described data comparison circuit is identical with desired value for detection of the data that read from described non-volatility memorizer; Described detection end signal is input to described data comparison circuit, when described detection end signal is 1, and described data comparison circuit power cut-off.
For solving the problems of the technologies described above, it is 2 that non-volatility memorizer gridiron pattern test circuit provided by the invention is used for capacity
M+ 2
M1The non-volatility memorizer of individual storage unit carries out the gridiron pattern test, makes M greater than M1, and the gridiron pattern test circuit comprises: gridiron pattern address production electric circuit, read control signal produce circuit, data comparison circuit.
Described gridiron pattern address production electric circuit is used for the output test address to described non-volatility memorizer, and described gridiron pattern address production electric circuit comprises the adding of M+1 bit address register, the carry/borrow of M bit strip/subtracter and adds/the down control circuit.
Per 1 add/subtracter can both realize 1 bit data with one advance/borrow position or data add and subtract mutually, and export new data and new advancing/borrow position.
Described M+1 bit address register and M position add/and the annexation of subtracter is:
The 0th add/subtracter is by the value of the 0th bit address register and 1 addition/subtract, and produces the 0th new bit address and delivers to described the 0th bit address register, produces simultaneously a carry/borrow position, delivers to the input end of the 1st totalizer.
The n position adds/and subtracter adds/the value addition of the carry of subtracter/borrow position and n bit address register by the n-1 position, produce new n bit address and deliver to described n bit address register, produce simultaneously n position carry/borrow position, wherein n is the value between 1 to M-1.
With the M-1 position add/carry of subtracter/borrow position and M1-1 position add/carry of subtracter/borrow position with value as detecting end signal, the detection that is used for controlling described gridiron pattern test circuit finishes.
Further be improved to, when described detection end signal was 1, the detection of described gridiron pattern test circuit finished.
Further be improved to, described read control signal produces circuit and produces a read control signal, is used for controlling the reading of data that described non-volatility memorizer is positioned at place, described test address; Described detection end signal is input to described read control signal and produces circuit, and when described detection end signal was 1, described read control signal produced the circuit power cut-off.
Further be improved to, whether described data comparison circuit is identical with desired value for detection of the data that read from described non-volatility memorizer; Described detection end signal is input to described data comparison circuit, when described detection end signal is 1, and described data comparison circuit power cut-off.
For solving the problems of the technologies described above, the detection method of non-volatility memorizer gridiron pattern test circuit provided by the invention comprises the steps:
Step 1, in described gridiron pattern address production electric circuit, set the initial value of described test address and output to described non-volatility memorizer.
Step 2, described read control signal produce circuit and produce described read control signal.
Whether step 3, described data comparison circuit read the data that are positioned at described test address and detect the data that read identical with desired value from described non-volatility memorizer.
Step 4, described gridiron pattern address production electric circuit carry out add operation or reducing to described test address.
Step 5, repeating step three and step 4, until described detection end signal is 1 o'clock, described data comparison circuit power cut-off.
Non-volatility memorizer gridiron pattern test circuit of the present invention adopt add/carry of subtracter/borrow position forms as detecting end signal, be the present invention can adopt add/subtracter carry/borrow position judges whether the address overflows, detect end signal thereby form, determination methods is simple.With respect to prior art, the present invention does not need extra value register and extra value comparer to form the detection end signal, thereby can greatly simplify circuit and design, reduces circuit area.
Embodiment
As shown in Figure 2, be the circuit structure diagram of the embodiment of the invention one non-volatility memorizer gridiron pattern test circuit.The embodiment of the invention one non-volatility memorizer gridiron pattern test circuit carries out the gridiron pattern test for the non-volatility memorizer 14 that to capacity is 2N storage unit, and the gridiron pattern test circuit comprises: gridiron pattern address production electric circuit 11, read control signal produce circuit 12, data comparison circuit 13.
Described gridiron pattern address production electric circuit 11 by address bus be connected non-volatility memorizer 14 and connect, be used for the output test address to described non-volatility memorizer 14.As shown in Figure 3, Fig. 3 is the circuit diagram of the gridiron pattern address production electric circuit 11a of the embodiment of the invention one; Described gridiron pattern address production electric circuit 11a comprises the adding of N bit address register 15, the carry/borrow of N bit strip/subtracter 16 and adds/the down control circuit.
Per 1 add/subtracter 16 can both realize 1 bit data with one advance/borrow position or data add and subtract mutually, and export new data and new advancing/borrow position.
Described N bit address register 15 and N position add/and the annexation of subtracter 16 is:
The 0th add/subtracter 16 is by the value of the 0th bit address register 15 and 1 addition/subtract, and produces the 0th new bit address and delivers to described the 0th bit address register 15, producing simultaneously a carry/borrow position is C
0, deliver to the input end of the 1st totalizer.
The n position adds/and subtracter 16 adds/the value addition of the carry of subtracter 16/borrow position and n bit address register 15 by the n-1 position, produce new n bit address and deliver to described n bit address register 15, produce simultaneously n position carry/borrow position, wherein n is the value between 1 to N-1.
With the N-1 position add/subtracter 16 carry/the borrow position is C
N-1As detecting end signal, be used for controlling the detection end of described gridiron pattern test circuit.In the example one of the present invention, when described detection end signal was 1, the detection of described gridiron pattern test circuit finished.
Described read control signal produces circuit 12 and produces a read control signal, by control bus be connected non-volatility memorizer 14 and connect, this read control signal is used for controlling the reading of data of described non-volatility memorizer 14; Described detection end signal is input to described read control signal and produces circuit 12, and when described detection end signal was 1, described read control signal produced circuit 12 power cut-offs.
Described data comparison circuit 13 by data bus be connected non-volatility memorizer 14 and connect, whether identical with desired value for detection of the data that from described non-volatility memorizer 14, read; Described detection end signal is input to described data comparison circuit 13, when described detection end signal is 1, and described data comparison circuit 13 power cut-offs.
The detection method of the embodiment of the invention one non-volatility memorizer gridiron pattern test circuit comprises the steps:
Step 1, in described gridiron pattern address production electric circuit 11, set the initial value of described test address and output to described non-volatility memorizer 14.
Step 2, described read control signal produce circuit 12 and produce described read control signal.
Whether step 3, described data comparison circuit 13 read the data that are positioned at described test address and detect the data that read identical with desired value from described non-volatility memorizer 14.
Add operation or reducing are carried out in step 4,11 pairs of described test addresses of described gridiron pattern address production electric circuit.
When add operation is carried out in described test address, the 0th bit test address and 1 addition, n bit test address and n-1 position add/the carry digit addition of subtracter.When the N-1 position add/carry digit of subtracter is C
N-1Be 1 o'clock, reach maximal value.
When reducing was carried out in described test address, subtracted each other the 0th bit test address and 1, and n bit test address adds with the n-1 position/and subtract each other the borrow position of subtracter.When the N-1 position add/the borrow position of subtracter is C
N-1Be 1 o'clock, reach minimum value.
Step 5, repeating step three and step 4 are until described detection end signal is 1 to be C
N-1Being 1 o'clock, also is described test address when reaching maximal value or minimum value, described data comparison circuit 13 power cut-offs.
The embodiment of the invention two non-volatility memorizer gridiron pattern test circuits also can be with reference to circuit structure diagram as shown in Figure 2.It is 2 that the embodiment of the invention two non-volatility memorizer gridiron pattern test circuits are used for capacity
M+ 2
M1The non-volatility memorizer 14 of individual storage unit carries out the gridiron pattern test, makes M greater than M1, and the gridiron pattern test circuit comprises: gridiron pattern address production electric circuit 11, read control signal produce circuit 12, data comparison circuit 13.
Described gridiron pattern address production electric circuit 11 by address bus be connected non-volatility memorizer 14 and connect, be used for the output test address to described non-volatility memorizer 14.
As shown in Figure 4, be the circuit diagram of the gridiron pattern address production electric circuit 11b of the embodiment of the invention two; Described gridiron pattern address production electric circuit 11b comprises the adding of M+1 bit address register 15, the carry/borrow of M bit strip/subtracter 16 and adds/the down control circuit.
Per 1 add/subtracter 16 can both realize 1 bit data with one advance/borrow position or data add and subtract mutually, and export new data and new advancing/borrow position.
Described M+1 bit address register 15 and M position add/and the annexation of subtracter 16 is:
The 0th add/subtracter 16 is by the value of the 0th bit address register 15 and 1 addition/subtract, and produces the 0th new bit address and delivers to described the 0th bit address register 15, producing simultaneously a carry/borrow position is C
0, deliver to the input end of the 1st totalizer.
The n position adds/and subtracter 16 adds/the value addition of the carry of subtracter 16/borrow position and n bit address register 15 by the n-1 position, produce new n bit address and deliver to described n bit address register 15, produce simultaneously n position carry/borrow position, wherein n is the value between 1 to M-1.
With the M-1 position add/subtracter 16 carry/the borrow position is C
M-1Add with the M1-1 position/subtracter 16 carry/the borrow position is C
M1-1With value as detecting end signal, the detection that is used for controlling described gridiron pattern test circuit finishes.
Described read control signal produces circuit 12 and produces a read control signal, by control bus be connected non-volatility memorizer 14 and connect, this read control signal is used for controlling the reading of data of described non-volatility memorizer 14; Described detection end signal is input to described read control signal and produces circuit 12, and when described detection end signal was 1, described read control signal produced circuit 12 power cut-offs.
Described data comparison circuit 13 by data bus be connected non-volatility memorizer 14 and connect, whether identical with desired value for detection of the data that from described non-volatility memorizer 14, read; Described detection end signal is input to described data comparison circuit 13, when described detection end signal is 1, and described data comparison circuit 13 power cut-offs.
The detection method of the embodiment of the invention two non-volatility memorizer gridiron pattern test circuits comprises the steps:
Step 1, in described gridiron pattern address production electric circuit 11, set the initial value of described test address and output to described non-volatility memorizer 14.
Step 2, described read control signal produce circuit 12 and produce described read control signal.
Whether step 3, described data comparison circuit 13 read the data that are positioned at described test address and detect the data that read identical with desired value from described non-volatility memorizer 14.
Add operation or reducing are carried out in step 4,11 pairs of described test addresses of described gridiron pattern address production electric circuit.
When add operation is carried out in described test address, the 0th bit test address and 1 addition, n bit test address and n-1 position add/the carry digit addition of subtracter.When the M-1 position add/carry digit of subtracter is C
M-1And the M1-1 position add/carry digit of subtracter is C
M1-1Be 1 o'clock all, reach maximal value.
When reducing was carried out in described test address, subtracted each other the 0th bit test address and 1, and n bit test address adds with the n-1 position/and subtract each other the borrow position of subtracter.When the M-1 position add/the borrow position of subtracter is C
M-1And the M1-1 position add/the borrow position of subtracter is C
M1-1Be 1 o'clock all, reach minimum value.
Step 5, repeating step three and step 4 are until described detection end signal is 1 to be C
N-1Being 1 o'clock, also is described test address when reaching maximal value or minimum value, described data comparison circuit 13 power cut-offs.
Abovely by specific embodiment the present invention is had been described in detail, but these are not to be construed as limiting the invention.In the situation that do not break away from the principle of the invention, those skilled in the art also can make many distortion and improvement, and these also should be considered as protection scope of the present invention.