Designware i2c driver, HCNT calculation logic