## Instrument Description
### Control and Recording System
#### 2.5.2 Recorder  
The data recorder's function is to write the 16 data streams to the raw data memory and send its content, as well as the content of the ancillary data and status memory, to the computer through the PCIe bus. The data recorder also works in 1 s cycles, whose start is determined by the 1 PPS marks. When the recording is started, it waits until the next 1 PPS pulse is active to transmit the data of a full second to the computer, and once completed, it sends the packet of ancillary data that has been prepared by the instrument controller during that second. After that, it waits until the next 1 PPS pulse to start the transmission of the next second of data. From this approach, it is clear that the last fraction of data for every second is never recorded, as this short interval of time is needed for sending the ancillary data (time-tagging, instrument status, etc.). In addition, this approach guarantees to have the same amount of data for each second, independently of the actual sampling frequency, which is derived from the actual system reference frequency. When the recorder is in the STOP mode, it behaves exactly as it does in the RECORD mode, except that it skips the step which sends the raw data. Raw-Data Transmission  
The raw data is composed of the 16 in-phase and quadrature 1-bit sampled signals output by the eight up-looking and eight down-looking antennas/receivers. These signals provide a 32-bit stream of data, sampled at a rate of 80 MHz. Therefore, the data recorder deals with a sustained stream of 320 MB/s. Ideally, one would transmit the complete amount of data in 1 s using a single transfer to the computer, but memory limitations within the FPGA and DMA (Direct Memory Access) micro-transfers through the PCIe bus force the continuous stream to split into smaller data units of 64 KiB. The first 4 bytes of these blocks are used as an identifier field (ID), and the remaining 64 KiB-4 bytes correspond \begin{table}
\begin{tabular}{p{142.3 pt} p{142.3 pt}} \hline \hline
**Sub-Block** & **Function** \\ \hline Offset measurement and cancellation & Measures the DC component of all raw signals and generates the corresponding PWM signals to cancel the offsets at all receivers. \\ \hline Input selection & Selects either the antenna or the calibration port of the receivers. \\ \hline Gain control & Programs the adjustable gain of the receivers, works coordinately with the slot addressing block. \\ \hline Slot addressing & Selects the slot address in which the 16 receivers are connected to the backplane in order to be able to program them individually. \\ \hline PMS control & Reads out the PMS measurement and physical temperature of the receivers. Works coordinately with the slot addressing block. \\ \hline Band select & Selects the corresponding RF filter from the filter bank of the receivers and the appropriate VCO (Voltage-Controlled Oscillator) at the synthesizer board. \\ \hline PLL control & Programs the synthesizer board PLL parameters. \\ \hline DAC control & Generates the calibration signal and sends it to the synthesizer board which converts it to the analogue domain and shifts it to RF. \\ \hline Clock control & Measures the actual reference clock frequency respect to the PPS marks and adjust its frequency towards its nominal value by generating a PWM that is delivered to the OXCO. \\ \hline Glitch cleaning & Acquires the 1 PPS signal provided by the standard GPS receiver, cleans it from possible glitches and distributes it to the different blocks for general synchronization. \\ \hline Time stamping & Parses the NMEA message provided by GPS receiver and provides this information to the control unit. \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Function of the different sub-blocks of the Control Unit. to raw data. This ID is used to determine the beginning of a second and the block position within the file, and to check the integrity of the collected data.