calibration working in DDR2/3 memory devices
DDR2 and DDR3 offer several new features that allow to alleviate differences in PCB channels and achieve higher communication rates. DDR3 offers driver calibration function (ODT), termination calibration (ZQ), and timing calibration.

Quick Google search shows several presentations describing these features, e.g. Micron article, and NXP article. Regarding the actual RTL implementations, the information is likely very proprietary, and this forum is not the right place to ask for details.