Other Parts Discussed in Thread: MMWAVE-SDK, TIDEP-0091
Hi experts,
I'm currently trying to utilize the Complex Multiplication block of the HWA, especially the Vector multiplication mode 1. Unfortunately I don't get it to deliver any plausible results.
Here is how my first implementation for testing looks like:
To avoid the bit shifting topic in the first place I use two vectors filled with int16 max values. The multiplication coefficients vector is shown below, it contains int16 max for the I part and zero for the Q part. It is loaded to the internal ram with the code below. This is of course executed before any HWA operation takes place.
if((globalRadarCfg.u16postProc&IWR_POSTPROC_COMP_MULT)==IWR_POSTPROC_COMP_MULT) { int16_t compMult_BufLen = 2048; int16_t compMult_Buf[ compMult_BufLen ]; memset( compMult_Buf, 32767, sizeof(compMult_Buf) ); uint16_t i; for( i=0 ; i < compMult_BufLen ; i=i+2 ) { //compMult_Buf[i] = 0; compMult_Buf[i+1] = 0; } errCode = HWA_configRam(obj->hwaHandle, HWA_RAM_TYPE_INTERNAL_RAM, (uint8_t *)&compMult_Buf[0], sizeof(compMult_Buf), //size in bytes 0); //offset in bytes while(errCode!=0) { } }
A test vector is loaded to the HWA memory buffer and the HWA source address is pointing to it. This test vector contains int16 max value for all array entries. For testing I also optionally multiplied it with (-1).
Finally the HWA multiplication block is enabled:
if((globalRadarCfg.u16postProc&IWR_POSTPROC_COMP_MULT)==IWR_POSTPROC_COMP_MULT) { hwaParamCfg[u8paramsetIdx].complexMultiply.mode = HWA_COMPLEX_MULTIPLY_MODE_VECTOR_MULT; hwaParamCfg[u8paramsetIdx].source.srcScale = 0; } else { hwaParamCfg[u8paramsetIdx].complexMultiply.mode = HWA_COMPLEX_MULTIPLY_MODE_DISABLE; hwaParamCfg[u8paramsetIdx].source.srcScale = 0; }
FFT, windowing and magnitude are disabled and the IQ data is saved as 16 bit values again after the HWA treatment.
So what I expect as result despite any shifting is that the Q part remains zero. Moreover I expect the I part to change the sign when the test vector only contains negative values. Unfortunately I cannot observe any of these behaviours. The output results just don't make very much sense for me currently.
So my question is, what I do wrong? Where am I missing something?
Also please let me now I you need further details about my code implementation.
Kind regards,
Fabian