Implement ec_simul_gen