Commit 961f8050 authored by Raymond Knopp's avatar Raymond Knopp

addition of dfts of size 18432 for PRACH TX/RX with 23.04 Ms/s sampling (15/20 MHz BW).

parent 1e1094fa
......@@ -46,7 +46,7 @@
#include "SCHED/extern.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#define PRACH_DEBUG 1
//#define PRACH_DEBUG 1
uint16_t NCS_unrestricted[16] = {0,13,15,18,22,26,32,38,46,59,76,93,119,167,279,419};
uint16_t NCS_restricted[15] = {15,18,22,26,32,38,46,55,68,82,100,128,158,202,237}; // high-speed case
......@@ -1018,13 +1018,12 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
idft18432(prachF,prach2);
memmove( prach, prach+36864, Ncp<<2 );
prach_len = 18432+Ncp;
printf("Generated prach for 100 PRB, 3/4 sampling\n");
if (prach_fmt>1) {
memmove( prach2+36834, prach2, 73728 );
prach_len = 2*18432+Ncp;
}
}
}
break;
......
......@@ -1200,6 +1200,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
y[i2] = c*ulsch_llr[i++];
i2=(i2+(Cmux<<2)-3);
*/
// slightly more optimized version (equivalent to above) for 16QAM to improve computational performance
*(__m64 *)&y[i2] = _mm_sign_pi16(*(__m64*)&ulsch_llr[i],*(__m64*)&cseq[i]);i+=4;i2+=(Cmux<<2);
......@@ -1531,6 +1532,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
// RI
// rank 1
if ((ulsch_harq->O_RI == 1) && (Qprime_RI > 0)) {
ulsch_harq->o_RI[0] = ((ulsch_harq->q_RI[0] + ulsch_harq->q_RI[Q_m/2]) > 0) ? 0 : 1;
}
......
......@@ -5680,15 +5680,58 @@ void idft12288(int16_t *input, int16_t *output)
// write_output("out.m","out",output,6144,1,1);
}
#include "twiddle18432.h"
// 6144 x 3
void dft18432(int16_t *input, int16_t *output)
{
void dft18432(int16_t *input, int16_t *output) {
int i,i2,j;
uint32_t tmp[3][6144] __attribute__((aligned(32)));
uint32_t tmpo[3][6144] __attribute__((aligned(32)));
for (i=0,j=0; i<6144; i++) {
tmp[0][i] = ((uint32_t *)input)[j++];
tmp[1][i] = ((uint32_t *)input)[j++];
tmp[2][i] = ((uint32_t *)input)[j++];
}
dft6144((int16_t*)(tmp[0]),(int16_t*)(tmpo[0]));
dft6144((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]));
dft6144((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]));
for (i=0,i2=0; i<12288; i+=8,i2+=4) {
bfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),(simd_q15_t*)(&tmpo[2][i2]),
(simd_q15_t*)(output+i),(simd_q15_t*)(output+12288+i),(simd_q15_t*)(output+24576+i),
(simd_q15_t*)(twa18432+i),(simd_q15_t*)(twb18432+i));
}
_mm_empty();
_m_empty();
}
void idft18432(int16_t *input, int16_t *output)
{
void idft18432(int16_t *input, int16_t *output) {
int i,i2,j;
uint32_t tmp[3][6144] __attribute__((aligned(32)));
uint32_t tmpo[3][6144] __attribute__((aligned(32)));
for (i=0,j=0; i<6144; i++) {
tmp[0][i] = ((uint32_t *)input)[j++];
tmp[1][i] = ((uint32_t *)input)[j++];
tmp[2][i] = ((uint32_t *)input)[j++];
}
idft6144((int16_t*)(tmp[0]),(int16_t*)(tmpo[0]));
idft6144((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]));
idft6144((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]));
for (i=0,i2=0; i<12288; i+=8,i2+=4) {
ibfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),(simd_q15_t*)(&tmpo[2][i2]),
(simd_q15_t*)(output+i),(simd_q15_t*)(output+12288+i),(simd_q15_t*)(output+24576+i),
(simd_q15_t*)(twa18432+i),(simd_q15_t*)(twb18432+i));
}
_mm_empty();
_m_empty();
}
#include "twiddle24576.h"
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment