This application claims priority to Taiwan Application Serial No. 112135155, filed Sep. 14, 2023, the entirety of which is hereby incorporated herein by reference.
The present disclosure relates to a storage device, and in particular to a flash memory controller and a method for executing a cache erase operation.
A memory device includes a flash memory controller and a flash memory. The flash memory controller is configured to control operations of the memory device and access the flash memory, and the flash memory is configured to store data. When performing an erase operation, a bus between the flash memory controller and the flash memory is idle. In other words, no related operations that use the bus will be performed during this period, such as data transmission or command transmitting. This will cause the flash memory controller to stay in a waiting status before the erase operation is completed, resulting in an inability to fully utilize its computing power and resources, as well as a reduction in overall system performance and a waste of resources.
In order to solve the above-mentioned problems of the prior art, an object of the present disclosure is to provide a flash memory controller and a method for executing a cache erase operation, which can perform related operations that use a bus while executing an erase operation to improve transmission efficiency.
In a first aspect, the present disclosure provides a flash memory controller for controlling a flash memory. The flash memory controller includes a first interface circuit and a processor. The first interface circuit is coupled to the flash memory to transmit data and commands. The processor is coupled to the first interface circuit to access the flash memory through the first interface circuit. The processor controls the first interface circuit to transmit a first command sequence and a second command sequence to the flash memory. The first command sequence includes a first command and a second command, the first command is configured to instruct the flash memory to receive address information, and in response to the transmission of the second command, the flash memory executes an erase operation corresponding to the address information, and when an array ready status bit is in a non-ready status, the second command sequence is transmitted to the flash memory.
In some embodiments, the flash memory is in the non-ready status when the array ready status bit of the flash memory is set to 0, and the flash memory is in a ready status when the array ready status bit of the flash memory is set to 1.
In some embodiments, in response to the transmission of the second command, a ready status bit of the flash memory and the array ready status bit are set to 0, and after a first busy period, the ready status bit is set to 1 and the array ready status bit is set to 0.
In some embodiments, the processor controls the first interface circuit to transmit a set feature command sequence to the flash memory before transmitting the first command sequence, the set feature command sequence is configured to enable the flash memory controller to transmit the second command sequence to the flash memory when the array ready status bit is in the non-ready status.
In some embodiments, the second command sequence includes the same commands as the first command sequence, and during a timing interval of the flash memory executing operations corresponding to the first command sequence and the second command sequence, the array ready status bit remains in the non-ready status.
In some embodiments, the second command sequence is configured to instruct the flash memory to execute a read operation, and during a timing interval of the flash memory executing operations corresponding to the first command sequence and the second command sequence, the array ready status bit remains in the non-ready status.
In some embodiments, the second command sequence is configured to instruct the flash memory to execute a write operation, and during a timing interval of the flash memory executing operations corresponding to the first command sequence and the second command sequence, the array ready status bit remains in the non-ready status.
In a second aspect, the present disclosure provides a method for executing a cache erase operation in a flash memory controller. The flash memory controller is coupled to a flash memory to transmit data and commands. The method includes a step of transmitting a first command sequence to the flash memory, where the first command sequence includes a first command and a second command, and the first command is configured to instruct the flash memory to receive address information; and executing, by the flash memory, an erase operation corresponding to the address information in response to the transmission of the second command, and transmitting a second command sequence to the flash memory when an array ready status bit is in a non-ready status.
In some embodiments, it indicates that the flash memory is in the non-ready status when the array ready status bit of the flash memory is set to 0, and it indicates that the flash memory is in a ready status when the array ready status bit of the flash memory is set to 1.
In some embodiments, before transmitting the first command sequence, the method further includes a step of transmitting a set feature command sequence to the flash memory. In response to the transmission of the set feature command sequence, the flash memory controller is capable of transmitting the second command sequence to the flash memory when the array ready status bit is in the non-ready status.
In some embodiments, the second command sequence includes the same commands as the first command sequence, and during a timing interval of the flash memory executing operations corresponding to the first command sequence and the second command sequence, the array ready status bit remains in the non-ready status.
In some embodiments, the second command sequence is configured to instruct the flash memory to execute a read operation, and during a timing interval of the flash memory executing operations corresponding to the first command sequence and the second command sequence, the array ready status bit remains in the non-ready status.
In some embodiments, the second command sequence is configured to instruct the flash memory to execute a write operation, and during a timing interval of the flash memory executing operations corresponding to the first command sequence and the second command sequence, the array ready status bit remains in the non-ready status.
In a third aspect, the present disclosure provides a method for executing a cache erase operation in a flash memory, including: receiving address information in response to the receiving of a first command of the first command sequence; executing an erase operation corresponding to the address information and setting an array ready status bit to a non-ready status in response to the receiving of a second command of the first command sequence; and receiving a second command sequence while the array ready status bit is in the non-ready status.
In some embodiments, it indicates that the flash memory is in the non-ready status when the array ready status bit is set to 0, and it indicates that the flash memory is in a ready status when the array ready status bit is set to 1.
In some embodiments, before receiving the first command sequence, the method further includes a step of receiving a set feature command sequence. In response to the receiving of the set feature command sequence, the flash memory is capable of receiving the second command sequence when the array ready status bit is in the non-ready status.
In some embodiments, the second command sequence includes the same commands as the first command sequence, and during a timing interval of the flash memory executing operations corresponding to the first command sequence and the second command sequence, the array ready status bit remains in the non-ready status.
In some embodiments, the second command sequence is configured to instruct the flash memory to execute a read operation, and during a timing interval of the flash memory executing operations corresponding to the first command sequence and the second command sequence, the array ready status bit remains in the non-ready status.
In some embodiments, the second command sequence is configured to instruct the flash memory to execute a write operation, and during a timing interval of the flash memory executing operations corresponding to the first command sequence and the second command sequence, the array ready status bit remains in the non-ready status.
In comparison with the prior art, the present disclosure provides the flash memory controller and the method for executing the cache erase operation, which receives another command sequence or data while executing the erase operation. Therefore, it is prevented from having to wait for the erase operation to complete before performing related operations that use a bus, thereby improving transmission efficiency.
Exemplary embodiments of the present disclosure will now be described more fully with reference to the accompanying drawings. The exemplary embodiments may, however, be embodied in many forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art. The drawings are merely schematic illustrations of the disclosure, and components in the drawings are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted.
Referring to
As shown in
In some embodiments, the flash memory controller 100 that executes the program codes 151 through the processor 130 can utilize its own internal components to perform many control operations, for example: to control the access of the flash memory 200 by using the first interface circuit 110, to communicate with the host device by using the second interface circuit 120, to perform required buffering processing by using the buffer 140, and so on. For example, the host device can transmit host commands and corresponding logical addresses to the flash memory controller 100. The processor 130 of the flash memory controller 100 receives the host commands and the logical addresses through the second interface circuit 120, and converts the host commands into memory operation commands. The processor 130 further controls the flash memory 200 with the operation commands through the first interface circuit 110 to perform operations such as reading and/or writing (also called programming) of memory cells (such as data pages) at certain physical addresses in the flash memory 200. The physical addresses correspond to the logical addresses. The first interface circuit 110 may include an encoder and a decoder. The encoder is configured to encode data written into the flash memory 200 to generate a corresponding check code, and the decoder is configured to decode data received from the flash memory 200.
In some embodiments, the host device may include a processor and a power supply circuit coupled to each other. The processor can be configured to control operations of the host device. The power supply circuit can be configured to supply power to the processor and the memory device 10, and output one or more driving voltages to the memory device 10. The memory device 10 can be configured to provide storage space to the host device, and obtain one or more driving voltages from the host device as the power supply of the memory device 10. The host device mentioned here may include, but is not limited to, mobile devices, wearable devices, tablet computers, and personal computers such as desktop computers and notebook computers.
In some embodiments, the second interface circuit 120 of the flash memory controller 100 can conform to a specific communication standard, such as Serial Advanced Technology Attachment (Serial ATA or SATA) standard, Peripheral Component Interconnect (PCI) standard, PCIe standard, Universal Flash Storage (UFS) standard, etc., and can communicate according to the specific communication standard, for example, communicate between the host device and the memory device 10. The host device may include a corresponding transmission interface circuit conforming to the specific communication standard for communication between the host device and the memory device 10.
In this embodiment, the flash memory 200 may be a NAND flash. Correspondingly, the first interface circuit 110 of the flash memory controller 100 communicates with the flash memory 200 using a communication protocol compatible with an Open NAND Flash Interface (ONFI). For example, the flash memory controller 100 can convert requests from the host device into commands for the flash memory 200 according to the ONFI protocol, where the commands are selected from a command set defined in an ONFI specification.
Referring to
For example, an 8-bit wide input and output signal I/Ox is sent and received between the I/O control circuit 201 and the flash memory controller 100. For example, the I/O control circuit 201 may receive the input/output signal I/Ox including write data from the flash memory controller 100 and transmit it to the data register 209. In addition, the I/O control circuit 201 transmits the read data from the data register 209 to the flash memory controller 100 as the input/output signal I/Ox.
The logic control circuit 202 receives various control signals from the flash memory controller 100 to control the I/O control circuit 201. The control signals include, for example, a chip enable signal CE #, a command latch enable signal CLE, an address latch enable signal ALE, a write enable signal WE #, a read enable signal RE #, and a write protection signal WP #. The logic control circuit 202 controls the overall operation of the flash memory 200. Specifically, the logic control circuit 202 controls the row decoder 207, the column decoder 208, the data register 209, etc. based on the command transmitted from the command register 205, and then performs the write operation, read operation, etc. related to the data.
The address register 203 receives address information from the I/O control circuit 201 and maintains the address information. Furthermore, the address register 203 respectively transmits column address signals and row address signals included in the address information to the row decoder 207, the column decoder 208, and the data register 209. The status register 204 transmits status information to the I/O control circuit 201 according to instructions of the logic control circuit 202. The command register 205 receives commands from the I/O control circuit 201 and maintains the commands. Also, the command register 205 transmits the commands to the logic control circuit 202.
The memory cell array 206 includes a plurality of blocks. The blocks, bit lines, and word lines establish an associated collection of multiple non-volatile memory cells. Each memory cell can store multi-bit data by applying multi-level cell (MLC). Each block includes multiple pages. The page is the smallest unit of programming. In other words, one page is the smallest unit when writing or reading data. The block is the smallest unit of an erase operation. The erase operation must be executed before the flash memory 200 performs the write operation. This is because the write operation can only change the memory cell from “1” to “0”, and the erase operation is to set all memory cells to 1.
The logic control circuit 202 may receive a control signal to check the status of the memory cell array 206 and provide a status check result to the status register 204. Referring to Table 1, which illustrates various status values in the status register 204.
The row decoder 207 and the column decoder 208 select the bit lines and the word lines corresponding to the object memory cells for read operation and write operation. In addition, the row decoder 207 and the column decoder 208 respectively apply required voltages to selected/unselected bit lines and word lines.
The data register 209 outputs the data read from the memory cell array 206 to the flash memory controller 100 through the I/O control circuit 201. In addition, the data register 209 transmits the write data received from the flash memory controller 100 through the I/O control circuit 201 to the memory cell array 206.
The R/B control circuit 210 generates the ready/busy signal R/B # based on the action status of the logic control circuit 202 and transmits the signal to the flash memory controller 100. The ready/busy signal R/B # is a signal that notifies the flash memory controller 100 that the flash memory 200 is in a ready status or a busy status. The ready status is a status in which the command from the flash memory controller 100 can be processed, and the busy status is a status in which the command from the flash memory controller 100 cannot be processed. In addition, the ready/busy signal R/B # is generated by the R/B control circuit 210 controlling the on or off of the transistor connected to its output. For example, the ready/busy signal R/B # is set to a low level (busy status) when the flash memory 200 is accessed, such as reading data from the flash memory 200, and is set to a high level (ready status) when the access is completed.
In an ideal situation (high transmission efficiency), a bus between the flash memory controller 100 and the flash memory 200 should be transmitting commands or data. However, in the prior art, when an erase operation is performed, the bus is in an idle state. In other words, no related operations that use the bus will be performed, such as data or command transmission. This will cause the flash memory controller to stay in a waiting state before the erase operation is completed, unable to fully utilize its computing power and resources. In the present disclosure, by executing a cache erase operation, it is possible to perform related operations that use the bus while executing the erase operation, thereby improving transmission efficiency. The implementations of the present disclosure are specifically described as follows.
Referring to
As shown in
As shown in
As shown in
As shown in
As shown in
It should be understood that in some embodiments, whether the erase operation is successful can be determined by reading the data in the status register of the flash memory 200. If the erase operation is successful, data can be written to the flash memory 200 again. If the erase operation is unsuccessful, the erase command can be issued again to erase the erroneous data in the flash memory 200 until the erase operation is successful. For example, after transmitting the second command sequence 302, the flash memory controller 100 may further transmit a status read command 70h to the flash memory 200. The flash memory 200 responds to the status read command 70h and transmits the status to the flash memory controller 100. At this time, by reading the status value of the SR[0] bit of the status register, it is confirmed whether the erase operation failed or not. When the SR[0] bit is set to 0, it indicates that the erase operation is successfully completed. However, when the SR[0] bit is set to 1, it indicates that the erase operation failed.
In this embodiment, in the first command sequence 301, a conventional erase confirmation command D0h is replaced by the command 86h, so that the flash memory 200 can receive the second command sequence 302 while executing the erase operation. Therefore, it is prevented from having to wait for the erase operation to complete before performing related operations that use the bus, thereby improving transmission efficiency. For example, when two erase operations are executed, this embodiment reduces a transmission time of one command sequence compared to the prior art (because the transmission of the second command sequence 302 and the execution of the erase operation are performed simultaneously (in parallel)).
In the above description, the case where the command 86h is used instead of the conventional erase confirmation command D0h to implement the transmission of the second command sequence 302 and the execution of the erase operation in parallel is taken as an example, but the invention is not limited to this. For example, an operation mode of the memory device 10 can be changed by using a set feature command. Specifically, refer to
As shown in
It should be noted that in this embodiment, the first command sequence transmitted after the set feature command sequence 400 is <60h-ALE-D0h>, that is, the first command is 60h and the second command is D0h. In some electronic products, it is restricted that the commands to execute the erase operation must contain D0h. At this time, by transmitting and enabling the above set feature command sequence 400, it is realized that the flash memory 200 can receive the second command sequence while executing the erase operation without changing the conventional erase operation command sequence (i.e., the first command sequence <60h-ALE-D0h>).
Referring to
Referring to
As shown in
As shown in
As shown in
In this embodiment, in the first command sequence 501, the conventional erase confirmation command D0h is replaced by the command 86h, so that the flash memory 200 can receive the second command sequence 502 while executing the erase operation. Therefore, it is prevented from having to wait for the erase operation to complete before performing related operations that use the bus, thereby improving transmission efficiency. It should be understood that based on the cache erase operation of the second embodiment, the operation mode of the memory device 10 can be changed through a combination of the set feature command and the existing multi-plane erase command sequence. Thus, it is possible to perform related operations that use the bus while performing the multi-plane erase operation. On the other hand, the remaining features of the second embodiment are the same as those of the first embodiment and will not be described again.
Referring to
As shown in
As shown in
As shown in
In this embodiment, in the first command sequence 601, the conventional erase confirmation command D0h is replaced by the command 86h, so that the flash memory 200 can receive the second command sequence 602 while executing the erase operation. Therefore, it is prevented from having to wait for the erase operation to complete before performing related operations that use the bus, thereby improving transmission efficiency. For example, when the erase operation and the write operation are executed continuously, this embodiment reduces a transmission time of the command sequence and the written data compared to the existing technology (because the transmission of the second command sequence 602 and the stored data W_DATA is performed simultaneously (in parallel) with the execution of the erase operation). It should be understood that based on the cache erase operation of the third embodiment, the operation mode of the memory device 10 can be changed by combining the set feature command with the existing erase command sequence, so that the erase operation can be executed simultaneously with bus-related operations. On the other hand, the remaining features of the third embodiment are substantially the same as those of the first embodiment and will not be described again here.
Referring to
As shown in
As shown in
As shown in
In this embodiment, in the first command sequence 701, the conventional erase confirmation command D0h is replaced by the command 86h, so that the flash memory 200 can receive the second command sequence 702 while executing the erase operation. Therefore, it is prevented from having to wait for the erase operation to complete before performing related operations that use the bus, thereby improving transmission efficiency. For example, when the erase operation and the read operation are executed continuously, this embodiment reduces a transmission time of the command sequence compared to the prior art (because the transmission of the second command sequence 702 is performed simultaneously (in parallel) with the execution of the erase operation). It should be understood that based on the cache erase operation of the fourth embodiment, the operation mode of the memory device 10 can be changed by combining the set feature command with the existing erase command sequence, so that related operations that use the bus can be performed while executing the erase operation. On the other hand, the remaining features of the fourth embodiment are substantially the same as those of the first embodiment and will not be described again here.
The present disclosure also provides a method for executing a cache erase operation in a flash memory controller. The flash memory controller is coupled to a flash memory to transfer data and commands. The flash memory controller and the flash memory are as mentioned above and will not be described in detail here. Specifically, the processor of the flash memory controller is typically configured to control the overall operation of the memory device. The processor executes program codes and then performs all or part of the steps in the cache erase operation as described in the first to fourth embodiments.
Referring to
In some embodiments, the flash memory is in the non-ready status when the array ready status bit of the flash memory is set to 0, and the flash memory is in a ready status when the array ready status bit of the flash memory is set to 1.
In some embodiments, before transmitting the first command sequence, the method further includes a step of transmitting a set feature command sequence to the flash memory. In response to the transmission of the set feature command sequence, the flash memory controller is capable of transmitting the second command sequence to the flash memory when the array ready status bit is in the non-ready status.
In some embodiments, the second command sequence includes the same commands as the first command sequence, and during a timing interval of the flash memory executing operations corresponding to the first command sequence and the second command sequence, the array ready status bit remains in the non-ready status.
In some embodiments, the second command sequence is configured to instruct the flash memory to execute a read operation, and during a timing interval of the flash memory executing operations corresponding to the first command sequence and the second command sequence, the array ready status bit remains in the non-ready status.
In some embodiments, the second command sequence is configured to instruct the flash memory to execute a write operation, and during a timing interval of the flash memory executing operations corresponding to the first command sequence and the second command sequence, the array ready status bit remains in the non-ready status.
The present disclosure also provides a method for executing a cache erase operation in a flash memory. A flash memory controller is coupled to the flash memory to transfer data and commands. The flash memory controller and the flash memory are as mentioned above and will not be described in detail here. Specifically, the flash memory performs all or part of the steps in the cache erase operation as described in the above-mentioned first to fourth embodiments.
Referring to
In some embodiments, the flash memory is in the non-ready status when the array ready status bit is set to 0, and the flash memory is in a ready status when the array ready status bit is set to 1.
In some embodiments, before receiving the first command sequence, the method further includes a step of receiving a set feature command sequence. In response to the receiving of the set feature command sequence, the flash memory is capable of receiving the second command sequence when the array ready status bit is in the non-ready status.
In some embodiments, the second command sequence includes the same commands as the first command sequence, and during a timing interval of the flash memory executing operations corresponding to the first command sequence and the second command sequence, the array ready status bit remains in the non-ready status.
In some embodiments, the second command sequence is configured to instruct the flash memory to execute a read operation, and during a timing interval of the flash memory executing operations corresponding to the first command sequence and the second command sequence, the array ready status bit remains in the non-ready status.
In some embodiments, the second command sequence is configured to instruct the flash memory to execute a write operation, and during a timing interval of the flash memory executing operations corresponding to the first command sequence and the second command sequence, the array ready status bit remains in the non-ready status.
The above are only specific implementations of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any changes or replacements that can be easily devised by those skilled in the art within the technical scope of the present disclosure should all fall within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be defined by the protection scope of appending claims.
| Number | Date | Country | Kind |
|---|---|---|---|
| 112135155 | Sep 2023 | TW | national |