Data writing method and device, data reading method and device and electronic equipment
By writing key data in the inverse relationship in the eFuse circuit and performing data comparison and error correction processing, the problem of data errors in special cases is solved, and the system stability and data correctness are improved.
Patent Information
- Application Number
- CN202411508461.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-26
- Publication Date
- 2025-02-28
AI Technical Summary
In special circumstances such as electromagnetic interference, power supply fluctuations or electrostatic discharge, eFuse circuit may cause data errors and affect system stability.
By obtaining the amount of writing data to be written, it is decided to write the key data in the inverse relationship into multiple sub-storage areas of the electronic fuse, and perform data comparison and error correction processing during reading to ensure the accuracy of the data.
It reduces the possibility of data errors and read errors caused in special circumstances, improves the accuracy of system key data and the stability of chip system, and extends the service life of electronic fuses.
Smart Images

Figure CN119536637A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of chip technology, and in particular relates to a data writing method, a data reading method, a device and an electronic device. Background Art
[0002] eFuse (Electronic Fuse) is an electronic fuse, which is a programmable electronic fuse. In modern chip design, eFuse plays a key role. The eFuse defaults to a low level and becomes a high resistance state after programming. This state is permanent, so eFuse can be used to store one-time programmable information, such as chip configuration parameters, calibration data, etc. With the continuous development of semiconductor technology, eFuse is widely used in various electronic products due to its high reliability and small footprint. It is usually burned and programmed by chip manufacturers when leaving the factory. Chip users cannot re-burn eFuse, which has good security.
[0003] Under normal circumstances, the unprogrammed bits of the eFuse will generally not be mistakenly burned as the running time increases. However, in special circumstances, such as strong electromagnetic interference, power supply fluctuations or electrostatic discharge in the system, the voltage or current in the eFuse circuit may be abnormal, which may mistakenly trigger the unprogrammed bits for burning, resulting in data errors. For example, under high voltage transients or electrostatic shocks, enough energy may be generated to cause the weak connection part of the eFuse to fuse, similar to the programming operation, resulting in data errors and affecting system stability. In the design and use of eFuse, how to reasonably set the burning data format and how to reasonably determine the burning data plan is an urgent problem to be solved. Summary of the invention
[0004] The embodiments of the present application provide a data writing method, a data reading method, a device and an electronic device, which can solve the technical problem of data errors in the eFuse circuit affecting system stability.
[0005] In a first aspect, an embodiment of the present application provides a data writing method, comprising:
[0006] Obtaining a first amount of first data to be programmed and a second amount of second data to be programmed, wherein the first data to be programmed includes first key data, the second data to be programmed includes second key data, and a data value of the first key data is inversely related to a data value of the second key data;
[0007] If the first writing data amount is greater than the second writing data amount, the first data to be written is written into multiple sub-storage areas of the electronic fuse; if the first writing data amount is less than the second writing data amount, the second data to be written is written into multiple sub-storage areas of the electronic fuse.
[0008] In a possible implementation manner of the first aspect, the first data to be written further includes first negated identification data and a first check code, and the second data to be written further includes second negated identification data and a second check code, and the method further includes:
[0009] Calculate and obtain the first check code according to the first key data and the first inverted identification data;
[0010] A third check code is calculated based on the first key data and the second inverted identification data, wherein the data value of the second inverted identification data is in an inverted relationship with the data value of the first inverted identification data;
[0011] Performing a negation operation on the first key data to obtain the second key data;
[0012] Perform an inversion operation on the third check code to obtain the second check code.
[0013] In a possible implementation manner of the first aspect, the sub-storage area includes a data area, a negation identification area, and a check area, and writing the first to-be-written data into the multiple sub-storage areas of the electronic fuse includes:
[0014] Writing the first key data of the first data to be written into multiple data areas of the electronic fuse, writing the first inverted identification data of the first data to be written into multiple inverted identification areas of the electronic fuse, and writing the first check code of the first data to be written into multiple check areas of the electronic fuse;
[0015] The step of writing the second data to be written into a plurality of sub-storage areas of the electronic fuse comprises:
[0016] The second key data of the second data to be burned is written into multiple data areas of the electronic fuse, the second inverted identification data of the second data to be burned is written into multiple inverted identification areas of the electronic fuse, and the second verification code of the second data to be burned is written into multiple verification areas of the electronic fuse.
[0017] In a possible implementation manner of the first aspect, writing the first to-be-written data into multiple sub-storage areas of the electronic fuse includes:
[0018] Writing the first data to be written into each sub-storage area of the plurality of sub-storage areas of the electronic fuse;
[0019] The step of writing the second data to be burned into a plurality of sub-storage areas of the electronic fuse comprises:
[0020] The second data to be written is written into each of the multiple sub-storage areas of the electronic fuse.
[0021] In a second aspect, an embodiment of the present application provides a data reading method, comprising:
[0022] reading a plurality of written data in a plurality of sub-storage areas of the electronic fuse;
[0023] Performing data comparison and error correction processing on the plurality of written data to obtain error-corrected data, wherein the written data includes written key data, written inverted identification data, and written check codes, and the error-corrected data includes error-corrected key data, error-corrected inverted identification data, and error-corrected check codes;
[0024] If the post-error correction inverted identification data indicates that no inverting operation is required, a first reference check code is calculated based on the post-error correction key data and the post-error correction inverted identification data;
[0025] If the first reference check code and the post-error-correction check code are the same, it is determined that the post-error-correction key data is valid data.
[0026] In a possible implementation manner of the second aspect, the method further includes:
[0027] If the post-error correction inversion identification data indicates that an inversion operation is required, an inversion operation is performed on the post-error correction key data and the post-error correction check code to obtain the inverted key data and the inverted check code;
[0028] Calculate and obtain a second reference check code according to the inverted key data and the inverted identification data after error correction;
[0029] If the second reference check code and the inverted check code are the same, the inverted key data is determined to be valid data.
[0030] In a possible implementation manner of the second aspect, the sub-storage area includes a data area, a negation identification area, and a check area, and the reading of multiple written data in multiple sub-storage areas of the electronic fuse includes:
[0031] The multiple key data written in the multiple data areas, the multiple inverted identification data written in the multiple inverted identification areas, and the multiple verification codes written in the multiple verification areas of the electronic fuse are read.
[0032] In a third aspect, an embodiment of the present application provides a data writing device, including:
[0033] A data amount acquisition module, used for acquiring a first writing data amount of first data to be written and a second writing data amount of second data to be written, wherein the first data to be written includes first key data, the second data to be written includes second key data, and the data value of the first key data is inversely related to the data value of the second key data;
[0034] A data writing module is used to write the first data to be written into multiple sub-storage areas of the electronic fuse if the first amount of data to be written is greater than the second amount of data to be written, and to write the second data to be written into multiple sub-storage areas of the electronic fuse if the first amount of data to be written is less than the second amount of data to be written.
[0035] In a fourth aspect, an embodiment of the present application provides a data reading device, including:
[0036] A data reading module, used for reading a plurality of written data in a plurality of sub-storage areas of the electronic fuse;
[0037] A comparison and error correction module, used for performing data comparison and error correction processing on the plurality of written data to obtain error-corrected data, wherein the written data includes written key data, written inverted identification data, and written check codes, and the error-corrected data includes error-corrected key data, error-corrected inverted identification data, and error-corrected check codes;
[0038] A first verification module, configured to calculate and obtain a first reference verification code according to the post-error-correction key data and the post-error-correction inverted identification data if the post-error-correction inverted identification data indicates that no inverted operation is required;
[0039] A data determination module is used to determine that the error-corrected key data is valid data if the first reference check code and the error-corrected check code are the same.
[0040] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device implements the data writing method described in the first aspect above, or the data reading method described in the second aspect above.
[0041] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the data writing method described in the first aspect or the data reading method described in the second aspect is implemented.
[0042] In a seventh aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the data writing method described in the first aspect or the data reading method described in the second aspect.
[0043] It can be understood that the beneficial effects of the third to seventh aspects mentioned above can be found in the relevant descriptions of the first and second aspects mentioned above, and will not be repeated here.
[0044] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0045] The present application obtains a first amount of data to be burned and a second amount of data to be burned of a first data to be burned, wherein the first data to be burned includes a first key data, the second data to be burned includes a second key data, the data value of the first key data and the data value of the second key data are inversely related, if the first amount of data to be burned is greater than the second amount of data to be burned, the first data to be burned is written into a plurality of sub-storage areas of the electronic fuse, if the first amount of data to be burned is less than the second amount of data to be burned, the second data to be burned is written into a plurality of sub-storage areas of the electronic fuse. The present application can reduce the possibility of data reading errors caused by data errors caused by special circumstances such as strong electromagnetic interference, power supply fluctuations or electrostatic discharge in the system. The present application uses the characteristics of one-time programming of eFuse to propose a data structure for eFuse storage and an easy-to-implement error correction and error detection method, which can reduce the probability of erroneous burning during eFuse operation, and realize efficient error correction without increasing memory cost and complexity. In addition, the present application can ensure the correctness of key data of the system, improve the stability of the chip system, and increase the service life of the electronic fuse.
[0046] The present application reads multiple written data in multiple sub-storage areas of an electronic fuse, performs data comparison and error correction processing on the multiple written data, and obtains error-corrected data, wherein the written data includes written key data, written inverted identification data, and written check codes, and the error-corrected data includes error-corrected key data, error-corrected inverted identification data, and error-corrected check codes. If the error-corrected inverted identification data indicates that no inversion operation is required, a first reference check code is calculated based on the error-corrected key data and the error-corrected inverted identification data. If the first reference check code is the same as the error-corrected check code, the error-corrected key data is determined to be valid data. The present application can ensure the correctness of system key data, improve chip system stability, and increase the service life of electronic fuses by introducing error detection and correction mechanisms. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0048] Figure 1 is a flow chart of a data writing method provided by an embodiment of the present application;
[0049] Figure 2 is a flowchart of a data writing method provided by another embodiment of the present application;
[0050] Figure 3 It is a schematic diagram of the data structure of multiple sub-storage areas of an electronic fuse provided by an embodiment of the present application;
[0051] Figure 4 is a flow chart of a data reading method provided in an embodiment of the present application;
[0052] Figure 5 is a schematic diagram of obtaining error-corrected data provided by an embodiment of the present application;
[0053] Figure 6 is a flow chart of a data reading method provided by another embodiment of the present application;
[0054] Figure 7 is a structural schematic diagram of a data writing device provided by an embodiment of the present application;
[0055] Figure 8 is a structural schematic diagram of a data reading device provided by another embodiment of the present application;
[0056] Fig. 9 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0058] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0059] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0060] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0061] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0062] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0063] The data writing method or data reading method provided in the embodiments of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), etc. The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.
[0064] For example, the electronic device may be a station (STAION, ST) in a WLAN, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) device, a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a vehicle networking terminal, a computer, a laptop computer, a handheld communication device, a handheld computing device, a satellite wireless device, a wireless modem card, a TV set top box (STB), a customer premises equipment (CPE) and / or other devices for communicating on a wireless system and a next-generation communication system, such as a mobile terminal in a 5G network or a mobile terminal in a future evolved Public Land Mobile Network (PLMN) network, etc.
[0065] Figure 1 It is a flowchart of a data writing method provided in one embodiment of the present application.
[0066] S11, obtaining a first amount of first data to be burned and a second amount of second data to be burned, wherein the first data to be burned includes first key data, the second data to be burned includes second key data, and the data value of the first key data is inversely related to the data value of the second key data.
[0067] eFuse (Electronic Fuse) is an electronic fuse, which is a programmable electronic fuse. In modern chip design, eFuse plays a key role. The eFuse defaults to a low level, and becomes a high resistance state after programming, and this state is permanent. The data value of each bit in the eFuse is logic 0 when it is not burned, and the data value of the corresponding bit is logic 1 after the fuse is burned. Therefore, eFuse can be used to store one-time programmable information. Data such as chip configuration data, calibration data, security encryption keys, secure boot identification, production test data, and device unique identification that eFuse needs to store are called key data. Key data is data required for chips that need to be saved when power is off. The first key data and the second key data both save the necessary key data. The data value of the first key data and the data value of the second key data are inversely related and negated. For example, if the first key data is 00001111, the second key data is 11110000. Those skilled in the art should understand that although the data value of the first key data and the data value of the second key data are in a negated relationship or an inverse relationship, the data information content stored in the first key data and the second key data can be considered to express the same data content. When reading data, if a negation operation is required, it is only necessary to perform a negation operation on the first key data or the second key data to obtain accurate key data. When reading data, if a negation operation is not required, the first key data or the second key data can be directly determined as the accurate key data.
[0068] The electronic fuse (eFuse) defaults to a low level, and becomes a high resistance state after programming, and this state is permanent. In addition, for some electronic fuses, the default is a high resistance state, which can also be changed to a low level state through programming. The amount of data to be burned refers to the number of data that needs to be burned, that is, the number of levels that need to be burned to change the level state of the electronic fuse. For example, programming a low level state to a high resistance state, and programming a high resistance state to a low level state. The first amount of data to be burned can be obtained by calculating the number of data that needs to be burned in the first data to be burned. The second amount of data to be burned can be obtained by calculating the number of data that needs to be burned in the second data to be burned.
[0069] S12, if the first writing data amount is greater than the second writing data amount, write the first data to be written into multiple sub-storage areas of the electronic fuse; if the first writing data amount is less than the second writing data amount, write the second data to be written into multiple sub-storage areas of the electronic fuse.
[0070] Here, by comparing the first writing data amount of the first data to be written and the second writing data amount of the second data to be written, the first data to be written or the second data to be written with a larger writing data amount can be written into multiple sub-storage areas of the electronic fuse.
[0071] Here, the storage area of the electronic fuse is divided into a plurality of sub-storage areas, and the first data to be burned or the second data to be burned can be written into the plurality of sub-storage areas. In one embodiment, the number of sub-storage areas is greater than or equal to 3. For example, for a plurality of sub-storage areas, the first data to be burned or the second data to be burned can be stored in each sub-storage area, or in some of the sub-storage areas. In this way, the accuracy of the data when the first data to be burned or the second data to be burned is read after being written into the plurality of sub-storage areas can be guaranteed. Even if the data in a small number of sub-storage areas is written incorrectly, or an error occurs during the use of the electronic fuse, the data accuracy of the first data to be burned or the second data to be burned can be guaranteed when the data is subsequently read, provided that the data in most of the sub-storage areas is correct.
[0072] In order to avoid interference causing abnormal fusing of the eFuse during chip operation as much as possible, the number of bits that need to be programmed can be calculated first when programming the eFuse, so that as many data bits as possible are programmed, reducing the probability of abnormal fusing after operation. Since the data value of the first key data and the data value of the second key data are inversely related, the first data to be written or the second data to be written with a larger amount of data to be written is written into multiple sub-storage areas of the electronic fuse, which can ensure that the amount of data to be written is greater than the amount of data not to be written, and ensure that all key data are written.
[0073] The present application obtains a first writing data amount of a first data to be written and a second writing data amount of a second data to be written, wherein the first data to be written includes a first key data, the second data to be written includes a second key data, the data value of the first key data and the data value of the second key data are in a negative relationship, if the first writing data amount is greater than the second writing data amount, the first writing data to be written is written into a plurality of sub-storage areas of an electronic fuse, if the first writing data amount is less than the second writing data amount, the second writing data to be written is written into a plurality of sub-storage areas of an electronic fuse. The present application configures the first key data and the second key data in a mutually negative relationship, and can accurately determine the size relationship between the first writing data amount of the first data to be written including the first key data and the second writing data amount of the second data to be written including the second key data, so as to write the first data to be written or the second data to be written with a larger writing data amount into a plurality of sub-storage areas of an electronic fuse. The present application can reduce the possibility of data reading errors caused by data errors in special circumstances such as strong electromagnetic interference, power supply fluctuations or electrostatic discharge in the system. In special circumstances, such as strong electromagnetic interference, power supply fluctuations or electrostatic discharge in the system, the voltage or current in the eFuse circuit may be abnormal, which may trigger the unprogrammed bit (bit) to be burned by mistake, resulting in data errors, and then the error probability when reading the data increases. For example, under high voltage transients or electrostatic shocks, enough energy may be generated to cause the weak connection part of the eFuse to fuse, similar to the programming operation, resulting in data errors, and then the error probability when reading the data increases. This application uses the characteristics of one-time programming of eFuse to propose a data structure for eFuse storage and an easy-to-implement error correction and error detection method, which can reduce the probability of erroneous burning during eFuse operation, and realize efficient error correction without increasing memory cost and complexity. In addition, this application can simultaneously realize multi-bit error correction and most random error detection, avoiding the change of eFuse data and affecting the normal operation of the system when there is electrical interference in the system, which can ensure the correctness of key system data, improve the stability of the chip system, and increase the service life of the electronic fuse.
[0074] Figure 2 It is a flowchart of a data writing method provided by another embodiment of the present application.
[0075] S21, calculating and obtaining a first check code according to the first key data and the first inverted identification data, wherein the first data to be programmed includes the first key data, the first inverted identification data, and the first check code.
[0076] Here, the data value of the first inverted identification data is in a negated relationship with the data value of the second inverted identification data in S22. For example, if the data value of the first inverted identification data is 1, then the data value of the second inverted identification data is 0. For another example, if the data value of the first inverted identification data is 0, then the data value of the second inverted identification data is 1. The data value of the inverted identification data indicates whether an inverted operation is required. Here, the first inverted identification data indicates that no inverted operation is required, and the first inverted identification data can be 0, for example, for example, for illustration.
[0077] According to the first key data and the first inverted identification data, the first check code can be calculated by a cyclic redundancy check (CRC) calculation method, an error checking and correction (ECC) calculation method, or other verification methods. The first key data, the first inverted identification data, and the first check code constitute the first data to be burned.
[0078] S22, calculating and obtaining a third check code according to the first key data and the second inverted identification data, wherein the data value of the second inverted identification data is in an inverted relationship with the data value of the first inverted identification data.
[0079] Continuing with the previous example, taking the example where the first inverted identification data indicates that no inversion operation is required and the first inverted identification data is 0, since the data value of the second inverted identification data is inversely related to the data value of the first inverted identification data, the second inverted identification data indicates that a inversion operation is required and the second inverted identification data can be 1, for example.
[0080] According to the first key data and the second inverted identification data, the third check code can be calculated by a cyclic redundancy check (CRC) calculation method, an error checking and correction (ECC) calculation method, or other check methods.
[0081] As described above, the first check code and the third check code can be calculated by the calculation method of error detection and correction such as ECC and CRC. ECC is a technology for detecting and correcting errors in data storage and transmission, and can detect and correct multi-bit errors that occur during storage or transmission. On the one hand, the error correction capability of ECC is limited. If the number of errors exceeds the error correction capability of ECC verification, the data may not be recoverable, which will still lead to data loss or system failure. On the other hand, ECC usually requires more hardware resources, which will increase the cost and complexity of memory. CRC hardware implementation is relatively simple, and can detect most random errors in data transmission or storage, but cannot correct errors. This application is mostly illustrated by using CRC verification.
[0082] S23, performing a negation operation on the first key data to obtain second key data.
[0083] The data value of the first key data is in an inverse relationship with the data value of the second key data, for example, if the first key data is 00001111, the second key data is 11110000. The second key data can be obtained by performing a negation operation on the first key data.
[0084] S24, performing an inversion operation on the third check code to obtain a second check code, wherein the second data to be programmed includes second key data, second inverted identification data, and a second check code.
[0085] The second check code can be obtained by performing an inversion operation on the third check code. For example, the third check code is 10101010, and after the inversion operation, the second check code is 01010101. The second key data, the second inverted identification data, and the second check code constitute the second data to be burned.
[0086] S25, obtain the first amount of data to be burned and the second amount of data to be burned of the first data to be burned, wherein the first data to be burned includes first key data, first inverted identification data, and a first check code, and the second data to be burned includes second key data, second inverted identification data, and a second check code, and the data value of the first key data and the data value of the second key data are inverted.
[0087] Here, the first writing data amount of the first data to be written can be calculated according to the sum of the writing data amounts of the first key data, the first negated identification data, and the first check code that need to be written respectively. The second writing data amount of the second data to be written can be calculated according to the sum of the writing data amounts of the second key data, the second negated identification data, and the second check code that need to be written respectively.
[0088] S26, if the first writing data amount is greater than the second writing data amount, write the first data to be written into multiple sub-storage areas of the electronic fuse; if the first writing data amount is less than the second writing data amount, write the second data to be written into multiple sub-storage areas of the electronic fuse.
[0089] Here, by comparing the first writing data amount of the first data to be written and the second writing data amount of the second data to be written, the first data to be written or the second data to be written with a larger writing data amount can be written into multiple sub-storage areas of the electronic fuse.
[0090] Compare the data bitwise inversion (i.e., the second data amount of the second data to be written) and the data amount without bitwise inversion (i.e., the first data amount of the first data to be written). If the amount of the data to be written is larger without inversion, the first data to be written is written into the multiple sub-storage areas of the electronic fuse. If the amount of the data to be written is larger with inversion, the second data to be written is written into the multiple sub-storage areas of the electronic fuse.
[0091] Here, the storage area of the electronic fuse is divided into a plurality of sub-storage areas, and the first data to be burned or the second data to be burned can be written into the plurality of sub-storage areas. In one embodiment, the number of sub-storage areas is greater than or equal to 3. For example, for a plurality of sub-storage areas, the first data to be burned or the second data to be burned can be stored in each sub-storage area, or in some of the sub-storage areas. In this way, the accuracy of the data when the first data to be burned or the second data to be burned is read after being written into the plurality of sub-storage areas can be guaranteed. Even if the data in a small number of sub-storage areas is written incorrectly, or an error occurs during the use of the electronic fuse, the data accuracy of the first data to be burned or the second data to be burned can be guaranteed when the data is subsequently read, provided that the data in most of the sub-storage areas is correct.
[0092] In one embodiment, writing the first data to be written into the multiple sub-storage areas of the electronic fuse includes: writing the first data to be written into each of the multiple sub-storage areas of the electronic fuse. Writing the second data to be written into the multiple sub-storage areas of the electronic fuse includes: writing the second data to be written into each of the multiple sub-storage areas of the electronic fuse.
[0093] Here, if the first writing data amount of the first data to be written is greater than the second writing data amount of the second data to be written, the first data to be written can be written into each of the multiple sub-storage areas of the electronic fuse. If the first writing data amount of the first data to be written is less than the second writing data amount of the second data to be written, the second data to be written can be written into each of the multiple sub-storage areas of the electronic fuse. For each of the multiple sub-storage areas of the electronic fuse, the first data to be written or the second data to be written is written, which can ensure the accuracy of the data when the first data to be written or the second data to be written is read after the data is written into the multiple sub-storage areas. Even if the data writing of a small number of sub-storage areas is wrong, or an error occurs during the use of the electronic fuse, the data accuracy of the first data to be written or the second data to be written can be guaranteed when the data is subsequently read, provided that the data in most of the sub-storage areas is correct.
[0094] Figure 3 It is a schematic diagram of the data structure of multiple sub-storage areas of an electronic fuse provided in an embodiment of the present application.
[0095] In one embodiment, the sub-storage area includes a data area, a negation identification area, and a verification area, and the step of writing the first data to be burned into the multiple sub-storage areas of the electronic fuse includes:
[0096] Writing the first key data of the first data to be written into multiple data areas of the electronic fuse, writing the first inverted identification data of the first data to be written into multiple inverted identification areas of the electronic fuse, and writing the first check code of the first data to be written into multiple check areas of the electronic fuse;
[0097] The step of writing the second data to be written into a plurality of sub-storage areas of the electronic fuse comprises:
[0098] The second key data of the second data to be burned is written into multiple data areas of the electronic fuse, the second inverted identification data of the second data to be burned is written into multiple inverted identification areas of the electronic fuse, and the second verification code of the second data to be burned is written into multiple verification areas of the electronic fuse.
[0099] Here, the data area is used to write the data required by the chip that needs to be saved after power failure, that is, to write the first key data of the first data to be burned or the second key data of the second data to be burned. The inverted identification area is used to write the first inverted identification data of the first data to be burned or the second inverted identification data of the second data to be burned. The check area is used to write the first check code of the first data to be burned or the second check code of the second data to be burned.
[0100] like Figure 3As shown, the storage area of the electronic fuse includes a plurality of sub-storage areas, namely, a first sub-storage area, a second sub-storage area, a third sub-storage area, ..., an Nth sub-storage area. The first sub-storage area includes a first data area, a first negation identification area, and a first verification area. The second sub-storage area includes a second data area, a second negation identification area, and a second verification area. The third sub-storage area includes a third data area, a third negation identification area, and a third verification area. The Nth sub-storage area includes an Nth data area, an Nth negation identification area, and an Nth verification area.
[0101] Here, if the first writing data amount of the first data to be written is greater than the second writing data amount of the second data to be written, the first key data of the first data to be written can be written into multiple data areas of the electronic fuse. The first inverted identification data of the first data to be written is written into multiple inverted identification areas of the electronic fuse. The first check code of the first data to be written is written into multiple check areas of the electronic fuse. In one embodiment, for each data area of each sub-storage area in the multiple sub-storage areas of the electronic fuse, the first key data of the first data to be written is written. For each inverted identification area of each sub-storage area in the multiple sub-storage areas of the electronic fuse, the first inverted identification data of the first data to be written is written. For each check area of each sub-storage area in the multiple sub-storage areas of the electronic fuse, the first check code of the first data to be written is written.
[0102] If the first amount of data to be written is less than the second amount of data to be written, the second key data of the second data to be written can be written into multiple data areas of the electronic fuse. The second inverted identification data of the second data to be written is written into multiple inverted identification areas of the electronic fuse. The second check code of the second data to be written is written into multiple check areas of the electronic fuse. In one embodiment, for each data area of each sub-storage area in the multiple sub-storage areas of the electronic fuse, the second key data of the second data to be written is written. For each inverted identification area of each sub-storage area in the multiple sub-storage areas of the electronic fuse, the second inverted identification data of the second data to be written is written. For each check area of each sub-storage area in the multiple sub-storage areas of the electronic fuse, the second check code of the second data to be written is written.
[0103] Figure 4 It is a flowchart of a data reading method provided in an embodiment of the present application.
[0104] S41, reading a plurality of written data in a plurality of sub-storage areas of the electronic fuse.
[0105] Here, the first sub-storage area, the second sub-storage area, the third sub-storage area, ..., and the Nth sub-storage area all include written data. The multiple written data can be obtained by reading the multiple sub-storage areas of the electronic fuse.
[0106] S42, performing data comparison and error correction processing on multiple written data to obtain error-corrected data, wherein the written data includes written key data, written inverted identification data, and written verification code, and the error-corrected data includes error-corrected key data, error-corrected inverted identification data, and error-corrected verification code.
[0107] Here, for example, multiple written data can be subjected to data comparison and error correction processing bit by bit. For a certain bit, the data value with the most identical data values among multiple written data can be determined as the data value after error correction of the bit. Since the written data includes written key data, written inverted identification data, and written check code, after data comparison and error correction processing is performed on the written key data, the written inverted identification data, and the written check code bit by bit, key data after error correction, inverted identification data after error correction, and check code after error correction can be obtained. Performing data comparison and error correction processing on multiple written key data can obtain key data after error correction, performing data comparison and error correction processing on multiple written inverted identification data can obtain inverted identification data after error correction, and performing data comparison and error correction processing on multiple written check codes can obtain check codes after error correction.
[0108] like Figure 5 As shown, the storage area of the electronic fuse includes three sub-storage areas, namely, the first sub-storage area, the second sub-storage area, and the third sub-storage area. From top to bottom, the data values of the first bit are 0, 0, 0 respectively, and the data value with the most identical data values among the multiple written data can be determined as the error-corrected data value of the bit, and the error-corrected data of the first bit is 0. The data values of the second bit are 0, 0, 1 respectively, and the data value with the most identical data values among the multiple written data can be determined as the error-corrected data value of the bit, and the error-corrected data of the second bit is 0. ... The data values of the sixth bit are 1, 1, 0 respectively, and the data value with the most identical data values among the multiple written data can be determined as the error-corrected data value of the bit, and the error-corrected data of the sixth bit is 1. ... The data values of the last bit are 0, 0, 0 respectively, and the data value with the most identical data values among the multiple written data can be determined as the error-corrected data value of the bit, and the error-corrected data of the last bit is 0.
[0109] S43, if the post-error correction inverted identification data indicates that no inverting operation is required, a first reference check code is calculated based on the post-error correction key data and the post-error correction inverted identification data.
[0110] The inverted flag data after error correction indicates that no inversion operation is required and the inverted flag data after error correction may be 0, for example.
[0111] According to the key data after error correction and the inverted identification data after error correction, the first reference check code can be calculated by using a cyclic redundancy check (CRC) calculation method, an error checking and correction (ECC) calculation method, or other check methods.
[0112] S44, if the first reference check code and the error-corrected check code are the same, then determining that the error-corrected key data is valid data.
[0113] Here, the first reference check code and the check code after error correction are compared. If the two are the same, the key data after error correction is determined to be valid data. After determining that the key data after error correction is valid data, for example, the key data after error correction can be written into the corresponding configuration register. For another example, the key data after error correction can be provided to various systems or software for use.
[0114] In one embodiment, if the first reference check code and the check code after error correction are different, the key data after error correction is determined to be invalid data. Here, if the key data after error correction is invalid data, the key data after error correction is not used, and the default key data determined during chip design can be used.
[0115] The present application reads multiple written data in multiple sub-storage areas of an electronic fuse, performs data comparison and error correction processing on the multiple written data, obtains error-corrected data, the written data includes written key data, written inversion identification data, and written check code, the error-corrected data includes key data after error correction, inversion identification data after error correction, and check code after error correction, if the inversion identification data after error correction indicates that no inversion operation is required, according to the key data after error correction and the inversion identification data after error correction, a first reference check code is calculated, if the first reference check code is the same as the check code after error correction, then the key data after error correction is determined to be valid data. Since the electronic fuse can reliably maintain the level state after programming once the programming is successful, the probability of the same bit position having errors at the same time is very low. Therefore, through data comparison and error correction processing, if the corresponding same bit positions in multiple sub-storage areas have unequal values, more data values with the same data value are selected as the data value of the bit position, which can reduce the probability and possibility of data errors. When errors occur in different bits of different sub-storage areas, the errors of multiple bits can be corrected in a simple way to improve the accuracy of data reading. This application can ensure the correctness of key system data, improve chip system stability, and increase the service life of electronic fuses by introducing error detection and correction mechanisms.
[0116] Figure 6It is a flowchart of a data reading method provided in another embodiment of the present application.
[0117] S61, reading a plurality of written data in a plurality of sub-storage areas of the electronic fuse.
[0118] S62, performing data comparison and error correction processing on the multiple written data to obtain error-corrected data, the written data includes written key data, written inverted identification data, and written verification code, and the error-corrected data includes error-corrected key data, error-corrected inverted identification data, and error-corrected verification code.
[0119] S63: If the post-error correction inversion identification data indicates that no inversion operation is required, a first reference check code is calculated based on the post-error correction key data and the post-error correction inversion identification data.
[0120] S64: If the first reference check code and the post-error correction check code are the same, determining that the post-error correction key data is valid data.
[0121] S61 to S64 process and Figure 4 The descriptions of the embodiments are similar or close and will not be repeated here.
[0122] S65, if the post-error correction inversion identification data indicates that an inversion operation is required, an inversion operation is performed on the post-error correction key data and the post-error correction check code to obtain inverted key data and an inverted check code.
[0123] For example, the after-error-correction inversion flag data indicates that an inversion operation needs to be performed, and the after-error-correction inversion flag data may be 1, for example.
[0124] The inverted key data can be obtained by performing an inversion operation on the key data after error correction, and the inverted check code can be obtained by performing an inversion operation on the check code after error correction. For example, the key data after error correction is 10101010, and after the inversion operation, the inverted key data is 01010101. For another example, the check code after error correction is 10111010, and after the inversion operation, the inverted check code is 01000101.
[0125] S66, calculating and obtaining a second reference check code according to the inverted key data and the inverted identification data after error correction.
[0126] According to the inverted key data and the inverted identification data after error correction, the second reference check code can be calculated by the calculation method of cyclic redundancy check (CRC), or the calculation method of error checking and correction (ECC), or other verification methods.
[0127] S67: If the second reference check code and the inverted check code are the same, determine that the inverted key data is valid data.
[0128] Here, the second reference check code is compared with the check code after error correction. If the two are the same, the inverted key data is determined to be valid data. After determining that the inverted key data is valid data, for example, the inverted key data can be written into the corresponding configuration register. For another example, the inverted key data can be provided to various systems or software for use.
[0129] In one embodiment, if the second reference check code is different from the negated check code, the negated key data is determined to be invalid data. Here, if the negated key data is invalid data, the negated key data is not used, and the default key data determined during chip design can be used.
[0130] exist Figure 4 or Figure 6 Based on the embodiment shown, in one embodiment, the sub-storage area includes a data area, a negation identification area, and a check area, and the reading of multiple written data in multiple sub-storage areas of the electronic fuse includes:
[0131] The multiple key data written in the multiple data areas, the multiple inverted identification data written in the multiple inverted identification areas, and the multiple verification codes written in the multiple verification areas of the electronic fuse are read.
[0132] Since the data area stores the written key data, the negation identification area stores the written negation identification data, and the verification area stores the written verification code, multiple written key data can be obtained by reading multiple data areas of the electronic fuse. Multiple written negation identification data can be obtained by reading multiple negation identification areas of the electronic fuse. Multiple written verification codes can be obtained by reading multiple verification areas of the electronic fuse.
[0133] Figure 7 It is a structural schematic diagram of a data writing device provided in one embodiment of the present application.
[0134] like Figure 7 As shown, the data writing device 7 includes:
[0135] A data amount acquisition module 71 is used to acquire a first writing data amount of first data to be written and a second writing data amount of second data to be written, wherein the first data to be written includes first key data, the second data to be written includes second key data, and the data value of the first key data is inversely related to the data value of the second key data;
[0136] The data writing module 72 is used to write the first data to be written into multiple sub-storage areas of the electronic fuse if the first amount of data to be written is greater than the second amount of data to be written, and to write the second data to be written into multiple sub-storage areas of the electronic fuse if the first amount of data to be written is less than the second amount of data to be written.
[0137] Another embodiment of the present invention discloses a data writing device 7. Figure 7 On the basis of the corresponding embodiment, the first data to be written further includes first inverted identification data and a first check code, the second data to be written further includes second inverted identification data and a second check code, and the data writing device 7 further includes:
[0138] A first check code calculation module, used for calculating and obtaining the first check code according to the first key data and the first inverted identification data;
[0139] A third check code calculation module, used for calculating a third check code according to the first key data and the second inverted identification data, wherein a data value of the second inverted identification data is in an inverted relationship with a data value of the first inverted identification data;
[0140] A second key data obtaining module, used for performing an inversion operation on the first key data to obtain the second key data;
[0141] The second check code obtaining module is used to perform an inversion operation on the third check code to obtain the second check code.
[0142] Another embodiment of the present invention discloses a data writing device 7. Figure 7 On the basis of the corresponding embodiment, the sub-storage area includes a data area, a negation mark area, and a check area, and the data writing module 72 is used for:
[0143] If the first writing data amount is greater than the second writing data amount, writing the first key data of the first data to be written into multiple data areas of the electronic fuse, writing the first negation identification data of the first data to be written into multiple negation identification areas of the electronic fuse, and writing the first verification code of the first data to be written into multiple verification areas of the electronic fuse;
[0144] If the first amount of data to be burned is smaller than the second amount of data to be burned, the second key data of the second data to be burned is written into multiple data areas of the electronic fuse, the second inverted identification data of the second data to be burned is written into multiple inverted identification areas of the electronic fuse, and the second verification code of the second data to be burned is written into multiple verification areas of the electronic fuse.
[0145] Another embodiment of the present invention discloses a data writing device 7. Figure 7 Based on the corresponding embodiment, the data writing module 72 is used for:
[0146] If the first writing data amount is greater than the second writing data amount, writing the first to-be-written data into each of the plurality of sub-storage areas of the electronic fuse;
[0147] If the first writing data amount is smaller than the second writing data amount, the second data to be written is written into each of the plurality of sub-storage areas of the electronic fuse.
[0148] Figure 8 It is a structural schematic diagram of a data reading device provided in another embodiment of the present application.
[0149] like Figure 8 As shown, the data reading device 8 includes:
[0150] A data reading module 81, used for reading a plurality of written data in a plurality of sub-storage areas of the electronic fuse;
[0151] The comparison and error correction module 82 is used to perform data comparison and error correction processing on the plurality of written data to obtain error-corrected data, wherein the written data includes written key data, written inverted identification data, and written check code, and the error-corrected data includes error-corrected key data, error-corrected inverted identification data, and error-corrected check code;
[0152] A first check module 83 is used to calculate and obtain a first reference check code according to the post-error-correction key data and the post-error-correction inverted identification data if the post-error-correction inverted identification data indicates that no inverted operation is required;
[0153] The data determination module 84 is configured to determine that the error-corrected key data is valid data if the first reference check code and the error-corrected check code are the same.
[0154] Another embodiment of the present invention discloses a data reading device 8. Figure 8 On the basis of the corresponding embodiment, the data reading device 8 further includes:
[0155] A negation operation module, used for performing a negation operation on the post-error-correction key data and the post-error-correction check code to obtain the negated key data and the negated check code if the post-error-correction negation identification data indicates that a negation operation is required;
[0156] A second check code calculation module, used for calculating and obtaining a second reference check code according to the inverted key data and the inverted identification data after error correction;
[0157] The valid data determination module is used to determine that the inverted key data is valid data if the second reference check code is the same as the inverted check code.
[0158] Another embodiment of the present invention discloses a data reading device 8. Figure 8 On the basis of the corresponding embodiment, the sub-storage area includes a data area, a negation identification area, and a check area, and the data reading module 81 is used for:
[0159] The multiple key data written in the multiple data areas, the multiple inverted identification data written in the multiple inverted identification areas, and the multiple verification codes written in the multiple verification areas of the electronic fuse are read.
[0160] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0161] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0162] The present application also provides an electronic device, such as Fig. 9 As shown, the electronic device 9 includes: at least one processor 90, a memory 91, and a computer program 92 stored in the memory 91 and executable on the at least one processor 90, and when the processor 90 executes the computer program 92, the steps in any of the above-mentioned method embodiments are implemented.
[0163] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0164] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0165] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / electronic device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0166] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0167] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0168] In the embodiments provided in the present application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0169] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0170] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A data writing method, characterized in that: include: Obtaining a first amount of first data to be programmed and a second amount of second data to be programmed, wherein the first data to be programmed includes first key data, the second data to be programmed includes second key data, and a data value of the first key data is inversely related to a data value of the second key data; If the first writing data amount is greater than the second writing data amount, the first data to be written is written into multiple sub-storage areas of the electronic fuse; if the first writing data amount is less than the second writing data amount, the second data to be written is written into multiple sub-storage areas of the electronic fuse.
2. The data writing method according to claim 1, characterized in that: The first data to be programmed further includes first inverted identification data and a first check code, and the second data to be programmed further includes second inverted identification data and a second check code. The method further includes: Calculate and obtain the first check code according to the first key data and the first inverted identification data; A third check code is calculated based on the first key data and the second inverted identification data, wherein the data value of the second inverted identification data is in an inverted relationship with the data value of the first inverted identification data; Performing a negation operation on the first key data to obtain the second key data; Perform an inversion operation on the third check code to obtain the second check code.
3. The data writing method according to claim 2, characterized in that: The sub-storage area includes a data area, a negation identification area, and a verification area. The step of writing the first data to be burned into the multiple sub-storage areas of the electronic fuse includes: Writing the first key data of the first data to be written into multiple data areas of the electronic fuse, writing the first inverted identification data of the first data to be written into multiple inverted identification areas of the electronic fuse, and writing the first check code of the first data to be written into multiple check areas of the electronic fuse; The step of writing the second data to be burned into a plurality of sub-storage areas of the electronic fuse comprises: The second key data of the second data to be burned is written into multiple data areas of the electronic fuse, the second inverted identification data of the second data to be burned is written into multiple inverted identification areas of the electronic fuse, and the second verification code of the second data to be burned is written into multiple verification areas of the electronic fuse.
4. The data writing method according to claim 2 or 3, characterized in that: The step of writing the first data to be written into a plurality of sub-storage areas of the electronic fuse comprises: Writing the first data to be written into each sub-storage area of the plurality of sub-storage areas of the electronic fuse; The step of writing the second data to be burned into a plurality of sub-storage areas of the electronic fuse comprises: The second data to be written is written into each of the multiple sub-storage areas of the electronic fuse.
5. A data reading method, characterized in that: include: reading a plurality of written data in a plurality of sub-storage areas of the electronic fuse; Performing data comparison and error correction processing on the plurality of written data to obtain error-corrected data, wherein the written data includes written key data, written inverted identification data, and written check codes, and the error-corrected data includes error-corrected key data, error-corrected inverted identification data, and error-corrected check codes; If the post-error correction inverted identification data indicates that no inverting operation is required, a first reference check code is calculated based on the post-error correction key data and the post-error correction inverted identification data; If the first reference check code and the post-error-correction check code are the same, it is determined that the post-error-correction key data is valid data.
6. The data reading method according to claim 5, characterized in that: The method further includes: If the post-error correction inversion identification data indicates that an inversion operation is required, an inversion operation is performed on the post-error correction key data and the post-error correction check code to obtain the inverted key data and the inverted check code; Calculate and obtain a second reference check code according to the inverted key data and the inverted identification data after error correction; If the second reference check code and the inverted check code are the same, it is determined that the inverted key data is valid data.
7. The data reading method according to claim 5 or 6, characterized in that: The sub-storage area includes a data area, a negation identification area, and a verification area. The reading of multiple written data in multiple sub-storage areas of the electronic fuse includes: A plurality of key data written in a plurality of data areas, a plurality of inverted identification data written in a plurality of inverted identification areas, and a plurality of check codes written in a plurality of check areas of the electronic fuse are read.
8. A data writing device, characterized in that: include: A data amount acquisition module, used for acquiring a first writing data amount of first data to be written and a second writing data amount of second data to be written, wherein the first data to be written includes first key data, the second data to be written includes second key data, and the data value of the first key data is inversely related to the data value of the second key data; A data writing module is used to write the first data to be written into multiple sub-storage areas of the electronic fuse if the first amount of data to be written is greater than the second amount of data to be written, and to write the second data to be written into multiple sub-storage areas of the electronic fuse if the first amount of data to be written is less than the second amount of data to be written.
9. A data reading device, characterized in that: include: A data reading module, used for reading a plurality of written data in a plurality of sub-storage areas of the electronic fuse; A comparison and error correction module, used for performing data comparison and error correction processing on the plurality of written data to obtain error-corrected data, wherein the written data includes written key data, written inverted identification data, and written check codes, and the error-corrected data includes error-corrected key data, error-corrected inverted identification data, and error-corrected check codes; A first verification module, configured to calculate and obtain a first reference verification code according to the post-error-correction key data and the post-error-correction inverted identification data if the post-error-correction inverted identification data indicates that no inverted operation is required; A data determination module is used to determine that the error-corrected key data is valid data if the first reference check code and the error-corrected check code are the same.
10. An electronic device, characterized in that: The electronic device comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device implements the method according to any one of claims 1 to 7.
Citation Information
Cited By
Data storage method, data reading method, equipment and medium
CN120523395A