Data burning verification method, data burning verification device and electronic equipment
By programming the target data twice in different address spaces of the OTP memory and comparing it to determine whether the programming is successful, the problem of OTP memory programming failure is solved and the chip yield and data reading accuracy are improved.
Patent Information
- Application Number
- CN202410605523.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-05-15
AI Technical Summary
There is a probability of failure in programming OTP memory, which may cause the chip to read incorrect values during operation, affecting the normal operation and yield of the chip. Especially in the back-end inspection process, OTP programming errors will cause the chip to be rejected. , affecting manufacturing costs.
By programming the target data twice in different address spaces of the memory, obtain the first write data and the second write data, compare them, and generate flag data to determine whether the programming is successful, ensuring that the target value in any write data is correct. It is considered that the programming is successful, thereby reducing the probability of programming errors.
It improves the success rate of data programming, optimizes the programming and reading process, improves the yield and stability of the chip, and ensures accurate reading and long-term storage of data.
Smart Images

Figure CN118193403B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data storage, and in particular to a data burning and verifying method, a data burning and verifying device and an electronic device. Background Art
[0002] OTP (One Time Programmable) memory is often used in IC circuits. However, due to its one-time programmable characteristics, that is, a single address is only allowed to be burned once and cannot be erased, it sometimes brings risks to the use of the chip. This is mainly because there is a probability of failure in the burning of OTP. Once the final value of the burning does not match the target value, it will cause the chip to read an erroneous and unexpected value from the OTP when it is working, which may cause the chip to fail to work properly. Therefore, in the post-process CP / FT (Circuit Probing, Chip Probing, wafer test / Final Test), even if the other functions of the chip are normal, as long as the OTP burning error is detected, the IC will be eliminated. Once the probability of OTP burning error is high, it will cause the chip yield to fail to meet the standard, which will ultimately affect the manufacturing cost of the chip. Summary of the invention
[0003] In order to solve the above technical problems, the present application provides a data burning verification method, a data burning verification device and an electronic device to solve the problems in the prior art.
[0004] According to one aspect of the present invention, a data burning verification method is provided, comprising: obtaining first write data from a first address space, the first write data being data burned into a first address space of a memory based on target data in response to a data burning instruction, the target data comprising a plurality of target numerical values; numerically comparing the first write data with the target data to generate first flag data and second flag data, the first flag data comprising a plurality of flag values corresponding one-to-one to the plurality of target numerical values, the flag values selecting a first value and a second value, the second flag data being the first value; obtaining second write data from a second address space, the second write data being data burned into a second address space of a memory based on the target data in response to a data burning instruction; numerically comparing the second write data with the target data, if the corresponding numerical values are inconsistent, then in the case where the corresponding flag value in the first flag data is the second value, updating the second flag data to the second value; and judging whether the target data is burned successfully according to the second flag data, wherein the second flag data being the first value indicates that the target data is burned successfully.
[0005] Optionally, the first write data is numerically compared with the target data to generate first flag data and second flag data, including: comparing multiple values of the first write data with the multiple target values one by one; if a value of the first write data is consistent with the corresponding target value, setting the corresponding flag value to the first value, otherwise, setting the corresponding flag value to the second value; combining multiple flag values into first flag data and setting the second flag data to the first value.
[0006] Optionally, the data burning verification method further includes: calculating a first cyclic redundancy check code according to the first flag bit data, and burning the first flag bit data and the first cyclic redundancy check code into a third address space and a fourth address space of the memory respectively.
[0007] Optionally, the data burning verification method also includes: obtaining first flag data from the third address space, and calculating a second cyclic redundancy check code based on the obtained first flag data; comparing the second cyclic redundancy check code with the first cyclic redundancy check code obtained from the fourth address space, and generating third flag data based on the comparison result, the third flag data selecting a first value and a second value; judging whether the target data is burned successfully based on the third flag data, wherein when the third flag data is the first value, the result of successful burning of the target data is returned, and when the third flag data is the second value, the result of failed burning of the target data is returned.
[0008] Optionally, the second cyclic redundancy check code is compared with the first cyclic redundancy check code obtained from the fourth address space, and the step of generating third flag data according to the comparison result includes: when the second cyclic redundancy check code is consistent with the first cyclic redundancy check code, it indicates that the first flag data and the first cyclic redundancy check code are both burned correctly, and the third flag data is set to the first value; when the second cyclic redundancy check code is inconsistent with the first cyclic redundancy check code, it indicates that the burning of the first flag data and / or the first cyclic redundancy check code fails, and the third flag data is set to the second value.
[0009] Optionally, when the target data is successfully programmed, the data programming verification method further comprises: reading programming data from the first write data and the second write data according to the first flag bit data.
[0010] Optionally, the step of reading the burn data according to the first flag data, the first write data and the second write data includes: traversing the first flag data obtained in response to the data read instruction; reading from the first write data a numerical value corresponding to the flag value of the first flag data when it is a first value; reading from the second write data a numerical value corresponding to the flag value of the first flag data when it is a second value.
[0011] Optionally, the first value is a binary number 0, and the second value is a binary number 1.
[0012] According to another aspect of the present invention, a data burning verification device is provided, comprising: a first acquisition unit, acquiring first write data from a first address space, the first write data being data written to a first address space of a memory based on target data in response to a data burning instruction, the target data comprising a plurality of target values; a first comparison unit, comparing the first write data with the target data to generate first flag data and second flag data, the first flag data comprising a plurality of flag values corresponding to the plurality of target values one by one, the flag values selecting a first value and a second value, the second flag data being the first value; a second acquisition unit, acquiring second write data from a second address space, the second write data being data written to a second address space of the memory based on the target data in response to a data burning instruction; a second comparison unit, comparing the second write data with the target data to update the second flag data to the second value if the corresponding values are inconsistent; and a judgment unit, judging whether the target data is successfully burned according to the second flag data, the second flag data being the first value indicating that the target data is successfully burned.
[0013] According to another aspect of the present invention, there is provided an electronic device, comprising: a processor, the processor comprising a processing unit and a cache unit, the processing unit being used to execute the above-mentioned data burning verification method, the cache unit being used to store instructions and data operable by the processing unit; and a memory, the memory being used to store first write data, second write data, first flag data and a first cyclic redundancy check code.
[0014] Optionally, the processor includes a central processing unit, the memory includes a one-time programmable memory, and the cache unit includes a register, and the register stores the second flag bit data and the third flag bit data.
[0015] The data burning verification method, data burning verification device and electronic device provided by the present invention burn target data twice in different address spaces of a memory to obtain first write data and second write data, compare the first write data and the second write data with the target data respectively, and obtain first flag data and second flag data, thereby judging whether the burning is successful. The first flag data is the comparison result of the first write data and the target data, and the second flag data represents that any target value of the target data is correctly burned in any one of the first write data and the second write data. Therefore, as long as the target value is correct in any one of the write data of the two burns, it is considered that the target value is burned correctly. When all target values can be regarded as being burned correctly, the correct burning data can be read through the first flag data. Therefore, by burning the target data twice, the probability of burning errors of the target value is reduced, the overall burning and reading process is optimized, the success rate of data burning is essentially improved, and the yield and stability of the chip are also improved from the side.
[0016] Furthermore, after the data is successfully burned, the correct target value burned in the first write data can be read through the first flag data, and then the correct target value burned in the second write data can be read to obtain the final burning data. The data reading operation is simple and has high accuracy.
[0017] Furthermore, the first cyclic redundancy check code can be calculated by the first flag data, and the first flag data and the first cyclic redundancy check code are burned into the memory, so as to reduce the occupation of the memory and the like, and the data is stored for a long time and stably. In addition, after the first flag data and the first cyclic redundancy check code are burned, the first flag data is also read from the memory, and the second cyclic redundancy check code is calculated by the read first flag data. By comparing whether the first cyclic redundancy check code and the second cyclic redundancy check code are consistent, it can be verified whether the first flag data and the first cyclic redundancy check code are burned successfully. By verifying whether the first flag data is burned successfully, it is further guaranteed that the target data is burned and read successfully.
[0018] It should be noted that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A schematic flow chart of a data programming verification method according to a first embodiment of the present invention is shown;
[0020] Figure 2 Shown according to Figure 1 A schematic flow chart of the detailed steps of step S102;
[0021] Figure 3A schematic flow chart of a data programming verification method according to a second embodiment of the present invention is shown;
[0022] Figure 4 Shown according to Figure 3 A schematic flowchart of the detailed steps of step S210;
[0023] Figure 5 A schematic diagram showing the distribution of address space in a memory according to an embodiment of the present invention is shown;
[0024] Figure 6 A schematic block diagram of a data programming verification device according to an embodiment of the present invention is shown;
[0025] Figure 7 A schematic block diagram of an electronic device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0026] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. The preferred embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive.
[0027] In order to improve the data burning success rate of OTP, the present invention uses a specific data burning verification method and a data burning verification device to burn the target data into two copies in different address spaces of the OTP, and by comparing the two written data with the target data, it is determined whether each data value of the target data is burned successfully, thereby improving the data burning success rate by burning twice. Figure 1-7 Detailed description.
[0028] Figure 1 A schematic flow chart of a data programming verification method according to a first embodiment of the present invention is shown.
[0029] like Figure 1 As shown, the data burning verification method includes steps S101-S105, which are as follows:
[0030] In step S101, first write data is obtained from a first address space, where the first write data is data written into a first address space of a memory based on target data in response to a data writing instruction, where the target data includes a plurality of target values.
[0031] In this step, first respond to the data burning instruction issued by the host, and write the target data (data to be burned) into different address spaces of the memory. For example, the target data is written into the first address space and the second address space of the OTP memory respectively, and the first address space and the second address space do not overlap. The data in the first address space is the first write data, and the data in the second address space is the second write data. The target data can be written into the first address space and the second address space respectively at the same time, or the target data can be written into the first address space and the second address space respectively. If the target data includes multiple target values, then the first write data and the second write data also include multiple values. The multiple values of the first write data, the multiple values of the second write data and the multiple target values correspond one to one.
[0032] In step S102, the first write data is numerically compared with the target data to generate first flag data and second flag data. The first flag data includes multiple flag values corresponding to multiple target values one by one. The flag value selects the first value and the second value, and the second flag data is the first value.
[0033] In this step, the first written data is numerically compared with the target data. During the comparison, multiple values of the first written data are compared with multiple target values one by one. The comparison result is recorded as a flag value, that is, multiple flag values are obtained according to the comparison result. Multiple flag values correspond to multiple target values one by one, and multiple flag values are combined into first flag bit data. The flag value includes a first value and a second value, which can correspond to the consistency and inconsistency of the comparison result respectively. The flag value is, for example, a binary number, which can be 0 or 1. Figure 2 Shown according to Figure 1 Detailed steps of step S102 are shown in FIG. Figure 2 As shown, Figure 1 Step S102 in the embodiment specifically includes the following steps:
[0034] In step S1021 , multiple values of the first write data are compared one by one with multiple target values.
[0035] In this step, the first write data is traversed, and each value of the first write data is compared one by one with the target value of the corresponding sequence.
[0036] In step S1022, if a value of the first write data is consistent with the corresponding target value, the corresponding flag value is set to the first value; otherwise, the corresponding flag value is set to the second value.
[0037] In this step, if a certain value in the first write data is consistent with the target value, the value is burned correctly and the corresponding flag value is set to the first value; if a certain value in the first write data is inconsistent with the target value, the value is burned incorrectly and the corresponding flag value is set to the second value.
[0038] In step S1023, a plurality of flag values are combined into first flag data and the second flag data is set to the first value.
[0039] In this step, a plurality of flag values are combined into the first flag data in the same order as the target value, that is, the first flag value in the first flag data corresponds to the comparison result of the first target value and the first value in the first write data. Moreover, regardless of the comparison result between the first write data and the target data, the second flag data is set to the first value. Specifically, each address in the first address space stores a value, and also generates a flag value accordingly. All flag values form the first flag data, and all first data values share one second flag data. If the first data value in a certain address is consistent with the target value, the corresponding flag value is recorded as the first value, for example, 0, and the second flag data is temporarily recorded as the first value, for example, 0. If the first data value is inconsistent with the target value, the corresponding flag value is recorded as the second value, for example, 1, and the second flag data is also temporarily recorded as the first value, for example, 0. In other words, regardless of the comparison result between the first data value and the target data, the second flag data is 0.
[0040] Continue to see Figure 1 In step S103, second write data is obtained from the second address space, where the second write data is data written into the second address space of the memory based on the target data in response to the data writing instruction.
[0041] In step S104, the second write data is numerically compared with the target data. If the corresponding numerical values are inconsistent, the second flag data is updated to the second value when the corresponding flag value in the first flag data is the second value.
[0042] In this step, the second write data read from the second address space is numerically compared with the target data, and it is determined whether to update the second flag data according to the comparison result. The final second flag data is generated by comparing the second write data with the target data. If the second write data and the target data are completely consistent, the final second flag data is recorded as the first value, for example, 0.
[0043] Specifically, multiple values in the second write data are compared with multiple target values one by one. If a certain value in the second write data is consistent with the corresponding target value, it means that the value is correctly written. If a certain value in the second write data is inconsistent with the corresponding target value, it means that the value is wrongly written. When a certain value in the second data value is inconsistent with the target value, it is also necessary to determine whether the target value is consistent with the corresponding value in the first write data. That is, when a value in the second write data is consistent with the target value, the second flag data is not updated, and the next value is compared. When a value in the second write data is inconsistent with the target value, the first flag data obtained in the above steps is obtained, and the flag value corresponding to the target value is found. If the flag value is the first value, it means that the corresponding value in the first write data is correctly written, but the corresponding value in the second write data is wrongly written, and the second flag data is still kept at the first value. Only when a certain value in the second data value is inconsistent with the target value and the corresponding flag value in the first flag data is the second value, the second flag data is updated to the second value. The flag value being the second value indicates that the corresponding data in the first write data is incorrectly burned, and the corresponding data in the second write data is also incorrectly burned. At this time, the second flag bit data is updated to the second value, for example, the binary number 1, the burning fails, and the process ends.
[0044] Then, for any target value, as long as it is burned correctly in the first write data, or burned correctly in the second write data, or both are burned correctly, the data can be considered to be burned successfully, and the second flag bit data corresponding to the successful data burning is the first value (for example, binary number 0).
[0045] In step S105, it is determined whether the target data is successfully programmed according to the second flag data. When the second flag data is a first value, it indicates that the target data is successfully programmed.
[0046] In this step, the second flag data is read to determine whether the data is successfully burned. If the second flag data read is the first value, the target data is successfully burned. That is, any target value is successfully burned in the first write data and / or successfully burned in the second write data. When the second flag data is the second value, it indicates that the target data has failed to be burned, and the target data is re-burned in the other two address spaces of the OTP memory, or burned in the address space of a new OTP memory.
[0047] Through the above steps S101-S105, the target data is burned twice and the data comparison is completed, and the first flag data representing whether the first write data is burned correctly and the second flag data representing whether the target data is burned successfully are generated. The burning data can be read or other operations can be performed only when it is judged that the target data is burned successfully according to the second flag data. Through the above steps, the target data is burned twice in the OTP, and any correct one is considered to be burned correctly, which reduces the risk of mistakes, increases the probability of successful burning, and reduces the risk of the chip being rejected. In this embodiment, the target data is burned twice in the OTP. In other embodiments, the target data can also be tried to burn three or more times, and then the corresponding flag data is calculated. The corresponding ideas can also be included in the scope disclosed by the present invention.
[0048] After the above steps S101-S105, the first flag data can be stored in the OTP, and the second flag data can be stored in a cache unit, such as a memory. Storing the first flag data in the OTP can prevent the data from being lost and unable to be retrieved after the chip is powered off. The burning data stored in the OTP can be read afterwards. That is, after the target data is successfully burned, the burning data is read according to the first flag data, the first write data and the second write data. Specifically, the first flag data can be read first, and the flag value therein can be traversed. When the flag value is 0, the corresponding value in the first write data is read out, and when the flag value is 1, the corresponding value in the second write data is read out, and finally the data read out constitutes the final burning data.
[0049] Figure 3 A schematic flow chart of a data programming verification method according to a second embodiment of the present invention is shown.
[0050] like Figure 3 As shown, this embodiment provides a more complete data burning verification method, including steps S201-S210, which are specifically as follows.
[0051] In step S201, first write data is obtained from a first address space, where the first write data is data written into a first address space of a memory based on target data in response to a data writing instruction, where the target data includes a plurality of target values.
[0052] In step S202, the first write data is numerically compared with the target data to generate first flag data and second flag data, the first flag data includes multiple flag values corresponding to multiple target values one by one, the flag value selects the first value and the second value, and the second flag data is the first value.
[0053] In step S203, second write data is acquired from the second address space, where the second write data is data written into the second address space of the memory based on the target data in response to the data writing instruction.
[0054] In step S204, the second write data is numerically compared with the target data. If the corresponding numerical values are inconsistent, the second flag data is updated to the second value when the corresponding flag value in the first flag data is the second value.
[0055] In step S205, it is determined whether the target data is successfully programmed according to the second flag data. When the second flag data is a first value, it indicates that the target data is successfully programmed.
[0056] In step S206, a first cyclic redundancy check code is calculated according to the first flag bit data, and the first flag bit data and the first cyclic redundancy check code are respectively burned into the third address space and the fourth address space of the memory.
[0057] In step S207, first flag data is obtained from the third address space, and a second cyclic redundancy check code is calculated according to the obtained first flag data.
[0058] In step S208, the second cyclic redundancy check code is compared with the first cyclic redundancy check code obtained from the fourth address space, and third flag data is generated according to the comparison result. The third flag data selects the first value and the second value.
[0059] In step S209, it is determined whether the target data is successfully programmed according to the third flag data.
[0060] In step S210, the programming data is read from the first writing data and the second writing data according to the first flag bit data.
[0061] The above steps S201-S205 and Figure 1 The steps S101-S105 are the same as in the above, and the same embodiment can be adopted, which will not be repeated here.
[0062] For step S206, after the burning is successful, the first cyclic redundancy check code can also be calculated according to the final first flag data, recorded as CRC-1, and the first flag data is written into the third address space of the OTP memory, and the CRC-1 is written into the fourth address space of the OTP memory. Both the third address space and the fourth address space can contain multiple addresses. Burning the first flag data and CRC-1 into the OTP can improve the speed of subsequent reading of the burning data, and also make the data preservation lasting and error-prone, further ensuring the success rate of reading the burning data. However, it is also necessary to verify whether the first flag data and CRC-1 are also burned successfully.
[0063] Thus, in step S207, the first flag data written in the third address space of the OTP memory is read, and the second cyclic redundancy check code is calculated based on the read first flag data, which is recorded as CRC-2. In step S208, the CRC-1 and CRC-2 read from the fourth address space are compared to see whether the two are consistent to generate the third flag data. The third flag data and the second flag data can both be a single value, that is, a binary number, 0 or 1. When CRC-1 is consistent with CRC-2, it means that the first flag data and CRC-1 are both written correctly, and the third flag data is recorded as the first value (for example, 0); when the two are inconsistent, it means that the first flag data is written incorrectly, or CRC-1 is written incorrectly, and the third flag data is recorded as the second value (for example, 1). In step S209, it is determined whether the target data is successfully written based on the third flag data. If the third flag data is the first value, the first flag data and CRC-1 are both written correctly. At this time, the second flag data is also the first value, so the target data is successfully written. When the third flag data is the second value, it is considered that the target data is burned unsuccessfully. Therefore, when the second flag data and the third flag data are both 0, it is considered that the target data is burned successfully, otherwise it is considered that the target data is burned unsuccessfully.
[0064] After the target data is successfully programmed, an operation of reading the programmed data may be performed, that is, step S210 . Figure 4 Shown according to Figure 3 The schematic flow chart of the detailed steps of step S210 is shown in FIG. Figure 4 As shown, step S210 specifically includes the following steps:
[0065] In step S2101, the first flag bit data obtained in response to the data read instruction is traversed.
[0066] In step S2102, a numerical value corresponding to when the flag value of the first flag bit data read from the first write data is the first value.
[0067] In step S2103, a value corresponding to when the flag value of the first flag bit data read from the second write data is the second value.
[0068] Specifically, after the target data is successfully burned, that is, when the second flag data and the third flag data are both the first value (the first value is, for example, a binary number 0), the data read instruction issued by the host is responded to, and the first flag data burned in the third address space of the OTP memory is read. Then the first write data burned in the first address space of the OTP memory is read. By traversing all the flag values of the first flag data, each flag value is judged to be the first value or the second value. When the flag value is the first value (for example, 0, indicating that the burning is correct), the value corresponding to the flag value in the first write data is read out and used as the final burning data. Similarly, the second write data burned in the second address space is read, and when the flag value is the second value (for example, 1, indicating a burning error), the value corresponding to the flag value in the second write data is read out and used as the final burning data. According to the order of the flag values, the read values corresponding to the flag values are combined to obtain the final burning data read out. The first value in all the above steps can be a binary number 0, and the second value can be a binary number 1.
[0069] Through the data burning verification method of this embodiment, the target data is burned twice in the OTP, which improves the probability of successful burning, and the first flag data is set to improve the data reading speed and accuracy. It is further judged whether the burning of the first flag data is correct, which further ensures the accuracy of the read burning data, improves the reliability of data storage, improves the yield of the chip, and reduces the cost.
[0070] Figure 5 A schematic diagram showing the distribution of address space in a memory according to an embodiment of the present invention is shown.
[0071] like Figure 5As shown, the data burning verification method of the present application is introduced through a specific example. The memory is, for example, an OTP memory, and the storage space of the OTP memory can be set to 128×8 bits, that is, each address can store 8 bits of data, which is regarded as a data value. The data amount of the target data A to be burned is, for example, 32×8 bits. The target data A is written into the first address space and the second address space respectively, the first address space is address 0 to 31, and the second address space is address 32 to 63. Read the first write data in the first address space, assuming that the first data value in address 0 and address 6 is burned incorrectly, then the first flag bit data (including 32 flag values, the flag value is 0 or 1) is recorded as 0000_0000_0000_0000_0000_0000_0100_0001, and the second flag bit data is initialized and recorded as 0. Then read the second write data in the second address space, assuming that the second data value at address 0 and address 6 still has a burning error, then the second flag bit data is recorded as 1, which is regarded as a burning failure. Assuming that there is no programming error in the second data values at address 0 and address 6, the second flag bit data is recorded as 0 regardless of whether there is a programming error in the second data values at other addresses.
[0072] When the second flag data is 0, the first flag data 0000_0000_0000_0000_0000_0000_0100_0001 is written into the third address space, which is addresses 64 to 67. The corresponding CRC-1 is calculated based on the first flag data. Assuming that CRC-1 is 1110_1101_1110_1001, the CRC-1 is written into the fourth address space, which is addresses 68 to 69. After that, the first flag data in the third address space is read and CRC-2 is calculated. Assuming that CRC-2 is not equal to 1110_1101_1110_1001, the third flag data is recorded as 1, which is considered as a programming failure. Assuming that CRC-2 is equal to 1110_1101_1110_1001, the third flag data is recorded as 0, which is considered as a programming success.
[0073] When the second flag data and the third flag data are both 0, the first flag data in the third address space is read, and the read value is 0000_0000_0000_0000_0000_0000_0100_0001. Then the first write data in the first address space is read, and the first data values in addresses 1 to 5 and addresses 7 to 31 are used as the final programming data. Then the second write data in the second address space is read, and the second data values in addresses 0 and 6 are used as the final programming data.
[0074] Figure 6A schematic block diagram of a data programming verification device according to an embodiment of the present invention is shown.
[0075] like Figure 6 As shown, the data burning verification device 300 provided by the embodiment of the present invention includes: a first acquisition unit 310, a first comparison unit 320, a second acquisition unit 330, a second comparison unit 340 and a judgment unit 350. The first acquisition unit 310 acquires first write data from the first address space, the first write data is data written into the first address space of the memory based on the target data in response to the data burning instruction, and the target data includes multiple target values; the first comparison unit 320 compares the first write data with the target data to generate first flag data and second flag data, the first flag data includes multiple flag values corresponding to the multiple target values one by one, the flag value selects the first value and the second value, and the second flag data is the first value; the second acquisition unit 330 acquires second write data from the second address space, the second write data is data written into the second address space of the memory based on the target data in response to the data burning instruction; the second comparison unit 340 compares the second write data with the target data, if the corresponding values are inconsistent, then when the corresponding flag value in the first flag data is the second value, the second flag data is updated to the second value; the judgment unit 350 judges whether the target data is successfully burned according to the second flag data, and when the second flag data is the first value, it indicates that the target data is successfully burned.
[0076] Figure 7 A schematic block diagram of an electronic device according to an embodiment of the present invention is shown.
[0077] like Figure 7 As shown, the electronic device 400 provided in this embodiment includes a processor 420 and a memory 410. The processor 420 can use the data burning verification method provided in the embodiment of the present application to perform read and write operations on the data of the memory 410, and the memory 410 is used to store the first write data, the second write data, the first flag data and the first cyclic redundancy check code, etc. The memory 410 can be an OTP (One Time Programmable) memory, or it can also be an external memory such as a flash memory. The processor 420 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components.
[0078] The processor 420 further includes a processing unit 430 and a cache unit 440. The processing unit 430 and the cache unit 440 cooperate to perform the above-mentioned data burning verification method. The cache unit 440 is used to store instructions and data operable by the processing unit 430. The cache unit 440 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, referred to as EPROM), programmable read-only memory (Programmable Red-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0079] In one embodiment, the processor 420 is a central processing unit, the memory 410 is a one-time programmable memory OTP, and the cache unit 440 is a register, which stores the second flag bit data and the third flag bit data.
[0080] The processing unit 430 may further include a writing control unit 431, a reading control unit 433, and a comparison control unit 432. When writing data, the writing control unit 431 will write the target data in two different address spaces of the OTP memory, the two different address spaces being, for example, the first address space and the second address space, respectively. The data in the first address space is the first write data, and the data in the second address space is the second write data. The first write data and the second write data may be written simultaneously or successively. After writing each data value, the writing control unit 431 will read out the two writing data, send them to the comparison control unit 432 for comparison with the target data, and generate the first flag data and the second flag data. The writing control unit 431 will also write the first flag data into the third address space of the OTP memory, and calculate a CRC-1 (Cyclic Redundancy Check, cyclic redundancy check code, such as the remainder of dividing binary data by a specific number) based on the first flag data, and then write it into the CRC address of the OTP memory, which is called the fourth address space. The second flag data will be stored in the internal register of the chip. The burning control unit 431 also reads the first flag data of burning in the third address space and calculates CRC-2, and then reads CRC-1 in the fourth address space. The two CRCs are sent to the comparison control unit 432 for comparison, and the third flag data is generated to determine whether the first flag data and CRC are burned successfully. For example, when the second flag data and the third flag data are both 0, it means that the burning is successful.
[0081] When reading data, the read control unit 433 reads the first flag data in the OTP memory, the first write data in the first address space, and the second write data in the second address space. For a single data value, if the flag value of the first flag data is 0, the data stored in the first address space of the corresponding OTP memory is the final burn-in data; if the flag value of the first flag data is 1, the data stored in the second address space of the corresponding OTP memory is the final burn-in data.
[0082] Furthermore, an embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. The computer program can be executed by a processor to complete the data burning verification method provided in the embodiment of the present application.
[0083] In summary, the data burning verification method, data burning verification device and electronic device provided by the present invention burn the target data twice in different address spaces of the memory to obtain the first write data and the second write data, compare the first write data and the second write data with the target data respectively, and obtain the first flag data and the second flag data, and judge whether the burning is successful. The first flag data is the comparison result of the first write data and the target data, and the second flag data represents that any target value of the target data is correctly burned in any of the first write data and the second write data. Therefore, as long as the target value is correct in any of the write data of the two burns, it is considered that the target value is burned correctly. When all target values can be regarded as being burned correctly, the correct burning data can be read through the first flag data. Therefore, by burning the target data twice, the probability of burning errors of the target value is reduced, the overall burning and reading process is optimized, the success rate of data burning is essentially improved, and the yield and stability of the chip are also improved from the side.
[0084] Furthermore, after the data is successfully burned, the correct target value burned in the first write data can be read through the first flag data, and then the correct target value burned in the second write data can be read to obtain the final burning data. The data reading operation is simple and has high accuracy.
[0085] Furthermore, the first cyclic redundancy check code can be calculated by the first flag data, and the first flag data and the first cyclic redundancy check code are burned into the memory, so as to reduce the occupation of the memory and the like, and the data is stored for a long time and stably. In addition, after the first flag data and the first cyclic redundancy check code are burned, the first flag data is also read from the memory, and the second cyclic redundancy check code is calculated by the read first flag data. By comparing whether the first cyclic redundancy check code and the second cyclic redundancy check code are consistent, it can be verified whether the first flag data and the first cyclic redundancy check code are burned successfully. By verifying whether the first flag data is burned successfully, it is further guaranteed that the target data is burned and read successfully.
[0086] It should be noted that the numerical values in this article are only used for exemplary description. In other embodiments of the present invention, other numerical values can also be sampled to implement this solution. The specific settings should be reasonable according to the actual situation, and the present invention does not limit this.
[0087] Finally, it should be noted that: Obviously, the above embodiments are only examples for clearly explaining the present invention, and are not intended to limit the implementation methods. For ordinary technicians in the relevant field, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from this are still within the scope of protection of the present invention.
[0088] It should also be understood that the terms and expressions used herein are for descriptive purposes only, and one or more embodiments of this specification should not be limited to these terms and expressions. The use of these terms and expressions does not mean to exclude any equivalent features of the illustrations and descriptions (or parts thereof), and it should be recognized that various modifications that may exist should also be included in the scope of the claims. Other modifications, changes and substitutions may also exist. Accordingly, the claims should be deemed to cover all such equivalents.
Claims
1. A data burning verification method, comprising: Acquire first write data from the first address space, wherein the first write data is data written into the first address space of the memory based on target data in response to a data writing instruction, wherein the target data includes a plurality of target values; Compare the first write data with the target data to generate first flag data and second flag data, wherein the first flag data includes a plurality of flag values corresponding to the plurality of target values one by one, the flag values select a first value and a second value, and the second flag data is the first value; Acquire second write data from the second address space, where the second write data is data written into the second address space of the memory based on the target data in response to the data writing instruction; Compare the second write data with the target data in numerical value, and if the corresponding numerical values are inconsistent, update the second flag data to the second value when the corresponding flag value in the first flag data is the second value; as well as Determine whether the target data is successfully burned according to the second flag data, when the second flag data is a first value, it indicates that the target data is successfully burned, and when the second flag data is a second value, it indicates that the target data fails to be burned. The step of performing numerical comparison between the first write data and the target data to generate first flag bit data and second flag bit data includes: Comparing the multiple values of the first write data with the multiple target values one by one; If a value of the first write data is consistent with the corresponding target value, the corresponding flag value is set to the first value; otherwise, the corresponding flag value is set to the second value; A plurality of the flag values are combined into first flag bit data, and no matter what the comparison result between the first write data and the target data is, the second flag bit data is set to the first value.
2. The data burning verification method according to claim 1 further comprises: A first cyclic redundancy check code is calculated according to the first flag bit data, and the first flag bit data and the first cyclic redundancy check code are burned into the third address space and the fourth address space of the memory respectively.
3. The data burning verification method according to claim 2 further comprises: Acquire first flag bit data from the third address space, and calculate a second cyclic redundancy check code according to the acquired first flag bit data; Compare the second cyclic redundancy check code with the first cyclic redundancy check code obtained from the fourth address space, and generate third flag data according to the comparison result, wherein the third flag data selects a first value and a second value; According to the third flag bit data, it is judged whether the target data is successfully burned, When the third flag bit data is a first value, the result indicating that the target data is successfully burned is returned; and when the third flag bit data is a second value, the result indicating that the target data is failed to be burned is returned.
4. The data burning verification method according to claim 3, wherein: The step of comparing the second cyclic redundancy check code with the first cyclic redundancy check code obtained from the fourth address space, and generating third flag bit data according to the comparison result comprises: When the second cyclic redundancy check code is consistent with the first cyclic redundancy check code, it indicates that the first flag bit data and the first cyclic redundancy check code are both correctly burned, and the third flag bit data is set to the first value; When the second cyclic redundancy check code is inconsistent with the first cyclic redundancy check code, it indicates that the first flag bit data and / or the first cyclic redundancy check code fails to be burned, and the third flag bit data is set to a second value.
5. The data burning verification method according to claim 1 or 4, when the target data is successfully burned, the data burning verification method further comprises: The programming data is read from the first writing data and the second writing data according to the first flag bit data.
6. The data burning verification method according to claim 5, wherein: The step of reading the programming data according to the first flag data, the first writing data and the second writing data comprises: Traversing the first flag bit data acquired in response to the data read instruction; Reading from the first write data a value corresponding to when the flag value of the first flag bit data is a first value; The value corresponding to when the flag value of the first flag bit data read from the second write data is the second value.
7. The data burning verification method according to claim 1, wherein: The first value is a binary number 0, and the second value is a binary number 1.
8. A data burning verification device, comprising: A first acquisition unit acquires first write data from the first address space, wherein the first write data is data written into the first address space of the memory based on target data in response to a data writing instruction, wherein the target data includes a plurality of target values; a first comparison unit, performing a numerical comparison between the first write data and the target data to generate first flag data and second flag data, wherein the first flag data includes a plurality of flag values corresponding to the plurality of target values one by one, the flag values select a first value and a second value, and the second flag data is the first value; A second acquisition unit acquires second write data from a second address space, wherein the second write data is data written into a second address space of a memory based on the target data in response to a data writing instruction; a second comparison unit, for comparing the second write data with the target data in numerical value, and if the corresponding numerical values are inconsistent, updating the second flag bit data to a second value when the corresponding flag value in the first flag bit data is a second value; as well as a judging unit, judging whether the target data is successfully burned according to the second flag data, wherein when the second flag data is a first value, it indicates that the target data is successfully burned, and when the second flag data is a second value, it indicates that the target data fails to be burned. Among them, the first comparison unit compares the multiple values of the first write data with the multiple target values one by one; if a value of the first write data is consistent with the corresponding target value, the corresponding flag value is set to the first value, otherwise, the corresponding flag value is set to the second value; the multiple flag values are combined into the first flag bit data, and regardless of the comparison result between the first write data and the target data, the second flag bit data is set to the first value.
9. An electronic device, comprising: A processor, the processor comprising a processing unit and a cache unit, the processing unit is used to execute the data burning verification method according to any one of claims 1 to 7, and the cache unit is used to store instructions and data operable by the processing unit; as well as A memory is used to store first write data, second write data, first flag data and a first cyclic redundancy check code.
10. The electronic device according to claim 9, wherein: The processor includes a central processing unit, the memory includes a one-time programmable memory, and the cache unit includes a register, in which the second flag bit data and the third flag bit data are stored.
