Drawings
The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
FIG. 1 is a circuit block diagram of a memory controller according to an embodiment of the invention;
FIG. 2 is a circuit block diagram of a memory controller according to an embodiment of the invention;
FIG. 3 is a flow chart of a control method according to an embodiment of the invention;
fig. 4 is a flowchart of a control method according to an embodiment of the invention.
Description of the reference numerals
10, A host device;
11. a memory controller;
A flash memory;
110. 210, checking a circuit;
111. 211, a selection circuit;
112, a processor;
2100 voltage level setting circuit;
2101, a confirmation result judging circuit;
2110-2112;
DS1, DS 2;
DS2 Cont, checking a result custom signal;
LDO 1-LDOx voltage conversion circuit;
MS, mode selection signal;
RSC, reset acknowledgement signal;
S1, S2 and S3, setting signals;
s2_en, mode enable signal;
S31-S34, S41-S46;
VC 1-VCx, power supply confirmation signal;
Vext, external voltage;
VS, converting the setting signal;
VS1 to VSx, the power supply voltage.
Detailed Description
FIG. 1 is a block diagram of a memory controller 11 according to an embodiment of the invention. Generally, the memory controller 11 is coupled between the flash memory 12 and the host device 10. The memory controller 11 can receive the external voltage Vext provided by the host device 10 and the externally input setting signals S1 and S2, and correspondingly convert the external voltage Vext into a suitable voltage level, so as to drive the operations of the flash memory 12 and the internal circuits of the memory controller 11. In practical applications, the external voltage Vext provided by the host device 10 of different specifications is different, so that the memory controller 10 connected between the host device 10 and the flash memory 12 plays an important role, and is responsible for adaptively performing voltage conversion between the host device 10 of different specifications and voltage requirements and the flash memory 12, so as to better region the flash memory 12 and further increase the system compatibility of the flash memory 12.
In detail, the host device 10 may be a Secure Digital (SD) memory card, an embedded multimedia card (embedded MultiMedia Card, eMMC), a universal serial bus (Universal Serial Bus, USB), a universal flash memory storage (Universal Flash Storage, UFS), a Non-volatile memory communication protocol (Non-Volatile Memory Express, NVMe), or other host devices 10 of suitable specifications. Further, the host device 10 may provide an external voltage Vext to the memory controller 11. Meanwhile, the voltage combination set by the user or the system requirement is indicated by externally inputting the first setting signal S1 and the second setting signal S2 to the memory controller 11.
In some embodiments, the memory controller 11 can receive the external voltage Vext and generate the appropriate first power voltage VS1 and the second power voltage VS2 according to the first setting signal S1, respectively for driving the core circuit blocks in the flash memory 12. On the other hand, each time the memory controller 11 is started or restarted, it is necessary to recheck the voltage of the external voltage Vext to confirm that the converted power supply voltages have reached the system requirements. In this embodiment, the memory controller 11 can also operate in different modes according to the second setting signal S2, and check the levels of the converted power voltages VS1 to VSx (including the first power voltage VS1 and the second power voltage VS 2) in different manners according to the setting. When operating in the first mode, the memory controller 11 can check all the converted power supply voltages VS 1-VSx one by one through the internal processor 112 in a software operation mode. When operating in the second mode, the memory controller 11 can check the converted power supply voltages VS 1-VSx in hardware through its internal circuits.
In some embodiments, the memory controller 11 includes a plurality of voltage conversion circuits LDO 1-LDOx, a checking circuit 110, a selecting circuit 111, and a processor 112. The voltage conversion circuits LDO 1-LDOx can be used for receiving an external voltage Vext to generate a plurality of power voltages VS 1-VSx, wherein the power voltages include a first power voltage VS1, a second power voltage VS2 and a third power voltage VS3. The first power voltage VS1 and the second power voltage VS2 can be provided to the flash memory 12 for driving, for example, the flash memory core circuit block and the input/output circuit block, respectively. The third power voltage VS3 (i.e., the internal power voltage) may be provided to the memory controller 11 for driving, and is, for example, a basic power voltage for driving the memory controller 11 to operate. In some embodiments, each of the voltage converting circuits LDOs 1-LDOx may be, for example, a low dropout converting circuit (low dropout circuit), a buck converter (buck converter), or other suitable circuits for stepping down the external voltage Vext to an appropriate voltage level. In this embodiment, the number x of the voltage converting circuits LDOs 1 to LDOx can be adjusted according to the number of power supply voltages required by the system or the number of divided voltage domains (voltage domains).
Further, the checking circuit 110 is coupled to the voltage converting circuits LDO 1-LDOx, and the checking circuit 110 can generate a plurality of conversion setting signals VS according to the first setting signal S1 for controlling and setting the operation of the voltage converting circuits LDO 1-LDOx, so that the voltage converting circuits LDO 1-LDOx can convert and generate the power voltage according to the specifications of the host device 10 and the flash memory 12. In detail, each of the voltage converting circuits LDOs 1 to LDOx can independently operate and generate a different power supply voltage, which can have the same or different voltage levels. The first voltage converting circuit LDO1 and the second voltage converting circuit LDO2 (not explicitly shown in FIG. 1) among the voltage converting circuits LDO 1-LDOx can generate power supply voltages VS1 and VS2, respectively, for driving the core circuit blocks and the input/output circuit blocks in the flash memory 12, respectively. In addition, the third voltage conversion circuit LDO3 (not explicitly shown in fig. 1) can generate the third power voltage VS3 required by the memory controller 11. In addition, each time the power-on or the power-off of the external voltage Vext is performed, the memory controller 11 needs to determine whether each of the power supply voltages VS1 to VSx reaches or exceeds the corresponding voltage threshold. More specifically, the voltage conversion circuits LDO 1-LDOx can sense the power supply voltages VS 1-VSx generated by themselves respectively to determine whether each power supply voltage VS 1-VSx exceeds the corresponding voltage threshold value, and generate corresponding power supply confirmation signals VC 1-VCx accordingly.
In some embodiments, the first setting signal S1 and the second setting signal S2 can be provided in real time from outside or written in advance to the memory controller 11, thereby controlling the operation of the memory controller 11. For example, the first setting signal S1 and the second setting signal S2 may be obtained by reading a pre-written electronic fuse (efuse). Alternatively, the first setting signal S1 and the second setting signal S2 may be obtained by, for example, reading the voltage level connected to the corresponding pad (pad) and the bonding wire (bonding wire). Alternatively, the first setting signal S1 and the second setting signal S2 may be provided in real time by an external device that is the same as or different from the host device 10, for example.
Further, the checking circuit 110 is coupled to the voltage converting circuits LDO 1-LDOx, and the checking circuit 110 can generate a first checking signal DS1 and a second checking signal DS2 according to the power confirming signals VC 1-VCx, wherein the first checking signal DS1 corresponds to the third power confirming signal VC3, which contains checking information of the third power voltage VS3 for driving the processor 112. The second inspection signal DS2 corresponds to the power supply confirm signals VC 1-VCx of all the power supply voltages VS1-VSx, and comprises inspection information of all the power supply voltages VS1-VSx. Further, the checking circuit 110 may generate the mode selection signal MS according to the second setting signal S2, and provide the mode selection signal MS, the first checking signal DS1, and the second checking signal DS2 to the selecting circuit 111.
The selection circuit 111 is coupled to the inspection circuit 110. The selection circuit 111 may select the first check signal DS1 or the second check signal DS as the reset confirm signal RSC according to the mode select signal MS and output to the processor 112. More specifically, when the memory controller 11 is operating in the first mode, the processor 112 is used to check the power confirm signals VC 1-VCx. In this case, to ensure that the processor 112 can first obtain a stable supply voltage for inspection, the inspection circuit 110 may first inspect only the supply voltage received by the processor 112. In this embodiment, the processor 112 operates in need of the third supply voltage VS3. Therefore, the checking circuit 110 outputs the power confirmation signal VC3 generated by the voltage converting circuit LDO3 checking the third power voltage VS3 as the first checking signal DS1, and provides the first checking signal DS1 to the selecting circuit 111. In addition, when the memory controller 11 is operating in the second mode, all the power confirm signals VC 1-VCx are checked by the checking circuit 110 in a hardware circuit mode, and the second checking signal DS2 is generated according to all the power confirm signals VC 1-VCx.
On the other hand, the second setting signal S2 indicates whether the memory controller 11 is to check the power supply voltages VS1 to VSx in a software manner or a hardware manner. In this case, the checking circuit 110 can generate the mode selection signal MS according to the second setting signal S2 to inform the selecting circuit 111 whether the host device 10 is to instruct the software or hardware to check the power supply voltages VS 1-VSx. When the second setting signal S2 indicates to check the power voltages VS1 to VSx in a software manner, the memory controller 11 is controlled to operate in the first mode, and the selection circuit 111 outputs the first check signal DS1 as the reset confirm signal RSC according to the mode select signal MS, so that the processor 112 checks all the power confirm signals VC1 to VCx after the reset confirm signal RSC indicates that the third power voltage VS3 is ready. In addition, when the second setting signal S2 indicates to check the power supply voltages VS1 to VSx in hardware, the memory controller 11 is controlled to operate in the second mode, and the checking circuit 110 checks all the power supply confirm signals VC1 to VCx simultaneously, and generates the corresponding second checking signal DS2 accordingly. The selection circuit 111 outputs the second checking signal DS2 as a reset acknowledge signal RSC in the second mode according to the mode selection signal MS, thereby indicating the checking result of the processor 112 with respect to the checking circuit 110.
Under control of the reset acknowledge signal RSC, the processor 112 performs operations corresponding to the first mode and the second mode. Specifically, when the memory controller 11 is operated in the first mode and the reset confirm signal RSC indicates that the basic operating voltage VS3 is ready, the processor 112 executes a software program to check the power confirm signals VC 1-VCx sequentially, so as to ensure that the driving and the reading/writing operation of the flash memory 12 are performed after the power voltages VS 1-VSx are greater than or equal to their corresponding voltage thresholds. In addition, when the memory controller 11 is operated in the second mode and the reset acknowledge signal RSC indicates that all the power voltages VS 1-VSx are ready, the processor 112 can immediately start driving and performing the read/write operation of the flash memory 12.
FIG. 2 is a block diagram of a memory controller 21 according to an embodiment of the invention. The memory controller 21 of fig. 2 is similar to the memory controller 11 of fig. 1, and is used for illustrating the internal circuit structures of the checking circuit 210 and the selecting circuit 211 in the memory controller 21, so the same elements are denoted by the same symbols, and the description thereof is omitted herein.
In this embodiment, the memory controller 21 includes a checking circuit 210, a selecting circuit 211, a processor 112 and voltage converting circuits LDOs 1-LDOx. Further, the inspection circuit 210 includes a voltage level setting circuit 2100 and a confirmation result judging circuit 2101. Specifically, the voltage level setting circuit 2100 receives the first setting signal S1 and the second setting signal S2. The voltage level setting circuit 2100 can generate a switching setting signal VS according to the first setting signal, so as to adaptively adjust the voltage switching circuits LDO 1-LDOx to generate the power supply voltages VS 1-VSx required by the system. Further, the voltage level setting circuit 2100 may provide the mode information MI to the confirmation result judging circuit 2101 according to the second setting signal S2.
In this embodiment, the confirmation result determining circuit 2101 receives the third setting signal S3 from the host device 10 and the mode enabling signal s2_en and the inspection result custom signal ds2_cont from the processor 112 in addition to the power confirmation signals VC1 to VCx and the mode information MI related to the second setting signal S2 from the voltage level setting circuit 2100. In detail, the third setting signal S3 includes an output time of the reset acknowledge signal RSC, i.e. how long the operation time is needed to wait after the start or the restart, and the output time of the reset acknowledge signal RSC is generally related to the ramp-up slope and the acknowledge time required by the power acknowledge signals VC1 to VCx. The mode enable signal s2_en contains information about whether the memory controller 21 is allowed to operate in the second mode, i.e. whether the memory controller 21 is open to perform the confirmation determination of the power supply voltage in hardware. Finally, the check result custom signal ds2_cont is a power confirm signal that is asserted by the system or user to define the memory controller 21 to check in the second mode. For example, in some embodiments, the determining circuit 2101 may receive all the power confirm signals VC 1-VCx through an AND gate to determine whether all the power confirm signals VC 1-VCx are ready, and generate the second check signal DS2 accordingly. However, in some other embodiments, the determining circuit 2101 can select a part of the selected power confirm signals from the power confirm signals VC 1-VCx according to the checking result custom signal ds2_cont, so as to determine whether the selected power confirm signals are ready, and generate the second checking signal DS2 accordingly.
The selection circuit 211 includes an and gate 2110, an exclusive or gate 2111, and an or gate 2112. The first input of the and gate 2110 receives the mode information MI and the second input receives the first check signal DS1. The exclusive or gate 2111 has a first input receiving the mode information MI and a second input receiving the second check signal DS2. And, the outputs of the and gate 2110 and the exclusive-or gate 2111 are respectively connected to the first input and the second input of the or gate 2112 to generate the reset acknowledge signal RSC at the output of the or gate 2112. In detail, when the mode enable signal s2_en indicates that the memory controller 21 opens the second mode, the selection circuit 211 selectively selects the first check signal DS1 or the second check signal DS2 as the reset confirm signal RSC according to the control of the second set signal S2. In contrast, when the mode enable signal s2_en indicates that the memory controller 21 does not open the second mode, the determination result determining circuit 2101 may operate only the mode selection signal MS in the first mode according to the mode enable signal s2_en, so that the selection circuit 211 outputs the first check signal DS1 as the reset determination signal RSC according to the mode selection signal MS. Although an implementation in which the selection circuit 211 is implemented with an and gate 2110, an exclusive or gate 2111, and an or gate 2112 is shown in fig. 2. It should be understood that the circuit structure in fig. 3 is only one implementation of various alternative embodiments of the present invention, and those skilled in the art can naturally change the circuit structure by themselves, and the same result can be achieved by different circuit structures. For example, the selection circuit 211 may be realized by a multiplexer, as long as it can selectively output the first check signal DS1 or the second check signal DS2 as the reset acknowledge signal RSC.
Fig. 3 is a flowchart of a control method according to an embodiment of the invention. The flowchart shown in fig. 3 can be applied to the memory controllers 11, 21 shown in fig. 1,2, and the operation contents with respect to the memory controllers 11, 21 can be generalized to the flowchart shown in fig. 3. The flowchart shown in FIG. 3 includes steps S31-S34. In step S31, the memory controller 11/21 receives the external voltage Vext and converts the external voltage Vext into a plurality of power voltages VS 1-VSx. In step S32, the memory controller 11/21 can detect the levels of the converted power supply voltages VS 1-VSx to generate corresponding power supply confirmation signals VC 1-VCx, respectively. In step S33, the memory controller 11/21 generates a first check signal DS1 and a second check signal DS2 according to the power confirm signals VC 1-VCx, wherein the first check signal DS1 corresponds to a third power voltage VS3 among the power voltages, and the second check signal DS2 corresponds to all the power voltages. Finally, the memory controller 11/21 may selectively output the first check signal DS1 or the second check signal DS2 as the reset confirm signal RSC. For details of the control method shown in fig. 3, please refer to the description of the memory controllers 11 and 21 in the above paragraphs, and the detailed description is omitted here.
Fig. 4 is a flowchart of a control method according to an embodiment of the invention. The flow chart shown in fig. 4 can be applied to the memory controllers 11, 21 shown in fig. 1,2, and the operation contents concerning the memory controllers 11, 21 can also be generalized to the flow chart shown in fig. 4. The flowchart shown in FIG. 4 includes steps S41-S46. In step S41, the memory controller 11/21 can set the first voltage conversion circuit LDO1 and the second voltage conversion circuit LDO2 of the flash memory 12 according to the first setting signal S1. In step S42, the memory controller 11/21 receives the external voltage Vext and converts the external voltage Vext into a plurality of power voltages VS1-VSx. In step S43, the memory controller 11/21 can detect the levels of the power voltages VS 1-VSx to generate the corresponding power confirmation signals VC 1-VCx, respectively. In step S44, the memory controller 11/21 may determine in which operation mode the memory controller 11/21 is controlled according to the second setting signal. When the memory controller 11/21 determines that the memory controller 11/21 is controlled in the first mode, the process proceeds to step S45, where the memory controller 11/21 can check the power supply voltages VS 1-VSx in a software manner through the processor 112. Conversely, when the memory controller 11/21 determines that the memory controller 11/21 is controlled in the second mode, the process proceeds to step S46, where the memory controller 11/21 can check the power supply voltages VS1 to VSx in hardware through the checking circuit 110.
In summary, the memory controller and the control method of the present invention provide for checking the power supply voltage by means of software or hardware. Compared with the process of checking all power supply voltages one by one in a software mode through a processor, the process of checking all power supply voltages one by one can be omitted by checking the power supply voltages in a hardware mode, and the checking speed of the memory controller after starting or restarting is effectively improved.