cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer
Observer
891 Views
Registered: ‎07-27-2016

Xapp 1249 picoblaze code bug

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.

 

 

Tags (2)
1 Reply
Highlighted
Xilinx Employee
Xilinx Employee
790 Views
Registered: ‎08-01-2007

Re: Xapp 1249 picoblaze code bug

Nice job noticing that there is a mis-match.  We'll pass this back to the Author to get this fixed.

Chris
Versal ACAP: AI Engines | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
Tags (2)