This Answer Record describes the function and use of the Virtex-II Pro X RocketIO attributes PMA_SPEED_USE and PMA_SPEED_HEX.
The PMA_SPEED attribute is set in the following syntax:
PMA_SPEED : string := "30_16";
// synthesis attribute PMA_SPEED of GT10_OC48_2_INST is "30_16"
defparam GT10_OC48_2_INST.PMA_SPEED = "30_16";
The 30_16 value correlates with a 120-bit hex value that sets the clock mode for the MGT. The corresponding hex value can be found in Table 3 of (Xilinx XAPP767): "RocketIO X Transceiver Clock Mode Switcher for Virtex-II Pro FPGAs."
Altering the hex value for PMA_SPEED_HEX will allow you to create custom clocking modes. This 120-bit hex value maps to the PMA Memory Map that can be found in Appendix C of the Virtex-II Pro X Rocket IO User Guide:
For example, if you wanted to see how the PMA_SPEED value of 30_16 is mapped to the PMA Memory Map, you would look in Table 3 of (Xilinx XAPP767) and see that the 120-bit hex value is 00fc0d300b0f304430680901050420. Taking this value and comparing it to Table C-2 from the RocketIO X User Guide, you could see how this bitstream is setting the values on the PMA Memory Map.
This hex value can be changed to modify the attributes that are shown on the memory map. The 120-bit hex value is MSB 119 down to LSB 0 and this can be mapped up to the PMA Memory Map in the same way. If you look at the hex value for 30_16 (00fc0d300b0f304430680901050420), you can see that least significant byte is going to be all the way to the right at 20. This 20 byte will map up to address 0x00 on the memory map with the 2 corresponding to bits 7:4 and the 0 to bits 3:0. The next byte up will be 04, which will map to address 0x01 in the same manner.
Below are the bits of the hex value lined up with the Memory Map:
You can see how the 120-bit hex value for 30_16 sets up the clocking mode. To create a custom clocking mode, you would need to create your own 120-bit hex value that will set the attributes listed in Appendix C of the RocketIO X User Guide.
To use the PMA_SPEED_HEX attribute to set the clock mode, you will need to set the PMA_SPEED_USE attribute value to PMA_SPEED_HEX instead of PMA_SPEED, as shown below:
PMA_SPEED_USE : string := "PMA_SPEED";
// synthesis attribute PMA_SPEED_USE of GT10_OC48_2_INST is "PMA_SPEED_HEX"
defparam GT10_OC48_2_INST.PMA_SPEED_USE = "PMA_SPEED_HEX";
This will use the PMA_SPEED_HEX value for the PMA Memory Bus instead of the PMA_SPEED value.
To use a custom mode, you will need to set the PMA_SPEED_HEX attribute value accordingly. Below is an example using the default hex value for 30_16:
PMA_SPEED_HEX => x"00ffcd24ca1504d00208c9050d4068",
// synthesis attribute PMA_SPEED_HEX of GT10_OC48_2_INST is "00fc0d300b0f304430680901050420"
defparam GT10_OC48_2_INST.PMA_SPEED_HEX = 120'h00fc0d300b0f304430680901050420;