Reading the API documentation of the capture card, we can see the read interface as follows.
int pcie7820_set_upload_data_param(unsigned int upload_ch_num,unsigned int upload_data_src,unsigned int upload_data_rate)
function description:
Set up the board upload data parameters. Digital downconversion has been done on the board to perform digital I/Q demodulation of the collected data. The upload_ch_num parameter and upload_data_src are used together to select where in the demodulation algorithm to read the data.
Digital Quadrature Demodulation Process
function parameter:
upload_ch_num :Set the number of channels to upload;
1 - upload one channel of data; 2 - upload two channels of data; 4 - upload four channels of data;
upload_data_src:Upload data source selection;
0 - upload raw acquisition data; 2 - upload IQ data; 3 - upload phase and magnitude data;
upload_data_rate:Sets the upload data rate;
1---1GSps;2---500MSps;4---250MSps;8---125MSps;12---83.333MSps;
16---62.5MSps;20---50MSps;24---41.66MSps;28---35.714MSps;
32---31.25MSps;
The function returns the value:
Success, 0
Failure, -1
The data read by the pcie7820_read_data function should be parsed according to the following table:
item | upload_ch_num | upload_data_src | Uploaded data | Upload data parsing rules |
---|---|---|---|---|
1 | 1 | 0 | Raw data captured on channel 0 | ch0_raw_data--- ch0_raw_data --- ch0_raw_data --- ch0_raw_data--- |
2 | 1 | 2 | I data for channel 0 after low-pass filtering | I0---I0----I0---I0…… |
3 | 1 | 3 | Channel 0 demodulated phase data | arctan(Q0/I0)--- arctan(Q0/I0)--- arctan(Q0/I0)--- arctan(Q0/I0)--- |
4 | 2 | 0 | Raw data captured on channels 0 and 1 | ch0_raw_data--- ch1_raw_data --- ch0_raw_data --- ch1_raw_data…… |
5 | 2 | 2 | I and Q data of channel 0 after low-pass filtering | I0---Q0---I0----Q0…… |
6 | 2 | 3 | Channel 0 demodulated phase and amplitude data | arctan(Q0/I0)---√(I02+Q02)--- arctan(Q0/I0)---√(I02+Q02)… |
7 | 4 | 0 | unsupported | unsupported |
8 | 4 | 2 | I and Q data of channels 0 and 1 after low-pass filtering | I0---Q0---I1----Q1---I0---Q0---I1----Q1…… |
9 | 4 | 3 | Phase and amplitude data after demodulation of channels 0 and 1 | arctan(Q0/I0)---√(I02+Q02)--- arctan(Q1/I1)---√(I12+Q12)--- arctan(Q0/I0)---√(I02+Q02)--- arctan(Q1/I1)---√(I12+Q12)… |
ch0_raw_data---ch1_raw_data---I0---Q0---I1----Q1--- arctan(Q0/I0)--- arctan(Q1/I1),These 8 types of data need to be parsed as 16-bit signed data (short).;√(I02+Q02)---√(I12+Q12),These two types of data need to be parsed as 16-bit unsigned short numbers.
The arctan phase value read up is a fixed point number, and its correspondence with π is: 25735 - positive π, -25735 - negative π.