11-06-2018 03:41 AM
We found this bug on provided pico blaze code, (and hence the generated Rom code) on xapp 1249.
LOAD s0, new_mode ; Get the new_mode value
AND s0, 0E ; Clear the rx_pll_select bit
COMPARE s0, 02 ; Is the rx_mode == 3'b001 (SD-SDI)?
JUMP Z, rx_mode_is_SD
COMPARE s0, 05 ; Is the rx_mode == 3'b101 (12G-SDI)?
JUMP Z, rx_mode_is_12G
COMPARE s0, 06 ; Is the rx_mode == 3'b110 (12G-SDI)?
JUMP Z, rx_mode_is_12G
Must be:
LOAD s0, new_mode ; Get the new_mode value
AND s0, 0E ; Clear the rx_pll_select bit
COMPARE s0, 02 ; Is the rx_mode == 3'b001 (SD-SDI)?
JUMP Z, rx_mode_is_SD
COMPARE s0, 0A ; Is the rx_mode == 3'b101 (12G-SDI)?
JUMP Z, rx_mode_is_12G
COMPARE s0, 0C ; Is the rx_mode == 3'b110 (12G-SDI)?
JUMP Z, rx_mode_is_12G
Note that to check if its SD-SDI its looking for 2 (not 1)
the LSB is actually rx/tx_pll_select, but its cleared above.
11-14-2018 10:57 AM
Nice job noticing that there is a mis-match. We'll pass this back to the Author to get this fixed.