The characterization of a-Si:H structure, using an electron beam in the keV range, is an interesting alternative to the more common photon beam techniques. a-Si:H device characterization by the determination of collection efficiency and other electronic parameters can be performed by variable energy EBIC method. But this requires an accurate knowledge of electron generation function and electron range in a-Si:H. In this paper we present an experimental determination of electron generation function and electron range in a-Si:H. To do this, a series of identical n-i-p a-Si:H diodes with a thin aluminium top electrodes were fabricated and varying thicknesses of a-Si:H layer were deposited on it. In EBIC measurements, the n-i-p diode was reverse biased at maximum potential. The electron range of a-Si:H was determined directly by measuring the energy at which electron beam is completely stopped in the top layer and no carrier generation is possible in the n-i-p diode. The generation function is then deduced from EBIC contrast measurements between the aluminium electrode and the top a-Si:H layer.