Role of electron and hole trapping in the degradation and breakdown of SiO2 and HfO2 films