Simulation on intensity self-pulsation in cw semiconductor lasers