bcm-v4

[Specification

LP PHY Smooth PAPD (int winsz, int start, int end)

  1. Establish a phy table structure
  2. Calculate the size (end - start + 1)
  3. Allocate two tables each of 256 bytes, a source and a destination
  4. Set the table length to 64
  5. Set the table ID to 9
  6. Set the table offset to 0
  7. Set the table width to 32
  8. Set the table data pointer to the source buffer above
  9. Do LP Table Read

  10. Start a loop
    1. win_start = end - min(end, winsz >> 1)

    2. win_end = min(63, end + winsz >> 1)

    3. number to average is win_end - win_start + 1
    4. Zero two quantities called eps_real and eps_imag
    5. Loop from win_start to win_end (inclusive)
      1. Use the loop index to get a data word from the source table and right shift by 12
      2. If the result is greater than 0x7FF
        1. Sign extend by subtracting 0x1000
      3. Add the result to eps_real
      4. Use the loop index to get the same data word and mask with 0xFFF
      5. If the result is greater than 0x7FF
        1. Sign extend as above
      6. Add the result to eps_imag
    6. Divide eps_real and eps_imag by the number of steps in the loop
    7. Calculate eps_real left-shifted by 12 and bitwise ORed with (eps_imag masked with 0xFFF)
    8. Save the result in the destination table using "end" as the index
    9. Decrement end
    10. Repeat as long as end not equal to start
  11. Set the table data pointer to destination
  12. Set the table length to end - start + 1
  13. Set the table offset to 0
  14. Write the LP table

  15. Free the table space

Exported/Archived from the wiki to HTML on 2016-10-27