Flash memory controller and data programming method
By transmitting a program command sequence in the flash controller to read the job temperature information, the error problem caused by the increase in memory temperature is solved, and the temperature information is quickly transferred back, which improves the reliability and efficiency of data access.
Patent Information
- Application Number
- CN202310886747.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-06-02
- Filing Date
- 2023-07-19
- Publication Date
- 2024-12-03
AI Technical Summary
The increase in the temperature of the memory device will lead to unpredictable errors during data access, and even lead to memory failure, and the prior art will find it difficult to effectively solve this problem.
Provides a flash controller and data programming method that ensures that temperature information is monitored and returned while storing data, avoiding waiting for all by transmitting a sequence of programming commands in programming operations, including commands for writing data and reading job temperature. Time wasted and cache programming operation interrupts caused by the end of the channel operation.
It realizes the rapid return of job temperature information when executing programming operations, avoids data errors and memory failures, improves the reliability and efficiency of data access, and reduces time waste.
Smart Images

Figure CN119065916A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to a storage device, and more particularly to a flash memory controller and a data programming method. Background Art
[0002] The data reliability of a memory device is affected by temperature. For example, the temperature of a memory device increases as the data access speed of the memory device increases. When the temperature is higher than the allowable operating range, unexpected errors are likely to occur when executing a programming (read or write) command, and the memory device may even fail.
[0003] In view of this, it is necessary to provide a flash memory controller and a data programming method to solve the above technical problems. Summary of the invention
[0004] In order to solve the above problems of the prior art, the purpose of the present application is to provide a flash memory controller and a data programming method, which can enable the flash memory performing the programming operation to quickly return the operating temperature information.
[0005] In a first aspect, the present application provides a flash memory controller for controlling a flash memory. The flash memory includes a first chip enablement space. The flash memory controller includes: a control logic circuit and a processor. The control logic circuit is coupled to the first chip enablement space of the flash memory through at least one channel to transmit data and commands. The processor is coupled to the control logic circuit to access the first chip enablement space on the channel through the control logic circuit. The processor controls the control logic circuit to transmit a programming command sequence to the first chip enablement space through the channel. The programming command sequence includes a first command and a second command, wherein the first command is used to instruct the first chip enablement space to write storage data and read operating temperature information, and in response to the transmission of the second command, the processor controls the control logic circuit to receive the operating temperature information from the first chip enablement space.
[0006] In some embodiments, the writing of the storage data and the reading of the operating temperature information are adjacent to each other in terms of timing.
[0007] In some embodiments, the second command comprises a polling command.
[0008] In some embodiments, the flash memory further includes a second chip enable space, and after the processor controls the control logic circuit to transmit the first command to the first chip enable space through the channel and before transmitting the second command to the first chip enable space, the processor controls the control logic circuit to transmit another first command to the second chip enable space through the channel.
[0009] In some embodiments, the transmission of the first command and the transmission of the address receiving command corresponding to the another first command are adjacent to each other in timing.
[0010] In some embodiments, after the processor controls the control logic circuit to receive the operating temperature information from the first chip enablement space, the processor controls the control logic circuit to immediately transmit an address receive command corresponding to a data programming command or an address receive command corresponding to another first command to the first chip enablement space through the channel.
[0011] In some embodiments, the flash memory controller operates in a cache access mode.
[0012] In some embodiments, another program command sequence located before or after the program command sequence does not include a command for instructing the first chip enabling space to read another operating temperature information.
[0013] In some embodiments, the control logic circuit communicates with the flash memory using a communication protocol compatible with an Open NAND Flash Interface (ONFI).
[0014] In some embodiments, the first command and the second command are selected from an ONFI command set.
[0015] In a second aspect, the present application also provides a data programming method, which is performed by a flash memory controller coupled to a flash memory, wherein the flash memory includes a first chip enablement space, and the flash memory controller is coupled to the first chip enablement space of the flash memory through at least one channel to transmit data and commands. The data programming method includes: transmitting a first command to the first chip enablement space through the channel, wherein the first command is used to instruct the first chip enablement space to write storage data and read operating temperature information; transmitting a second command to the first chip enablement space through the channel; and receiving the operating temperature information from the first chip enablement space in response to the transmission of the second command.
[0016] In some embodiments, the writing of the storage data and the reading of the operating temperature information are adjacent to each other in terms of timing.
[0017] In some embodiments, the first command is executed before the second command.
[0018] In some embodiments, the flash memory further includes a second chip enable space. After the flash memory controller transmits the first command to the first chip enable space through the channel and before transmitting the second command to the first chip enable space, the data programming method also includes: transmitting another first command to the second chip enable space through the channel.
[0019] In some embodiments, the transmission of the first command and the transmission of the address receiving command corresponding to the another first command are adjacent to each other in timing.
[0020] In some embodiments, after the flash memory controller receives the operating temperature information from the first chip enable space, the data programming method further includes: immediately transmitting an address receive command corresponding to the data programming command or an address receive command corresponding to another first command to the first chip enable space through the channel.
[0021] In some embodiments, the flash memory controller operates in a cache access mode.
[0022] In some embodiments, the first command and the second command are combined into a programming command sequence, and another programming command sequence located before or after the programming command sequence does not include a command for instructing the first chip enable space to read another operating temperature information.
[0023] In some embodiments, the flash memory controller communicates with the flash memory using a communication protocol compatible with an Open NAND Flash Interface (ONFI).
[0024] In some embodiments, the first command and the second command are selected from an ONFI command set.
[0025] Compared to the prior art, the present application provides a flash memory controller and data programming method, which can write storage data and obtain operating temperature information by executing a programming command sequence, avoiding the time wasted waiting for the operation of all channels to end and / or avoiding the time wasted by having to end the cache programming operation first. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A schematic diagram showing a memory device according to an embodiment of the present invention.
[0027] Figure 2 A timing diagram showing a programming operation according to the first embodiment of the present invention is shown.
[0028] Figure 3A A timing diagram showing execution of the first subcommand sequence.
[0029] Figure 3B A timing diagram showing execution of the second subcommand sequence.
[0030] Figure 3C Another timing diagram showing execution of the second subcommand sequence.
[0031] Figure 4 A timing diagram showing a programming operation according to a second embodiment of the present invention is shown.
[0032] Figure 5 A timing diagram showing the execution of the program command sequence of the second embodiment.
[0033] Figure 6 A timing diagram showing a programming operation according to the third embodiment of the present invention is shown.
[0034] Fig. 7A A timing diagram showing the execution of the command sequence C_prog.
[0035] Figure 7B A timing diagram showing the execution of the command sequence N_prog.
[0036] Figure 8 A timing diagram showing a program operation according to a fourth embodiment of the present invention is shown.
[0037] Fig. 9 A timing diagram showing the execution of the program command sequence of the fourth embodiment.
[0038] Fig.10 A flow chart showing the data programming method of the present invention. DETAILED DESCRIPTION
[0039] The example embodiments of the present application will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein. On the contrary, these embodiments are provided so that the present application will be more comprehensive and complete, and the concepts of the example embodiments will be fully conveyed to those of ordinary skill in the art. The accompanying drawings are only schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the accompanying drawings represent the same or similar parts, and thus their repeated description will be omitted.
[0040] Please refer to Figure 1, which is a schematic diagram of a memory device 10 according to an embodiment of the present invention. The memory device 10 includes a flash memory controller 100 and a flash memory 200. The flash memory controller 100 is used to control the operation of the memory device 10 and access the flash memory 200, and the flash memory 200 is used to store data. The memory device 10 may include, but is not limited to, a solid state drive (SSD) and various types of embedded memory devices, such as an embedded memory device that complies with the Peripheral Component Interconnect Express (PCIe) standard.
[0041] like Figure 1 As shown, the flash controller 100 may include an interface logic circuit 110, a control logic circuit 120, a microprocessor 130, a buffer 140 and a read-only memory 150. The flash controller 100 may be connected to a host device through the interface logic circuit 110. In addition, the flash controller 100 is coupled to the flash memory 200 through the control logic circuit 120. The microprocessor 130 is electrically coupled to the interface logic circuit 110, the control logic circuit 120, the buffer 140 and the read-only memory 150. The buffer 140 may be implemented by a random access memory (RAM). For example, the buffer 140 may be a static random access memory (SRAM), but the present invention is not limited thereto. The read-only memory 150 is used to store a program code 151.
[0042] In some embodiments, the flash memory controller 100 that executes the program code 151 through the microprocessor 130 can use its own internal components to perform a variety of control operations, such as: using the interface logic circuit 110 to communicate with the host device, using the control logic circuit 120 to control the access of the flash memory 200, and using the buffer 140 to perform the required buffering processing. For example, the microprocessor 130 receives the programming (write / read) command issued by the host device through the interface logic circuit 110, and accesses the data in the flash memory 200 through the control logic circuit 120. The control logic circuit 120 may include an encoder and a decoder. The encoder is used to encode the data written into the flash memory 200 to generate a corresponding check code, and the decoder is used to decode the data received from the flash memory 200.
[0043] In some embodiments, the host device may include a processor and a power supply circuit coupled to each other. The processor may be used to control the operation of the host device, and the power supply circuit may be used to provide 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 may be used to provide storage space to the host device, and obtain one or more driving voltages from the host device as power for the memory device 10. The host device mentioned herein may include, but is not limited to, a mobile device, a wearable device, a tablet computer, and a personal computer such as a desktop computer and a notebook computer.
[0044] In some embodiments, the interface logic circuit 110 of the flash memory controller 100 may comply with a specific communication standard, such as the Serial Advanced Technology Attachment (Serial ATA or SATA) standard, the Peripheral Component Interconnect (PCI) standard, the PCIe standard, the Universal Flash Storage (UFS) standard, etc., and may communicate according to the specific communication standard, for example, to communicate between a host device and the memory device 10, wherein the host device may include a corresponding transmission interface circuit that complies with the specific communication standard to communicate between the host device and the memory device 10.
[0045] In the present embodiment, the flash memory 200 is a NAND flash memory. Accordingly, the control logic circuit 120 of the flash memory controller 100 uses a communication protocol compatible with the Open NAND Flash Interface (ONFI) to communicate with the flash memory 200. For example, the flash memory controller 100 can translate a request from a host device into a command for the flash memory 200 according to the ONFI protocol, wherein the command is selected from the ONFI command set.
[0046] like Figure 1 As shown, the flash memory 200 may include a plurality of flash memory chips, such as chips C1, C2...CN, where N is a positive integer greater than 1. In the present embodiment, the flash memory 200 includes 12 chips as an example, but is not limited thereto. Each chip C1~C12 of the flash memory 200 includes a plurality of blocks, and each block includes a plurality of pages. A page is usually the smallest unit of programming. In other words, a page is the smallest unit for writing or reading data. When accessing one or more pages of data, the flash memory controller 100 accesses the one or more pages of data according to preset access parameters, and performs decoding operations on the data of the accessed pages.
[0047] In this embodiment, the host device can transmit a host command and a corresponding logical address to the flash memory controller 100 to access the memory device 10. The flash memory controller 100 receives the host command and the logical address, converts the host command into a memory operation command, and further uses the operation command to control the flash memory 200 to read and / or write (also called program) memory cells (e.g., data pages) at certain physical addresses in the flash memory 200. The physical address corresponds to the logical address.
[0048] like Figure 1 As shown, the flash memory controller 100 accesses the flash memory 200 in parallel with multiple channels. In this embodiment, the control logic circuit 120 of the flash memory controller 100 includes four channels CH(0)-CH(3), and each channel is shared by four chips, but is not limited thereto. The flash memory 200 includes a first chip enable space 201, a second chip enable space 202, a third chip enable space 203, and a fourth chip enable space 204. The control logic circuit 120 of the flash memory controller 100 is coupled to the first chip enable space 201, the second chip enable space 202, the third chip enable space 203, and the fourth chip enable space 204 of the flash memory 200 through the channels CH(0)-CH(3) to transmit data and commands. The processor 130 of the flash memory controller 100 transmits chip enable signals CE(0)-CE(3) through the control logic circuit 120 to access the corresponding chip enable space on the corresponding channel. Specifically, in this embodiment, the control logic circuit 120 uses several electronic signals to coordinate the data and command transmission between the flash memory controller 100 and the flash memory 200, including data lines, clock signals and control signals. The data lines can be used to transmit commands, addresses, read and write data. The control signal lines can be used to transmit control signals such as chip enable (CE), address latch enable (ALE), command latch enable (CLE), write enable (WE), etc.
[0049] like Figure 1As shown, the chip enable signal CE(0) enables the chips C1-C3 on all channels CH(0)-CH(3) and arranged in the first chip enable space 201. The chip enable signal CE(1) enables the chips C4-C6 on all channels CH(0)-CH(3) and arranged in the second chip enable space 202. The chip enable signal CE(2) enables the chips C7-C9 on all channels CH(0)-CH(3) and arranged in the third chip enable space 203. The chip enable signal CE(3) enables the chips C10-C12 on all channels CH(0)-CH(3) and arranged in the fourth chip enable space 204. In this embodiment, the chip enable signals CE(0), CE(1), CE(2) and CE(3) are enabled in an interleaved manner. Through the multiple channels CH(0)-CH(3), the chip enable spaces 201-204 enabled by the chip enable signals CE(0)-CE(3) are accessed in parallel.
[0050] It should be understood that the data quality of the blocks in the flash memory 200 will decrease as the temperature increases. In order to avoid unexpected errors or losses in data when executing read or write commands, the operating temperature of the flash memory 200 should be monitored to ensure that data is accessed when the temperature of the flash memory 200 is not higher than the allowable operating range. For example, the memory device 10 can be provided with a temperature sensor (not shown), but the present invention is not limited to this. The temperature sensor can detect the temperature of the flash memory 200 at any time and record the temperature value in its register. When the flash memory controller 100 performs an access operation on the flash memory 200, the microprocessor 130 will command the flash memory 200 to return the temperature value measured and recorded by the temperature sensor to achieve temperature monitoring of the flash memory 200.
[0051] In the present application, one solution for obtaining the temperature of the flash memory 200 is to wait for the completion of the programming operation of each channel before the flash memory controller 100 performs the temperature reading operation. Furthermore, after the temperature information of each channel is transmitted back, the flash memory controller 100 controls the flash memory 200 to perform another programming operation. For details, please refer to Figure 2 , which shows a timing diagram of a programming operation according to a first embodiment of the present invention.
[0052] In this embodiment, Figure 2The timing diagram of the flash memory controller 100 performing a rotational programming operation on all chips in all chip enable spaces 201 to 204 on one of the channels CH(#) is shown. The flash memory controller 100 sequentially transmits a programming command sequence to each chip enable space 201 to 204. The programming command sequence includes a first sub-command sequence Prog_CMD and a second sub-command sequence Read_CMD. In the present embodiment, the first sub-command sequence Prog_CMD is used to instruct the flash memory 200 to perform a data-related write operation, and the second sub-command sequence Read_CMD is used to instruct the flash memory 200 to perform a temperature-related read operation. It should be understood that different graphics (e.g., dots, horizontal lines, right slashes, grids, etc.) filled in the blocks of the timing diagram represent different execution commands / states, and blocks with the same graphics represent the same execution command / state.
[0053] For details, please refer to Figure 3A , which shows a timing diagram for executing the first sub-command sequence Prog_CMD, where I / Ox represents the data input / output signal of the flash memory controller 100 and the flash memory 200, and R / B# is a standby signal for indicating a busy state. When the standby signal R / B is low, it means that the operation of programming, erasing or reading is in progress. When the standby signal R / B becomes high, it means that the operation is completed. On the other hand, Figure 3A The time interval marked with data W_Data represents that the flash memory controller 100 provides data to the corresponding chip of the flash memory 200 through the channel.
[0054] like Figure 3A As shown, the first sub-command sequence Prog_CMD is a general write command sequence, including commands 80h and 10h. Specifically, the flash memory controller 100 transmits the command "80h" to the flash memory 200. The command "80h" is a command that instructs the flash memory 200 to receive the address information ALE, that is, an address receiving command. Secondly, the flash memory controller 100 transmits the address information ALE to the flash memory 200. Then, the flash memory controller 100 also sequentially transmits the data W_Data to the page buffer of the corresponding chip of the flash memory 200. Finally, the flash memory controller 100 transmits the command "10h" to the flash memory 200. Command "10h" is the first command of the programming command sequence of this embodiment, which instructs the flash memory 200 to start the write operation and sets the corresponding chip of the flash memory 200 to a busy state. Subsequently, the data in the page buffer of the chip is written to the page corresponding to the logical address in units of pages. Figure 3A tPROG in FIG. 1 represents a period during which a write operation is performed, during which the chip remains busy.
[0055] like Figure 2 and Figure 3AAs shown, in a single-channel architecture, the flash memory controller 100 first transmits the first sub-command sequence Prog_CMD (i.e., <80h-ALE-10h>) to spaces 201 to 204 in sequence. Then, after waiting for the first sub-command sequence Prog_CMD of all channels to be executed (i.e., waiting for all channels to complete the operation and enter the ready state), the flash memory controller 100 will then transmit the second sub-command sequence Read_CMD to spaces 201 to 204 in sequence. For example, Figure 2 The tW1 in FIG. 1 represents the period of waiting for all channels to complete the operation and enter the ready state.
[0056] Please refer to Figure 3B , which shows a timing diagram for executing the second sub-command sequence Read_CMD. The second sub-command sequence Read_CMD includes commands EEh and FA. The flash memory controller 100 transmits the commands "EEh" and "FA" to the flash memory 200. The command "EEh" is the second command of the programming command sequence of this embodiment, which indicates a command for obtaining a feature, and the command "FA" indicates an address related to feature data. In this embodiment, the operating temperature information of the flash memory 200 is read as feature data. Figure 3B tT in t represents the period of measuring the temperature of the flash memory 200, during which the chip remains busy. Then, the flash memory controller 100 detects the end of the operating temperature measurement operation according to the standby signal R / B of the flash memory 200, and the flash memory controller 100 starts to receive operating temperature information from the flash memory 200. For example, Figure 3B The time interval marked with the operating temperature information D_temp represents that the flash memory controller 100 receives the operating temperature information from the corresponding chip through the channel.
[0057] In some embodiments, the second sub-command sequence Read_CMD can use different commands to obtain the operating temperature. For example, please refer to Figure 3C , which shows another timing diagram for executing the second sub-command sequence Read_CMD. In this embodiment, the second sub-command sequence Read_CMD includes command 91h, wherein command “91h” is used as the second command of the programming command sequence of this embodiment. The flash memory controller 100 transmits command “91h” to the flash memory 200. Then, the flash memory controller 100 detects that the measuring operation of the operating temperature is completed according to the standby signal R / B of the flash memory 200, and the flash memory controller 100 starts to receive the operating temperature information from the flash memory 200.
[0058] like Figure 2 , Figure 3B and Figure 3CAs shown, in a single-channel architecture, the flash memory controller 100 first transmits the commands "EEh" and "FA" or command "91h" in the second sub-command sequence Read_CMD to spaces 201 to 204 in sequence. Then, when the transmission of the commands "EEh" and "FA" or command "91h" to the last space 204 is completed, the flash memory controller 100 begins to receive the operating temperature information D_temp from spaces 201 to 204 in sequence until the flash memory controller 100 receives the operating temperature information D_temp from the last space 204. Furthermore, the flash memory controller 100 can perform another programming operation on the flash memory 200 only after the second sub-command sequence Read_CMD of all channels is executed. For example, Figure 2 tW2 in FIG. 1 represents the period of waiting for all channels to complete the operation and enter the ready state.
[0059] In the present application, the temperature monitoring of the flash memory 200 is realized by the alternating programming operation of the flash memory of the first embodiment. Figure 2 As shown, the flash memory controller 100 must wait for all channels to complete the operation and the flash memory 200 to enter the ready state (during tW1) before transmitting the second sub-command sequence Read_CMD to perform the temperature reading operation. In addition, the flash memory controller 100 must wait for the second sub-command sequence Read_CMD of all channels to be executed (during tW2) before performing another programming operation on the flash memory 200. Therefore, in this embodiment, the temperature reading operation needs to spend a certain amount of time waiting for the flash memory 200 to enter the ready state. On the other hand, when the flash memory controller 100 operates in the cache access mode, if the command "91h" is used in the second sub-command sequence Read_CMD_ to obtain the operating temperature, this method will disrupt the data on the register of the flash memory 200, resulting in the interruption of the process of the cache programming operation. In view of this, the present application also proposes another solution to enable the flash memory that performs the programming operation to quickly return the operating temperature information without affecting the execution of the programming operation.
[0060] Please refer to Figure 4 , which shows a timing diagram of a programming operation according to a second embodiment of the present invention. Specifically, Figure 4The timing diagram of the flash memory controller 100 performing a rotational programming operation on all chips in all chip enable spaces 201 to 204 on one of the channels CH(#) is shown. The processor 130 of the flash memory controller 100 controls the control logic circuit 120 to transmit a programming command sequence to the chip enable spaces 201 to 204 through the channel. The programming command sequence includes a first sub-command sequence CMD_1 and a second sub-command sequence CMD_2. The execution order of the first sub-command sequence CMD_1 is before the second sub-command sequence CMD_2. The first sub-command sequence CMD_1 includes a first command, which is used to instruct the corresponding chip enable space to write storage data W_Data and read operating temperature information D_temp. The second sub-command sequence CMD_2 includes a second command. In response to the transmission of the second command, the processor 130 of the flash memory controller 100 controls the control logic circuit 120 to receive the operating temperature information D_temp from the corresponding chip enable space. It should be understood that different graphics (e.g., left slashes, dots, horizontal lines, grids, etc.) filled in blocks of the timing diagram represent different execution commands / states, and blocks with the same graphics represent the same or similar execution commands / states.
[0061] For details, please refer to Figure 5 , which shows a timing diagram of executing a programming command sequence of the second embodiment of the present invention, wherein I / Ox represents the data input / output signal of the flash memory controller 100 and the flash memory 200, and R / B# is a standby signal for indicating a busy state. When the standby signal R / B is at a low level, it indicates that an operation such as programming, erasing or reading is in progress, and when the standby signal R / B becomes high, it indicates that the operation is completed. On the other hand, Figure 5 In FIG. 1 , the time interval marked with storage data W_Data represents that the flash memory controller 100 provides data to the corresponding chip through the channel, and the time interval marked with operating temperature information D_temp represents that the flash memory controller 100 receives the operating temperature information of the corresponding chip through the channel.
[0062] like Figure 5As shown, the first sub-command sequence CMD_1 of the programming command sequence includes commands 80h and 12h, wherein command "12h" is used as the first command of this embodiment. It should be noted that command "12h" is optional, and can be replaced by any command in the ONFI command set, for example. The flash memory controller 100 transmits command "80h" to the flash memory 200. Command "80h" is a command that instructs the flash memory 200 to receive address information ALE, that is, an address reception command. The command "80h" transmitted through the channel is stored in the command register of the corresponding chip of the flash memory 200. Secondly, the flash memory controller 100 transmits the address information ALE to the flash memory 200. The address information ALE transmitted through the channel is stored in the address register of the corresponding chip of the flash memory 200. Next, the flash memory controller 100 also sequentially transmits the storage data W_Data to the page buffer of the corresponding chip of the flash memory 200. Subsequently, the flash memory controller 100 transmits command "12h" to the flash memory 200. The command "12h" is used to instruct the flash memory 200 to start the write operation and set the corresponding chip of the flash memory 200 to the busy state, and is also used to instruct the start of measuring the operating temperature. The command "12h" transmitted through the channel is stored in the command register of the corresponding chip of the flash memory 200. If the command "12h" is stored in the register of the chip, the write and measurement operations are started, and the ready state is changed to the busy state. Figure 5 In FIG. 1 , tPROG represents a period of performing a write operation, and tT represents a period of performing a measurement of the operating temperature information of the flash memory 200. In this embodiment, the writing of storage data and the reading of the operating temperature information are adjacent to each other in terms of timing.
[0063] Based on the solution of the second embodiment of the present application, optionally, a specific command for enabling the operation of measuring temperature, such as AAh (but not limited to), can be inserted at different positions in the first sub-command sequence CMD_1 of the programming command sequence. The command "AAh" is optional, and can be replaced by any command in the ONFI command set. For example, in some embodiments, the first sub-command sequence CMD_1 includes commands 80h, AAh, and 10h. In the first example, the first sub-command sequence CMD_1 is <aah-80h-ale-10h>, wherein the command "AAh" is inserted and transmitted before the command "80h". In the second example, the first sub-command sequence CMD_1 is <80h-AAh-ALE-10h>, wherein the command "AAh" is inserted and transmitted between the command "80h" and the address information. In the third example, the first sub-command sequence CMD_1 is <80h-ALE-AAh-10h>, wherein the command "AAh" is inserted and transmitted between the address information and the command "10h". In the fourth example, the first sub-command sequence CMD_1 is <80h-ALE-10h-AAh>, wherein the command "AAh" is inserted and transmitted after the command "10h". In other embodiments, the command "AAh" can be inserted into the address information (such as between the logical column address and the logical row address) and transmitted, or it can be transmitted between any two valid data parts. It should be understood that in the above-mentioned first to fourth examples, the commands "AAh" and "10h" are collectively used as the first command of the programming command sequence of this embodiment.
[0064] like Figure 5 As shown, the second sub-command sequence CMD_2 of the programming command sequence includes, for example, command 76h, wherein command "76h" may be a polling command, and command "76h" serves as the second command of the programming command sequence of this embodiment. The flash memory controller 100 detects the end of the write operation and the temperature measurement operation according to the standby signal R / B of the flash memory 200. Specifically, the flash memory controller 100 transmits command "76h" to the flash memory 200. Command "76h" is a command instructing the flash memory 200 to output the operating temperature information D_temp to the flash memory controller 100. It should be noted that in this embodiment, the state of the Ready Bit is checked by the polling command, wherein the Ready Bit is a flag bit indicating whether the flash memory 200 is ready for operation. When the flash memory 200 is ready for read and write operations, the Ready Bit is set to 1. When the flash memory 200 is in operation, the Ready Bit is set to 0. That is, only when the Ready Bit is set to 1, the flash memory controller 100 will obtain the operating temperature information from the flash memory 200, thereby improving the reliability of the read operation and avoiding data errors or other problems.
[0065] like Figure 4 As shown, the flash controller 100 sequentially transmits the first sub-command sequence CMD_1 of the programming command sequence to the first to fourth chip enable spaces 201-204 through the channel. Moreover, after the processor 130 of the flash controller 100 controls the control logic circuit 120 to transmit the first command "12h" of the first sub-command sequence CMD_1 to the first chip enable space 201 through the channel and before transmitting the second command "76h" of the second sub-command sequence CMD_2 to the first chip enable space 201, the processor 130 of the flash controller 100 controls the control logic circuit 120 to transmit the first command of another first sub-command sequence CMD_1 to another chip enable space through the channel. Specifically, after transmitting the first command "12h" of the first sub-command sequence CMD_1 to the first chip enable space 201, the flash controller 100 immediately transmits another first sub-command sequence CMD_1 (i.e., <80h-5ALE-12h>) to the second chip enable space 202 through the channel. By analogy, until the flash controller 100 transmits another first sub-command sequence CMD_1 (i.e., <80h-ALE-12h>) to the last chip enable space (the fourth chip enable space 204) through the channel, the flash controller 100 then transmits the second command "76h" of the second sub-command sequence CMD_2 of the programming command sequence to the first chip enable space 201. That is, the transmission of the first command "12h" of the first sub-command sequence CMD_1 to the first chip enable space 201 and the transmission of the address receiving command "80h" corresponding to the first command "12h" of another first sub-command sequence CMD_1 to the second chip enable space 202 are adjacent to each other in timing. Furthermore, the transmission of the first command "12h" of the first sub-command sequence CMD_1 to the fourth chip enable space 204 and the transmission of the second command "76h" of the second sub-command sequence CMD_2 to the first chip enable space 201 are adjacent to each other in timing.
[0066] In this embodiment, after the processor 130 of the flash memory controller 100 controls the control logic circuit 120 to receive the operating temperature information D_temp from the corresponding chip enable space (such as the first chip enable space 201), the processor 130 controls the control logic circuit 120 to immediately transmit an address receiving command (such as 80h) corresponding to the data programming command (such as 10h) to the chip enable space through a channel. In some embodiments, the processor 130 may also control the control logic circuit 120 to immediately transmit an address receiving command (such as 80h) corresponding to another first command (such as 12h) to the chip enable space through a channel.
[0067] In the second embodiment of the present invention, the storage data W_DATA and the operating temperature information D_temp can be written by executing the programming command sequence. In addition, another programming command can be sent immediately after the programming command sequence is sent, thereby avoiding wasting time waiting for the operation of all channels to end (i.e., waiting for the flash memory 200 to enter the ready state).
[0068] On the other hand, the following will describe how to obtain the operating temperature information of the flash memory 200 when the flash memory controller 100 operates in the cache access mode.
[0069] Please refer to Figure 6 , which shows a timing diagram of a programming operation according to a third embodiment of the present invention, wherein the flash memory controller 100 operates in a cache access mode. Figure 6 In the example, the flash controller 100 is used to access a single chip enabled space through a single channel. The flash controller 100 transmits multiple command sequences to instruct the flash memory 200 to perform corresponding access operations. The multiple command sequences include a cache programming command sequence C_prog, a general programming command sequence N_prog, and a temperature acquisition command sequence Get_T.
[0070] like Figure 6 As shown, first, the flash memory controller 100 transmits a cache programming command sequence C_prog to the flash memory 200. In this embodiment, the cache programming command sequence C_prog is used to instruct the flash memory 200 to perform a cache programming operation. Fig. 7A As shown, the cache programming command sequence C_prog includes commands 80h and 15h. Command "15h" is a command to instruct the cache memory to perform a programming operation, and the flash memory 200 that receives the command executes a corresponding programming operation. Fig. 7A In the example, tPCBSY represents the period during which a cache write operation is performed.
[0071] like Figure 6 As shown, the flash memory controller 100 then transmits a general programming command sequence N_prog to the flash memory 200 to instruct the flash memory 200 to perform a general programming operation, that is, only to instruct the corresponding chip to enable the space to write the storage data W_Data without reading the temperature information. Figure 7B As shown, the general programming command sequence N_prog is similar to that in the first embodiment. Figure 3A The first sub-command sequence Prog_CMD (ie, <80h-ALE-10h>) described above is the same and will not be described in detail here.
[0072] like Figure 6 As shown, the flash memory controller 100 then transmits the temperature acquisition command sequence Get_T to the flash memory 200. In this embodiment, the temperature acquisition command sequence Get_T is the same as that in the first embodiment. Figure 3B or Figure 3C The second sub-command sequence Read_CMD described above is the same and is used to instruct the flash memory 200 to perform a temperature-related read operation, which will not be described in detail herein.
[0073] In the present application, the temperature monitoring of the flash memory 200 is realized through the programming operation of the third embodiment. Figure 6 As shown, when reading the temperature, the flash memory 200 will read specific bit groups, and these bit groups may overwrite certain bit groups in the cache memory, thereby polluting the data in the cache memory. Therefore, in order to ensure that the data in the cache memory is not polluted, it is necessary to first end the cache programming operation and perform a general programming operation (i.e., execute the general programming command sequence N_prog) before the temperature reading operation can be performed. In other words, the cache programming operation must be ended and the flash memory 200 enters the ready state before the flash memory controller 100 can transmit the temperature acquisition command sequence Get_T to perform the temperature reading operation. In this way, the cache access operation is interrupted and unnecessary time is consumed. In view of this, the present application also proposes another solution to enable the flash memory that performs the cache programming operation to quickly return the operating temperature information without affecting the execution of the cache programming operation.
[0074] Please refer to Figure 8 , which shows a timing diagram of a read operation according to a fourth embodiment of the present invention, wherein the flash memory controller 100 operates in a cache access mode. Figure 8 In the embodiment, the operation timing of the flash memory controller 100 accessing a single chip enabled space through a single channel is used for explanation. The flash memory controller 100 transmits multiple command sequences to instruct the flash memory 200 to perform corresponding access operations. The multiple command sequences include a cache programming command sequence C_prog, a general programming command sequence N_prog, and a programming command sequence, wherein the programming command sequence includes a first sub-command sequence CMD_1 and a second sub-command sequence CMD_2.
[0075] like Figure 8 As shown, first, the flash memory controller 100 transmits a cache programming command sequence C_prog to the flash memory 200. In this embodiment, the cache programming command sequence C_prog is used to instruct the flash memory 200 to perform a cache programming operation. The cache programming command sequence C_prog of this embodiment is similar to the cache programming command sequence C_prog of the third embodiment. Therefore, the cache programming command sequence C_prog of this embodiment includes commands 80h and 15h (such as Fig. 7A The command "15h" is a command to instruct the cache memory to perform a programming operation, and the flash memory 200 receiving the command executes a corresponding programming operation.
[0076] like Figure 8 As shown, the processor 130 of the flash memory controller 100 then controls the control logic circuit 120 to transmit the programming command sequence to the corresponding chip enable space (such as the first chip enable space 201) through the channel. Fig. 9 , which shows a timing diagram for executing the programming command sequence of the fourth embodiment. The programming command sequence includes a first sub-command sequence CMD_1 and a second sub-command sequence CMD_2. The transmission and execution order of the first sub-command sequence CMD_1 is before the second sub-command sequence CMD_2. The first sub-command sequence CMD_1 includes a first command, which is used to instruct the corresponding chip enable space to write storage data W_Data and read operating temperature information D_temp. The second sub-command sequence CMD_2 includes a second command. In response to the transmission of the second sub-command sequence CMD_2, the processor 130 of the flash memory controller 100 controls the control logic circuit 120 to receive the operating temperature information D_temp from the corresponding chip enable space.
[0077] like Fig. 9 As shown, the first sub-command sequence CMD_1 is <80h-ALE-0Bh>, where the command "0Bh" is the first command, which is used to instruct the flash memory 200 to perform a cache programming operation and to instruct the start of measuring the operating temperature. The command "0Bh" is optional and can be replaced by any command in the ONFI command set. The command "0Bh" transmitted through the channel is stored in the command register of the corresponding chip of the flash memory 200. If the command "0Bh" is stored in the register of the chip, then the data writing and temperature measurement operations are started, and the ready state becomes the busy state. Fig. 9 In FIG. 1 , tPCBSY represents a period of executing a cache write operation, and tT represents a period of measuring the operating temperature information of the flash memory 200. In this embodiment, the writing of storage data and the reading of the operating temperature information are adjacent to each other in timing.
[0078] It should be understood that, based on the solution of the fourth embodiment of the present application, a specific command for enabling the operation of measuring temperature, such as AAh (but not limited to), may be optionally inserted at different positions in the first sub-command sequence CMD_1 of the programming command sequence. The command "AAh" is optional, and may be replaced by any command in the ONFI command set, for example. For example, in some embodiments, the first sub-command sequence CMD_1 includes commands 80h, AAh, and 15h. In the first example, the first sub-command sequence CMD_1 is <aah-80h-ale-15h>, wherein the command "AAh" is inserted and transmitted before the command "80h". In the second example, the first sub-command sequence CMD_1 is <80h-AAh-ALE-15h>, wherein the command "AAh" is inserted and transmitted between the command "80h" and the address information. In the third example, the first sub-command sequence CMD_1 is <80h-ALE-AAh-15h>, wherein the command "AAh" is inserted and transmitted between the address information and the command "15h". In the fourth example, the first sub-command sequence CMD_1 is <80h-ALE-15h-AAh>, wherein the command "AAh" is inserted and transmitted after the command "15h". In other embodiments, the command "AAh" can be inserted into the address information (such as between the logical column address and the logical row address) and transmitted, or it can be transmitted between any two valid data parts. It should be understood that in the above-mentioned first to fourth examples, the commands "AAh" and "15h" are collectively used as the first command of the programming command sequence of this embodiment.
[0079] On the other hand, the second sub-command sequence CMD_2 is similar to the second embodiment. Figure 5 The second sub-command sequence CMD_2 described is the same (ie, includes the second command “76h”) and will not be described in detail here.
[0080] like Figure 8 As shown, after the processor 130 of the flash memory controller 100 controls the control logic circuit 120 to receive the operating temperature information from the corresponding chip enable space (such as the first chip enable space 201), the processor 130 controls the control logic circuit 120 to immediately transmit an address receiving command (such as command 80h) corresponding to another cache programming command sequence C_prog to the chip enable space through a channel. In some embodiments, the processor 130 may also control the control logic circuit 120 to immediately transmit an address receiving command (such as command 80h) corresponding to the first command "0Bh" of another programming command sequence to the chip enable space through a channel. In some embodiments, another programming command sequence located before or after the programming command sequence does not include a command for instructing the corresponding chip enable space to read another operating temperature information.
[0081] In the fourth embodiment of the present invention, the storage data can be written and the operating temperature information can be obtained by executing the programming command sequence. Moreover, the programming command sequence is transmitted immediately after the previous cache programming command, avoiding the need to terminate the cache programming operation first and causing time consumption.
[0082] The present application also provides a data programming method, which is performed by a flash memory controller coupled to a flash memory. The flash memory controller and the flash memory are as described above and are not described in detail here. The flash memory controller is coupled to the first chip enable space of the flash memory through at least one channel to transmit data and commands. Specifically, the microprocessor of the flash memory controller is generally configured to control the overall operation of the memory device. The microprocessor executes the program code and then performs all or part of the steps in the data programming method of the first embodiment to the fourth embodiment described above.
[0083] Please refer to Fig.10 , which shows a flow chart of a data programming method of the present invention. The data programming method at least includes steps S10 to S30. In step S10, a first command is transmitted to the first chip enable space through the channel, wherein the first command is used to instruct the first chip enable space to write storage data and read operating temperature information. In step S20, a second command is transmitted to the first chip enable space through the channel. In step S30, in response to the transmission of the second command, the operating temperature information is received from the first chip enable space.
[0084] In some embodiments, the writing of the storage data and the reading of the operating temperature information are adjacent to each other in terms of timing.
[0085] In some embodiments, the first command is executed before the second command.
[0086] In some embodiments, the flash memory further includes a second chip enable space. After the flash memory controller transmits the first command to the first chip enable space through the channel and before transmitting the second command to the first chip enable space, the data programming method also includes: transmitting another first command to the second chip enable space through the channel.
[0087] In some embodiments, the transmission of the first command and the transmission of the address receiving command corresponding to the another first command are adjacent to each other in timing.
[0088] In some embodiments, after the flash memory controller receives the operating temperature information from the first chip enable space, the data programming method further includes: immediately transmitting an address receive command corresponding to the data programming command or an address receive command corresponding to another first command to the first chip enable space through the channel.
[0089] In some embodiments, the flash memory controller operates in a cache access mode.
[0090] In some embodiments, the first command and the second command are combined into a programming command sequence, and another programming command sequence located before or after the programming command sequence does not include a command for instructing the first chip enable space to read another operating temperature information.
[0091] In some embodiments, the flash memory controller communicates with the flash memory using a communication protocol compatible with an Open NAND Flash Interface (ONFI).
[0092] In some embodiments, the first command and the second command are selected from an ONFI command set.
[0093] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. A person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A flash memory controller for controlling a flash memory, characterized in that: The flash memory includes a first chip enable space, and the flash memory controller includes: a control logic circuit coupled to the first chip enable space of the flash memory through at least one channel to transfer data and commands; and a processor coupled to the control logic circuit to access the first chip enable space on the channel through the control logic circuit, wherein the processor controls the control logic circuit to transmit a programming command sequence to the first chip enable space through the channel; and The programming command sequence includes a first command and a second command, wherein the first command is used to instruct the first chip enable space to write storage data and read operating temperature information, and in response to the transmission of the second command, the processor controls the control logic circuit to receive the operating temperature information from the first chip enable space.
2. The flash memory controller according to claim 1, wherein: The writing of the storage data and the reading of the operating temperature information are adjacent to each other in terms of timing.
3. The flash memory controller according to claim 1, wherein: The second command includes a polling command.
4. The flash memory controller according to claim 1, wherein: The flash memory further includes a second chip enable space. After the processor controls the control logic circuit to transmit the first command to the first chip enable space through the channel and before transmitting the second command to the first chip enable space, the processor controls the control logic circuit to transmit another first command to the second chip enable space through the channel.
5. The flash memory controller according to claim 4, wherein: The transmission of the first command and the transmission of the address receiving command corresponding to the other first command are adjacent to each other in timing.
6. The flash memory controller according to claim 1, wherein: After the processor controls the control logic circuit to receive the operating temperature information from the first chip enable space, the processor controls the control logic circuit to immediately transmit an address receive command corresponding to a data programming command or an address receive command corresponding to another first command to the first chip enable space through the channel.
7. The flash memory controller according to claim 1, wherein: The flash memory controller operates in a cache access mode.
8. The flash memory controller according to claim 1, wherein: Another program command sequence located before or after the program command sequence does not include a command for instructing the first chip enabling space to read another operating temperature information.
9. The flash memory controller according to claim 1, wherein: The control logic circuit communicates with the flash memory using a communication protocol compatible with an Open NAND Flash Interface (ONFI).
10. The flash memory controller according to claim 9, wherein: The first command and the second command are selected from an ONFI command set.
11. A data programming method, executed by a flash memory controller coupled to a flash memory, characterized in that: The flash memory includes a first chip enable space, the flash memory controller is coupled to the first chip enable space of the flash memory through at least one channel to transmit data and commands, and the data programming method includes: Transmitting a first command to the first chip enable space through the channel, wherein the first command is used to instruct the first chip enable space to write storage data and read operating temperature information; transmitting a second command to the first chip enable space through the channel; and In response to the transmission of the second command, the operating temperature information is received from the first chip enabling space.
12. The data programming method according to claim 11, characterized in that: The writing of the storage data and the reading of the operating temperature information are adjacent to each other in terms of timing.
13. The data programming method according to claim 11, characterized in that: The execution order of the first command is before the second command.
14. The data programming method according to claim 11, characterized in that: The flash memory further includes a second chip enable space, and after the flash memory controller transmits the first command to the first chip enable space through the channel and before transmitting the second command to the first chip enable space, the data programming method further includes: Another first command is transmitted to the second chip enable space through the channel.
15. The data programming method according to claim 14, characterized in that: The transmission of the first command and the transmission of the address receiving command corresponding to the other first command are adjacent to each other in timing.
16. The data programming method according to claim 11, characterized in that: After the flash memory controller receives the operating temperature information from the first chip enabling space, the data programming method further includes: An address receiving command corresponding to a data programming command or an address receiving command corresponding to another first command is immediately transmitted to the first chip enabling space through the channel.
17. The data programming method according to claim 11, characterized in that: The flash memory controller operates in a cache access mode.
18. The data programming method according to claim 11, characterized in that: The first command and the second command are combined into a programming command sequence, and another programming command sequence located before or after the programming command sequence does not include a command for instructing the first chip enabling space to read another operating temperature information.
19. The data programming method according to claim 11, characterized in that: The flash memory controller communicates with the flash memory using a communication protocol compatible with an Open NAND Flash Interface (ONFI).
20. The data programming method according to claim 19, characterized in that: The first command and the second command are selected from an ONFI command set.
