This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AWR1642BOOST: How to implement mmwavelib_windowing16x16() to windows platform?

Part Number: AWR1642BOOST

Hi team,

We want to create a simulator in Windows, but several function doesn't find in Standard-C like _cmpyr1. 

So we reference the description of mmwavelib_windowing16x16()

* <b>Description</b> : Multiplies a 16 bit complex vector with a 16 bit real windowing vector.
* The rounded result is stored inplace.
* The math is as follows:
* output_real[n]=round(input_real[n]*window[n]/2^15);
* output_imag[n]=round(input_imag[n]*window[n]/2^15)

Then we implement a function like below:

void mmwavelib_windowing16x16_2(cmplx16ReIm_t *inp,
const int16_t *win, uint32_t len)
{
int n = 0;
for (n = 0; n < len; n++)
{
inp[n].real = round(inp[n].real * win[n] / 2 ^ 15);
inp[n].imag = round(inp[n].imag * win[n] / 2 ^ 15);
}
}

And we give obj->adcDataIn same value to check mmwavelib_windowing16x16_2() and mmwavelib_windowing16x16() output result.

obj->adcDataIn[0].imag = 502;
obj->adcDataIn[0].real = -149;
obj->adcDataIn[1].imag = 636;
obj->adcDataIn[1].real = -61;
obj->adcDataIn[2].imag = 636;
obj->adcDataIn[2].real = -30;
obj->adcDataIn[3].imag = 594;
obj->adcDataIn[3].real = -28;
obj->adcDataIn[4].imag = 653;
obj->adcDataIn[4].real = -72;

The result is different. 

Do I miss anything on mmwavelib_windowing16x16_2()?

Thanks for your help.