Development of Software PHA for Measurements of Soft-X-Ray Spectral Distribution in HL-2A Tokamak