The DQS to DQ/DBI centering calibration stage is required to provide enough setup and hold margin for DQ lines with respect to their sampling DQS. To perform this calibration stage a known pattern is written in the memory and read back. And both the patterns, sent and received, are compared. Based on the comparison result the write path delay of the DQ lines are changed to center align with respect to the DQS.