Modify for change the cast fro 64bit machine.
upgrade for ISE14.5.
Added a pre-process to correct the data.