if something is not clear in picture, I can explain, I used this idea many many times and it worked great for filters. you just need to charge cap by reference current for a few cycles of ref clock and then compare Vcap to voltage drop across res Vres. when Vcap gets higher Vres it means that Tref=Cap*Res, and res mism is compensated by trim capacitance.
added small update, check timig dig with phases, signal mode controls charge time, then switch current for Vres generation. in the end of cycle disharge cap.