To get noise adding radiometer modes working, the noise diode will need to be controlled by HIPSR. To do so, a “master” roach board will control the noise diode, using square wave generator gateware tied to the GPIO output on the ROACH board.
The sections that follow give more detail into how this is/will be achieved.
While the firmware is still in development, here’s the general idea:
Note that while only one board controls the noise diode, all boards require square wave generators. The other option would be to distribute the square wave between boards with cables; this would be pretty horrible.
Firstly, we need to generate the signal with which to control the noise diode. This is done with the sq_wave_gen block:
The output of the ADC is changed from 8_7 bits to 18_17 bits, then FFT’d. There are 16 complex channels output. The power (autocorrelation) is taken, then the signal is quantized down to 8 bits, in prep for the vector accumulator.
The output of the FFT needs to be separated into ON and OFF, which corresponds to the noise diode being on and off. To do this, the square wave generator is used as an input to a ‘demux’ block.
After separating the two signals, they are fed into vector accumulators. As the vectors are short (2x8 channels), bits grow quickly. As such, the input is 8 bit, and the output is 32 bit. This gives 2^24 max accumulations before bit overflows can occur (might need to increase this).
To compute the sum ON - OFF, the outputs of the vector accumulators are fed into an adder block (which is set to minus). This creates a 33 bit signed number (can be -ve), which is recast to 32.
After this, the signal is buffered and then fed into a shared BRAM, which can be accessed via the ROACH’s Power PC.
TODO.