Current Link Speed
This signal outputs the current link speed from Link Status
register bits 1 down to 0. This field indicates the negotiated
Link speed of the given PCI Express Link.
• 001b: 2.5 GT/s PCI Express Link
• 010b: 5.0 GT/s PCI Express Link
• 100b: 8.0 GT/s PCI Express Link
I think you are trying to change the 1 hot bits to a 2 bit unsigned number right?
It seems that there is a typo here https://github.com/KastnerRG/riffa/blob/4e9d3c8d81b164e291f343bf6e0417c9241e6bee/fpga/xilinx/vc709/riffa_wrapper_vc709.v#L286
I think it should be
According to the Ultrascale datasheet
I think you are trying to change the 1 hot bits to a 2 bit unsigned number right?