Transistor-level oriented calculation of reliability for generalized gates based on PTM