Summary of the invention
The invention provides a kind of detection method and system, the detection to storer exists operand big in the use prior art to solve, the problem that detection speed is slow.
Concrete technical scheme is as follows:
A kind of detection method, described method are applied in the detection of storer, and the storage space of detected storer is divided into district to be detected and detection zone not, and described district to be detected is divided at least two unit to be detected again, and described method comprises:
Obtain the initial value of described current unit to be detected;
Carry out the CRC polynomial computation according to described initial value and described current cell value to be detected, obtain result of calculation;
It is pre-conditioned to judge whether described result of calculation meets, if generating described current unit to be detected does not have the failure judgment result, if not, can not generate described current detection unit does not have the failure judgment result.
Preferably, the described described current unit to be detected initial value in advance that obtains comprises:
Determine that expection result of calculation is the inverse operation algorithm input value of described current unit to be detected;
Carry out the inverse operation of CRC polynomial expression according to described inverse operation algorithm input value and described current cell value to be detected, obtain operation result;
With the initial value of described operation result as described current unit to be detected.
Preferably, described to judge whether described result of calculation meets pre-conditioned, if generating described current unit to be detected does not have the failure judgment result, if not, can not generate described current detection unit does not have the failure judgment result to comprise:
Judge whether described result of calculation meets described expection result of calculation, if generating described current unit to be detected does not have the failure judgment result, if not, can not generate described current detection unit does not have the failure judgment result.
Preferably, also comprise:
The initial value of described current unit to be detected is stored in the described not detection zone position corresponding with described current unit to be detected.
A kind of detection system, described system applies is in the detection of storer, the storage space of detected storer is divided into district to be detected and detection zone not, and described district to be detected is divided at least two unit to be detected again, and described system comprises: acquisition module, computing module and judge module;
Wherein, described acquisition module is used for, and obtains the initial value of described current detection unit;
Described computing module is used for, and carries out the CRC polynomial computation according to described initial value and described current cell value to be detected, obtains result of calculation;
Described judge module is used for, and it is pre-conditioned to judge whether described result of calculation meets, if generating described current unit to be detected does not have the failure judgment result, if not, can not generate described current detection unit does not have the failure judgment result.
Preferably, described acquisition module comprises: determining unit, inverse operation unit and assignment unit;
Described determining unit is used for, and determines that expection result of calculation is the inverse operation algorithm input value of described current unit to be detected;
Described inverse operation unit is used for, and carries out the inverse operation of CRC polynomial expression according to described inverse operation algorithm input value and described current cell value to be detected, obtains operation result;
Described initial value determining unit is used for, with the initial value of described operation result as described current unit to be detected.
As can be seen from the above technical solutions, a kind of detection method and the system that provide among the present invention, described method is applied in the detection of storer, the storage space of detected storer is divided into district to be detected and detection zone not, described district to be detected is divided into some unit to be detected again, obtain the initial value of described current unit to be detected, carry out the CRC polynomial computation according to described initial value and described current cell value to be detected, obtain result of calculation, when described result of calculation meets when pre-conditioned, then generate described current unit to be detected and do not have the failure judgment result, in the described method, with described some unit to be detected that have been distinguished into to be detected, when needs begin to detect, then only need to detect current unit to be detected, and can in the different time, finish, and do not need whole one-time detection in described district to be detected a time, it is big so just to have avoided occurring operand, slow-footed problem.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to protection scope of the present invention not making the every other embodiment that obtains under the creative work prerequisite.
The embodiment of the invention one discloses a kind of detection method, referring to shown in Figure 1, described method is applied in the detection of storer, and the storage space of detected storer is divided into district to be detected and detection zone not, described district to be detected is divided at least two unit to be detected again, and step comprises:
Step S101: the initial value that obtains described current unit to be detected;
Need to prove that the initial value of described current unit to be detected is to be stored in the described not detection zone position corresponding with described current unit to be detected;
Step S102: carry out CRC polynomial expression (CRC) according to described initial value and described current cell value to be detected and calculate, obtain result of calculation;
Wherein, according to the CRC algorithm that writes in advance, and calculate according to described initial value and described current cell value to be detected, obtained result of calculation, need to prove, described CRC is to utilize the principle of division and remainder to make error-detecting, has very strong diagnosis covering power;
Step S103: it is pre-conditioned to judge whether described result of calculation meets, if, execution in step S104, if not, execution in step S105;
Need to prove that the pre-conditioned expection result of calculation that is herein that is to say, judge whether described result of calculation meets described expection result of calculation, if, execution in step S104, if not, execution in step S105;
Step S104: generating described current unit to be detected does not have the failure judgment result,
Step S105: can not generate described current detection unit does not have the failure judgment result.
For embodiment, need to prove, the storage space that described method will be detected storer is divided into district to be detected and detection zone not, described district to be detected is divided into some unit to be detected again, can be referring to shown in Figure 2, this instantiation is 60K(bytes with the program code) be example, the address space that takies is 0x000000~0x00EFFF.According to the restriction of program execution time, with n the unit to be detected of dividing into to be checked, wherein, described memory address space is divided for district to be checked and inspection district, and described district to be checked start address is 0x000000, and described inspection to distinguish start address be 0X010000.
Present embodiment discloses a kind of detection method, described method is applied in the detection of storer, the storage space of described detection of stored device is divided into district to be detected and detection zone not, described district to be detected is divided at least two unit to be detected again, obtain the initial value of described current unit to be detected, carry out the CRC polynomial computation according to described initial value and described current cell value to be detected, obtain result of calculation, when described result of calculation meets when pre-conditioned, then generate described current unit to be detected and do not have the failure judgment result, in the described method, do not need the data in the storer are done and move operation, therefore store data and be not easy to wreck, and, with described some unit to be detected that have been distinguished into to be detected, when needs begin to detect, then only need to detect current unit to be detected in the described method, and can in the different time, finish, and do not need whole one-time detection in described district to be detected a time, it is big so just to have avoided occurring operand, slow-footed problem.
Disclose a kind of detection method in the embodiment of the invention two, described method discloses the method for the initial value that obtains described current unit to be detected, referring to shown in Figure 3,
Step S201: determine that expection result of calculation is the inverse operation algorithm input value of described current unit to be detected;
Step S202: carry out CRC polynomial expression (CRC) inverse operation according to described inverse operation algorithm input value and described current cell value to be detected, obtain operation result;
Step S203: with the initial value of described operation result as described current unit to be detected;
Need to prove that the described method of obtaining the initial value of current unit to be detected was finished in advance before detecting.
Present embodiment discloses a kind of method of obtaining the initial value of current unit to be detected, described method comprises: determine that expection result of calculation is the input value of described current unit to be detected, carry out the inverse operation of CRC polynomial expression according to described input value and described current cell value to be detected, obtain operation result, with the initial value of described operation result as described current detection unit, the described initial value that obtains current unit to be detected was finished before detecting, and when needs detect described current unit to be detected, can carry out the CRC polynomial computation according to described initial value and described current cell value to be detected, obtain result of calculation, when described result of calculation meets when pre-conditioned, then generate described current unit to be detected and do not have the failure judgment result, like this, just do not need the data in the storer are done and move operation, therefore storing data is not easy to wreck, and, in the described method with described some unit to be detected that have been distinguished into to be detected, when needs begin to detect, then only need to detect current unit to be detected, and can in the different time, finish, and do not need whole one-time detection in described district to be detected a time, it is big so just to have avoided operand occurring, slow-footed problem, and this method can also solve owing to wipe repeatedly, write and cause the problem that life-span of storer lowers.
The embodiment of the invention three discloses a kind of detection method, referring to shown in Figure 4, described method is applied in the detection of storer, and the storage space of detected storer is divided into district to be detected and detection zone not, described district to be detected is divided at least two unit to be detected again, and step comprises:
Step S301: the initial value that obtains described current unit to be detected;
Step S302: the initial value of described current unit to be detected is stored in the described not detection zone position corresponding with described current unit to be detected;
Understanding for convenience, referring to shown in Figure 5, prolong with the example among Fig. 2, is 60K(bytes with the program code) be example, the address space that takies is 0x000000~0x00EFFF.Restriction according to program execution time, with n the unit to be detected of dividing into to be checked, wherein, described memory address space is divided for district to be detected and detection zone not, described district to be detected start address is 0x000000, and described not detection zone start address is 0X010000;
When described current unit to be detected is n unit, behind the initial value that has calculated described n unit, from Fig. 5, can obtain, described initial value is stored in described not detection zone 0x010000+ (n-1) * 4 address spaces, this be because, because the initial value of each unit to be detected is two words, i.e. 4 bytes are so be stored in described initial value in 0x010000+ (n-1) * 4 address spaces of described not detection zone.
Step S303: carry out the CRC polynomial computation according to described initial value and described current cell value to be detected, obtain result of calculation;
Wherein, according to the CRC algorithm that writes in advance, and calculate according to described initial value and described current cell value to be detected, obtained result of calculation, need to prove, described CRC is to utilize the principle of division and remainder to make error-detecting, has very strong diagnosis covering power;
Step S304: it is pre-conditioned to judge whether described result of calculation meets, if, execution in step S305, if not, execution in step S306;
Need to prove that the pre-conditioned expection result of calculation that is herein that is to say, judge whether described result of calculation meets described expection result of calculation, if, execution in step S305, if not, execution in step S306;
Step S305: generating described current unit to be detected does not have the failure judgment result;
Step S306: can not generate described current detection unit does not have the failure judgment result.
A kind of detection method is disclosed in the present embodiment, described method is applied in the detection of storer, the storage space of detected storer is divided into district to be detected and detection zone not, described district to be detected is divided at least two unit to be detected again, obtain the initial value of described current unit to be detected, carry out the CRC polynomial computation according to described initial value and described current cell value to be detected, obtain result of calculation, when described result of calculation meets when pre-conditioned, then generate described current unit to be detected and do not have the failure judgment result, the initial value of described unit to be detected is stored in the described not detection zone position corresponding with described current unit to be detected, owing to used the CRC method, the disclosed detection method of present embodiment has very strong verification and diagnosis covering power.
The embodiment of the invention four discloses a kind of detection system, referring to shown in Figure 6, described system applies is in the detection of storer, the storage space of detected storer is divided into district to be detected and detection zone not, described district to be detected is divided at least two unit to be detected again, and described system comprises: acquisition module 101, computing module 102 and judge module 103;
Described acquisition module 101 is used for, and obtains the initial value of described current detection unit;
Need to prove that the initial value of described current unit to be detected is to be stored in the described not detection zone position corresponding with described current unit to be detected;
Described computing module 102 is used for, and carries out the CRC polynomial computation according to described initial value and described current cell value to be detected, obtains result of calculation;
Wherein, according to the CRC algorithm that writes in advance, and calculate according to described initial value and described current cell value to be detected, obtained result of calculation, need to prove, described CRC is to utilize the principle of division and remainder to make error-detecting, has very strong diagnosis covering power;
Described judge module 103 is used for, and it is pre-conditioned to judge whether described result of calculation meets, if generating described current unit to be detected does not have the failure judgment result, if not, can not generate described current detection unit does not have the failure judgment result.
Need to prove the pre-conditioned expection result of calculation that is herein.
Present embodiment discloses a kind of detection system, described system applies is in the detection of storer, the storage space of detected storer is divided into district to be detected and detection zone not, described district to be detected is divided at least two unit to be detected again, described system comprises: acquisition module, computing module and judge module, described acquisition module is used for, obtain the initial value of described current detection unit, described computing module is used for, carry out the CRC polynomial computation according to described initial value and described current cell value to be detected, obtain result of calculation, described judge module is used for, it is pre-conditioned to judge whether described result of calculation meets, if, generate described current unit to be detected and do not have the failure judgment result, if not, can not generate described current detection unit and not have the failure judgment result, do not need the data in the storer are done and move operation, therefore storing data is not easy to wreck, and, in the described method with described some unit to be detected that have been distinguished into to be detected, when needs begin to detect, then only need to detect current unit to be detected, and can in the different time, finish, and do not need whole one-time detection in described district to be detected a time, it is big so just to have avoided occurring operand, slow-footed problem.
The embodiment of the invention five discloses a kind of detection system, referring to shown in Figure 7, described system applies is in the detection of storer, the storage space of detected storer is divided into district to be detected and detection zone not, described district to be detected is divided at least two unit to be detected again, and described system comprises: acquisition module 101, computing module 102 and judge module 103;
Wherein, described computing module 102 is consistent with embodiment four disclosed described computing modules 102 and described judge module 103 with described judge module 103;
Described acquisition module 101 comprises: determining unit 104, inverse operation unit 105 and initial value determining unit 106;
Described determining unit 104 is used for, and determines that expection result of calculation is the inverse operation algorithm input value of described current unit to be detected;
Described inverse operation unit 105 is used for, and carries out the inverse operation of CRC polynomial expression according to described inverse operation algorithm input value and described current cell value to be detected, obtains operation result;
Described initial value determining unit 106 is used for, with the initial value of described operation result as described current unit to be detected.
Present embodiment discloses a kind of detection system, refinement the acquisition module among the embodiment four, described acquisition module comprises: determining unit, inverse operation unit and initial value determining unit, described determining unit is used for, determine that expection result of calculation is the inverse operation algorithm input value of described current unit to be detected, described inverse operation unit is used for, carry out the inverse operation of CRC polynomial expression according to described inverse operation algorithm input value and described current cell value to be detected, obtain operation result, described initial value determining unit is used for, with the initial value of described operation result as described current unit to be detected, the described initial value that obtains current unit to be detected was finished before detecting, and when needs detect described current unit to be detected, can finish whole detection to described unit to be detected by disclosed computing module and judge module among the embodiment four, like this, just do not need the data in the storer are done and move operation, therefore storing data is not easy to wreck, and, in the described method with described some unit to be detected that have been distinguished into to be detected, when needs begin to detect, then only need to detect current unit to be detected, and do not need described district to be detected is all detected one time, it is big so just to have avoided operand occurring, slow-footed problem, and this method can also solve owing to wipe repeatedly, write and cause the problem that life-span of storer lowers.
Each embodiment adopts the mode of going forward one by one to describe in this instructions, and what each embodiment stressed is and the difference of other embodiment that identical similar part is mutually referring to getting final product between each embodiment.For the disclosed device of embodiment, because it is corresponding with the embodiment disclosed method, so description is fairly simple, relevant part partly illustrates referring to method and gets final product.
To the above-mentioned explanation of the disclosed embodiments, make this area professional and technical personnel can realize or use the present invention.Multiple modification to these embodiment is apparent to those skilled in the art, and defined General Principle can realize under the situation that does not break away from the spirit or scope of the present invention in other embodiments herein.Therefore, the present invention will can not be restricted to these embodiment shown in this article, but will meet the wide region consistent with principle disclosed herein and features of novelty.