Modeling of Charge-Trapping/Detrapping-Induced Voltage Instability in High- $k$ Gate Dielectrics