We consider a scenario in which the baryon asymmetry was created in the early universe during a cold electroweak transition. The spinodal instability of the Higgs field caused by a rapid change of sign of its effective mass-squared parameter induces tachyonic preheating. We study the development of Chern-Simons number in this transition by numerical lattice simulations of the SU(2)-Higgs model with an added effective CPviolating term. A net asymmetry is produced, and we study its dependence on the size of CP violation and the ratio of Higgs to W mass.