This application claims the benefit of People's Republic of China Patent Application No. 201710948855.0, filed Oct. 12, 2017, the subject matter of which is incorporated herein by reference.
The present invention relates to a solid state drive, and more particularly to a solid state drive with a reset circuit and a reset method thereof.
As known, the internal buses of the computer system in the early stage include an advanced graphic port (AGP) bus and a peripheral component Interconnect (PCI) bus. The AGP bus is connected with a graphic card. The PCI bus is connected with a peripheral device such as an internet card.
Since the data transmission speed of a PCI Express (PCIe) bus is fast, the conventional AGP bus and the conventional PCI bus are replaced by the PCIe bus. In other words, the internal devices of the computer system are all connected with the PCIe buses.
For example, the graphic card and the solid state drive (SSD) of the existing computer system are connected with the PCIe buses.
Moreover, the solid state drive 100 comprises a controlling circuit 110 and a flash array 105. The controlling circuit 110 is connected with the flash array 105.
The controlling circuit 110 comprises a PCIe physical layer circuit 112, which is also referred as a PCIe PHY circuit. The host 130 comprises a PCIe physical layer circuit 132. The PCIe physical layer circuit 112 of the controlling circuit 110 and the PCIe physical layer circuit 132 of the host 130 are connected with each other through the PCIe bus 120.
Consequently, the host 130 may issue an access command to the controlling circuit 110 of the solid state drive 100 through the PCIe bus 120. For example, according to a write command, a write data from the host 130 is stored into the flash array 105 under control of the controlling circuit 110. Alternatively, according to a read command, a read data is read from the flash array 105 and transmitted to the host 130 under control of the controlling circuit 110.
According to the specifications of the PCIe bus 120, one of plural control signals from the PCIe bus 120 is a reset signal. As shown in
According to the specifications of the PCIe bus 120, the reset signal of the PCIe bus 120 has the highest priority to be processed. That is, when the reset terminal RESET2# of the PCIe physical layer circuit 112 of the controlling circuit 110 receives the reset signal, the PCIe physical layer circuit 112 of the controlling circuit 110 has to be reset immediately. Generally, the PCIe physical layer circuit 132 of the host 130 can activate the reset signal at any time. If the host 130 activates the reset signal while the PCIe physical layer circuit 112 of the controlling circuit 110 is executing the access command, the PCIe physical layer circuit 112 of the controlling circuit 110 is reset compulsively. Consequently, the data that is being processed by the controlling circuit 110 is possibly suffered from corruption. Under this circumstance, the solid state drive 100 is suffered from unrecoverable injury.
An embodiment of the present invention provides a solid state drive with a reset circuit. The solid state drive is connected with a host through a bus. The host has a first reset terminal. The solid state drive includes a controlling circuit, a flash array and a buffer. The controlling circuit includes a physical layer circuit and a first input/output port corresponding to the bus. The physical layer circuit has a second reset terminal. The first reset terminal of the host is connected with the first input/output port. The physical layer circuit is reset according to a level state of the second reset terminal. The flash array is connected with the controlling circuit. The buffer is connected with the controlling circuit. When the first reset terminal of the host activates a reset signal, a voltage level of the first input/output port is changed from a first level to a second level. After a delay time, the voltage level of the second reset terminal of the physical layer circuit is changed from a third level to a fourth level and the physical layer circuit is reset.
Another embodiment of the present invention provides a reset method for a solid state drive with a reset circuit. The solid state drive is connected with a host through a bus. The host has a first reset terminal. The solid state drive includes a control circuit. The control circuit includes a physical layer circuit and a first input/output port corresponding to the bus. The physical layer circuit has a second reset terminal. Firstly, the controlling circuit judges whether a voltage level of the first input/output port is changed from a first level to a second level. The first input/output port is connected with the first reset terminal of the host. Then, a voltage level of the second reset terminal of the physical layer circuit is changed from a third level to a fourth level after the voltage level of the first input/output port has been changed to the second level for a delay time. Then, the physical layer circuit is reset. If the controlling circuit judges that the voltage level of the first input/output port is changed to the second level, the controlling circuit stops receiving a command from the host temporarily and a data that is being processed by the physical layer circuit is stored in a buffer of the solid state drive temporarily.
Numerous objects, features and advantages of the present invention will be readily apparent upon a reading of the following detailed description of embodiments of the present invention when taken in conjunction with the accompanying drawings. However, the drawings employed herein are for the purpose of descriptions and should not be regarded as limiting.
The above objects and advantages of the present invention will become more readily apparent to those ordinarily skilled in the art after reviewing the following detailed description and accompanying drawings, in which:
The solid state drive 200 comprises a controlling circuit 210, a flash array 205 and a buffer 208. The controlling circuit 210 is connected with the flash array 205 and the buffer 208. For example, the buffer 208 is a dynamic random access memory (DRAM).
The controlling circuit 210 comprises a PCIe physical layer circuit 212, which is also referred as a PCIe PHY circuit. The PCIe physical layer circuit 212 has a reset terminal RESET2#. Moreover, the controlling circuit 210 further comprises two I/O ports. For example, the two I/O ports are general purpose I/O ports GPIO1 and GPIO2.
In this embodiment, the general purpose I/O port GPIO1 of the controlling circuit 210 is directly connected with the reset terminal RESET1# of the PCIe physical layer circuit 132 of the host 130 through a physical wire. The general purpose I/O port GPIO1 of the controlling circuit 210 and the reset terminal RESET1# of the PCIe physical layer circuit 132 of the host 130 have the same voltage level. The general purpose I/O port GPIO2 of the controlling circuit 210 is directly connected with the reset terminal RESET2# of the PCIe physical layer circuit 212 of the controlling circuit 210. The general purpose I/O port GPIO2 of the controlling circuit 210 and the reset terminal RESET2# of the PCIe physical layer circuit 212 have the same voltage levels.
While the host 130 performs an ordinary operation on the solid state drive 200 such as a data accessing operation, the general purpose I/O port GPIO1 of the controlling circuit 210 and the reset terminal RESET1# of the PCIe physical layer circuit 132 of the host 130 have the same voltage level (e.g., a first level). In addition, the general purpose I/O port GPIO2 of the controlling circuit 210 and the reset terminal RESET2# of the PCIe physical layer circuit 212 of the controlling circuit 210 have the same voltage level (e.g., a second level). The first level and the second level are identical or different.
When the PCIe physical layer circuit 132 of the host 130 activates the reset signal through the reset terminal RESET1#, the voltage level at the general purpose I/O port GPIO1 of the controlling circuit 210 is changed to a third level. The third level is different from the first level. After a delay time, the voltage level at the reset terminal RESET2# of the PCIe physical layer circuit 212 of the controlling circuit 210 is changed to a fourth level. The fourth level is different from the second level.
In an embodiment, the first level and the second level are voltage levels in a high level state. An implementation example of the present invention will be described as follows.
When the host 130 intends to reset the PCIe physical layer circuit 212 of the controlling circuit 210, the PCIe physical layer circuit 132 of the host 130 activates the reset signal through the reset terminal RESET1#. That is, the reset terminal RESET1# of the PCIe physical layer circuit 132 of the host 130 is switched from the high level state (e.g., the first level) to the low level state (e.g., the third level). Consequently, the general purpose I/O port GPIO1 of the controlling circuit 210 is switched from the high level state (e.g., the first level) to the low level state (e.g., the third level). According to the level state of the general purpose I/O port GPIO1, the controlling circuit 210 judges whether the reset signal is received.
After a delay time, the controlling circuit 210 activates a control signal of the general purpose I/O port GPIO2. That is, after the delay time, the general purpose I/O port GPIO2 is switched from the high level state (e.g., the second level) to the low level state (e.g., the fourth level). Consequently, the reset terminal RESET2# of the PCIe physical layer circuit 212 of the controlling circuit 210 is switched from the high level state (e.g., the second level) to the low level state (e.g., the fourth level). According to the level state of the reset terminal RESET2#, the controlling circuit 210 resets the PCIe physical layer circuit 212 of the controlling circuit 210 according to the level state of the reset terminal RESET2#.
When the general purpose I/O port GPIO1 of the controlling circuit 210 receives the reset signal and the general purpose I/O port GPIO1 of the controlling circuit 210 is switched from the high level state (e.g., the first level) to the low level state (e.g., the third level), the controlling circuit 210 performs a data protecting operation. For example, the controlling circuit 210 stops receiving the command from the host 130 temporarily. In addition, the data that is being processed by the PCIe physical layer circuit 212 is temporarily stored in the buffer 208 by the controlling circuit 210. As mentioned above, the controlling circuit 210 detects the level state of the general purpose I/O port GPIO1 to judge if whether the reset signal is received and accordingly to perform the data protecting operation.
Please refer to
At the time point ta, the host 130 activates the reset signal through the reset terminal RESET1#. That is, at the time point ta, the reset terminal RESET1# of the PCIe physical layer circuit 132 of the host 130 is switched from the high level state to the low level state. Since the general purpose I/O port GPIO1 of the controlling circuit 210 is connected with the reset terminal RESET1#, the general purpose I/O port GPIO1 is also switched from the high level state to the low level state. According to the level state of the general purpose I/O port GPIO1, the controlling circuit 210 judges whether the reset signal is received. When the controlling circuit 210 confirms that the reset signal is received, the controlling circuit 210 performs the data protecting operation.
After a delay time Td (i.e., at the time point tb), the general purpose I/O port GPIO2 is switched from the high level state to the low level state under control of the controlling circuit 210. Since the reset terminal RESET2# of the PCIe physical layer circuit 212 of the controlling circuit 210 is connected with the general purpose I/O port GPIO2, the reset terminal RESET2# of the PCIe physical layer circuit 212 of the controlling circuit 210 is also switched from the high level state to the low level state. And, the PCIe physical layer circuit 212 of the controlling circuit 210 is reset according to the level state of the reset terminal RESET2#.
The controlling circuit 210 performs the data protecting operation during the delay time Td. For example, during the delay time Td, the controlling circuit 210 stops receiving the command from the host 130 temporarily. In addition, the data that is being processed by the PCIe physical layer circuit 212 is temporarily stored in the buffer 208 by the controlling circuit 210. After the PCIe physical layer circuit 212 is reset and operated again, the PCIe physical layer circuit 212 retrieves the processed data from the buffer 208 and continuously processes the data. Consequently, the data corruption problem of the solid state drive 200 can be effectively overcome.
The solid state drive 300 comprises a controlling circuit 310, a flash array 305, a buffer 308 and a delaying circuit 330. The controlling circuit 310 is connected with the flash array 305 and the buffer 308. For example, the buffer 308 is a dynamic random access memory (DRAM).
The controlling circuit 310 comprises a PCIe physical layer circuit 312. The PCIe physical layer circuit 312 has a reset terminal RESET2#. Moreover, the controlling circuit 310 further comprises an I/O port such as a general purpose I/O port GPIO1.
In this embodiment, the general purpose I/O port GPIO1 of the controlling circuit 310 is directly connected with the reset terminal RESET1# of the PCIe physical layer circuit 132 of the host 130 through a physical wire. Moreover, the delaying circuit 330 is connected with the reset terminal RESET2# of the PCIe physical layer circuit 312 of the controlling circuit 310 and the reset terminal RESET1# of the PCIe physical layer circuit 132 of the host 130.
While the host 130 performs an ordinary operation on the solid state drive 300 such as a data accessing operation, the general purpose I/O port GPIO1 of the controlling circuit 310 and the reset terminal RESET1# of the PCIe physical layer circuit 132 of the host 130 have the same voltage level (e.g., a first level). In addition, the reset terminal RESET2# of the PCIe physical layer circuit 312 of the controlling circuit 310 has a second level. The first level and the second level are identical or different
Similarly, when the PCIe physical layer circuit 132 of the host 130 activates the reset signal through the reset terminal RESET1#, the voltage level at the general purpose I/O port GPIO1 of the controlling circuit 310 is changed to a third level. The third level is different from the first level. After a delay time, the voltage level at the reset terminal RESET2# of the PCIe physical layer circuit 312 of the controlling circuit 310 is changed to a fourth level. The fourth level is different from the second level.
In an embodiment, the first level and the second level are voltage levels in a high level state. An implementation example of the present invention will be described as follows.
When the host 130 intends to reset the PCIe physical layer circuit 312 of the controlling circuit 310, the PCIe physical layer circuit 132 of the host 130 activates the reset signal through the reset terminal RESET1#. That is, the reset terminal RESET1# of the PCIe physical layer circuit 132 of the host 130 is switched from the high level state (e.g., the first level) to the low level state (e.g., the third level). Consequently, the general purpose I/O port GPIO1 of the controlling circuit 310 is switched from the high level state (e.g., the first level) to the low level state (e.g., the third level). When the controlling circuit 310 confirms that the reset signal is received according to the level state of the general purpose I/O port GPIO1, the controlling circuit 310 performs a data protecting operation.
When the PCIe physical layer circuit 132 of the host 130 activates the reset signal through the reset terminal RESET1#, the delaying circuit 330 also receives the reset signal. After the delaying circuit 330 provides a delay time, the reset terminal RESET2# of the PCIe physical layer circuit 312 of the controlling circuit 310 is switched from the high level state (e.g., the second level) to the low level state (e.g., the fourth level). And, the PCIe physical layer circuit 312 of the controlling circuit 310 is reset according to level state of the reset terminal RESET2#. In this embodiment, after the delaying circuit 330 provides the delay time, the delaying circuit 330 issues a signal to switch the level state of the reset terminal RESET2# of the PCIe physical layer circuit 312 of the controlling circuit 310.
Similarly, when the general purpose I/O port GPIO1 of the controlling circuit 310 receives the reset signal and the general purpose I/O port GPIO1 of the controlling circuit 310 is switched from the high level state (e.g., the first level) to the low level state (e.g., the third level), the controlling circuit 310 performs the data protecting operation. For example, the controlling circuit 310 stops receiving the command from the host 130 temporarily. In addition, the data that is being processed by the PCIe physical layer circuit 312 is temporarily stored in the buffer 308 by the controlling circuit 310.
During the delay time, the controlling circuit 310 performs the data protecting operation. After the PCIe physical layer circuit 312 is reset and operated again, the PCIe physical layer circuit 312 retrieves the processed data from the buffer 308 and continuously processes the data. Consequently, the data corruption problem of the solid state drive 300 can be effectively overcome.
According to the specifications of the PCIe bus, the voltage level at the reset terminal RESET1# of the PCIe physical layer circuit 132 of the host 130 needs to be changed for at least a specified time period Ta when the reset signal is activated. For example, the time period Ta is 100 μs. In an embodiment, the delay time is set as Ta/2, i.e., 50 μs. Consequently, in case that the clock signal is operated at an operation speed of 500 MHz, the controlling circuit 310 has the sufficient time to perform the data protecting operation. Under this circumstance, the processed data can be safely stored in the buffer before the PCIe physical layer circuit 312 of the controlling circuit 310 being reset.
After the voltage level at the reset terminal RESET1# of the PCIe physical layer circuit 132 of the host 130 has been changed for the specified time period Ta, the voltage level at the reset terminal RESET1# is restored to the original voltage level corresponding to the ordinary operation. Moreover, the voltage level at the reset terminal RESET2# of the PCIe physical layer circuit 212 (or 312) of the controlling circuit 210 (or 310) is also restored to the original voltage level corresponding to the ordinary operation.
From the above descriptions, the present invention provides a solid state device with a reset circuit and a reset method. When the host intends to reset the physical layer circuit, the controlling circuit of the solid state drive judges whether the reset signal is received according to the level state of the I/O port. When the controlling circuit confirms that the reset signal is received, the controlling circuit performs the data protecting operation. After a delay time, the level state at the reset terminal of the physical layer circuit of the controlling circuit is changed. Consequently, the physical layer circuit is reset. In such way, the data corruption problem of the solid state drive can be effectively overcome. Moreover, the timing of changing the voltage level of the reset terminal of the physical layer circuit of the controlling circuit can be controlled by the controlling circuit or determined by the delaying circuit.
While the invention has been described in terms of what is presently considered to be the most practical and preferred embodiments, it is to be understood that the invention needs not be limited to the disclosed embodiment. On the contrary, it is intended to cover various modifications and similar arrangements included within the spirit and scope of the appended claims which are to be accorded with the broadest interpretation so as to encompass all such modifications and similar structures.
Number | Date | Country | Kind |
---|---|---|---|
201710948855.0 | Oct 2017 | CN | national |