Patent Publication Number: US-8988967-B2

Title: Method of increasing a timing margin for relaying data to a memory array

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
     This application is a divisional of U.S. patent application Ser. No. 12/578,917, filed Oct. 14, 2009, the disclosure of which is incorporated herein in its entirety by reference. 
    
    
     FIELD OF THE INVENTION 
     The present invention relates to a method for writing data to a memory array, and more particularly to a method to increase a timing margin for writing data to a memory array. 
     BACKGROUND OF THE INVENTION 
     Please refer to  FIG. 1 , which is the schematic diagram showing the first conventional scheme for writing the data DR 1  to the double data rate synchronous dynamic random access memory (DDR SDRAM) array  101 .  FIG. 1  shows a memory device  10  and waveforms including the clock signal CLK 1 , the data strobe signal DQS 1 , the data bus signal DQ 1  and the signal DAR 11 . The memory device  10  receives the clock signal CLK 1 , the data strobe signal DQS 1  and the data bus signal DQ 1 , and includes the DDR SDRAM array  101  operating in synchronization with the clock signal CLK 1 . The clock signal CLK 1  has the rising edge RC 11  and the rising edge RC 12  lagged behind the rising edge RC 11  by one clock cycle of the clock signal CLK 1 . The data bus signal DQ 1  includes the data DR 1 . 
     Based on DDR/DDR 2 /DDR 3  JEDEC timing specification, both the data DR 1  and the rising edge of the data strobe signal DQS 1  corresponding to the rising edge RC 12  can arrive at the memory device  10  anytime between ¼ clock cycle before and ¼ clock cycle after the rising edge RC 12 . The data DR 1  is provided to the memory device  10  on the rising edge of the data strobe signal DQS 1  corresponding to the rising edge RC 12 . If the data strobe signal DQS 1  is coming in the memory device  10  later than the clock signal CLK 1 , the data strobe signal DQS 1  is shown to be the signal DQS 11  and the data DR 1  is shown to be the data DR 1 L. If the data strobe signal DQS 1  is coming in the memory device  10  earlier than the clock signal CLK 1 , the data strobe signal DQS 1  is shown to be the signal DQS 12  and the data DR 1  is shown to be the data DR 1 E. 
     The signal DQS 11  includes the rising edge RDL 11  corresponding to the rising edge RC 12 . The signal DQS 12  includes the rising edge RDE 11  corresponding to the rising edge RC 12 . The rising edges RDL 11  and RDE 11  are coming in later and earlier respectively than the rising edge RC 12 . The rising edges RDL 11  and RDE 11  respectively correspond to the data DR 1 L in duration HR 1 L and the data DR 1 E in duration HR 1 E, and are used to respectively capture the data DR 1 L and the data DR 1 E. 
     The signal DAR 11  is produced in response to the data strobe signal DQS 1  and the data bus signal DQ 1 . The data DR 1  of the data bus signal DQ 1  is latched into the signal DAR 11  at a first time point lagged behind the rising edge of the data strobe signal DQS 1 , corresponding to the rising edge RC 12 , by a first time interval until a second time point in response to the rising edge of the data strobe signal DQS 1  corresponding to the rising edge RC 12 . 
     As shown in  FIG. 1 , the data DR 1  and the rising edge RDL 11  arrive at the memory device  10  at a time point of ¼ clock cycle after the rising edge RC 12 . The rising edge RDL 11  is used to capture the data DR 1 L, and the data DR 1 L is latched into the signal DAR 11  at the time point TR 11  lagged behind the rising edge RDL 11  by the time interval GR 1  until the time point TR 12  in response to the rising edge RDL 11 . The time intervals GR 1  is a propagation delay from the rising edge RDL 11  to output the data DR 1 L-RDL 11  of a flip-flop or a latch (not shown) being used to capture the data DR 1 L. The time point TR 11  and the time point TR 12  have the duration HR 11  being one clock cycle of the clock signal CLK 1 . 
     As shown in  FIG. 1 , the data DR 1 E and the rising edge RDE 11  arrive at the memory device  10  at a time point of ¼ clock cycle before the rising edge RC 12 . The rising edge RDE 11  is used to capture the data DR 1 E, and the data DR 1 E is latched into the signal DAR 11  at the time point TR 21  lagged behind the rising edge RDE 11  by the time interval GR 2  until the time point TR 22  in response to the rising edge RDE 11 . The time intervals GR 2  is a propagation delay from the rising edge RDE 11  to output the data DR 1 E-RDE 11  of the flip-flop or the latch being used to capture the data DR 1 E. The time point TR 21  and the time point TR 22  have the duration HR 12  being one clock cycle of the clock signal CLK 1 . For instance, the time intervals GR 1  and GR 2  have a same time length. 
     The internal clock signal ICLK 1  is produced, e.g. by an input buffer (not shown) in the memory device  10 , in response to the clock signal CLK 1 , and is provided to the inside of the memory device  10 . The data valid window QR 1  of the data DR 1 , seen by the internal clock ICLK 1 , is a time interval between the time point TR 11  and the time point TR 22 . Therefore, the data valid window QR 1  is only a ½ clock cycle of the clock signal CLK 1 . 
     Please refer to  FIG. 2 , which is the schematic diagram showing the second conventional scheme for writing the data DF 1  to the double data rate synchronous dynamic random access memory (DDR SDRAM) array  101 .  FIG. 2  shows waveforms including the clock signal CLK 1 , the data strobe signal DQS 1 , the data bus signal DQ 1  and the signal DAF 11 . The clock signal CLK 1  has the falling edge FC 11  and the falling edge FC 12  lagged behind the falling edge FC 11  by one clock cycle of the clock signal CLK 1 . The data bus signal DQ 1  includes the data DF 1 . 
     Based on DDR/DDR 2 /DDR 3  JEDEC timing specification, both the data DF 1  and the falling edge of the data strobe signal DQS 1  corresponding to the falling edge FC 12  can arrive at the memory device  10  anytime between ¼ clock cycle before and ¼ clock cycle after the falling edge FC 12 . The data DF 1  is provided to the memory device  10  on the falling edge of the data strobe signal DQS 1  corresponding to the falling edge FC 12 . If the data strobe signal DQS 1  is coming in the memory device  10  later than the clock signal CLK 1 , the data strobe signal DQS 1  is shown to be the signal DQS 11  and the data DF 1  is shown to be the data DF 1 L. If the data strobe signal DQS 1  is coming in the memory device  10  earlier than the clock signal CLK 1 , the data strobe signal DQS 1  is shown to be the signal DQS 12  and the data DF 1  is shown to be the data DF 1 E. 
     The signal DQS 11  includes the falling edge FDL 11  corresponding to the falling edge FC 12 . The signal DQS 12  includes the falling edge FDE 11  corresponding to the falling edge FC 12 . The falling edges FDL 11  and FDE 11  are coming in later and earlier respectively than the falling edge FC 12 . The falling edges FDL 11  and FDE 11  respectively correspond to the data DF 1 L in duration HF 1 L and the data DF 1 E in duration HF 1 E, and are used to respectively capture the data DF 1 L and the data DF 1 E. 
     The signal DAF 11  is produced in response to the data strobe signal DQS 1  and the data bus signal DQ 1 . The data DF 1  of the data bus signal DQ 1  is latched into the signal DAF 11  at a third time point lagged behind the falling edge of the data strobe signal DQS 1 , corresponding to the falling edge FC 12 , by a second time interval until a fourth time point in response to the falling edge of the data strobe signal DQS 1  corresponding to the falling edge FC 12 . 
     As shown in  FIG. 2 , the data DF 1  and the falling edge FDL 11  arrive at the memory device  10  at a time point of ¼ clock cycle after the falling edge FC 12 . The falling edge FDL 11  is used to capture the data DF 1 L, and the data DF 1 L is latched into the signal DAF 11  at the time point TF 11  lagged behind the falling edge FDL 11  by the time interval GF 1  until the time point TF 12  in response to the falling edge FDL 11 . The time intervals GF 1  is a propagation delay from the falling edge FDL 11  to output the data DF 1 L-FDL 11  of a flip-flop or a latch (not shown) being used to capture the data DF 1 L. The time point TF 11  and the time point TF 12  have the duration HF 11  being one clock cycle of the clock signal CLK 1 . 
     As shown in  FIG. 2 , the data DF 1 E and the falling edge FDE 11  arrive at the memory device  10  at a time point of ¼ clock cycle before the falling edge FC 12 . The falling edge FDE 11  is used to capture the data DF 1 E, and the data DF 1 E is latched into the signal DAF 11  at the time point TF 21  lagged behind the falling edge FDE 11  by the time interval GF 2  until the time point TF 22  in response to the falling edge FDE 11 . The time intervals GF 2  is a propagation delay from the falling edge FDE 11  to output the data DF 1 E-FDE 11  of the flip-flop or the latch being used to capture the data DF 1 E. The time point TF 21  and the time point TF 22  have the duration HF 12  being one clock cycle of the clock signal CLK 1 . For instance, the time intervals GF 1  and GF 2  have a same time length. The data valid window QF 1  of the data DF 1 , seen by the internal clock ICLK 1 , is a time interval between the time point TF 11  and the time point TF 22 . Therefore, the data valid window QF 1  is only a ½ clock cycle of the clock signal CLK 1 . 
     Because the data valid windows QR 1  and QF 1  for writing the data DR 1  and the data DF 1  to the DDR SDRAM array  101  are small, capturing the data DR 1  and the data DF 1  properly can be difficult especially with wide process, temperature and voltage variations, so that it is very difficult to meet JEDEC DQS and Data timing requirement. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to provide a method to increase timing margin for writing data to a memory array when the clock domain of the data strobe signal is crossed to the internal clock domain. 
     It is therefore a first aspect of the present invention to provide a method for writing data to a memory array operating in synchronization with a clock signal having a transition edge. The method includes the following steps. A data strobe signal having a transition edge corresponding to the transition edge of the clock signal is provided. The transition edge of the clock signal is used to relay the data corresponding to the transition edge of the data strobe signal if the transition edge of the data strobe signal is coming in earlier than the transition edge of the clock signal, wherein the clock signal has a rising edge and a falling edge, the data strobe signal has a rising edge and a falling edge respectively corresponding to the rising and the falling edges of the clock signal, and the transition edge of the clock signal is one of the rising and the falling edges of the clock signal. 
     It is therefore a second aspect of the present invention to provide a method for writing data to a memory array operating in synchronization with a clock signal having a transition edge. The method includes the following steps. A data strobe signal having a transition edge corresponding to the transition edge of the clock signal is provided. The transition edge of the clock signal is used to relay the data corresponding to the transition edge of the data strobe signal if the transition edge of the data strobe signal is coming in earlier than the transition edge of the clock signal. 
     It is therefore a third aspect of the present invention to provide a method for writing data to a memory. The method includes the following steps. A clock signal is provided. A data strobe signal is received. The data is relayed based on the clock signal if the data strobe signal is coming in earlier than the clock signal. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       The foregoing and other features and advantages of the present invention will be more clearly understood through the following descriptions with reference to the drawings, wherein: 
         FIG. 1  is a schematic diagram showing the first conventional scheme for writing data to a DDR SDRAM array; 
         FIG. 2  is a schematic diagram showing the second conventional scheme for writing data to the DDR SDRAM array; 
         FIG. 3  is a schematic diagram showing a scheme for writing data to a memory array according to the first embodiment of the present invention; and 
         FIG. 4  is a schematic diagram showing a scheme for writing data to the memory array according to the second embodiment of the present invention. 
     
    
    
     DETAIL DESCRIPTION OF THE PREFERRED EMBODIMENT 
     The present invention will now be described more specifically with reference to the following embodiments. It is to be noted that the following descriptions of preferred embodiments of this invention are presented herein for the purposes of illustration and description only; it is not intended to be exhaustive or to be limited to the precise form disclosed. 
     Please refer to  FIG. 3 , which is the schematic diagram showing the scheme for writing the data DR 3  to the memory array  301  according to the first embodiment of the present invention.  FIG. 3  shows a memory device  30  and waveforms including the clock signal CLK 3 , the data strobe signal DQS 3 , the data bus signal DQ 3 , the signal DAR 31 , and the signal DAR 32 . The memory device  30  receives the clock signal CLK 3 , the data strobe signal DQS 3  and the data bus signal DQ 3 , and includes the memory array  301  operating in synchronization with the clock signal CLK 3 . The memory array  301  may be a DRAM array, e.g. a DDR SDRAM array. 
     Comparing the embodiment in  FIG. 3  with the conventional scheme in  FIG. 1 , most functions and operation principles of the schemes are similar or the same, so that the descriptions for the portion of the same or the similar are omitted, wherein the memory device  30 , the memory array  301 , the clock signal CLK 3 , the rising edge RC 31 , the rising edge RC 32 , the data strobe signal DQS 3 , the signal DQS 31 , the rising edge RDL 31 , the signal DQS 32 , the rising edge RDE 31 , the data bus signal DQ 3 , the data DR 3 , the data DR 3 L, the data DR 3 E, the signal DAR 31 , the data DR 3 L-RDL 31 , the time interval GR 1 , the time point TR 11 , the time point TR 12 , the duration HR 31 , the data DR 3 E-RDE 31 , the time interval GR 2 , the time point TR 21 , the time point TR 22 , the duration HR 32  and the internal clock ICLK 3  in  FIG. 3  correspond to the memory device  10 , the DDR SDRAM array  101 , the clock signal CLK 1 , the rising edge RC 11 , the rising edge RC 12 , the data strobe signal DQS 1 , the signal DQS 11 , the rising edge RDL 11 , the signal DQS 12 , the rising edge RDE 11 , the data bus signal DQ 1 , the data DR 1 , the data DR 1 L, the data DR 1 E, the signal DAR 11 , the data DR 1 L-RDL 11 , the time interval GR 1 , the time point TR 11 , the time point TR 12 , the duration HR 11 , the data DR 1 E-RDE 11 , the time interval GR 2 , the time point TR 21 , the time point TR 22 , the duration HR 12  and the internal clock ICLK 1  in  FIG. 1 , respectively. 
     In an embodiment in  FIG. 3 , the data strobe signal DQS 3  has a specific rising edge, e.g. RDL 31  or RDE 31 , corresponding to the rising edge RC 32  of the clock signal CLK 3 . The rising edge RC 32  is used to relay the data DR 3  corresponding to the specific rising edge, e.g. RDE 31 , of the data strobe signal DQS 3  if the specific rising edge, e.g. RDE 31 , of the data strobe signal DQS 3  is coming in earlier than the rising edge RC 32  of the clock signal CLK 3 . In an embodiment, whether the specific rising edge, e.g. RDL 31  or RDE 31 , of the data strobe signal DQS 3  is coming in earlier than the rising edge RC 32  is detected before the rising edge RC 32  is used to relay the data DR 3  to the memory array  301 . 
     Based on DDR/DDR 2 /DDR 3  JEDEC timing specification, the rising edge RC 32  and the specific rising edge, e.g. RDL 31  or RDE 31 , of the data strobe signal DQS 3  have a first timing difference in a range from −25% to 25% of one clock cycle of the clock signal CLK 3 . In an embodiment, the signal DAR 31  is produced in response to the data strobe signal DQS 3  and the data bus signal DQ 3 . The signal DAR 32  is produced in response to the clock signal CLK 1  and the signal DAR 31 . The data DR 3  of the data bus signal DQ 3  is latched into the signal DAR 31  at a first time point lagged behind the specific rising edge, e.g. RDL 31  or RDE 31 , of the data strobe signal DQS 3  by a first time interval until a second time point in response to the specific rising edge, e.g. RDL 31  or RDE 31 , of the data strobe signal DQS 3 . 
     For instance, when the first timing difference is 25% of one clock cycle of the clock signal, i.e., when the data strobe signal DQS 3  is the signal DQS 31 , the data DR 3 , marked to be DR 3 L, of the data bus signal DQ 3  is latched into the signal DAR 31  at the time point TR 11  lagged behind the rising edge RDL 31  of the signal DQS 31  by the time interval GR 1  until the time point TR 12  in response to the rising edge RDL 31 . The time interval GR 1  may be a propagation delay used to capture the data DR 3 , marked to be DR 3 L, of the data bus signal DQ 3  into the signal DAR 31 . For instance, when the specific rising edge of the data strobe signal DQS 3  is coming in earlier than the rising edge RC 32 , i.e., when the data strobe signal DQS 3  is the signal DQS 32 , the data DR 3 , marked to be DR 3 E, of the data bus signal DQ 3  is latched into the signal DAR 31  at the time point TR 21  lagged behind the rising edge RDE 31  of the signal DQS 32  by the time interval GR 2  until the time point TR 22  in response to the rising edge RDE 31 . The time interval GR 2  may be a propagation delay used to capture the data DR 3 , marked to be DR 3 E, of the data bus signal DQ 3  into the signal DAR 31 . 
     In an embodiment, when the specific rising edge of the data strobe signal DQS 3  is coming in earlier than the rising edge RC 32 , i.e., when the data strobe signal DQS 3  is the signal DQS 32 , the data DR 3 , marked to be DR 3 E-RDE 31 , of the signal DAR 31  is latched into the signal DAR 32  at the time point TR 31  lagged behind the rising edge RC 32  of the clock signal CLK 3  by the time interval GR 3  until the time point TR 32  in response to the rising edge RC 32 . The time interval GR 3  may be a propagation delay used to capture the data DR 3 , marked to be DR 3 E-RDE 31 , of the signal DAR 31  into the signal DAR 32 . When the specific rising edge, e.g. RDE 31 , of the data strobe signal DQS 3  is coming in earlier than the rising edge RC 32 , the data DR 3 , marked to be DR 3 E-RDE 31 -RC 32 , of the signal DAR 32  is relayed to the memory array  301 . When the specific rising edge, e.g. RDL 31 , of the data strobe signal DQS 3  is coming in later than or in phase with the rising edge RC 32 , the data DR 3 , e.g. marked to be DR 3 L-RDL 31 , of the signal DAR 31  is relayed to the memory array  301 . 
     In an embodiment, the time points TR 11  and TR 12  have the duration HR 31  being one clock cycle of the clock signal CLK 3 . The time points TR 21  and TR 22  have the duration HR 32  being one clock cycle of the clock signal CLK 3 . The time points TR 31  and TR 32  have the duration HR 33  being one clock cycle of the clock signal CLK 3 . The data DR 3  is caused to be valid in the data valid window QR 3  being a time interval between the time points TR 11  and TR 32 . In an embodiment, the internal clock signal ICLK 3  is produced in response to the clock signal CLK 3 , wherein the data DR 3  is seen in the data valid window QR 3  by the internal clock signal ICLK 3 . In an embodiment, the time intervals GR 1 , GR 2  and GR 3  have a same time length, and the data valid window QR 3  lasts a ¾ clock cycle of the clock signal CLK 3 . 
     Comparing the embodiment in  FIG. 3  with the conventional scheme in  FIG. 1 , the data valid window QR 3  of the data DR 3  will increase from the ½ clock cycle to a ¾ clock cycle of the clock signal CLK 3 ; i.e. the data valid window QR 3  is improved by an additional timing margin of a ¼ clock cycle, which causes the memory device employing the scheme in  FIG. 3  to work better with wider PVT variations. 
     Please refer to  FIG. 4 , which is the schematic diagram showing the scheme for writing the data DF 3  to the memory array  301  according to the second embodiment of the present invention.  FIG. 4  shows waveforms including the clock signal CLK 3 , the data strobe signal DQS 3 , the data bus signal DQ 3 , the signal DAF 31 , and the signal DAF 32 . 
     Comparing the embodiment in  FIG. 4  with the conventional scheme in  FIG. 2 , most functions and operation principles of the schemes are similar or the same, so that the descriptions for the portion of the same or the similar are omitted, wherein the clock signal CLK 3 , the falling edge FC 31 , the falling edge FC 32 , the data strobe signal DQS 3 , the signal DQS 31 , the falling edge FDL 31 , the signal DQS 32 , the falling edge FDE 31 , the data bus signal DQ 3 , the data DF 3 , the data DF 3 L, the data DF 3 E, the signal DAF 31 , the data DF 3 L-FDL 31 , the time interval GF 1 , the time point TF 11 , the time point TF 12 , the duration HF 31 , the data DF 3 E-FDE 31 , the time interval GF 2 , the time point TF 21 , the time point TF 22  and the duration HF 32  in  FIG. 4  correspond to the clock signal CLK 1 , the falling edge FC 11 , the falling edge FC 12 , the data strobe signal DQS 1 , the signal DQS 11 , the falling edge FDL 11 , the signal DQS 12 , the falling edge FDE 11 , the data bus signal DQ 1 , the data DF 1 , the data DF 1 L, the data DF 1 E, the signal DAF 11 , the data DF 1 L-FDL 11 , the time interval GF 1 , the time point TF 11 , the time point TF 12 , the duration HF 11 , the data DF 1 E-FDE 11 , the time interval GF 2 , the time point TF 21 , the time point TF 22  and the duration HF 12  in  FIG. 2 , respectively. 
     In an embodiment in  FIG. 4 , the data strobe signal DQS 3  has a specific falling edge, e.g. FDL 31  or FDE 31 , corresponding to the falling edge FC 32  of the clock signal CLK 3 . The falling edge FC 32  is used to relay the data DF 3  corresponding to the specific falling edge, e.g. FDE 31 , of the data strobe signal DQS 3  if the specific falling edge, e.g. FDE 31 , of the data strobe signal DQS 3  is coming in earlier than the falling edge FC 32  of the clock signal CLK 3 . In an embodiment, whether the specific falling edge, e.g. FDL 31  or FDE 31 , of the data strobe signal DQS 3  is coming in earlier than the falling edge FC 32  is detected before the falling edge FC 32  is used to relay the data DF 3  to the memory array  301 . 
     Based on DDR/DDR 2 /DDR 3  JEDEC timing specification, the falling edge FC 32  and the specific falling edge, e.g. FDL 31  or FDE 31 , of the data strobe signal DQS 3  have a first timing difference in a range from −25% to 25% of one clock cycle of the clock signal CLK 3 . In an embodiment, the signal DAF 31  is produced in response to the data strobe signal DQS 3  and the data bus signal DQ 3 . The signal DAF 32  is produced in response to the clock signal CLK 1  and the signal DAF 31 . The data DF 3  of the data bus signal DQ 3  is latched into the signal DAF 31  at a first time point lagged behind the specific falling edge, e.g. FDL 31  or FDE 31 , of the data strobe signal DQS 3  by a first time interval until a second time point in response to the specific falling edge, e.g. FDL 31  or FDE 31 , of the data strobe signal DQS 3 . 
     For instance, when the first timing difference is 25% of one clock cycle of the clock signal, i.e., when the data strobe signal DQS 3  is the signal DQS 31 , the data DF 3 , marked to be DF 3 L, of the data bus signal DQ 3  is latched into the signal DAF 31  at the time point TF 11  lagged behind the falling edge FDL 31  of the signal DQS 31  by the time interval GF 1  until the time point TF 12  in response to the falling edge FDL 31 . The time interval GF 1  may be a propagation delay used to capture the data DF 3 , marked to be DF 3 L, of the data bus signal DQ 3  into the signal DAF 31 . For instance, when the specific falling edge of the data strobe signal DQS 3  is coming in earlier than the falling edge FC 32 , i.e., when the data strobe signal DQS 3  is the signal DQS 32 , the data DF 3 , marked to be DF 3 E, of the data bus signal DQ 3  is latched into the signal DAF 31  at the time point TF 21  lagged behind the falling edge FDE 31  of the signal DQS 32  by the time interval GF 2  until the time point TF 22  in response to the falling edge FDE 31 . The time interval GF 2  may be a propagation delay used to capture the data DF 3 , marked to be DF 3 E, of the data bus signal DQ 3  into the signal DAF 31 . 
     In an embodiment, when the specific falling edge of the data strobe signal DQS 3  is coming in earlier than the falling edge FC 32 , i.e., when the data strobe signal DQS 3  is the signal DQS 32 , the data DF 3 , marked to be DF 3 E-FDE 31 , of the signal DAF 31  is latched into the signal DAF 32  at the time point TF 31  lagged behind the falling edge FC 32  of the clock signal CLK 3  by the time interval GF 3  until the time point TF 32  in response to the falling edge FC 32 . The time interval GF 3  may be a propagation delay used to capture the data DF 3 , marked to be DF 3 E-FDE 31 , of the signal DAF 31  into the signal DAF 32 . When the specific falling edge, e.g. FDE 31 , of the data strobe signal DQS 3  is coming in earlier than the falling edge FC 32 , the data DF 3 , marked to be DF 3 E-FDE 31 -FC 32 , of the signal DAF 32  is relayed to the memory array  301 . When the specific falling edge, e.g. FDL 31 , of the data strobe signal DQS 3  is coming in later than or in phase with the falling edge FC 32 , the data DF 3 , e.g. marked to be DF 3 L-FDL 31 , of the signal DAF 31  is relayed to the memory array  301 . 
     In an embodiment, the time points TF 11  and TF 12  have the duration HF 31  being one clock cycle of the clock signal CLK 3 . The time points TF 21  and TF 22  have the duration HF 32  being one clock cycle of the clock signal CLK 3 . The time points TF 31  and TF 32  have the duration HF 33  being one clock cycle of the clock signal CLK 3 . The data DF 3  is caused to be valid in the data valid window QF 3  being a time interval between the time points TF 11  and TF 32 . In an embodiment, the data DF 3  is seen in the data valid window QF 3  by the internal clock signal ICLK 3 . In an embodiment, the time intervals GF 1 , GF 2  and GF 3  have a same time length, and the data valid window QF 3  lasts a ¾ clock cycle of the clock signal CLK 3 . 
     Comparing the embodiment in  FIG. 4  with the conventional scheme in  FIG. 2 , the data valid window QF 3  of the data DF 3  will increase from the ½ clock cycle to a ¾ clock cycle of the clock signal CLK 3 ; i.e. the data valid window QF 3  is improved by an additional timing margin of a ¼ clock cycle, which causes the memory device employing the scheme in  FIG. 4  to work better with wider PVT variations. 
     In an embodiment, a method is provided for writing data, e.g. DR 3 , to the memory array  301  operating in synchronization with the clock signal CLK 3  having a transition edge, e.g. RC 32 , according to  FIG. 3 . A data strobe signal, e.g. DQS 32 , having a transition edge, e.g. RDE 31 , corresponding to the transition edge, e.g. RC 32 , of the clock signal CLK 3  is provided. The transition edge, e.g. RC 32 , of the clock signal CLK 3  is used to relay the data, e.g. DR 3 , corresponding to the transition edge, e.g. RDE 31 , of the data strobe signal, e.g. DQS 32 , if the transition edge, e.g. RDE 31 , of the data strobe signal, e.g. DQS 32 , is coming in earlier than the transition edge, e.g. RC 32 , of the clock signal CLK 3 . 
     In an embodiment, the transition edge of the clock signal CLK 3  is the rising edge RC 32 , and the transition edge of the data strobe signal DQS 32  is the rising edge RDE 31 . In an embodiment, the transition edge of the clock signal CLK 3  is the falling edge FC 32 , and the transition edge of the data strobe signal DQS 32  is the falling edge FDE 31 . 
     In an embodiment, a method is provided for writing data, e.g. DR 3 , to a memory. In order to increase the timing margin for writing the data, e.g. DR 3 , the clock signal CLK 3  and the data strobe signal DQS 3  are received. Whether the data strobe signal DQS 3  is coming in earlier than the clock signal CLK 3  is detected. If the data strobe signal DQS 3  is coming in earlier than the clock signal CLK 3 , the data, e.g. DR 3 , is relayed based on the clock signal CLK 3  for writing the data, e.g. DR 3 , to the memory. 
     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 embodiments. 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.