Ban,
I said "phase-frequency detector". An XOR is not a phase-frequency detector. With an XOR or diode-bridge PD, the only reliable method I know of to indicate lock is to use another PD with a 90 degree phase shift, and look for a high level at its output.
As an aside, I've been designing high performance PLLs since I was a kid astronomer, circa 1981--my first real job was designing all the time and frequency-keeping for the first direct broadcast telecom system, the Spacetel from AEL Microtel. Talk about being chucked in the deep end--I'd never seen a PLL in my life, and wound up having to invent a new kind of fractional-N synthesis method to get the job done.
That's where I first learned to do the algebra carefully before designing stuff. Otherwise I'd have been toast.
Cheers
Phil Hobbs