Added function for Datawidth calculation of registers