How do I calculate the disparity ahead of time, in case it needs to be controlled by the TXCHARDISPVAL and TXCHARDISPMODE?
On the TX side, you can use TXCHARDISPMODE and TXCHARDISPVAL to set the disparity (negative) for certain applications.
The following link downloads code from Xilinx that calculates the disparity ahead of time, so that you can control the disparity of TXDATA by TXCHARDISPVAL and TXCHARDISPMODE, as required:
http://www.xilinx.com/txpatches/pub/applications/refdes/disp.zip