Gate-level current waveform simulation of cmos integrated circuits