AnsweredAssumed Answered

the location of I data and Q data in the data to be transmitted

Question asked by angleIsDancing on Mar 22, 2016
Latest reply on Mar 29, 2016 by AdrianC

Hi,all:

     In the project no-OS, there are two lines of code:

==============================

data_i1 = (sine_lut[index_i1 / 2] << 20);

data_q1 = (sine_lut[index_q1 / 2] << 4);

in the file dac_core.c. which means the 16 LSB‘s of the data is Q data.

 

And in the file util_dac_unpack.v there are four lines of code:

==============================================

  assign dac_data_00 = dac_data[DATA_WIDTH*1-1:DATA_WIDTH*0];//i0

  assign dac_data_01 = dac_data[DATA_WIDTH*2-1:DATA_WIDTH*1];//q0

  assign dac_data_02 = dac_data[DATA_WIDTH*3-1:DATA_WIDTH*2];//i1

  assign dac_data_03 = dac_data[DATA_WIDTH*4-1:DATA_WIDTH*3];//q1

which means the 16 LSB’s of the data is I data.

 

and in the end of the file util_dac_unpack, there are some code below:

=======================================================

          if (dac_enable[j])

            dac_data[DATA_WIDTH+j*DATA_WIDTH-1:j*DATA_WIDTH] <= data_array[offset[j]];

          else

            dac_data[DATA_WIDTH+j*DATA_WIDTH-1:j*DATA_WIDTH] <= 'h0000;

does the code exchange the locations of I data and Q data?

======================================================== 

if yes, why it do not put I data in the 16 LSB's of memory unit directly? If no, could anybody tell me where is my promble? do I misunderstand something? (forgive me, I am a newer and have asked so many naive questions in the zone.)

 

Thanks,

Gan

Outcomes