Digital gamma-ray spectroscopy based on FPGA technology