Initialization method of nonvolatile memory with write buffer system
By introducing two write buffers in nonvolatile memory and using the status register unit to control the data writing and burning process, the problem of too long waiting time for the write buffer is solved, and an efficient initialization process is realized and cost is reduced.
Patent Information
- Application Number
- CN202510264756.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-07-04
AI Technical Summary
During the initialization process of existing nonvolatile memory, the waiting time of the write buffer is too long, resulting in low burn efficiency and increasing product costs.
Two back-to-back write buffers (SRAMs) are set up in nonvolatile memory, and the data writing and burning process is controlled through the status register unit, allowing the serial bus to continuously send initialization data and reduce waiting time.
It improves the burning efficiency of non-volatile memory, shortens the initialization time, and reduces product costs.
Smart Images

Figure CN120256344A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of integrated circuits, and in particular to an initialization method for a non-volatile memory with a write buffer system. Background Art
[0002] Non-volatile memories with serial bus interfaces are widely used in scenarios such as storing boot codes, firmware, and log records due to their high speed, easy integration, and simple software driving characteristics. With the increasing complexity of end-side application scenarios, the amount of data written into non-volatile memories is also becoming more and more huge. In the factory initialization process before chip integration, especially in the application scenarios of boot code and firmware burning, the code or firmware needs to be burned into the non-volatile memory in advance. The initialization process takes a lot of time. Depending on the storage capacity, usually the initialization of each non-volatile memory takes several minutes. In the actual production process, usually about one hundred thousand non-volatile memories need to be initialized each time, and the same burning operation needs to be repeated for each non-volatile memory. Therefore, the total initialization time will be very long. For product-level applications, even through a customized burner, it still brings huge time overhead. In the trend of an increasingly large scale of data written into non-volatile memories in end-side products, improving the burning efficiency is very important, which directly affects the product cost.
[0003] Figure 3 is a schematic block diagram of a prior art non-volatile memory. As Figure 3 shown, the prior art non-volatile memory 900 includes: a storage array 91, a controller 92, a write buffer 93, and a serial bus 95. During initialization, the serial bus 95 sends initialization data to the controller 92, and the controller 92 writes the initialization data into the write buffer 93. After the write buffer 93 is full, the initialization data in the write buffer 93 is burned into the storage array 91. After all the initialization data in the write buffer 93 is burned into the storage array 91, the serial bus 95 continues to send initialization data and writes it into the write buffer 93. After the write buffer 93 is full, the initialization data in the write buffer 93 is burned into the storage array 91. This cycle continues until all the initialization data is burned into the storage array 91.
[0004] As can be seen from the above description, the serial bus 95 cannot continuously send initialization data. After the write buffer 93 is filled for the first time, it must wait until all the initialization data in the write buffer 93 is burned into the storage array 91 before it can continue to send initialization data. This waiting time is about several hundred milliseconds. And the current amount of initialization data is very large, usually in the range of dozens of megabytes to hundreds of megabytes. The capacity of the write buffer 93 is usually only several hundred kilobytes. Therefore, multiple repetitions are required to burn all the initialization data into the storage array 91. And each repetition requires waiting for several hundred milliseconds to several seconds, which wastes a lot of time. As a result, the burning efficiency is decreased and the cost of the product is increased. Summary of the Invention
[0005] The present invention aims to provide a non-volatile memory and its initialization method capable of improving the burning efficiency of factory initialization.
[0006] The present invention discloses a non-volatile memory with a write buffer system, characterized in that the non-volatile memory includes: a storage array including a plurality of storage units for storing data; a controller electrically connected to the storage array and the serial bus for controlling the burning of the initialization data sent by the serial bus into the storage array; the write buffer system includes: a first write buffer and a second write buffer, which are respectively electrically connected to the storage array and the controller for caching the initialization data sent by the serial bus; a status register unit electrically connected to the controller, the first write buffer and the second write buffer;
[0007] When initializing, the serial bus sends a pre-instruction to the controller to set the status of the status register unit to the initialization mode and writable;
[0008] Then, the first write buffer operation is performed. The serial bus obtains the status of the status register unit. When the status is the initialization mode and writable, the serial bus sends the initialization data to the controller. When the first write buffer is writable, the controller writes the initialization data into the first write buffer. When the first write buffer is full and the second write buffer has not burned data into the storage array, the initialization data in the first write buffer is burned into the storage array;
[0009] Then, a second write buffer is performed. The serial bus obtains the status of the status register unit. When the status is the initialization mode and writing is allowed, the serial bus continues to send the initialization data to the controller. When the first write buffer cannot be written and the second write buffer can be written, the controller writes the initialization data into the second write buffer. When the second write buffer is full and the first write buffer has not programmed the storage array, the initialization data in the second write buffer is programmed into the storage array;
[0010] Repeat the first write buffer and the second write buffer until all the initialization data sent by the serial bus is programmed into the storage array.
[0011] The non-volatile memory with a write buffer system and its initialization method of the present invention can allow the non-volatile memory to continuously receive the next piece of data to be written during the programming execution process by setting two back-to-back write buffers (SRAM) inside the non-volatile memory. The time for the serial bus to send the initialization data is hidden in the internal programming time of the non-volatile memory. Only the time for the serial bus to send the initialization data once is required for one full-chip programming, greatly improving the programming efficiency of the non-volatile memory. Description of the Drawings
[0012] Figure 1 is a schematic block diagram of the non-volatile memory with a write buffer system of the present invention.
[0013] Figure 2 is a flowchart of the initialization method of the non-volatile memory with a write buffer system of the present invention.
[0014] Figure 3 is a schematic block diagram of the prior art non-volatile memory.
[0015] Symbol Description
[0016] 100, 900 Non-volatile memory
[0017] 1, 91 Storage array
[0018] 2, 92 Controller
[0019] 3 First write buffer
[0020] 31 Fourth status register
[0021] 4 Second write buffer
[0022] 41 Fifth status register
[0023] 5, 95 Serial bus
[0024] 6 - state register unit
[0025] 61 First state register
[0026] 62 Second state register
[0027] 63 Third state register
[0028] 93 Write buffer Detailed implementation manners
[0029] The non - volatile memory with a write - buffer system and its initialization method of the present invention will be specifically described below in conjunction with the accompanying drawings. Figure 1 is a schematic block diagram of the non - volatile memory with a write - buffer system of the present invention. As Figure 1 shown, the non - volatile memory 100 of the present invention includes: a storage array 1, which includes a plurality of storage units for storing data; a controller 2, which is electrically connected to the storage array 1 and the serial bus 5, and is used to control the initialization data sent by the serial bus 5 to be programmed into the storage array 1. The write - buffer system includes: a first write buffer 3 and a second write buffer 4, which are respectively electrically connected to the storage array 1 and the controller 2, and are used to cache the initialization data sent by the serial bus 5; a state register unit 6, which is electrically connected to the controller 2, the first write buffer 3, and the second write buffer 4.
[0030] In this embodiment, the first write buffer 3 and the second write buffer 4 are SRAM (Static Random Access Memory). However, the present invention is not limited thereto. In other embodiments, the first write buffer 3 and the second write buffer 4 may also be other memories.
[0031] Figure 2 is a flowchart of the initialization method of the non - volatile memory with a write - buffer system of the present invention. As Figure 2 shown, the initialization method of the present invention includes: a pre - step S001, a first write - buffer step S002, and a second write - buffer step S003. The above steps will be specifically described below.
[0032] In the pre - step S001, the serial bus 5 sends a pre - instruction to the controller 2 to set the state of the state register unit 6 to the initialization mode and writable.
[0033] The present invention is directed to the factory initialization process before chip integration. Before leaving the factory, the user burns initialization data into the storage array 1 of the non-volatile memory 100. However, in addition to the initialization data, the user may also write other data into the storage array 1. Therefore, it is necessary to distinguish the initialization mode from other writing modes to prevent the user from accidentally entering the initialization mode. Therefore, in the present invention, a pre-instruction is required when executing the initialization instruction to write 1 to a 1-bit register, indicating that the current is in the initialization mode. Before each execution of the initialization, the value of this register is checked. If it is not 1, the initialization will not be executed.
[0034] As Figure 1 shown, in this embodiment, the status register unit 6 includes a first status register 61, a second status register 62, and a third status register 63. When the value in the first status register 61 is 1, it indicates the initialization mode; when it is 0, it indicates other writing modes. When the value in the second status register 62 is 0, it indicates that writing is allowed, that is, data can be written into the first write buffer 3 or the second write buffer 4; when it is 1, it indicates that writing is not allowed. When the value in the third status register 63 is 1, it indicates that data is being burned into the storage array 1; when it is 0, it indicates that no data is being burned into the storage array 1.
[0035] Table 1 shows the meanings of different values of the status register unit 6.
[0036]
[0037] In this embodiment, the non-volatile memory 100 further includes a fourth status register 31 and a fifth status register 41. When the value in the fourth status register 31 is 0, it indicates that data can be written into the first write buffer 3; when it is 1, it indicates that data cannot be written into the first write buffer 3. When the value in the fifth status register 41 is 0, it indicates that data can be written into the second write buffer 4; when it is 1, it indicates that data cannot be written into the second write buffer 4.
[0038] In this embodiment, when performing initialization, the serial bus 5 sends a pre-instruction to the controller 2, writes 1 to the first status register 61, writes 0 to the second status register 62, and writes 0 to the third status register 63. And, writes 0 to the fourth status register 31 and writes 0 to the fifth status register 41.
[0039] The first write buffer step S002: The serial bus 5 obtains the status of the status register unit 6. When the status is the initialization mode and writing is possible, the serial bus 5 sends initialization data to the controller 2. The controller 2 confirms the statuses of the first write buffer 3 and the second write buffer 4. When the first write buffer 3 can be written to, the controller 2 writes the initialization data into the first write buffer 3. When the first write buffer 3 is full and the second write buffer 4 has not burned data into the storage array 1, the initialization data in the first write buffer 3 is burned into the storage array 1.
[0040] In this embodiment, first, the serial bus 5 obtains the status of the status register unit 6. At this time, the value in the status register unit 6 is 1, 0, 0. That is, the initialization mode and writing is possible. Then, the serial bus 5 sends initialization data to the controller 2. The amount of data sent depends on the capacity of the first write buffer 3. In this embodiment, the capacity of the first write buffer 3 is 512k. Therefore, the initialization data sent by the serial bus 5 to the controller 2 is 512k. Next, the controller 2 confirms the statuses of the first write buffer 3 and the second write buffer 4. At this time, the values in the fourth status register 31 and the fifth status register 41 are both 0. Therefore, both the first write buffer 3 and the second write buffer 4 can be written to. Subsequently, the controller 2 writes the initialization data into the first write buffer 3 and writes 1 into the fourth status register 31. When the first write buffer 3 is full and the second write buffer 4 has not burned data into the storage array 1 at this time, the initialization data in the first write buffer 3 can be burned into the storage array 1. And 1 is written into the third status register 63.
[0041] The second write buffer step S003: The serial bus 5 obtains the status of the status register unit 6. When the status is the initialization mode and writing is possible, the serial bus 5 continues to send initialization data to the controller 2. The controller 2 confirms the statuses of the first write buffer 3 and the second write buffer 4. When the first write buffer 3 cannot be written to and the second write buffer 4 can be written to, the initialization data is written into the second write buffer 4. When the second write buffer 4 is full and the first write buffer 3 has not burned data into the storage array 1, the initialization data in the second write buffer 4 is burned into the storage array 1.
[0042] In this embodiment, when the first write buffer 3 is full, the serial bus 5 obtains the status of the status register unit 6. At this time, the values in the status register unit 6 are 1, 0, 1. That is, in the initialization mode and can be written. Therefore, the serial bus 5 can continue to send initialization data to the controller 2. The amount of data sent depends on the capacity of the second write buffer 4. In this embodiment, the capacity of the second write buffer 4 is 512k. Therefore, the initialization data sent by the serial bus 5 to the controller 2 is 512k. Moreover, while the serial bus 5 is sending initialization data to the controller 2, the initialization data in the first write buffer 3 is also being burned into the storage array 1. In this way, while burning data into the storage array 1, the serial bus 5 can continue to send initialization data. Instead of, like the non-volatile memory in the prior art, waiting until all the initialization data in the write buffer is burned into the storage array and then the serial bus sends the initialization data, this improves the efficiency.
[0043] Next, the controller 2 confirms the status of the first write buffer 3 and the second write buffer 4. At this time, the value in the fourth status register 31 is 1, and the value in the fifth status register 41 is 0. That is, the first write buffer 3 cannot be written and the second write buffer 4 can be written. Subsequently, the controller 2 writes the initialization data into the second write buffer 4 and writes 1 into the fifth status register 41. When the second write buffer 4 is full and the first write buffer 3 has not burned the initialization data into the storage array 1, the initialization data in the second write buffer 4 is burned into the storage array 1.
[0044] Generally, the time t1 from when the serial bus 5 sends the initialization data until the second buffer 4 is full is approximately equal to the time t2 for burning the initialization data in the first write buffer 3 into the storage array 1, or t1 is slightly less than t2. In this embodiment, t1 = 430ms and t2 = 550ms. That is, when the second buffer 4 is full, the first write buffer 3 is still burning data into the storage array 1. At this time, 1 is written into the second status register 62, that is, it cannot be written. Because the first write buffer 3 is still burning data into the storage array 1 at this time, it is not possible to write into the first write buffer 3. In addition, the second buffer 4 is also full, and the initialization data in the second buffer 4 has not been burned into the storage array 1 yet, so it is also not possible to write into the second buffer 4. Moreover, at this time, the initialization data in the second buffer 4 cannot be burned into the storage array 1 either, because the first write buffer 3 is still burning data into the storage array 1 at this time. It is necessary to wait until all the initialization data in the first write buffer 3 is burned into the storage array 1 before the initialization data in the second buffer 4 can be burned into the storage array 1.
[0045] After all the initialization data in the first write buffer 3 has been burned into the storage array 1, write 0 into the fourth status register 31. At this time, data can be written into the first write buffer 3. Therefore, write 0 into the second status register 62 as well. In addition, start burning the initialization data in the second buffer 4 into the storage array 1, and write 1 into the third status register 63. Then, the serial bus 5 obtains the status of the status register unit 6 again. At this time, the values in the status register unit 6 are 1, 0, 1. That is, it is in the initialization mode and writing is possible. In this way, the first write buffer step S002 can be repeated to write the initialization data into the first write buffer 3. It should be noted that when writing the initialization data into the first write buffer 3, the initialization data in the second write buffer 4 is also being burned into the storage array 1, which improves the efficiency again.
[0046] Generally, the time t3 from sending the initialization data from the serial bus 5 to filling the first buffer 3 is approximately equal to the time t4 for burning the initialization data in the second write buffer 4 into the storage array 1, or t3 is slightly less than t4. In this embodiment, t3 = 430 ms and t4 = 550 ms. That is, when the first buffer 3 is full, the second write buffer 4 is still burning data into the storage array 1. At this time, write 1 into the second status register 62, that is, writing is not allowed. Because the second write buffer 4 is still burning data into the storage array 1 at this time, data cannot be written into the second write buffer 4. In addition, the first write buffer 3 is also full, and the initialization data in the first write buffer 3 has not been burned into the storage array 1 yet, so data cannot be written into the first write buffer 3 either. And at this time, the initialization data in the first write buffer 3 cannot be burned into the storage array 1 either, because the second write buffer 4 is still burning data into the storage array 1 at this time. It is necessary to wait until all the initialization data in the second write buffer 4 has been burned into the storage array 1 before the initialization data in the first write buffer 3 can be burned into the storage array 1.
[0047] After all the initialization data in the second write buffer 4 has been burned into the storage array 1, write 0 into the fifth status register 41. At this time, data can be written into the second write buffer 4. Therefore, write 0 into the second status register 62 as well. In addition, start burning the initialization data in the first buffer 3 into the storage array 1, and write 1 into the third status register 63. Then, the serial bus 5 obtains the status of the status register unit 6 again. At this time, the values in the status register unit 6 are 1, 0, 1. That is, it is in the initialization mode and writing is possible. In this way, the second write buffer step S003 can be repeated to write the initialization data into the second write buffer 4.
[0048] And so on, repeat the first write buffer step S002 and the second write buffer step S003 until all the initialization data sent by the serial bus 5 has been burned into the storage array 1.
[0049] Through the non-volatile memory with a write buffer system and its initialization method of the present invention described above, the efficiency of factory initialization of the non-volatile memory can be improved. When t1 = t2 and t3 = t4, the serial bus 5 can keep sending initialization data without waiting. When t1 is slightly less than t2, or t3 is slightly less than t4, the waiting time of the serial bus 5 can also be shortened. Thereby, the efficiency of factory initialization of the non-volatile memory is improved and the product cost is reduced.
[0050] Although the present invention has been disclosed above in an implementation manner, it is not intended to limit the present invention. Any professional in the art may make various required changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the scope defined by the appended claims.
Claims
1. A method for initializing a non-volatile memory with a write buffer system, characterized in that, The non-volatile memory (100) includes: A storage array (1) including a plurality of storage units for storing data; A controller (2) electrically connected to the storage array (1) and a serial bus (5) for controlling the initialization data sent by the serial bus (5) to be burned into the storage array (1); The write buffer system includes: A first write buffer (3) and a second write buffer (4) electrically connected to the storage array (1) and the controller (2) respectively for caching the initialization data sent by the serial bus (5); A status register unit (6) electrically connected to the controller (2), the first write buffer (3) and the second write buffer (4); The initialization method includes: A pre-step, the serial bus (5) sends a pre-instruction to the controller (2) to set the status of the status register unit (6) to the initialization mode and writable; A first write buffer step, the serial bus (5) obtains the status of the status register unit (6). When the status is the initialization mode and writable, the serial bus (5) sends the initialization data to the controller (2). When the first write buffer (3) is writable, the controller (2) writes the initialization data into the first write buffer (3). When the first write buffer (3) is full and the second write buffer (4) has not burned data into the storage array (1), the initialization data in the first write buffer (3) is burned into the storage array (1); A second write buffer step, the serial bus (5) obtains the status of the status register unit (6). When the status is the initialization mode and writable, the serial bus (5) continues to send the initialization data to the controller (2). When the first write buffer (3) is not writable and the second write buffer (4) is writable, the controller (2) writes the initialization data into the second write buffer (4). When the second write buffer (4) is full and the first write buffer (3) has not burned data into the storage array (1), the initialization data in the second write buffer (4) is burned into the storage array (1); Repeat the first write buffer step and the second write buffer step until all the initialization data sent by the serial bus (5) is burned into the storage array (1).