Understanding AmplitudeController Class in RFSoC4x2 Xilinx Example

Hello, I’m currently studying this design on RFSoC4x2 board: RFSoC-PYNQ/boards/RFSoC4x2/base/notebooks/rfdc/01_rf_dataconverter_introduction.ipynb at master · Xilinx/RFSoC-PYNQ · GitHub

I was looking at the file transmitter.py: RFSoC-PYNQ/boards/RFSoC4x2/packages/rfsystem/package/rfsystem/transmitter.py at master · Xilinx/RFSoC-PYNQ · GitHub


I’m not able to understand what kind of bit processing is being done on the gain value to convert it to a 32 bit integer value.

Also, I noticed that when I set the value of gain as 0.5, then call the getter function control.gain, it prints the value 1.5