Commit 51314491 authored by Cedric Roux's avatar Cedric Roux

bugfix: add handling of DFT 768 everywhere it's needed

In the eNB it's not really used for the moment because there
is a limitation to uplink scheduling. In
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c we have:

            while (((rb_table[rb_table_index] > (N_RB_UL - 1 - first_rb[CC_id]))
                    || (rb_table[rb_table_index] > 45))

That limits uplink scheduling to at most 44 RBs. The 768 case is for
64 RBs.
parent 2a82e02a
...@@ -91,7 +91,7 @@ int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32))); ...@@ -91,7 +91,7 @@ int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32)));
eNB->ulsch[UE_id]->harq_processes[harq_pid]->n_DMRS2 + eNB->ulsch[UE_id]->harq_processes[harq_pid]->n_DMRS2 +
frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[(subframe<<1)+Ns]) % 12; frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[(subframe<<1)+Ns]) % 12;
Msc_idx_ptr = (uint16_t*) bsearch(&Msc_RS, dftsizes, 33, sizeof(uint16_t), compareints); Msc_idx_ptr = (uint16_t*) bsearch(&Msc_RS, dftsizes, 34, sizeof(uint16_t), compareints);
if (Msc_idx_ptr) if (Msc_idx_ptr)
Msc_RS_idx = Msc_idx_ptr - dftsizes; Msc_RS_idx = Msc_idx_ptr - dftsizes;
......
...@@ -27,13 +27,13 @@ ...@@ -27,13 +27,13 @@
#include "lte_refsig.h" #include "lte_refsig.h"
#include "PHY/defs_eNB.h" #include "PHY/defs_eNB.h"
uint16_t dftsizes[33] = {12,24,36,48,60,72,96,108,120,144,180,192,216,240,288,300,324,360,384,432,480,540,576,600,648,720,864,900,960,972,1080,1152,1200}; uint16_t dftsizes[34] = {12,24,36,48,60,72,96,108,120,144,180,192,216,240,288,300,324,360,384,432,480,540,576,600,648,720,768,864,900,960,972,1080,1152,1200};
uint16_t ref_primes[33] = {11,23,31,47,59,71,89,107,113,139,179,191,211,239,283,293,317,359,383,431,479,523,571,599,647,719,863,887,953,971,1069,1151,1193}; uint16_t ref_primes[34] = {11,23,31,47,59,71,89,107,113,139,179,191,211,239,283,293,317,359,383,431,479,523,571,599,647,719,761,863,887,953,971,1069,1151,1193};
int16_t *ul_ref_sigs[30][2][33]; int16_t *ul_ref_sigs[30][2][34];
int16_t *ul_ref_sigs_rx[30][2][33]; //these contain the sequences in repeated format and quantized to QPSK ifdef IFFT_FPGA int16_t *ul_ref_sigs_rx[30][2][34]; //these contain the sequences in repeated format and quantized to QPSK ifdef IFFT_FPGA
/* 36.211 table 5.5.1.2-1 */ /* 36.211 table 5.5.1.2-1 */
char ref12[360] = {-1,1,3,-3,3,3,1,1,3,1,-3,3,1,1,3,3,3,-1,1,-3,-3,1,-3,3,1,1,-3,-3,-3,-1,-3,-3,1,-3,1,-1,-1,1,1,1,1,-1,-3,-3,1,-3,3,-1,-1,3,1,-1,1,-1,-3,-1,1,-1,1,3,1,-3,3,-1,-1,1,1,-1,-1,3,-3,1,-1,3,-3,-3,-3,3,1,-1,3,3,-3,1,-3,-1,-1,-1,1,-3,3,-1,1,-3,3,1,1,-3,3,1,-1,-1,-1,1,1,3,-1,1,1,-3,-1,3,3,-1,-3,1,1,1,1,1,-1,3,-1,1,1,-3,-3,-1,-3,-3,3,-1,3,1,-1,-1,3,3,-3,1,3,1,3,3,1,-3,1,1,-3,1,1,1,-3,-3,-3,1,3,3,-3,3,-3,1,1,3,-1,-3,3,3,-3,1,-1,-3,-1,3,1,3,3,3,-1,1,3,-1,1,-3,-1,-1,1,1,3,1,-1,-3,1,3,1,-1,1,3,3,3,-1,-1,3,-1,-3,1,1,3,-3,3,-3,-3,3,1,3,-1,-3,3,1,1,-3,1,-3,-3,-1,-1,1,-3,-1,3,1,3,1,-1,-1,3,-3,-1,-3,-1,-1,-3,1,1,1,1,3,1,-1,1,-3,-1,-1,3,-1,1,-3,-3,-3,-3,-3,1,-1,-3,1,1,-3,-3,-3,-3,-1,3,-3,1,-3,3,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1,-3,-1,-3,3,1,-1,1,3,-3,-3,-1,3,-3,3,-1,3,3,-3,3,3,-1,-1,3,-3,-3,-1,-1,-3,-1,3,-3,3,1,-1};
...@@ -49,7 +49,7 @@ void generate_ul_ref_sigs(void) ...@@ -49,7 +49,7 @@ void generate_ul_ref_sigs(void)
unsigned int u,v,Msc_RS,q,m,n; unsigned int u,v,Msc_RS,q,m,n;
// These are the Zadoff-Chu sequences (for RB 3-100) // These are the Zadoff-Chu sequences (for RB 3-100)
for (Msc_RS=2; Msc_RS<33; Msc_RS++) { for (Msc_RS=2; Msc_RS<34; Msc_RS++) {
for (u=0; u<30; u++) { for (u=0; u<30; u++) {
for (v=0; v<2; v++) { for (v=0; v<2; v++) {
qbar = ref_primes[Msc_RS] * (u+1)/(double)31; qbar = ref_primes[Msc_RS] * (u+1)/(double)31;
...@@ -119,7 +119,7 @@ void generate_ul_ref_sigs_rx(void) ...@@ -119,7 +119,7 @@ void generate_ul_ref_sigs_rx(void)
unsigned int u,v,Msc_RS,q,m,n; unsigned int u,v,Msc_RS,q,m,n;
// These are the complex conjugated Zadoff-Chu sequences quantized to QPSK stored in repeated format (for RB 3-100) // These are the complex conjugated Zadoff-Chu sequences quantized to QPSK stored in repeated format (for RB 3-100)
for (Msc_RS=2; Msc_RS<33; Msc_RS++) { for (Msc_RS=2; Msc_RS<34; Msc_RS++) {
for (u=0; u<30; u++) { for (u=0; u<30; u++) {
for (v=0; v<2; v++) { for (v=0; v<2; v++) {
qbar = ref_primes[Msc_RS] * (u+1)/(double)31; qbar = ref_primes[Msc_RS] * (u+1)/(double)31;
...@@ -186,7 +186,7 @@ void free_ul_ref_sigs(void) ...@@ -186,7 +186,7 @@ void free_ul_ref_sigs(void)
unsigned int u,v,Msc_RS; unsigned int u,v,Msc_RS;
for (Msc_RS=0; Msc_RS<33; Msc_RS++) { for (Msc_RS=0; Msc_RS<34; Msc_RS++) {
for (u=0; u<30; u++) { for (u=0; u<30; u++) {
for (v=0; v<2; v++) { for (v=0; v<2; v++) {
if (ul_ref_sigs[u][v][Msc_RS]) { if (ul_ref_sigs[u][v][Msc_RS]) {
......
...@@ -25,10 +25,10 @@ extern char lte_cqi_snr_dB[15]; ...@@ -25,10 +25,10 @@ extern char lte_cqi_snr_dB[15];
extern short conjugate[8],conjugate2[8]; extern short conjugate[8],conjugate2[8];
extern short minus_one[8]; extern short minus_one[8];
extern short minus_one[8]; extern short minus_one[8];
extern short *ul_ref_sigs[30][2][33]; extern short *ul_ref_sigs[30][2][34];
extern short *ul_ref_sigs_rx[30][2][33]; extern short *ul_ref_sigs_rx[30][2][34];
extern unsigned short dftsizes[33]; extern unsigned short dftsizes[34];
extern unsigned short ref_primes[33]; extern unsigned short ref_primes[34];
extern int qam64_table[8],qam16_table[4],qpsk_table[2]; extern int qam64_table[8],qam16_table[4],qpsk_table[2];
......
...@@ -335,6 +335,12 @@ void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH) ...@@ -335,6 +335,12 @@ void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH)
dft720((int16_t*)idft_in2,(int16_t*)idft_out2,1); dft720((int16_t*)idft_in2,(int16_t*)idft_out2,1);
break; break;
case 768:
dft768((int16_t*)idft_in0,(int16_t*)idft_out0,1);
dft768((int16_t*)idft_in1,(int16_t*)idft_out1,1);
dft768((int16_t*)idft_in2,(int16_t*)idft_out2,1);
break;
case 864: case 864:
dft864((int16_t*)idft_in0,(int16_t*)idft_out0,1); dft864((int16_t*)idft_in0,(int16_t*)idft_out0,1);
dft864((int16_t*)idft_in1,(int16_t*)idft_out1,1); dft864((int16_t*)idft_in1,(int16_t*)idft_out1,1);
......
...@@ -83,7 +83,7 @@ int generate_drs_pusch(PHY_VARS_UE *ue, ...@@ -83,7 +83,7 @@ int generate_drs_pusch(PHY_VARS_UE *ue,
// cyclic_shift1 = 0; // cyclic_shift1 = 0;
Msc_RS = 12*nb_rb; Msc_RS = 12*nb_rb;
Msc_idx_ptr = (uint16_t*) bsearch(&Msc_RS, dftsizes, 33, sizeof(uint16_t), compareints); Msc_idx_ptr = (uint16_t*) bsearch(&Msc_RS, dftsizes, 34, sizeof(uint16_t), compareints);
if (Msc_idx_ptr) if (Msc_idx_ptr)
Msc_RS_idx = Msc_idx_ptr - dftsizes; Msc_RS_idx = Msc_idx_ptr - dftsizes;
......
...@@ -181,7 +181,7 @@ int32_t generate_srs(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -181,7 +181,7 @@ int32_t generate_srs(LTE_DL_FRAME_PARMS *frame_parms,
return(-1); return(-1);
} }
Msc_idx_ptr = (uint16_t*) bsearch((uint16_t*) &Msc_RS, (uint16_t*) dftsizes, 33, sizeof(uint16_t), compareints); Msc_idx_ptr = (uint16_t*) bsearch((uint16_t*) &Msc_RS, (uint16_t*) dftsizes, 34, sizeof(uint16_t), compareints);
if (Msc_idx_ptr) if (Msc_idx_ptr)
Msc_RS_idx = Msc_idx_ptr - dftsizes; Msc_RS_idx = Msc_idx_ptr - dftsizes;
......
...@@ -287,6 +287,12 @@ void dft_lte(int32_t *z,int32_t *d, int32_t Msc_PUSCH, uint8_t Nsymb) ...@@ -287,6 +287,12 @@ void dft_lte(int32_t *z,int32_t *d, int32_t Msc_PUSCH, uint8_t Nsymb)
dft720((int16_t*)dft_in2,(int16_t*)dft_out2,1); dft720((int16_t*)dft_in2,(int16_t*)dft_out2,1);
break; break;
case 768:
dft768((int16_t*)dft_in0,(int16_t*)dft_out0,1);
dft768((int16_t*)dft_in1,(int16_t*)dft_out1,1);
dft768((int16_t*)dft_in2,(int16_t*)dft_out2,1);
break;
case 864: case 864:
dft864((int16_t*)dft_in0,(int16_t*)dft_out0,1); dft864((int16_t*)dft_in0,(int16_t*)dft_out0,1);
dft864((int16_t*)dft_in1,(int16_t*)dft_out1,1); dft864((int16_t*)dft_in1,(int16_t*)dft_out1,1);
......
...@@ -375,6 +375,7 @@ void dft576(int16_t *x,int16_t *y,uint8_t scale_flag); ...@@ -375,6 +375,7 @@ void dft576(int16_t *x,int16_t *y,uint8_t scale_flag);
void dft600(int16_t *x,int16_t *y,uint8_t scale_flag); void dft600(int16_t *x,int16_t *y,uint8_t scale_flag);
void dft648(int16_t *x,int16_t *y,uint8_t scale_flag); void dft648(int16_t *x,int16_t *y,uint8_t scale_flag);
void dft720(int16_t *x,int16_t *y,uint8_t scale_flag); void dft720(int16_t *x,int16_t *y,uint8_t scale_flag);
void dft768(int16_t *x,int16_t *y,uint8_t scale_flag);
void dft864(int16_t *x,int16_t *y,uint8_t scale_flag); void dft864(int16_t *x,int16_t *y,uint8_t scale_flag);
void dft900(int16_t *x,int16_t *y,uint8_t scale_flag); void dft900(int16_t *x,int16_t *y,uint8_t scale_flag);
void dft960(int16_t *x,int16_t *y,uint8_t scale_flag); void dft960(int16_t *x,int16_t *y,uint8_t scale_flag);
......
...@@ -27,5 +27,5 @@ void exit_fun(const char *s) { exit(-1); } ...@@ -27,5 +27,5 @@ void exit_fun(const char *s) { exit(-1); }
extern unsigned int dlsch_tbs25[27][25],TBStable[27][110]; extern unsigned int dlsch_tbs25[27][25],TBStable[27][110];
extern unsigned char offset_mumimo_llr_drange_fix; extern unsigned char offset_mumimo_llr_drange_fix;
extern unsigned short dftsizes[33]; extern unsigned short dftsizes[34];
extern short *ul_ref_sigs[30][2][33]; extern short *ul_ref_sigs[30][2][34];
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