Patent Description:
<CIT> discloses the following solution: upon transmitting a request or data packet from a packet transmission part of a transmission part, a device saves the packet in replay buffer of a replay buffer control part, then determines whether to retransmit the packet held in replay buffer according to whether a DLLP such as an Ack/Nak packet transmitted from the destination opposite device in response to the transmitted packet is received by a reception part within a preset timer setting value, replay time, and counts the time elapsed from the packet transmission to the DLLP reception in response to the packet with a first counter, and corrects the timer setting value, replay time, according to the counter value.

As per the UFS specification (e.g., version <NUM>) published by the Joint Electron Device Engineering Council (JEDEC), when a data link layer of an initiator device transmits a data frame to a data link layer of a target device, the initiator device starts a replay timer with a dedicated time period (<NUM>) per traffic data at the end of every data frame transmission. The replay timer serves to identify an Acknowledgement and Flow Control (AFC) frame or a Negative Acknowledgement (NAC) frame for the transmitted data frame received within the dedicated time period. If the AFC frame or NAC frame is not received within the dedicated time period, the initiator device assumes there is a problem with a link between the initiator device and the target device.

<FIG> shows a normal operating scenario in which an initiator device <NUM> transmits the data frame to a target device <NUM> and the initiator device <NUM> receives the AFC frame from the target device <NUM> before expiry of the replay timer, according to prior art. At S102, a transmitter <NUM> of the initiator device <NUM> transmits the data frame to the receiver <NUM> of the target device <NUM>. After transmitting the data frame, the initiator device <NUM> starts the replay timer. At S104, the receiver <NUM> of the target device <NUM> receives the data frame and sends the AFC frame to a transmitter <NUM> of the target device <NUM>. At S106, the transmitter <NUM> of the target device <NUM> sends the AFC frame to the transmitter <NUM> of the initiator device <NUM>. Once the AFC frame is received at the initiator device <NUM>, the initiator device <NUM> stops the replay timer. Consider a scenario, when the AFC frame is not received, at the initiator device <NUM>, within the dedicated time period, the initiator device <NUM> waits for the expiry of the replay timer. After expiry of the replay timer, the initiator device <NUM> assumes there is a problem with the link between the initiator device <NUM> and the target device <NUM>. Further, the initiator device <NUM> initiates a link re-initialization between the initiator device <NUM> and the target device <NUM> to transmit the data frame from the initiator device <NUM> to the target device <NUM>. However, up to expiry of the replay timer, the initiator device <NUM> waits for the AFC frame from the target device <NUM>. Hence, the initiator device <NUM> wastes the power and resources (e.g., bandwidth). This problem is explained with reference to <FIG>.

<FIG> shows a problem scenario in which the initiator device <NUM> transmits the data frame to the target device <NUM> and the initiator device <NUM> does not receive the AFC from the target device <NUM> until expiry of the replay timer. At S202, the transmitter <NUM> of the initiator device <NUM> transmits the data frame to the receiver <NUM> of the target device <NUM>. After transmitting the data frame, the initiator device <NUM> starts the replay timer. At S204, the receiver <NUM> of the target device <NUM> receives the data frame and sends the AFC frame to the transmitter <NUM> of the target device <NUM>. However, the transmitter <NUM> of the target device <NUM> does not send the AFC frame to the transmitter <NUM> of the initiator device <NUM>. Nevertheless, the initiator device <NUM> still waits for the AFC or a negative Acknowledge (NAC) frame from the target device <NUM> until the expiry of the replay timer.

Further, when the AFC frame or the NAC frame is not received at the initiator device <NUM> within the dedicated time period, the initiator device <NUM> waits for the expiry of the replay timer. As per the UFC specification, the default time of the replay timer is <NUM>, which is considerably high. After expiry of the replay timer, the initiator device <NUM> assumes there is a problem with the link between the initiator device <NUM> and the target device <NUM>. Further, the initiator device <NUM> initiates a link re-initialization between the initiator device <NUM> and the target device <NUM> to transmit the data frame from the initiator device <NUM> to the target device <NUM>. However, up to expiry of the replay timer, the initiator device <NUM> waits for the AFC frame or NAC frame from the target device <NUM>. Consequently, the initiator device <NUM> wastes power and resources (e.g., bandwidth).

Further, the initiator device <NUM> and the target device <NUM> support multiple speed modes. The speed mode regulates speed of the data frame at the initiator device <NUM> and the target device <NUM>. The speed mode can be, for example, but not limited to a Pulse Width Modulation Gear <NUM> (PWM G1) mode, a High Speed Gear <NUM> (HSG1) mode, a High Speed Gear <NUM> (HSG2) mode, a High Speed Gear <NUM> (HSG3) mode, and a High Speed Gear <NUM> (HSG4) mode. In an example, in the HSG1 mode, speed of the data frame transmission is <NUM> Mbps. In another example, in the HSG2 mode, speed of the data frame transmission is <NUM> Mbps. The speed mode can be selected by the initiator device <NUM>. Based on the selected speed mode, the data frame transmission time varies. Further, the initiator device <NUM> can change a timer value of the replay timer for both initiator device <NUM> and the target device <NUM> before selecting the speed mode. Hence, the initiator device <NUM> can set a predefined timer value for the replay timer based on the selected speed mode. A problem with selecting the speed mode and setting the timer value, however, is that the initiator device <NUM> has to reset the timer value every time there is a speed mode change. Also, the initiator device <NUM> usually assigns higher reset timer values for the replay timer to avoid a link re-initialization penalty. For example, the actual duration of the timeout period shall be the value set in the Attribute ±<NUM>% and a replay timer value is <NUM>.

The invention is set out by a method as defined by appended claim <NUM>.

In an embodiment, detecting the status of the link between the initiator device and the target device by restarting the turn-around timer with the second time period includes transmitting, by the initiator device, a negative Acknowledgement (NAC) frame to the target device through the link, restarting, by the initiator device, the turn-around timer with the second time period, wherein the second time period of the turn-around timer is less than the time period of the replay timer, determining, by the initiator device, whether one of an AFC frame and an NAC frame is received from the target device before expiry of the restarted turn-around timer, and performing, by the initiator device: detecting the status of the link between the initiator device and the target device as active in response to determining that one of the AFC frame and the NAC frame is received from the target device before expiry of the restarted turn-around timer, and detecting the status of the link between the initiator device and the target device as inactive in response to determining that one of the AFC fame and the NAC frame is not received from the target device before expiry of the restarted turn-around timer, and reinitializing the link between the initiator device and the target device.

In an embodiment, starting, by the initiator device, the turn-around timer with the first time period includes determining, by the initiator device, the first time period for the turn-around timer based on time required for transmission of the data frame from the initiator device to the target device through the link, time required for reception of the AFC frame for the data frame from the target device through the link, and time required to process the data frame at the target device, and starting, by the initiator device, the turn-around timer by configuring the first time period.

In an embodiment, the time required for transmission of the data frame from the initiator device to the target device through the link is determined based on a speed mode configured at the initiator device.

In an embodiment, the time required for reception of the AFC frame for the data frame from the target device to the initiator device through the link is determined based on a speed mode configured at the initiator device.

In an embodiment, restarting, by the initiator device, the turn-around timer with the second time period includes determining, by the initiator device, the second time period for the turn-around timer based on time required for transmission of the NAC frame from the initiator device to the target device through the link, time required for reception of one of the AFC frame and the NAC frame from the target device through the link, and time required to process NAC and prepares the AFC at the target device, and restarting, by the initiator device, the turn-around timer by configuring the second time period.

In an embodiment, the time required for transmission of the NAC frame from the initiator device to the target device through the link is determined based on a speed mode configured at the initiator device.

In an embodiment, the time required for reception of one of the AFC frame and the NAC frame from the target device through the link is determined based on a speed mode configured at the initiator device.

Furthermore, the invention is set out by an initiator device as defined by appended claim <NUM>.

Embodiments of the method, the initiator device and the UFS system are illustrated in the accompanying drawings, throughout which like reference letters indicate corresponding parts in the various figures. The embodiments herein will be better understood from the following description with reference to the drawings, in which:.

The embodiments herein and the various features and advantageous details thereof are explained more fully with reference to the embodiments that are illustrated in the accompanying drawings and detailed in the following description.

As is traditional in the field, embodiments may be described and illustrated in terms of blocks which carry out a described function or functions. These blocks, which may be referred to herein as units or modules or the like, are physically implemented by analog or digital circuits such as logic gates, integrated circuits, microprocessors, microcontrollers, memory circuits, passive electronic components, active electronic components, optical components, hardwired circuits, or the like, and may optionally be driven by firmware. The circuits may, for example, be embodied in one or more semiconductor chips, or on substrate supports such as printed circuit boards and the like. The circuits constituting a block may be implemented by dedicated hardware, or by a processor (e.g., one or more programmed microprocessors and associated circuitry), or by a combination of dedicated hardware to perform some functions of the block and a processor to perform other functions of the block. Each block of the embodiments may be physically separated into two or more interacting and discrete blocks. Likewise, the blocks of the embodiments may be physically combined into more complex blocks.

The accompanying drawings are used to help easily understand various technical features and it should be understood that the embodiments presented herein are not limited by the accompanying drawings. As such, the present disclosure should be construed to extend to any alterations, equivalents and substitutes in addition to those which are particularly set out in the accompanying drawings.

Unlike conventional methods and systems, in embodiments of the inventive concept, the initiator device can quickly detect the status of the link between the initiator device and the target device in the UFS system. If the initiator device has not received the AFC frame or a NAC frame before the expiry of the turn-around timer, then, the initiator device sends an NAC frame to the target device and restarts the turn-around timer, so as to initiate/request the target device to send the AFC frame or the NAC frame. Even after sending the NAC frame to the target device, if the initiator device has not received the AFC frame or the NAC frame, before expiry of the restarted turn-around timer, then the initiator device will initiate link re-initialization without waiting for the replay timer expiry. (Conventional systems, by contrast, always wait until the replay timer expires before commencing link re-initialization. ) Hence, the initiator device consumes less power and avoids wasting its own resources (e.g., wasting bandwidth or the like), so as improve overall performance of the UFS system.

In embodiments of the inventive concept, after transmitting the NAC frame, the initiator device re-starts the turn-around timer. As per the UFS specification, when the target device receives a NAC frame, the target device should send an AFC frame (if available) as a priority to the initiator device. Further, the target device receives the NAC frame, and the target device sends the AFC frame to the initiator device. In embodiments herein, once the AFC frame is received at the initiator device, the initiator device stops the turn-around timer and initiator device detects that the status of the link between the initiator device and the target device is active. Thus, the initiator device can quickly detect the status of the link between the initiator device and the target device without wasting resources and power, since the initiator device need not wait for the expiry of the replay timer.

Referring now to the drawings, and more particularly to <FIG>, example embodiments are illustrated.

<FIG> is a timing diagram illustrating various operations of a method for transmitting a data frame from an initiator device <NUM> to a target device <NUM> with a turn-around timer expiry scenario, when the initiator device <NUM> detects that a status of a link between the initiator device <NUM> and the target device <NUM> is active, according to an embodiment as disclosed herein. The link can be, for example, but not limited to a wireless communication link, a serial point-to-point link, a transmission line, a copper line, an optical line, and an infrared communication link. A connection between the initiator device <NUM> and the target device <NUM> is referred to as the link. The link may support one lane. Each lane representing a set of differential signal pairs (one pair for transmission, one pair for reception). To scale bandwidth, the link may aggregate multiple lanes denoted by xN, where N is any supported link width, such as <NUM>, <NUM>, or <NUM>, or wider.

The initiator device <NUM> and/or the target device <NUM> can be a flash storage device. When the initiator device is a flash storage device, the target device may be a processor of an electronic device, such as a computer microprocessor, an image processor, an application processor, an audio processor, and so forth. The initiator device <NUM> and the target device <NUM> can be used, e.g., in automotive and fifth generation (<NUM>) applications. The initiator device <NUM> and the target device <NUM> may be used in the same electronic device (e.g., smart phone, laptop computer, tablet, flexible device, an internet of things (IoT) device, etc.). The initiator device <NUM> and the target device <NUM> may each be an embedded device within the electronic device or may be integrated on a removable card, for flexible use with different electronic devices.

Referring to the <FIG>, at S302, a transmitter <NUM> of the initiator device <NUM> transmits the data frame to a receiver <NUM> of the target device <NUM>. After transmitting the data frame, the initiator device <NUM> starts the replay timer and the turn-around timer. In an example, the time period of the replay timer is <NUM>. In the example of <FIG>, there is no response from the target device <NUM> to the initiator device <NUM> in the time period <NUM> directly following the data frame transmission. Based on the method, at S304, the transmitter <NUM> of the initiator device <NUM> transmits an NAC frame to the receiver <NUM> of the target device <NUM>. After transmitting the NAC, the initiator device <NUM> starts a turn-around timer. In an example, the time period of the turn-around timer may be <NUM> for an HS-G1/<NUM>-lane configuration. As per the UFS specification (e.g., version <NUM>), when the target device <NUM> receives the NAC frame, the target device <NUM> should send the AFC frame on a prioritized basis to the initiator device <NUM>. At S306, the receiver <NUM> of the target device <NUM> receives the NAC frame and sends the AFC frame to a transmitter <NUM> of the target device <NUM>. At S308, the transmitter <NUM> of the target device <NUM> sends the AFC frame to the transmitter <NUM> of the initiator device <NUM>. Once the AFC frame is received at the initiator device <NUM>, the initiator device <NUM> stops the turn-around timer. Hence, the initiator device <NUM> identifies that the status of the link between the initiator device <NUM> and the target device <NUM> is active. Accordingly, based on the method, the initiator device <NUM> can quickly detect the status of the link between the initiator device <NUM> and the target device <NUM> without wasting resources and power, since the initiator device <NUM> need not wait for the expiry of the replay timer. Consider an example, the time period of the replay timer is <NUM> for HS-G1/<NUM>-lane configuration and the time period of the turn-around timer is <NUM>, then, the total time saving for detecting the status of the link between the initiator device <NUM> and the target device <NUM> is <NUM>.

<FIG> is a timing diagram illustrating various operations of a method for transmitting the data frame from the initiator device <NUM> to the target device <NUM> with a turn-around timer expiry scenario, when the initiator device <NUM> detects the status of the link between the initiator device <NUM> and the target device <NUM> is inactive, according to an embodiment as disclosed herein.

At S402, the transmitter <NUM> of the initiator device <NUM> transmits the data frame to the receiver <NUM> of the target device <NUM>. After transmitting the data frame, the initiator device <NUM> starts the replay timer and the turn-around timer. However, there is no response from the target device <NUM> to the initiator device <NUM>. Based on the method, at S404, the transmitter <NUM> of the initiator device <NUM> transmits the NAC frame to the receiver <NUM> of the target device <NUM>. After transmitting the NAC frame, the initiator device <NUM> re-starts the turn-around timer. As per the UFS specification, when the target device <NUM> receives a NAC frame, the target device <NUM> should send the AFC frame as a priority to the initiator device <NUM>. At S406, the receiver <NUM> of the target device <NUM> receives the NAC frame, and the receiver <NUM> of the target device <NUM> sends the AFC frame to the transmitter <NUM> of the target device <NUM>. However, the transmitter <NUM> of the target device <NUM> does not send the AFC frame to the transmitter <NUM> of the initiator device <NUM>. If the turn-around timer of the initiator device <NUM> expires before receiving the AFC frame or the NAC frame from the target device <NUM>, then the initiator device <NUM> can confirm there is an issue with the link, whereby the initiator device <NUM> may start the link re-initialization immediately. Note that such link re-initialization begins prior to the time that the replay timer would otherwise expire, since the restarted turn-around timer is designed to expire prior to the expiry of the replay timer. Hence, the initiator device <NUM> consumes less power and avoids wasting its own resources (e.g., bandwidth wastage or the like), so as improve overall performance of the UFS system. Based on the method, the initiator device <NUM> can quickly detect the status of the link between the initiator device <NUM> and the target device <NUM>, since the initiator device <NUM> need not wait for the expiry of the replay timer.

<FIG> is a general overview of the UFS system <NUM> for autonomous detection of the status of the link between the initiator device <NUM> and the target device <NUM>, according to an embodiment as disclosed herein. The UFS system <NUM> includes the initiator device <NUM> and the target device <NUM>. The UFS system <NUM> can be a Flash memory system defined by the JEDEC standard, designed for high data transfer speed and low power consumption.

The initiator device <NUM> is configured to transmit the data frame to the target device <NUM> through the link. After transmitting the data, the initiator device <NUM> is configured to start the replay timer with a replay time period. As per the UFS specification (e.g., version <NUM>), the default value of the replay timer is <NUM>. Further, the initiator device <NUM> may be configured to determine a first time period for the turn-around timer based on time required for transmission of the data frame from the initiator device <NUM> to the target device <NUM> through the link, time required for reception of the AFC for the data frame from the target device <NUM> through the link, and time required to process the data frame at the target device <NUM>. The initiator device <NUM> may be configured to start the turn-around timer based on the configured first time period. In an example, the time required for transmission of the data frame from the initiator device <NUM> to the target device <NUM> for HSG4 - <NUM> Lanes is as follows: <MAT> <MAT>.

Further, the initiator device <NUM> may be configured to determine whether the AFC frame for the data frame is received before expiry of the turn-around timer. If the AFC frame for the data frame is received before expiry of the turn-around timer, then the initiator device <NUM> detects the status of the link between the initiator device <NUM> and the target device <NUM> as active. As discussed earlier, the initiator device <NUM> can quickly detect the status of the link between the initiator device <NUM> and the target device <NUM> as active without wasting resources and power, since the initiator device <NUM> need not wait for the expiry of the replay timer. If the AFC frame for the data frame is not received before expiry of the turn-around timer, the initiator device <NUM> is configured to transmit the NAC frame to the target device <NUM> through the link.

Further, the initiator device <NUM> may be configured to determine the second time period for the turn-around timer based on the time required for transmission of the NAC frame from the initiator device <NUM> to the target device <NUM> through the link, the time required for reception of the AFC and the NAC frame from the target device <NUM> through the link, and the time required to process the NAC and prepare the AFC at the target device <NUM>. Further, the initiator device <NUM> may be configured to restart the turn-around timer by configuring the second time period. In an example, the time required for transmission of the NAC frame from the initiator device <NUM> to the target device <NUM> for HSG4 <NUM> lanes is as follows:.

The initiator device <NUM> may be configured to determine whether the AFC and/or the NAC frame is received from the target device <NUM> before expiry of the restarted turn-around timer. If the AFC and the NAC frame is received from the target device <NUM> before expiry of the restarted turn-around timer then, the initiator device <NUM> is configured to detect the status of the link between the initiator device <NUM> and the target device <NUM> as active.

If the AFC frame and the NAC frame is not received from the target device <NUM> before expiry of the restarted turn-around timer then, the initiator device <NUM> is configured to detect the status of the link between the initiator device <NUM> and the target device <NUM> as inactive. Further, the initiator device <NUM> is configured to reinitialize the link with the target device <NUM>. The initiator device <NUM> can quickly detect the status of the link between the initiator device <NUM> and the target device <NUM> as inactive without wasting resources and power, since the initiator device <NUM> toned not wait for the expiry of the replay timer.

<FIG> shows various hardware components of the initiator device <NUM> for autonomous detection of the status of the link with the target device <NUM> in the UFS system <NUM>, according to an embodiment as disclosed herein. The initiator device <NUM> includes the transmitter <NUM>, the receiver <NUM>, a processor <NUM>, a UFS memory <NUM>, a speed mode controller <NUM>, and a link status controller <NUM>. The processor <NUM> is coupled with the transmitter <NUM>, the receiver <NUM>, the UFS memory <NUM>, the speed mode controller <NUM>, and the link status controller <NUM>.

The link status controller <NUM> is physically implemented by analog or digital circuits such as logic gates, integrated circuits, microprocessors, microcontrollers, memory circuits, passive electronic components, active electronic components, optical components, hardwired circuits, or the like, and may optionally be driven by firmware. The link status controller <NUM> may, for example, be embodied in one or more semiconductor chips, or on substrate supports such as printed circuit boards and the like. The circuits constituting a block may be implemented by dedicated hardware, or by a processor (e.g., one or more programmed microprocessors and associated circuitry), or by a combination of dedicated hardware to perform some functions of the block and a processor to perform other functions of the block.

The link status controller <NUM> is configured to transmit the data frame to the target device <NUM> through the link. After transmitting the data, the link status controller <NUM> is configured to start the replay timer with the replay time period. As per the UFS specification, the replay time period is <NUM>. Further, the link status controller <NUM> is configured to determine the first time period for the turn-around timer based on the time required for transmission of the data frame from the initiator device <NUM> to the target device <NUM> through the link, the time required for reception of the AFC frame for the data frame from the target device <NUM> through the link, and the time required to process the data frame at the target device <NUM>. The link status controller <NUM> is configured to start the turn-around timer based on the first time period.

Further, the link status controller <NUM> is configured to determine whether the AFC frame for the data frame is received on or before expiry of the turn-around timer. If the AFC frame for the data frame is received before expiry of the turn-around timer then, the initiator device <NUM> may detect the status of the link between the initiator device <NUM> and the target device <NUM> as active. If the AFC frame for the data frame is not received before expiry of the turn-around timer, the link status controller <NUM> is configured to transmit the NAC frame to the target device <NUM> through the link.

Further, the initiator device <NUM> is configured to determine the second time period for the turn-around timer based on the time required for transmission of the NAC frame from the initiator device <NUM> to the target device <NUM> through the link, the time required for reception of the AFC frame and the NAC frame from the target device <NUM> through the link, and the time required to process the NAC and prepares the AFC at the target device <NUM>. Further, the link status controller <NUM> is configured to restart the turn-around timer based on the configured second time period.

The link status controller <NUM> is configured to determine whether the AFC and/or the NAC frame is received from the target device <NUM> before expiry of the restarted turn-around timer. If the AFC and the NAC frame is received from the target device <NUM> before expiry of the restarted turn-around timer then, the link status controller <NUM> detects the status of the link between the initiator device <NUM> and the target device <NUM> as active.

If the AFC and the NAC frame is not received from the target device <NUM> on or before expiry of the restarted turn-around timer then, the link status controller <NUM> detects the status of the link between the initiator device <NUM> and the target device <NUM> as inactive. Further, the link status controller <NUM> is configured to reinitialize the link with the target device <NUM>.

The time required for transmission of the data frame from the initiator device <NUM> to the target device <NUM> through the link may be determined based on a speed mode configured at the initiator device <NUM> using the speed mode controller <NUM>. Further, the time required for reception of the AFC for the data frame from the target device <NUM> to the initiator device <NUM> through the link may be determined based on a speed mode configured at the initiator device <NUM> using the speed mode controller <NUM>. In an example, if the speed mode is a HSG1, a speed for the HSG1 is <NUM> Mbps, and total number of lanes in the initiator device <NUM> is <NUM> then a value of the turn-around timer is <NUM>. Below, table <NUM> and table <NUM> indicate various values of the turn-around timer at different speeds.

The processor <NUM> is configured to execute instructions stored in the UFS memory <NUM> and to perform various processes. The processor <NUM> may include one or more processors. The one or more processors may be a general-purpose processor, such as a central processing unit (CPU), an application processor (AP), or the like, a graphics-only processing unit such as a graphics processing unit (GPU), a visual processing unit (VPU), and/or an AI-dedicated processor such as a neural processing unit (NPU). The processor <NUM> may include multiple cores and is configured to execute the instructions stored in the UFS memory <NUM>.

The one or more processors control the processing of the input data in accordance with a predefined operating rule or artificial intelligence (AI) model stored in the non-volatile memory and the volatile memory. The predefined operating rule or artificial intelligence model is provided through training or learning.

The UFS memory <NUM> also stores instructions to be executed by the processor <NUM>. The UFS memory <NUM> stores the status of the link. The UFS memory <NUM> may include non-volatile storage elements. In addition, the UFS memory <NUM> may, in some examples, be considered a non-transitory storage medium. The term "non-transitory" may indicate that the storage medium is not embodied in a carrier wave or a propagated signal. However, the term "non-transitory" should not be interpreted that the memory <NUM> is non-movable. In some examples, the memory <NUM> can be configured to store larger amounts of information. In certain examples, a non-transitory storage medium may store data that can, over time, change (e.g., in Random Access Memory (RAM) or cache).

The transmitter <NUM> is configured for communicating internally between internal hardware components and with external devices via one or more networks. The communicator <NUM> can be, for example, a Bluetooth communicator, a Wireless fidelity (Wi-Fi) module, and a Li-Fi module. The receiver <NUM> is configured for communicating internally between internal hardware components and with external devices via one or more networks. The communicator <NUM> can be, for example, a Bluetooth communicator, a Wireless fidelity (Wi-Fi) module, and a Li-Fi module.

Further, initiator device <NUM> also comprises memory core, which may include one or more banks, arrays, and/or other organization of the memory cells, e.g., designed using Flash memory technology such as NAND Flash memory cells.

<FIG> shows various hardware components of the initiator device <NUM> as an example. In other embodiments, the initiator device <NUM> may include more or fewer components. One or more components can be combined together to perform the same or substantially similar function for autonomous detection of the status of the link between the initiator device <NUM> and the target device <NUM> in the UFS system.

<FIG> is an example illustration in which the replay time period of the replay timer is computed, according to prior art. In an example, <NUM> bits of data are transferred between the initiator device <NUM> and the target device <NUM>. The initiator device <NUM> and the target device <NUM> supports HSG4-<NUM> lanes (i.e., <NUM> Mbps per lane). Based on the UFS specification, a default value of the replay timer is <NUM>.

<FIG> is an example illustration in which a time period of the turn-around timer is computed, according to an embodiment as disclosed herein. In an example, <NUM> bits of data is to be transferred between the initiator device <NUM> and the target device <NUM>. The initiator device <NUM> and the target device <NUM> supports HSG4-<NUM> lanes (i.e., <NUM> Mbps per lane).

The initiator device <NUM> determines the first time period for the turn-around timer based on the time required for transmission of the data frame from the initiator device <NUM> to the target device <NUM> through the link, the time required for reception of the AFC for the data frame from the target device <NUM> through the link, and the time required to process the data frame at the target device <NUM>. The initiator device <NUM> starts the turn-around timer by configuring the first time period.

The initiator device <NUM> determines the second time period for the turn-around timer based on the time required for transmission of the NAC frame from the initiator device <NUM> to the target device <NUM> through the link, the time required for reception of the AFC and the NAC frame from the target device <NUM> through the link, and the time required to process the NAC and prepares the AFC at the target device <NUM>. The initiator device <NUM> restarts the turn-around timer by configuring the second time period.

<FIG> is a flow diagram of a first part of a method, S900A, for autonomous detection of the status of the link between the initiator device <NUM> and the target device <NUM> in the UFS system (<NUM>), according to an embodiment as disclosed herein. <FIG> is a flow diagram of a second part of a method, S900B for such autonomous detection. The operations S902-S930 of <FIG> are performed by the link status controller <NUM>.

At S902, the method includes transmitting the data frame to the target device <NUM> through the link. At S904, the method includes starting the replay timer with the replay time period. At S906, the method includes determining the first time period for the turn-around timer based on the time required for transmission of the data frame from the initiator device <NUM> to the target device <NUM> through the link, the time required for reception of the AFC for the data frame from the target device <NUM> through the link, and the time required to process the data frame at the target device <NUM>. At S908, the method includes starting the turn-around timer by configuring the first time period.

At S910, the method includes determining whether an AFC frame for the data frame is received before expiry of the turn-around timer (alternatively, on or before expiry of the turn-around timer). If the AFC frame for the data frame is received before (or on or before) expiry of the turn-around timer then, at S912, the method includes detecting the status of the link between the initiator device <NUM> and the target device <NUM> as active. If the AFC frame for the data frame is received before (or on or before) expiry of the turn-around timer then, at S914, the method includes transmitting the NAC frame to the target device <NUM> through the link. Herein, "on expiry" of the turn-around timer means immediately after the turn-around timer expires.

At S916, the method includes determining the second time period for the turn-around timer based on the time required for transmission of the NAC frame from the initiator device <NUM> to the target device <NUM> through the link, the time required for reception of one of the AFC and the NAC frame from the target device <NUM> through the link, and the time required to process the NAC and prepares the AFC at the target device <NUM>. At S918, the method includes restarting the turn-around timer by configuring the second time period.

At S920, the method includes determining whether one of the AFC and the NAC frame is received from the target device <NUM> before (or on or before) expiry of the restarted turn-around timer. If the AFC and the NAC frame is received from the target device <NUM> on or before expiry of the restarted turn-around timer then, at S922, the method includes detecting the status of the link between the initiator device <NUM> and the target device <NUM> as active.

If the AFC and the NAC frame is not received from the target device <NUM> before (or on or before) expiry of the restarted turn-around timer <NUM> then, at S924, the method includes detecting the status of the link between the initiator device <NUM> and the target device <NUM> as inactive. At S926, the method includes reinitializing the link between the initiator device <NUM> and the target device <NUM>.

Claim 1:
A method for autonomous detection of a status of a link between an initiator device (<NUM>) and a target device (<NUM>) in a Universal Flash Storage, UFS, system, comprising:
at the initiator device (<NUM>):
transmitting (S902) at least one data frame to the target device (<NUM>) through the link;
starting (S904) a replay timer with a replay time period, wherein the replay time period is a time period for receiving one of an Acknowledgement and Flow Control, AFC, frame or a Negative Acknowledgement, NAC, frame from the target device (<NUM>);
starting (S908) a turn-around timer with a first time period less than the replay time period;
determining (S910) whether at least one AFC frame for the at least one data frame is received before expiry of the turn-around timer; and
performing, by the initiator device (<NUM>):
detecting (S912) the status of the link as active in response to determining that the at least one AFC frame is received from the target device (<NUM>) before expiry of the turn-around timer; and
detecting (S920) the status of the link by restarting the turn-around timer with a second time period and transmitting at least one NAC frame to the target device (<NUM>) through the link in response to determining that the at least one AFC frame was not received before expiry of the turn-around timer.