A circuit-level simulation model of PNPN devices