Summary of the invention
For solving the problems of the technologies described above, the invention provides a kind of non-volatility memorizer and correcting and regulating method thereof, in the circuit of traditional non-volatility memorizer, add testing circuit, by testing circuit, detect in real time the work state information of non-volatility memorizer, and generate corresponding school adjusting information according to described work state information, and then according to described school adjusting information, non-volatility memorizer is carried out to school tune, thus having realized the automatic school tune of non-volatility memorizer, technical scheme is as follows:
, comprising: configuration information storage unit, steering logic unit, test pattern control module and testing circuit, wherein:
Described testing circuit is connected with described steering logic unit, for detecting in real time the work state information of non-volatility memorizer, generates corresponding school adjusting information, and export described school adjusting information to steering logic unit according to described work state information;
Described steering logic unit, for described school adjusting information and canonical reference information are compared, when described school adjusting information and canonical reference information are when inconsistent, according to described school adjusting information, non-volatility memorizer is carried out to school tune, wherein, the initial state information that described canonical reference information is described non-volatility memorizer;
Test pattern control module, is stored in described configuration information storage unit for controlling described steering logic unit by described school adjusting information.
Process corner and state of temperature information when preferably, described work state information is non-volatility memorizer work.
Preferably, described steering logic unit, is further used for, when described school adjusting information and canonical reference information are when inconsistent, producing control signal, and described control signal is used for activating described test pattern control module.
Preferably, described school adjusting information is the information of school tune that the electric current in the whole circuit of non-volatility memorizer, voltage, capacitor's capacity or metal-oxide-semiconductor quantity are carried out.
Preferably, described test circuit comprises: the first current source, the second current source, a PMOS pipe, a NMOS pipe, voltage-current converter, current comparator, bank of latches and school adjusting information scrambler, wherein:
The input end of described the first current source is connected with power supply, and the output terminal of described the first current source is connected with the source electrode of a described PMOS pipe, and the drain electrode of a described PMOS pipe is connected with earth terminal, and grid and the drain electrode of a described PMOS pipe are joined;
The input end of described the second current source is connected with power supply, and the output terminal of described the second current source is connected with the drain electrode of a described NMOS pipe, and the source electrode of a described NMOS pipe is connected with earth terminal, and the drain and gate of a described NMOS pipe joins;
A described source electrode for PMOS pipe and the input end of described voltage-current converter are connected, and for the voltage transitions that a described PMOS is managed to source electrode, are the first electric current;
The first input end of described current comparator is connected with the output terminal of described voltage-current converter, the second input end of described current comparator is connected with the grid of a described NMOS pipe, described current comparator is for obtaining n first mirror image current by described the first current ratio mirror image, and the n that the current ratio mirror image in a described NMOS pipe is obtained second image current, and described n first mirror image current compared with described n corresponding the second image current respectively, obtain n comparative result, wherein, n is greater than 2 positive integer;
The input end of described bank of latches is connected with the n of described current comparator output terminal, for latching n comparative result of described current comparator output;
The input end of described school adjusting information scrambler is connected with the output terminal of described bank of latches, and described school adjusting information scrambler is for by the described n comparative result generating digital school adjusting information of encoding, and offers described steering logic unit.
Preferably, described voltage-current converter comprises: the 2nd NMOS pipe and the 2nd PMOS pipe, wherein:
The grid of described the 2nd NMOS pipe is the input end of described voltage-current converter, the source ground of described the 2nd NMOS pipe, described the 2nd NMOS pipe drain electrode is connected with the drain electrode of described the 2nd PMOS pipe, drain electrode and the grid of described the 2nd PMOS pipe join, the output terminal that the grid of described the 2nd PMOS pipe is described voltage-current converter.
Preferably, described current comparator comprises: n PMOS pipe and n NMOS manage, and n is greater than 2 integer, wherein:
The source electrode of n PMOS pipe is all connected with direct supply, and the grid of n PMOS pipe is connected as the first input end of current comparator, and the source electrode of n NMOS pipe is all connected with earth terminal, and the grid of n NMOS pipe is connected as the second input end of current comparator;
The drain electrode of n PMOS pipe is connected as the output terminal of described current comparator with the drain electrode of NMOS pipe corresponding in n NMOS pipe respectively.
, be applied to non-volatility memorizer, comprising:
Detect the work state information of described non-volatility memorizer, and generate corresponding school adjusting information according to described work state information;
More described school adjusting information and canonical reference information, when described school adjusting information and canonical reference information are when inconsistent, be stored in configuration information storage unit by described school adjusting information;
According to described school adjusting information, described non-volatility memorizer is carried out to school tune.
Preferably, also comprise:
Read the school adjusting information in described configuration information storage unit, according to described school adjusting information, non-volatility memorizer is carried out to school tune.
From above technical scheme provided by the invention, non-volatility memorizer provided by the invention and correcting and regulating method thereof, in the circuit of traditional non-volatility memorizer, added testing circuit, after non-volatility memorizer powers on, testing circuit is started working, detect in real time the work state information of non-volatility memorizer, and generate corresponding school adjusting information according to described work state information, and then according to described school adjusting information, non-volatility memorizer is carried out to school tune, because test circuit does not need to connect external unit input external command, can generate in real time school adjusting information, thereby adjust in the automatic school of having realized non-volatility memorizer, greatly saved the test duration, reduced testing cost.
Embodiment
In order to make those skilled in the art person understand better the technical scheme in the application, below in conjunction with the accompanying drawing in the embodiment of the present application, technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment is only the application's part embodiment, rather than whole embodiment.Embodiment based in the application, those of ordinary skills are not making the every other embodiment obtaining under creative work prerequisite, all should belong to the scope of the application's protection.
The embodiment of the invention discloses a kind of non-volatility memorizer, its circuit structure as shown in Figure 2, comprise: configuration information storage unit 201, steering logic unit 202, test pattern control module 203 and test circuit 204, compare with traditional non-volatility memorizer, it has added test circuit 204 in circuit, and test circuit 204 is connected with steering logic unit 202.
Described test circuit 204, for detecting in real time the work state information of non-volatility memorizer, generates corresponding school adjusting information according to described work state information, and exports described school adjusting information to steering logic unit 202.
Wherein, process corner and state of temperature information when work state information is non-volatility memorizer work, the foundation of school adjusting information and process corner and state of temperature information corresponding relation, be by the breadth length ratio of PMOS pipe P1-Pn reasonable in design and NMOS pipe N1-Nn, make in different process corner different with the school adjusting information under working temperature.
Steering logic unit 202, for high-ranking officers' adjusting information and canonical reference information, compare, when school adjusting information and canonical reference information are when inconsistent, according to school adjusting information, non-volatility memorizer is carried out to school tune, what wherein, canonical reference information was corresponding is the initial state information of non-volatility memorizer.
Steering logic unit 202 is, according to the school adjusting information being stored in steering logic unit internal register, non-volatility memorizer is carried out to school tune.
School adjusting information in register is not longer-term storage, school adjusting information in power-off late register may disappear, therefore, need high-ranking officers' adjusting information to be stored in the configuration information storage unit 201 of non-volatility memorizer, this is because the information in configuration information storage unit 201 can not lost after power-off.After non-volatility memorizer powers on again, the processor in the system of non-volatility memorizer place can read school adjusting information, and according to school adjusting information, non-volatility memorizer be carried out to school tune from described configuration information storage unit 201.
Test pattern control module 203, when described school adjusting information and canonical reference information are when inconsistent, steering logic unit 202 produces control signal and activates test pattern control module 203, make non-volatility memorizer enter test pattern, and control described steering logic unit 202 high-ranking officers' adjusting informations and be stored in configuration information storage unit 201, after having stored, test pattern control module 203 is closed, and non-volatility memorizer exits test pattern.
Certainly, in other embodiments, test pattern control module 203 also has other functions, does not repeat them here.
Adjust in the school to non-volatility memorizer described in arbitrary embodiment disclosed by the invention, is all that the quantity of electric current, voltage, resistance value, capacitor's capacity or metal-oxide-semiconductor in the whole circuit of non-volatility memorizer is carried out to school tune.
The circuit structure of the testing circuit in above-described embodiment as shown in Figure 3, mainly comprises: the first current source 301, the second current source 302, a PMOS pipe Pt, a NMOS pipe Nt, voltage-current converter 303, current comparator 304, bank of latches 305 and school adjusting information scrambler 306.
The input end of the first current source 301 is connected with direct supply, and the output terminal of the first current source 301 is connected with the source electrode of a PMOS pipe Pt, and the drain electrode of a PMOS pipe Pt is connected with earth terminal, and grid and the drain electrode of a PMOS pipe Pt are joined.
The input end of the second current source 302 is connected with power supply, and the output terminal of the second current source 302 is connected with the drain electrode of a NMOS pipe Nt, and the source electrode of a NMOS pipe Nt is connected with earth terminal, and the drain and gate of a NMOS pipe Nt joins.
Concrete, the identical It that is of electric current that the first current source 301 produces with the second current source 302.The one PMOS pipe Pt is identical with the breadth length ratio of a NMOS pipe Nt, and described breadth length ratio is the ratio of channel width with the channel length of MOS device.
When non-volatility memorizer powers on, the flow through source electrode of the described PMOS pipe Pt that connects in diode mode of the output current It of described the first current source 301, the flow through drain electrode of the described NMOS pipe Nt that connects in diode mode of the output current It of described the second current source 302.
Voltage-current converter 303 comprises: the 2nd PMOS pipe P0, the 2nd NMOS pipe N0, wherein, the grid of the 2nd NMOS pipe P0 is the source electrode that the input end of voltage-current converter 303 connects a described PMOS pipe Pt, the source ground of the 2nd NMOS pipe N0, the drain electrode of the 2nd NMOS pipe N0 is connected with the drain electrode of the 2nd PMOS pipe P0, drain electrode and the grid of the 2nd PMOS pipe P0 join, and the grid of the 2nd PMOS pipe P0 is the output terminal of voltage-current converter 303.Voltage-current converter 303 is the first electric current I p0 for the voltage transitions that a described PMOS is managed to source electrode.
Current comparator 304 comprises: n PMOS pipe P1, P2 ... Pn, n NMOS pipe N1, N2 ... Nn, and n is greater than 2 integer.
The source electrode of n PMOS pipe is all connected with direct supply, and the grid of n PMOS pipe is connected as the first input end of current comparator 304, is connected with the output terminal of voltage-current converter 303.
The source electrode of n NMOS pipe is connected with earth terminal, and the grid of n NMOS pipe is connected as the second input end of current comparator 304, is connected with the grid of a described NMOS pipe Nt.
The drain electrode of n PMOS pipe is connected with the drain electrode of n NMOS pipe respectively, the output terminal that is current comparator with points of common connection n NMOS pipe n PMOS pipe.
Concrete, the drain electrode of P1 is connected with the drain electrode of N1, and the drain electrode of P2 is connected with the drain electrode of N2, the like, the drain electrode of Pn is connected with the drain electrode of Nn.
Current comparator 304 is for obtaining n first mirror image current Ip1~Ipn by the first electric current I p0 scaled mirror, wherein, Ip1=k1 * Ip0 ... Ipn=kn * Ip0.
Current comparator 304, also for the electric current I n0 scaled mirror of a NMOS pipe Nt is obtained to n second image current In1~Inn, wherein, In0 is identical with the electric current I t in the second current source 302, In1=M1 * In0, In2=M2 * In0, the like, Inn=Mn * In0, and scale-up factor M1 is determined by the breadth length ratio of P1 and N1, M2 determines by the breadth length ratio of P2 and N2, the like Mn by the breadth length ratio of Pn and Nn, determined.
Current comparator 304 is also for comparing described n first mirror image current respectively with corresponding described n the second image current, i.e. Ip1 and In1, Ip2 and In2 ... Ipn and Inn compare, and obtain n comparative result.
The input end of bank of latches 305 is connected with n output terminal of current comparator 304 respectively, for latching n comparative result of current comparator 304 outputs.
The input end of school adjusting information scrambler 306 is connected with the output terminal of bank of latches 305, for generating digital school adjusting information that a described n comparative result is encoded, and offers described steering logic unit 202.
The non-volatility memorizer that the embodiment of the present invention provides, in the circuit of traditional non-volatility memorizer, add testing circuit, after non-volatility memorizer powers on, testing circuit is started working, detect in real time the work state information of non-volatility memorizer, and generate corresponding school adjusting information according to described work state information, and then according to described school adjusting information, non-volatility memorizer is carried out to school tune, because test circuit does not need to connect external unit input external command, can generate in real time school adjusting information, thereby adjust in the automatic school of having realized non-volatility memorizer, greatly reduced the test duration, reduced testing cost.
The embodiment of the invention also discloses a kind of method that adjust in school, the non-volatility memorizer in application above-described embodiment, the process flow diagram of the method as shown in Figure 4, comprises the following steps:
Step 401: detect the work state information of non-volatility memorizer, and generate corresponding school adjusting information according to described work state information.
After non-volatility memorizer powers on, testing circuit is started working, constantly detect the work state information of non-volatility memorizer, and generate corresponding school adjusting information according to work state information, process corner and state of temperature information when wherein, described work state information is non-volatility memorizer work.
Step 402: more described school adjusting information and canonical reference information, when described school adjusting information and canonical reference information are when inconsistent, be stored in configuration information unit by described school adjusting information.
Wherein, canonical reference information is corresponding to the initial state information of described non-volatility memorizer.When school adjusting information exports to behind steering logic unit, steering logic unit can high-ranking officers' adjusting information and canonical reference information compare, when school adjusting information and canonical reference information are when inconsistent, high-ranking officers' adjusting information is stored in configuration information storage unit.
Step 403: described non-volatility memorizer is carried out to school tune according to described school adjusting information.
When school adjusting information and canonical reference information are when inconsistent, steering logic unit can carry out school tune according to described school adjusting information to described non-volatility memorizer in real time.After power-off, the school adjusting information being stored in configuration information storage unit can not disappear, after again powering on, the processor in steering logic unit or non-volatility memorizer place system can read the school adjusting information in configuration information storage unit, and again carries out school tune according to described school adjusting information.
The disclosed correcting and regulating method of the present embodiment, can detect in real time the work state information of non-volatility memorizer, and generate corresponding school adjusting information according to described work state information, and then according to described school adjusting information, non-volatility memorizer is carried out to school tune, having realized the automatic school of non-volatility memorizer adjusts, greatly saved the test duration, reduced testing cost.
The above is only the application's embodiment; it should be pointed out that for those skilled in the art, do not departing under the prerequisite of the application's principle; can also make some improvements and modifications, these improvements and modifications also should be considered as the application's protection domain.