PLLs are fascinating. Software PLLs are less fun than messing with the hardware, in my experience!
I started working on a software PLL recently -- not analog like this one, digital. Specifically, I was trying to work out the math on a fully event driven type-II PLL -- i.e. instead of updating at a fixed sampling rate, it'd wake only when an edge happened on the input or VCO. I was starting to get curious whether there's a solution for that somewhere on the web.
This is a good intro to (hardware) PLLs in general: https://www.youtube.com/watch?v=0jzLDe950AY followed by http://www.ece.tamu.edu/~spalermo/ecen620.html