generating and uploading the table
The generated table uploaded to the B PHY registers 0x3A0 and following.
- set result table index to 0
- for each index for the RF attenuation list (assigned when measuring the LO)
- for each index for the baseband attenuation list (also assigned when measuring the LO)
look up the I value in the computed LO I/Q table for the tuple (0xF & (RF attenuation from the current index), baseband attenuation for the current index, RF attenuation value & 0x10 & the current PAD mix mask), let's call it V1. The PAD mix mask as well as the LO I/Q table are computed while measuring the LO.
if the next iteration of the combined loops would also happen, look up the value V2 for the next iteration, otherwise use V1 for V2.
- create a value like this (FIXME: THIS IS NOT CORRECT, THE WHOLE FUNCTION MIGHT LOOK SLIGHTLY DIFFERENT)
mask
contents
0xF000
lower 4 bits of V2
0x0F00
V2 & 0xF00
0x00F0
lower 4 bits of V1
0x000F
value of the bits in mask 0xF0 of V1
- write that value to the table at the result table index
- increase the result table index
- skip the next iteration of the combined loops (its value has been used already if it existed)
- for each index for the baseband attenuation list (also assigned when measuring the LO)