I've just been debugging mine (XCV2) ... In principle this is what I do:
A decrease phase until memory errors occur B increase phase until no errors, note phase (min value) C increase by a number of steps (i used 10) to get out of the edge region D increase phase until memory errors occur, note phase (max value) E set the phase to mid value.
All this assumes that I start of in the data eye, or below it. My problems so far were: C is needed, i.e. when leaving the unstable region you really need to take a safe step away from the edge. Secondly I discovered that dcm_status(0) i.e. ps overflow became set when scanning the phase upwards. So I changed "memory errors" to "memory errors OR dcm_status(0)". An early misstake I did was to assume PSDONE staying high, in reality (also stated in the manual) it just pulses for one cycle.
Hppe this helps, good luck /Pontus