Merge branch 'develop' into parallel-config
Conflicts: targets/RT/USER/lte-ru.c
This commit is contained in:
@@ -130,7 +130,7 @@ int load_codinglib(void) {
|
||||
shlib_fdesc[ENCODE_SSE_FPTRIDX].fname= "threegpplte_turbo_encoder_sse";
|
||||
shlib_fdesc[ENCODE_C_FPTRIDX].fname= "threegpplte_turbo_encoder";
|
||||
shlib_fdesc[ENCODE_INIT_SSE_FPTRIDX].fname= "init_encoder_sse";
|
||||
ret=load_module_shlib("coding",shlib_fdesc,DECODE_NUM_FPTR);
|
||||
ret=load_module_shlib("coding",shlib_fdesc,DECODE_NUM_FPTR,NULL);
|
||||
if (ret < 0) exit_fun("Error loading coding library");
|
||||
|
||||
/* execute encoder/decoder init functions */
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-------------------------------------------------------------------------------
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*!\brief Initilization and reconfiguration routines for LTE PHY */
|
||||
#include "phy_init.h"
|
||||
@@ -27,12 +27,11 @@
|
||||
#include "PHY/LTE_REFSIG/lte_refsig.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
|
||||
|
||||
void generate_64qam_table(void)
|
||||
{
|
||||
void init_sss(void);
|
||||
|
||||
void generate_64qam_table(void) {
|
||||
int a,b,c,index;
|
||||
|
||||
|
||||
for (a=-1; a<=1; a+=2)
|
||||
for (b=-1; b<=1; b+=2)
|
||||
for (c=-1; c<=1; c+=2) {
|
||||
@@ -41,9 +40,7 @@ void generate_64qam_table(void)
|
||||
}
|
||||
}
|
||||
|
||||
void generate_16qam_table(void)
|
||||
{
|
||||
|
||||
void generate_16qam_table(void) {
|
||||
int a,b,index;
|
||||
|
||||
for (a=-1; a<=1; a+=2)
|
||||
@@ -53,54 +50,42 @@ void generate_16qam_table(void)
|
||||
}
|
||||
}
|
||||
|
||||
void generate_qpsk_table(void)
|
||||
{
|
||||
|
||||
void generate_qpsk_table(void) {
|
||||
int a,index;
|
||||
|
||||
for (a=-1; a<=1; a+=2) {
|
||||
index = (1+a)/2;
|
||||
qpsk_table[index] = -a*QPSK;
|
||||
qpsk_table[index] = -a*QPSK;
|
||||
}
|
||||
}
|
||||
|
||||
void init_lte_top(LTE_DL_FRAME_PARMS *frame_parms)
|
||||
{
|
||||
|
||||
void init_7_5KHz(void);
|
||||
void init_lte_top(LTE_DL_FRAME_PARMS *frame_parms) {
|
||||
ccodelte_init();
|
||||
ccodelte_init_inv();
|
||||
|
||||
init_dfts();
|
||||
|
||||
|
||||
phy_generate_viterbi_tables_lte();
|
||||
|
||||
load_codinglib();
|
||||
lte_sync_time_init(frame_parms);
|
||||
|
||||
generate_ul_ref_sigs();
|
||||
generate_ul_ref_sigs_rx();
|
||||
|
||||
generate_64qam_table();
|
||||
generate_16qam_table();
|
||||
generate_qpsk_table();
|
||||
generate_RIV_tables();
|
||||
|
||||
init_unscrambling_lut();
|
||||
init_scrambling_lut();
|
||||
//set_taus_seed(1328);
|
||||
|
||||
|
||||
init_7_5KHz();
|
||||
init_sss();
|
||||
}
|
||||
|
||||
void free_lte_top(void)
|
||||
{
|
||||
void free_lte_top(void) {
|
||||
free_codinglib();
|
||||
lte_sync_time_free();
|
||||
|
||||
/* free_ul_ref_sigs() is called in phy_free_lte_eNB() */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @}*/
|
||||
@}*/
|
||||
|
||||
@@ -450,11 +450,11 @@ void phy_config_sib2_eNB(uint8_t Mod_id,
|
||||
} else if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames) { // 24-bit subframe configuration
|
||||
fp->MBSFN_config[i].fourFrames_flag = 1;
|
||||
fp->MBSFN_config[i].mbsfn_SubframeConfig =
|
||||
mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]|
|
||||
mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[2]|
|
||||
(mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[1]<<8)|
|
||||
(mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[2]<<16);
|
||||
(mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]<<16);
|
||||
|
||||
LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %d\n", i,
|
||||
LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %x\n", i,
|
||||
fp->MBSFN_config[i].mbsfn_SubframeConfig);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,11 +165,11 @@ void phy_config_sib2_ue(module_id_t Mod_id,int CC_id,
|
||||
} else if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames) { // 24-bit subframe configuration
|
||||
fp->MBSFN_config[i].fourFrames_flag = 1;
|
||||
fp->MBSFN_config[i].mbsfn_SubframeConfig =
|
||||
mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]|
|
||||
mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[2]|
|
||||
(mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[1]<<8)|
|
||||
(mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[2]<<16);
|
||||
(mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]<<16);
|
||||
|
||||
LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %d\n", i,
|
||||
LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %x\n", i,
|
||||
fp->MBSFN_config[i].mbsfn_SubframeConfig);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "phy_init.h"
|
||||
#include "log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
uint16_t dl_S_table_normal[10]={3,9,10,11,12,3,9,10,11,6};
|
||||
uint16_t dl_S_table_extended[10]={3,8,9,10,3,8,9,5,0,0};
|
||||
|
||||
@@ -61,8 +61,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
temp = 0;
|
||||
|
||||
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
|
||||
Re = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[(i<<2)];
|
||||
Im = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[1+(i<<2)];
|
||||
Re = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[(i<<1)];
|
||||
Im = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[1+(i<<1)];
|
||||
temp += (Re*Re/2) + (Im*Im/2);
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
// do not filter to have proactive timing adjustment
|
||||
max_pos_fil = max_pos;
|
||||
|
||||
if(subframe == 6)
|
||||
if(subframe == 5)
|
||||
{
|
||||
diff = max_pos_fil - (frame_parms->nb_prefix_samples>>3);
|
||||
|
||||
|
||||
@@ -62,8 +62,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
temp = 0;
|
||||
|
||||
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
|
||||
Re = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[(i<<2)];
|
||||
Im = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[1+(i<<2)];
|
||||
Re = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[(i<<1)];
|
||||
Im = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[1+(i<<1)];
|
||||
temp += (Re*Re/2) + (Im*Im/2);
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
// do not filter to have proactive timing adjustment
|
||||
max_pos_fil = max_pos;
|
||||
|
||||
if(subframe == 6)
|
||||
if(subframe == 5)
|
||||
{
|
||||
diff = max_pos_fil - (frame_parms->nb_prefix_samples>>3);
|
||||
|
||||
|
||||
@@ -274,11 +274,11 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
|
||||
|
||||
|
||||
|
||||
LOG_M_BEGIN(DEBUG_LTEESTIM);
|
||||
LOG_M("primary_sync0.m","psync0",primary_synch0_time,frame_parms->ofdm_symbol_size,1,1);
|
||||
LOG_M("primary_sync1.m","psync1",primary_synch1_time,frame_parms->ofdm_symbol_size,1,1);
|
||||
LOG_M("primary_sync2.m","psync2",primary_synch2_time,frame_parms->ofdm_symbol_size,1,1);
|
||||
LOG_M_END
|
||||
if ( LOG_DUMPFLAG(DEBUG_LTEESTIM)){
|
||||
LOG_M("primary_sync0.m","psync0",primary_synch0_time,frame_parms->ofdm_symbol_size,1,1);
|
||||
LOG_M("primary_sync1.m","psync1",primary_synch1_time,frame_parms->ofdm_symbol_size,1,1);
|
||||
LOG_M("primary_sync2.m","psync2",primary_synch2_time,frame_parms->ofdm_symbol_size,1,1);
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
|
||||
@@ -460,18 +460,18 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
|
||||
LOG_I(PHY,"[UE] lte_sync_time: Sync source = %d, Peak found at pos %d, val = %d (%d dB)\n",sync_source,peak_pos,peak_val,dB_fixed(peak_val)/2);
|
||||
|
||||
|
||||
LOG_M_BEGIN(DEBUG_LTEESTIM)
|
||||
static int debug_cnt;
|
||||
if (debug_cnt == 0) {
|
||||
LOG_M("sync_corr0_ue.m","synccorr0",sync_corr_ue0,2*length,1,2);
|
||||
LOG_M("sync_corr1_ue.m","synccorr1",sync_corr_ue1,2*length,1,2);
|
||||
LOG_M("sync_corr2_ue.m","synccorr2",sync_corr_ue2,2*length,1,2);
|
||||
LOG_M("rxdata0.m","rxd0",rxdata[0],length<<1,1,1);
|
||||
// exit(-1);
|
||||
} else {
|
||||
if ( LOG_DUMPFLAG(DEBUG_LTEESTIM)){
|
||||
static int debug_cnt;
|
||||
if (debug_cnt == 0) {
|
||||
LOG_M("sync_corr0_ue.m","synccorr0",sync_corr_ue0,2*length,1,2);
|
||||
LOG_M("sync_corr1_ue.m","synccorr1",sync_corr_ue1,2*length,1,2);
|
||||
LOG_M("sync_corr2_ue.m","synccorr2",sync_corr_ue2,2*length,1,2);
|
||||
LOG_M("rxdata0.m","rxd0",rxdata[0],length<<1,1,1);
|
||||
// exit(-1);
|
||||
} else {
|
||||
debug_cnt++;
|
||||
}
|
||||
LOG_M_END
|
||||
}
|
||||
|
||||
|
||||
return(peak_pos);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "PHY/defs_UE.h"
|
||||
#include "PHY/phy_extern_ue.h"
|
||||
#include "log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "PHY/sse_intrin.h"
|
||||
|
||||
//#define k1 1000
|
||||
|
||||
@@ -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 +
|
||||
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)
|
||||
Msc_RS_idx = Msc_idx_ptr - dftsizes;
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "PHY/defs_UE.h"
|
||||
#include "PHY/impl_defs_top.h"
|
||||
|
||||
#include "common/utils/LOG/log.h"
|
||||
//extern unsigned int lte_gold_table[3][20][2][14];
|
||||
//#define DEBUG_DL_CELL_SPEC
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *eNB,
|
||||
else if ((p==1) && (l>0))
|
||||
nu = 0;
|
||||
else {
|
||||
printf("lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l);
|
||||
LOG_E(PHY,"lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
@@ -85,19 +85,19 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *eNB,
|
||||
// this is r_mprime from 3GPP 36-211 6.10.1.2
|
||||
output[k] = qpsk[(eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3];
|
||||
//output[k] = (lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3;
|
||||
#ifdef DEBUG_DL_CELL_SPEC
|
||||
printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
|
||||
Ns,l,m,mprime_dword,mprime_qpsk_symb);
|
||||
printf("index = %d (k %d)\n",(eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
|
||||
#endif
|
||||
if (LOG_DEBUGFLAG(DEBUG_DLCELLSPEC)) {
|
||||
LOG_I(PHY,"Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
|
||||
Ns,l,m,mprime_dword,mprime_qpsk_symb);
|
||||
LOG_I(PHY,"index = %d (k %d)\n",(eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
|
||||
}
|
||||
|
||||
mprime++;
|
||||
#ifdef DEBUG_DL_CELL_SPEC
|
||||
|
||||
if (LOG_DEBUGFLAG(DEBUG_DLCELLSPEC)) {
|
||||
if (m<4)
|
||||
printf("Ns %d, l %d output[%d] = (%d,%d)\n",Ns,l,k,((short *)&output[k])[0],((short *)&output[k])[1]);
|
||||
LOG_I(PHY,"Ns %d, l %d output[%d] = (%d,%d)\n",Ns,l,k,((short *)&output[k])[0],((short *)&output[k])[1]);
|
||||
|
||||
#endif
|
||||
}
|
||||
k+=6;//b
|
||||
|
||||
if (k >= eNB->frame_parms.ofdm_symbol_size) {
|
||||
@@ -105,7 +105,7 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *eNB,
|
||||
k-=eNB->frame_parms.ofdm_symbol_size;
|
||||
}
|
||||
|
||||
// printf("** k %d\n",k);
|
||||
// LOG_I(PHY,"** k %d\n",k);
|
||||
}
|
||||
|
||||
return(0);
|
||||
@@ -143,7 +143,7 @@ int lte_dl_cell_spec(PHY_VARS_eNB *eNB,
|
||||
else if ((p==1) && (l>0))
|
||||
nu = 0;
|
||||
else {
|
||||
printf("lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l);
|
||||
LOG_E(PHY,"lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
@@ -168,27 +168,24 @@ int lte_dl_cell_spec(PHY_VARS_eNB *eNB,
|
||||
// this is r_mprime from 3GPP 36-211 6.10.1.2
|
||||
output[k] = qpsk[(eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3];
|
||||
//output[k] = (lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3;
|
||||
#ifdef DEBUG_DL_CELL_SPEC
|
||||
printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
|
||||
Ns,l,m,mprime_dword,mprime_qpsk_symb);
|
||||
printf("index = %d (k %d)\n",(eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
|
||||
#endif
|
||||
|
||||
if (LOG_DEBUGFLAG(DEBUG_DLCELLSPEC)) {
|
||||
LOG_I(PHY,"Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
|
||||
Ns,l,m,mprime_dword,mprime_qpsk_symb);
|
||||
LOG_I(PHY,"index = %d (k %d)\n",(eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
|
||||
}
|
||||
mprime++;
|
||||
#ifdef DEBUG_DL_CELL_SPEC
|
||||
if (LOG_DEBUGFLAG(DEBUG_DLCELLSPEC)) {
|
||||
if (m<4)
|
||||
LOG_I(PHY,"Ns %d, l %d output[%d] = (%d,%d)\n",Ns,l,k,((short *)&output[k])[0],((short *)&output[k])[1]);
|
||||
}
|
||||
|
||||
if (m<4)
|
||||
printf("Ns %d, l %d output[%d] = (%d,%d)\n",Ns,l,k,((short *)&output[k])[0],((short *)&output[k])[1]);
|
||||
|
||||
#endif
|
||||
k+=6;
|
||||
|
||||
if (k >= eNB->frame_parms.ofdm_symbol_size) {
|
||||
k++; // skip DC carrier
|
||||
k-=eNB->frame_parms.ofdm_symbol_size;
|
||||
}
|
||||
|
||||
// printf("** k %d\n",k);
|
||||
// LOG_I(PHY,"** k %d\n",k);
|
||||
}
|
||||
|
||||
return(0);
|
||||
@@ -231,21 +228,21 @@ int lte_dl_cell_spec_rx(PHY_VARS_UE *ue,
|
||||
|
||||
// this is r_mprime from 3GPP 36-211 6.10.1.2
|
||||
output[k] = qpsk[(ue->lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3];
|
||||
#ifdef DEBUG_DL_CELL_SPEC
|
||||
printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
|
||||
Ns,l,m,mprime_dword,mprime_qpsk_symb);
|
||||
printf("index = %d (k %d)\n",(ue->lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
|
||||
#endif
|
||||
if (LOG_DEBUGFLAG(DEBUG_DLCELLSPEC)) {
|
||||
LOG_I(PHY,"Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
|
||||
Ns,l,m,mprime_dword,mprime_qpsk_symb);
|
||||
LOG_I(PHY,"index = %d (k %d)\n",(ue->lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
|
||||
}
|
||||
|
||||
mprime++;
|
||||
#ifdef DEBUG_DL_CELL_SPEC
|
||||
if (LOG_DEBUGFLAG(DEBUG_DLCELLSPEC)) {
|
||||
|
||||
if (m<4)
|
||||
printf("Ns %d l %d output[%d] = (%d,%d)\n",Ns,l,k,((short *)&output[k])[0],((short *)&output[k])[1]);
|
||||
if (m<4)
|
||||
LOG_I(PHY,"Ns %d l %d output[%d] = (%d,%d)\n",Ns,l,k,((short *)&output[k])[0],((short *)&output[k])[1]);
|
||||
|
||||
#endif
|
||||
k++;
|
||||
// printf("** k %d\n",k);
|
||||
}
|
||||
k++;
|
||||
// LOG_I(PHY,"** k %d\n",k);
|
||||
}
|
||||
|
||||
return(0);
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "lte_refsig.h"
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "PHY/defs_UE.h"
|
||||
#include "log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "PHY/impl_defs_top.h"
|
||||
|
||||
//extern unsigned int lte_gold_table[3][20][2][14];
|
||||
|
||||
@@ -54,9 +54,9 @@ void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_tabl
|
||||
for (l=0; l<3; l++) {
|
||||
|
||||
if (l==0)
|
||||
x2 = (Nid_mbsfn) + (((1+(Nid_mbsfn<<1))*(1 + 2 + (7*(1+(sfn>>1)))))<<9); //cinit
|
||||
x2 = (Nid_mbsfn) + (((1+(Nid_mbsfn<<1))*(1 + 2 + (7*(1+(sfn<<1)))))<<9); //cinit
|
||||
else
|
||||
x2 = (Nid_mbsfn) + (((1+(Nid_mbsfn<<1))*(1 + ((l-1)<<2) + (7*(2+(sfn>>1)))))<<9); //cinit
|
||||
x2 = (Nid_mbsfn) + (((1+(Nid_mbsfn<<1))*(1 + ((l-1)<<2) + (7*(2+(sfn<<1)))))<<9); //cinit
|
||||
|
||||
//x2 = frame_parms->Ncp + (Nid_cell<<1) + (1+(Nid_cell<<1))*(1 + (3*l) + (7*(1+ns))); //cinit
|
||||
//n = 0
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
#include "lte_refsig.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_rx[30][2][33]; //these contain the sequences in repeated format and quantized to QPSK ifdef IFFT_FPGA
|
||||
int16_t *ul_ref_sigs[30][2][34];
|
||||
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 */
|
||||
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,1,1,-1,-3,-1,-3,1,-1,1,3,-1,1,1,1,3,1,3,3,-1,1,-1,-3,-3,1,1,-3,3,3,1,3,3,1,-3,-1,-1,3,1,3,-3,-3,3,-3,1,-1,-1,3,-1,-3,-3,-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)
|
||||
unsigned int u,v,Msc_RS,q,m,n;
|
||||
|
||||
// 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 (v=0; v<2; v++) {
|
||||
qbar = ref_primes[Msc_RS] * (u+1)/(double)31;
|
||||
@@ -119,7 +119,7 @@ void generate_ul_ref_sigs_rx(void)
|
||||
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)
|
||||
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 (v=0; v<2; v++) {
|
||||
qbar = ref_primes[Msc_RS] * (u+1)/(double)31;
|
||||
@@ -186,7 +186,7 @@ void free_ul_ref_sigs(void)
|
||||
|
||||
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 (v=0; v<2; v++) {
|
||||
if (ul_ref_sigs[u][v][Msc_RS]) {
|
||||
|
||||
@@ -346,6 +346,13 @@ uint8_t generate_dci_top(uint8_t num_pdcch_symbols,
|
||||
y[0] = &yseq0[0];
|
||||
y[1] = &yseq1[0];
|
||||
|
||||
#if BASIC_SIMULATOR
|
||||
/* this should be the normal case
|
||||
* but it has to be validated for all the various cases
|
||||
* so let's just do it for the basic simulator
|
||||
*/
|
||||
memset(e, 2, DCI_BITS_MAX);
|
||||
#else
|
||||
#if 1
|
||||
// reset all bits to <NIL>, here we set <NIL> elements as 2
|
||||
// memset(e, 2, DCI_BITS_MAX);
|
||||
@@ -358,6 +365,7 @@ uint8_t generate_dci_top(uint8_t num_pdcch_symbols,
|
||||
* (not sure about this, to be checked somehow)
|
||||
*/
|
||||
//memset(e, 0, DCI_BITS_MAX);
|
||||
#endif /* BASIC_SIMULATOR */
|
||||
|
||||
e_ptr = e;
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ void fill_pdcch_order(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_a
|
||||
break;
|
||||
}
|
||||
|
||||
LOG_I(PHY,"%d.%d: DCI 1A: rnti %x, PDCCH order to do PRACH\n",
|
||||
LOG_T(PHY,"%d.%d: DCI 1A: rnti %x, PDCCH order to do PRACH\n",
|
||||
proc->frame_tx, proc->subframe_tx, rel8->rnti);
|
||||
}
|
||||
|
||||
@@ -1791,7 +1791,7 @@ void fill_dci0(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t *proc,
|
||||
|
||||
#ifdef T_TRACER
|
||||
T(T_ENB_PHY_ULSCH_UE_DCI, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe),
|
||||
T_INT(pdu->dci_pdu_rel8.rnti), T_INT(((frame*10+subframe+4) % 8) /* TODO: correct harq pid */),
|
||||
T_INT(pdu->dci_pdu_rel8.rnti), T_INT(pdu->dci_pdu_rel8.harq_pid),
|
||||
T_INT(mcs), T_INT(-1 /* TODO: remove round? */),
|
||||
T_INT(pdu->dci_pdu_rel8.resource_block_start),
|
||||
T_INT(pdu->dci_pdu_rel8.number_of_resource_block),
|
||||
|
||||
@@ -357,28 +357,36 @@ void conv_rballoc(uint8_t ra_header,uint32_t rb_alloc,uint32_t N_RB_DL,uint32_t
|
||||
break;
|
||||
|
||||
case 50:
|
||||
AssertFatal(ra_header==0,"resource type 1 not supported for N_RB_DL=50\n");
|
||||
if (ra_header==0) {
|
||||
|
||||
for (i=16; i>0; i--) {
|
||||
if ((rb_alloc&(1<<i)) != 0)
|
||||
rb_alloc2[(3*(16-i))>>5] |= (7<<((3*(16-i))%32));
|
||||
for (i=16; i>0; i--) {
|
||||
if ((rb_alloc&(1<<i)) != 0)
|
||||
rb_alloc2[(3*(16-i))>>5] |= (7<<((3*(16-i))%32));
|
||||
}
|
||||
|
||||
// bit mask across
|
||||
if ((rb_alloc2[0]>>31)==1)
|
||||
rb_alloc2[1] |= 1;
|
||||
|
||||
if ((rb_alloc&1) != 0)
|
||||
rb_alloc2[1] |= (3<<16);
|
||||
}
|
||||
else {
|
||||
LOG_W(PHY,"resource type 1 not supported for N_RB_DL=50\n");
|
||||
}
|
||||
|
||||
// bit mask across
|
||||
if ((rb_alloc2[0]>>31)==1)
|
||||
rb_alloc2[1] |= 1;
|
||||
|
||||
if ((rb_alloc&1) != 0)
|
||||
rb_alloc2[1] |= (3<<16);
|
||||
break;
|
||||
|
||||
case 100:
|
||||
AssertFatal(ra_header==0,"resource type 1 not supported for N_RB_DL=100\n");
|
||||
for (i=0; i<25; i++) {
|
||||
if ((rb_alloc&(1<<(24-i))) != 0)
|
||||
rb_alloc2[(4*i)>>5] |= (0xf<<((4*i)%32));
|
||||
|
||||
// printf("rb_alloc2[%d] (type 0) %x (%d)\n",(4*i)>>5,rb_alloc2[(4*i)>>5],rb_alloc&(1<<i));
|
||||
if (ra_header==0) {
|
||||
for (i=0; i<25; i++) {
|
||||
if ((rb_alloc&(1<<(24-i))) != 0)
|
||||
rb_alloc2[(4*i)>>5] |= (0xf<<((4*i)%32));
|
||||
|
||||
// printf("rb_alloc2[%d] (type 0) %x (%d)\n",(4*i)>>5,rb_alloc2[(4*i)>>5],rb_alloc&(1<<i));
|
||||
}
|
||||
}
|
||||
else {
|
||||
LOG_W(PHY,"resource type 1 not supported for N_RB_DL=100\n");
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -165,10 +165,19 @@ int allocate_REs_in_RB_no_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB,
|
||||
uint32_t tti_offset;
|
||||
uint8_t re;
|
||||
uint8_t *x0p;
|
||||
uint8_t first_re,last_re;
|
||||
|
||||
last_re=12;
|
||||
first_re=0;
|
||||
if (skip_half==1)
|
||||
last_re=6;
|
||||
else if (skip_half==2)
|
||||
first_re=6;
|
||||
re=first_re;
|
||||
|
||||
if (skip_dc == 0) {
|
||||
for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset,re=0;
|
||||
re<12;
|
||||
for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset+re;
|
||||
re<last_re;
|
||||
re++,x0p+=2,tti_offset++) {
|
||||
|
||||
qpsk_table_offset_re=x0p[0];
|
||||
@@ -199,8 +208,16 @@ int allocate_REs_in_RB_no_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB,
|
||||
((int16_t *)&txdataF[0][tti_offset])[1]=qam_table_s0[qpsk_table_offset_im];
|
||||
}
|
||||
}
|
||||
*re_allocated = *re_allocated + 12;
|
||||
*jj=*jj + 24;
|
||||
if(skip_half!=0)
|
||||
{
|
||||
*re_allocated = *re_allocated + 6;
|
||||
*jj=*jj + 12;
|
||||
}
|
||||
else
|
||||
{
|
||||
*re_allocated = *re_allocated + 12;
|
||||
*jj=*jj + 24;
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -238,12 +255,20 @@ int allocate_REs_in_RB_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB,
|
||||
uint32_t tti_offset;
|
||||
uint8_t re;
|
||||
uint8_t *x0p;
|
||||
uint8_t first_re,last_re;
|
||||
|
||||
last_re=12;
|
||||
first_re=0;
|
||||
if (skip_half==1)
|
||||
last_re=6;
|
||||
else if (skip_half==2)
|
||||
first_re=6;
|
||||
re=first_re+P1_SHIFT[0];
|
||||
|
||||
if (skip_dc == 0) {
|
||||
// printf("pilots: P1_SHIFT[0] %d\n",P1_SHIFT[0]);
|
||||
for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset+P1_SHIFT[0],re=P1_SHIFT[0];
|
||||
re<12;
|
||||
for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset+re;
|
||||
re<last_re;
|
||||
x0p+=2) {
|
||||
|
||||
qpsk_table_offset_re=x0p[0];
|
||||
@@ -260,8 +285,8 @@ int allocate_REs_in_RB_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB,
|
||||
re<6;
|
||||
x0p+=2) {
|
||||
|
||||
qpsk_table_offset_re+=x0p[0];
|
||||
qpsk_table_offset_im+=x0p[1];
|
||||
qpsk_table_offset_re=x0p[0];
|
||||
qpsk_table_offset_im=x0p[1];
|
||||
((int16_t *)&txdataF[0][tti_offset])[0]=qam_table_s0[qpsk_table_offset_re];
|
||||
((int16_t *)&txdataF[0][tti_offset])[1]=qam_table_s0[qpsk_table_offset_im];
|
||||
tti_offset+=P1_SHIFT[re+1];
|
||||
@@ -272,16 +297,24 @@ int allocate_REs_in_RB_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB,
|
||||
re<12;
|
||||
x0p+=2) {
|
||||
|
||||
qpsk_table_offset_re+=x0p[0];
|
||||
qpsk_table_offset_im+=x0p[1];
|
||||
qpsk_table_offset_re=x0p[0];
|
||||
qpsk_table_offset_im=x0p[1];
|
||||
((int16_t *)&txdataF[0][tti_offset])[0]=qam_table_s0[qpsk_table_offset_re];
|
||||
((int16_t *)&txdataF[0][tti_offset])[1]=qam_table_s0[qpsk_table_offset_im];
|
||||
tti_offset+=P1_SHIFT[re+1];
|
||||
re+=P1_SHIFT[re+1];
|
||||
}
|
||||
}
|
||||
*re_allocated = *re_allocated + 10;
|
||||
*jj=*jj + 20;
|
||||
if(skip_half!=0)
|
||||
{
|
||||
*re_allocated = *re_allocated + 5;
|
||||
*jj=*jj + 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
*re_allocated = *re_allocated + 10;
|
||||
*jj=*jj + 20;
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -317,10 +350,19 @@ int allocate_REs_in_RB_no_pilots_16QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
|
||||
uint32_t tti_offset;
|
||||
uint8_t re;
|
||||
uint8_t *x0p;
|
||||
uint8_t first_re,last_re;
|
||||
|
||||
last_re=12;
|
||||
first_re=0;
|
||||
if (skip_half==1)
|
||||
last_re=6;
|
||||
else if (skip_half==2)
|
||||
first_re=6;
|
||||
re=first_re;
|
||||
|
||||
if (skip_dc == 0) {
|
||||
for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset,re=0;
|
||||
re<12;
|
||||
for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset+re;
|
||||
re<last_re;
|
||||
re++,x0p+=4,tti_offset++) {
|
||||
|
||||
qam16_table_offset_re=TWO[x0p[0]];
|
||||
@@ -357,8 +399,16 @@ int allocate_REs_in_RB_no_pilots_16QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
|
||||
((int16_t *)&txdataF[0][tti_offset])[1]=qam_table_s0[qam16_table_offset_im];
|
||||
}
|
||||
}
|
||||
*re_allocated = *re_allocated + 12;
|
||||
*jj=*jj + 48;
|
||||
if(skip_half!=0)
|
||||
{
|
||||
*re_allocated = *re_allocated + 6;
|
||||
*jj=*jj + 24;
|
||||
}
|
||||
else
|
||||
{
|
||||
*re_allocated = *re_allocated + 12;
|
||||
*jj=*jj + 48;
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -396,12 +446,21 @@ int allocate_REs_in_RB_pilots_16QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
|
||||
uint32_t tti_offset;
|
||||
uint8_t re;
|
||||
uint8_t *x0p;
|
||||
uint8_t first_re,last_re;
|
||||
|
||||
last_re=12;
|
||||
first_re=0;
|
||||
if (skip_half==1)
|
||||
last_re=6;
|
||||
else if (skip_half==2)
|
||||
first_re=6;
|
||||
re=first_re+P1_SHIFT[0];
|
||||
|
||||
|
||||
if (skip_dc == 0) {
|
||||
// LOG_I(PHY,"pilots: P1_SHIFT[0] %d\n",P1_SHIFT[0]);
|
||||
for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset+P1_SHIFT[0],re=P1_SHIFT[0];
|
||||
re<12;
|
||||
for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset+re;
|
||||
re<last_re;
|
||||
x0p+=4) {
|
||||
|
||||
qam16_table_offset_re=TWO[x0p[0]];
|
||||
@@ -444,8 +503,16 @@ int allocate_REs_in_RB_pilots_16QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
|
||||
re+=P1_SHIFT[re+1];
|
||||
}
|
||||
}
|
||||
*re_allocated = *re_allocated + 10;
|
||||
*jj=*jj + 40;
|
||||
if(skip_half!=0)
|
||||
{
|
||||
*re_allocated = *re_allocated + 5;
|
||||
*jj=*jj + 20;
|
||||
}
|
||||
else
|
||||
{
|
||||
*re_allocated = *re_allocated + 10;
|
||||
*jj=*jj + 40;
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -482,10 +549,16 @@ int allocate_REs_in_RB_no_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
|
||||
uint32_t tti_offset;
|
||||
uint8_t re;
|
||||
uint8_t *x0p;
|
||||
uint8_t first_re;
|
||||
|
||||
first_re=0;
|
||||
if (skip_half==2)
|
||||
first_re=6;
|
||||
re=first_re;
|
||||
|
||||
if (skip_dc == 0) {
|
||||
|
||||
x0p=&x0[*jj],tti_offset=symbol_offset+re_offset;
|
||||
x0p=&x0[*jj],tti_offset=symbol_offset+re_offset+re;
|
||||
|
||||
/* for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset,re=0;
|
||||
re<12;
|
||||
@@ -521,36 +594,38 @@ int allocate_REs_in_RB_no_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
|
||||
((int16_t *)&txdataF[0][tti_offset])[10]=qam_table_s0[qam64_table_offset_re];
|
||||
((int16_t *)&txdataF[0][tti_offset])[11]=qam_table_s0[qam64_table_offset_im];
|
||||
|
||||
qam64_table_offset_re=(x0p[36]<<2)|(x0p[38]<<1)|x0p[40];
|
||||
qam64_table_offset_im=(x0p[37]<<2)|(x0p[39]<<1)|x0p[41];
|
||||
((int16_t *)&txdataF[0][tti_offset])[12]=qam_table_s0[qam64_table_offset_re];
|
||||
((int16_t *)&txdataF[0][tti_offset])[13]=qam_table_s0[qam64_table_offset_im];
|
||||
if(skip_half==0)
|
||||
{
|
||||
qam64_table_offset_re=(x0p[36]<<2)|(x0p[38]<<1)|x0p[40];
|
||||
qam64_table_offset_im=(x0p[37]<<2)|(x0p[39]<<1)|x0p[41];
|
||||
((int16_t *)&txdataF[0][tti_offset])[12]=qam_table_s0[qam64_table_offset_re];
|
||||
((int16_t *)&txdataF[0][tti_offset])[13]=qam_table_s0[qam64_table_offset_im];
|
||||
|
||||
qam64_table_offset_re=(x0p[42]<<2)|(x0p[44]<<1)|x0p[46];
|
||||
qam64_table_offset_im=(x0p[43]<<2)|(x0p[45]<<1)|x0p[47];
|
||||
((int16_t *)&txdataF[0][tti_offset])[14]=qam_table_s0[qam64_table_offset_re];
|
||||
((int16_t *)&txdataF[0][tti_offset])[15]=qam_table_s0[qam64_table_offset_im];
|
||||
qam64_table_offset_re=(x0p[42]<<2)|(x0p[44]<<1)|x0p[46];
|
||||
qam64_table_offset_im=(x0p[43]<<2)|(x0p[45]<<1)|x0p[47];
|
||||
((int16_t *)&txdataF[0][tti_offset])[14]=qam_table_s0[qam64_table_offset_re];
|
||||
((int16_t *)&txdataF[0][tti_offset])[15]=qam_table_s0[qam64_table_offset_im];
|
||||
|
||||
qam64_table_offset_re=(x0p[48]<<2)|(x0p[50]<<1)|x0p[52];
|
||||
qam64_table_offset_im=(x0p[49]<<2)|(x0p[51]<<1)|x0p[53];
|
||||
((int16_t *)&txdataF[0][tti_offset])[16]=qam_table_s0[qam64_table_offset_re];
|
||||
((int16_t *)&txdataF[0][tti_offset])[17]=qam_table_s0[qam64_table_offset_im];
|
||||
qam64_table_offset_re=(x0p[48]<<2)|(x0p[50]<<1)|x0p[52];
|
||||
qam64_table_offset_im=(x0p[49]<<2)|(x0p[51]<<1)|x0p[53];
|
||||
((int16_t *)&txdataF[0][tti_offset])[16]=qam_table_s0[qam64_table_offset_re];
|
||||
((int16_t *)&txdataF[0][tti_offset])[17]=qam_table_s0[qam64_table_offset_im];
|
||||
|
||||
qam64_table_offset_re=(x0p[54]<<2)|(x0p[56]<<1)|x0p[58];
|
||||
qam64_table_offset_im=(x0p[55]<<2)|(x0p[57]<<1)|x0p[59];
|
||||
((int16_t *)&txdataF[0][tti_offset])[18]=qam_table_s0[qam64_table_offset_re];
|
||||
((int16_t *)&txdataF[0][tti_offset])[19]=qam_table_s0[qam64_table_offset_im];
|
||||
qam64_table_offset_re=(x0p[54]<<2)|(x0p[56]<<1)|x0p[58];
|
||||
qam64_table_offset_im=(x0p[55]<<2)|(x0p[57]<<1)|x0p[59];
|
||||
((int16_t *)&txdataF[0][tti_offset])[18]=qam_table_s0[qam64_table_offset_re];
|
||||
((int16_t *)&txdataF[0][tti_offset])[19]=qam_table_s0[qam64_table_offset_im];
|
||||
|
||||
qam64_table_offset_re=(x0p[60]<<2)|(x0p[62]<<1)|x0p[64];
|
||||
qam64_table_offset_im=(x0p[61]<<2)|(x0p[63]<<1)|x0p[65];
|
||||
((int16_t *)&txdataF[0][tti_offset])[20]=qam_table_s0[qam64_table_offset_re];
|
||||
((int16_t *)&txdataF[0][tti_offset])[21]=qam_table_s0[qam64_table_offset_im];
|
||||
|
||||
qam64_table_offset_re=(x0p[66]<<2)|(x0p[68]<<1)|x0p[70];
|
||||
qam64_table_offset_im=(x0p[67]<<2)|(x0p[69]<<1)|x0p[71];
|
||||
((int16_t *)&txdataF[0][tti_offset])[22]=qam_table_s0[qam64_table_offset_re];
|
||||
((int16_t *)&txdataF[0][tti_offset])[23]=qam_table_s0[qam64_table_offset_im];
|
||||
qam64_table_offset_re=(x0p[60]<<2)|(x0p[62]<<1)|x0p[64];
|
||||
qam64_table_offset_im=(x0p[61]<<2)|(x0p[63]<<1)|x0p[65];
|
||||
((int16_t *)&txdataF[0][tti_offset])[20]=qam_table_s0[qam64_table_offset_re];
|
||||
((int16_t *)&txdataF[0][tti_offset])[21]=qam_table_s0[qam64_table_offset_im];
|
||||
|
||||
qam64_table_offset_re=(x0p[66]<<2)|(x0p[68]<<1)|x0p[70];
|
||||
qam64_table_offset_im=(x0p[67]<<2)|(x0p[69]<<1)|x0p[71];
|
||||
((int16_t *)&txdataF[0][tti_offset])[22]=qam_table_s0[qam64_table_offset_re];
|
||||
((int16_t *)&txdataF[0][tti_offset])[23]=qam_table_s0[qam64_table_offset_im];
|
||||
}
|
||||
|
||||
// }
|
||||
}
|
||||
@@ -584,8 +659,16 @@ int allocate_REs_in_RB_no_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
|
||||
}
|
||||
}
|
||||
|
||||
*re_allocated = *re_allocated + 12;
|
||||
*jj=*jj + 72;
|
||||
if(skip_half!=0)
|
||||
{
|
||||
*re_allocated = *re_allocated + 6;
|
||||
*jj=*jj + 36;
|
||||
}
|
||||
else
|
||||
{
|
||||
*re_allocated = *re_allocated + 12;
|
||||
*jj=*jj + 72;
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -623,12 +706,21 @@ int allocate_REs_in_RB_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
|
||||
uint32_t tti_offset;
|
||||
uint8_t re;
|
||||
uint8_t *x0p;
|
||||
uint8_t first_re,last_re;
|
||||
|
||||
last_re=12;
|
||||
first_re=0;
|
||||
if (skip_half==1)
|
||||
last_re=6;
|
||||
else if (skip_half==2)
|
||||
first_re=6;
|
||||
re=first_re+P1_SHIFT[0];
|
||||
|
||||
|
||||
if (skip_dc == 0) {
|
||||
// LOG_I(PHY,"pilots: P1_SHIFT[0] %d\n",P1_SHIFT[0]);
|
||||
for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset+P1_SHIFT[0],re=P1_SHIFT[0];
|
||||
re<12;
|
||||
for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset+re;
|
||||
re<last_re;
|
||||
x0p+=6) {
|
||||
|
||||
qam64_table_offset_re=FOUR[x0p[0]];
|
||||
@@ -677,8 +769,16 @@ int allocate_REs_in_RB_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
|
||||
re+=P1_SHIFT[re+1];
|
||||
}
|
||||
}
|
||||
*re_allocated = *re_allocated + 10;
|
||||
*jj=*jj + 60;
|
||||
if(skip_half!=0)
|
||||
{
|
||||
*re_allocated = *re_allocated + 5;
|
||||
*jj=*jj + 30;
|
||||
}
|
||||
else
|
||||
{
|
||||
*re_allocated = *re_allocated + 10;
|
||||
*jj=*jj + 60;
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -2423,7 +2523,7 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
|
||||
* with above code that needs to be analyzed and fixed. In the
|
||||
* meantime, let's use the generic function.
|
||||
*/
|
||||
allocate_REs = allocate_REs_in_RB;
|
||||
//allocate_REs = allocate_REs_in_RB;
|
||||
break;
|
||||
|
||||
}
|
||||
@@ -2432,7 +2532,8 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
|
||||
* previous version. Some more work/validation is needed before
|
||||
* we switch to the new version.
|
||||
*/
|
||||
allocate_REs = allocate_REs_in_RB;
|
||||
//if (frame_parms->N_RB_DL==25)
|
||||
//allocate_REs = allocate_REs_in_RB;
|
||||
|
||||
switch (mod_order1) {
|
||||
case 2:
|
||||
@@ -2486,8 +2587,6 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
|
||||
skip_half = check_skiphalf(rb,subframe_offset,frame_parms,l,nsymb);
|
||||
skip_dc = check_skip_dc(rb,frame_parms);
|
||||
|
||||
|
||||
|
||||
if (dlsch0) {
|
||||
if (dlsch0_harq->Nlayers>1) {
|
||||
LOG_E(PHY,"Nlayers %d: re_offset %d, symbol %d offset %d\n",dlsch0_harq->Nlayers,re_offset,l,symbol_offset);
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "PHY/TOOLS/alaw_lut.h"
|
||||
|
||||
#include "time_utils.h"
|
||||
|
||||
//#include "targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
|
||||
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
|
||||
#include <intertask_interface.h>
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
//#define DEBUG_DL_MOBIPASS
|
||||
//#define DEBUG_UL_MOBIPASS
|
||||
|
||||
@@ -27,6 +27,7 @@ int is_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_par
|
||||
|
||||
uint32_t period;
|
||||
uint8_t i;
|
||||
uint8_t j;
|
||||
|
||||
// LOG_D(PHY,"is_pmch_subframe: frame %d, subframe %d, num_MBSFN_config %d\n",
|
||||
// frame,subframe,frame_parms->num_MBSFN_config);
|
||||
@@ -34,8 +35,8 @@ int is_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_par
|
||||
for (i=0; i<frame_parms->num_MBSFN_config; i++) { // we have at least one MBSFN configuration
|
||||
period = 1<<frame_parms->MBSFN_config[i].radioframeAllocationPeriod;
|
||||
|
||||
if ((frame % period) == frame_parms->MBSFN_config[i].radioframeAllocationOffset) {
|
||||
if (frame_parms->MBSFN_config[i].fourFrames_flag == 0) {
|
||||
if (frame_parms->MBSFN_config[i].fourFrames_flag == 0) {
|
||||
if ((frame % period) == frame_parms->MBSFN_config[i].radioframeAllocationOffset) {
|
||||
if (frame_parms->frame_type == FDD) {
|
||||
switch (subframe) {
|
||||
|
||||
@@ -108,9 +109,96 @@ int is_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_par
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else { // handle 4 frames case
|
||||
} else { // handle 4 frames case
|
||||
|
||||
for(j=0;j<4;j++) {
|
||||
if ((frame % period) == (frame_parms->MBSFN_config[i].radioframeAllocationOffset + j)) {
|
||||
if (frame_parms->frame_type == FDD) {
|
||||
switch (subframe) {
|
||||
case 1:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x800000>>(j*6))) > 0) {
|
||||
//LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x800000>>(j*6));
|
||||
return(1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x400000>>(j*6))) > 0) {
|
||||
//LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x400000>>(j*6));
|
||||
return(1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x200000>>(j*6))) > 0) {
|
||||
//LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x200000>>(j*6));
|
||||
return(1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 6:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x100000>>(j*6))) > 0) {
|
||||
//LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x100000>>(j*6));
|
||||
return(1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x80000>>(j*6))) > 0) {
|
||||
//LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x80000>>(j*6));
|
||||
return(1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x40000>>(j*6))) > 0) {
|
||||
//LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x40000>>(j*6));
|
||||
return(1);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (subframe) {
|
||||
case 3:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF3) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF4) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF7) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF8) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 9:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF9) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+103
-103
@@ -153,25 +153,24 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
subframe = eNB->proc.subframe_prach_br;
|
||||
prachF = eNB->prach_vars_br.prachF;
|
||||
rxsigF = eNB->prach_vars_br.rxsigF[ce_level];
|
||||
LOG_DEBUG_BEGIN(PRACH)
|
||||
if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d, rootSequenceIndex %d, repetition number %d,numRepetitionsPrePreambleAttempt %d\n",
|
||||
br_flag,ce_level,ru->proc.frame_prach,subframe,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],
|
||||
prach_ConfigIndex,rootSequenceIndex,
|
||||
eNB->prach_vars_br.repetition_number[ce_level],
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level]);
|
||||
LOG_DEBUG_END
|
||||
}
|
||||
else
|
||||
if (LOG_DEBUGFLAG(PRACH)){
|
||||
if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d, rootSequenceIndex %d, repetition number %d,numRepetitionsPrePreambleAttempt %d\n",
|
||||
br_flag,ce_level,ru->proc.frame_prach,subframe,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],
|
||||
prach_ConfigIndex,rootSequenceIndex,
|
||||
eNB->prach_vars_br.repetition_number[ce_level],
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level]);
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
prach_ifftp = eNB->prach_vars.prach_ifft[0];
|
||||
subframe = eNB->proc.subframe_prach;
|
||||
prachF = eNB->prach_vars.prachF;
|
||||
rxsigF = eNB->prach_vars.rxsigF[0];
|
||||
LOG_DEBUG_BEGIN(PRACH)
|
||||
if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d , rootSequenceIndex %d\n", subframe,fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex,rootSequenceIndex);
|
||||
LOG_DEBUG_END
|
||||
if (LOG_DEBUGFLAG(PRACH)){
|
||||
if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d , rootSequenceIndex %d\n", subframe,fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex,rootSequenceIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -179,20 +178,19 @@ LOG_DEBUG_END
|
||||
if (br_flag == 1) {
|
||||
subframe = ru->proc.subframe_prach_br;
|
||||
rxsigF = ru->prach_rxsigF_br[ce_level];
|
||||
LOG_DEBUG_BEGIN(PRACH)
|
||||
if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (RU) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n",
|
||||
br_flag,ce_level,ru->proc.frame_prach,subframe,fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],prach_ConfigIndex);
|
||||
LOG_DEBUG_END
|
||||
}
|
||||
else
|
||||
if (LOG_DEBUGFLAG(PRACH)){
|
||||
if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (RU) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n",
|
||||
br_flag,ce_level,ru->proc.frame_prach,subframe,fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],prach_ConfigIndex);
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
subframe = ru->proc.subframe_prach;
|
||||
rxsigF = ru->prach_rxsigF;
|
||||
LOG_DEBUG_BEGIN(PRACH)
|
||||
if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (RU) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n",
|
||||
subframe,fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex);
|
||||
LOG_DEBUG_END
|
||||
if (LOG_DEBUGFLAG(PRACH)){
|
||||
if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (RU) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n",
|
||||
subframe,fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -204,27 +202,25 @@ LOG_DEBUG_END
|
||||
// DJP - indexing below in subframe zero takes us off the beginning of the array???
|
||||
prach[aa] = (int16_t*)&ru->common.rxdata[aa][(subframe*fp->samples_per_tti)-ru->N_TA_offset];
|
||||
|
||||
LOG_M_BEGIN(PRACH)
|
||||
int32_t en0=signal_energy((int32_t*)prach[aa],fp->samples_per_tti);
|
||||
int8_t dbEn0 = dB_fixed(en0);
|
||||
int8_t rach_dBm = dbEn0 - ru->rx_total_gain_dB;
|
||||
char buffer[80];
|
||||
if (dbEn0>32 && prach[0]!= NULL)
|
||||
{
|
||||
static int counter=0;
|
||||
sprintf(buffer, "%s%d", "/tmp/prach_rx",counter);
|
||||
LOG_M(buffer,"prach_rx",prach[0],fp->samples_per_tti,1,13);
|
||||
if (LOG_DUMPFLAG(PRACH)){
|
||||
int32_t en0=signal_energy((int32_t*)prach[aa],fp->samples_per_tti);
|
||||
int8_t dbEn0 = dB_fixed(en0);
|
||||
int8_t rach_dBm = dbEn0 - ru->rx_total_gain_dB;
|
||||
char buffer[80];
|
||||
if (dbEn0>32 && prach[0]!= NULL) {
|
||||
static int counter=0;
|
||||
sprintf(buffer, "%s%d", "/tmp/prach_rx",counter);
|
||||
LOG_M(buffer,"prach_rx",prach[0],fp->samples_per_tti,1,13);
|
||||
}
|
||||
if (dB_fixed(en0)>32) {
|
||||
sprintf(buffer, "rach_dBm:%d",rach_dBm);
|
||||
if (prach[0]!= NULL) LOG_M("prach_rx","prach_rx",prach[0],fp->samples_per_tti,1,1);
|
||||
LOG_I(PHY,"RU %d, br_flag %d ce_level %d frame %d subframe %d per_tti:%d prach:%p (energy %d) TA:%d %s rxdata:%p index:%d\n",
|
||||
ru->idx,br_flag,ce_level,ru->proc.frame_prach,subframe,fp->samples_per_tti,
|
||||
prach[aa],dbEn0,ru->N_TA_offset,buffer,ru->common.rxdata[aa],
|
||||
(subframe*fp->samples_per_tti)-ru->N_TA_offset);
|
||||
}
|
||||
if (dB_fixed(en0)>32)
|
||||
{
|
||||
sprintf(buffer, "rach_dBm:%d",rach_dBm);
|
||||
if (prach[0]!= NULL) LOG_M("prach_rx","prach_rx",prach[0],fp->samples_per_tti,1,1);
|
||||
LOG_I(PHY,"RU %d, br_flag %d ce_level %d frame %d subframe %d per_tti:%d prach:%p (energy %d) TA:%d %s rxdata:%p index:%d\n",
|
||||
ru->idx,br_flag,ce_level,ru->proc.frame_prach,subframe,fp->samples_per_tti,
|
||||
prach[aa],dbEn0,ru->N_TA_offset,buffer,ru->common.rxdata[aa],
|
||||
(subframe*fp->samples_per_tti)-ru->N_TA_offset);
|
||||
}
|
||||
LOG_M_END
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -306,9 +302,9 @@ LOG_M_END
|
||||
if (((eNB!=NULL) && (ru->function != NGFI_RAU_IF4p5))||
|
||||
((eNB==NULL) && (ru->function == NGFI_RRU_IF4p5))) { // compute the DFTs of the PRACH temporal resources
|
||||
// Do forward transform
|
||||
LOG_DEBUG_BEGIN(PRACH)
|
||||
LOG_D(PHY,"rx_prach: Doing FFT for N_RB_UL %d nb_rx:%d Ncp:%d\n",fp->N_RB_UL, nb_rx, Ncp);
|
||||
LOG_DEBUG_END
|
||||
if (LOG_DEBUGFLAG(PRACH)) {
|
||||
LOG_D(PHY,"rx_prach: Doing FFT for N_RB_UL %d nb_rx:%d Ncp:%d\n",fp->N_RB_UL, nb_rx, Ncp);
|
||||
}
|
||||
for (aa=0; aa<nb_rx; aa++) {
|
||||
AssertFatal(prach[aa]!=NULL,"prach[%d] is null\n",aa);
|
||||
prach2 = prach[aa] + (Ncp<<1);
|
||||
@@ -439,10 +435,10 @@ LOG_DEBUG_END
|
||||
return;
|
||||
} else if (eNB!=NULL) {
|
||||
|
||||
LOG_DEBUG_BEGIN(PRACH)
|
||||
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
|
||||
if ((en > 60)&&(br_flag==1)) LOG_I(PHY,"PRACH (br_flag %d,ce_level %d, n_ra_prb %d, k %d): Frame %d, Subframe %d => %d dB\n",br_flag,ce_level,n_ra_prb,k,eNB->proc.frame_rx,eNB->proc.subframe_rx,en);
|
||||
LOG_DEBUG_END
|
||||
if ( LOG_DEBUGFLAG(PRACH)) {
|
||||
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
|
||||
if ((en > 60)&&(br_flag==1)) LOG_I(PHY,"PRACH (br_flag %d,ce_level %d, n_ra_prb %d, k %d): Frame %d, Subframe %d => %d dB\n",br_flag,ce_level,n_ra_prb,k,eNB->proc.frame_rx,eNB->proc.subframe_rx,en);
|
||||
}
|
||||
}
|
||||
|
||||
// in case of RAU and prach received rx_thread wakes up prach
|
||||
@@ -477,10 +473,10 @@ LOG_DEBUG_END
|
||||
*max_preamble_energy=0;
|
||||
for (preamble_index=0 ; preamble_index<64 ; preamble_index++) {
|
||||
|
||||
LOG_DEBUG_BEGIN(PRACH)
|
||||
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
|
||||
if (en>60) LOG_I(PHY,"frame %d, subframe %d : Trying preamble %d (br_flag %d)\n",ru->proc.frame_prach,subframe,preamble_index,br_flag);
|
||||
LOG_DEBUG_END
|
||||
if (LOG_DEBUGFLAG(PRACH)){
|
||||
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
|
||||
if (en>60) LOG_I(PHY,"frame %d, subframe %d : Trying preamble %d (br_flag %d)\n",ru->proc.frame_prach,subframe,preamble_index,br_flag);
|
||||
}
|
||||
if (restricted_set == 0) {
|
||||
// This is the relative offset in the root sequence table (5.7.2-4 from 36.211) for the given preamble index
|
||||
preamble_offset = ((NCS==0)? preamble_index : (preamble_index/(N_ZC/NCS)));
|
||||
@@ -563,11 +559,11 @@ LOG_DEBUG_END
|
||||
}
|
||||
|
||||
// Compute DFT of RX signal (conjugate input, results in conjugate output) for each new rootSequenceIndex
|
||||
LOG_DEBUG_BEGIN(PRACH)
|
||||
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
|
||||
if (en>60) LOG_I(PHY,"frame %d, subframe %d : preamble index %d: offset %d, preamble shift %d (br_flag %d, en %d)\n",
|
||||
ru->proc.frame_prach,subframe,preamble_index,preamble_offset,preamble_shift,br_flag,en);
|
||||
LOG_DEBUG_END
|
||||
if (LOG_DEBUGFLAG(PRACH)) {
|
||||
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
|
||||
if (en>60) LOG_I(PHY,"frame %d, subframe %d : preamble index %d: offset %d, preamble shift %d (br_flag %d, en %d)\n",
|
||||
ru->proc.frame_prach,subframe,preamble_index,preamble_offset,preamble_shift,br_flag,en);
|
||||
}
|
||||
log2_ifft_size = 10;
|
||||
fft_size = 6144;
|
||||
|
||||
@@ -589,13 +585,13 @@ LOG_DEBUG_END
|
||||
}
|
||||
|
||||
memset(prachF, 0, sizeof(int16_t)*2*1024 );
|
||||
LOG_M_BEGIN(PRACH)
|
||||
if (prach[0]!= NULL) LOG_M("prach_rx0.m","prach_rx0",prach[0],6144+792,1,1);
|
||||
LOG_M("prach_rx1.m","prach_rx1",prach[1],6144+792,1,1);
|
||||
LOG_M("prach_rxF0.m","prach_rxF0",rxsigF[0],24576,1,1);
|
||||
LOG_M("prach_rxF1.m","prach_rxF1",rxsigF[1],6144,1,1);
|
||||
LOG_M_END
|
||||
|
||||
if (LOG_DUMPFLAG(PRACH)) {
|
||||
if (prach[0]!= NULL) LOG_M("prach_rx0.m","prach_rx0",prach[0],6144+792,1,1);
|
||||
LOG_M("prach_rx1.m","prach_rx1",prach[1],6144+792,1,1);
|
||||
LOG_M("prach_rxF0.m","prach_rxF0",rxsigF[0],24576,1,1);
|
||||
LOG_M("prach_rxF1.m","prach_rxF1",rxsigF[1],6144,1,1);
|
||||
}
|
||||
|
||||
for (aa=0;aa<nb_rx; aa++) {
|
||||
// Do componentwise product with Xu* on each antenna
|
||||
|
||||
@@ -623,10 +619,10 @@ LOG_M_END
|
||||
prach_ifft[i] += (prach_ifft_tmp[i<<1]*prach_ifft_tmp[(i<<1)] + prach_ifft_tmp[1+(i<<1)]*prach_ifft_tmp[1+(i<<1)])>>10;
|
||||
}
|
||||
|
||||
LOG_M_BEGIN(PRACH)
|
||||
if (aa==0) LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1);
|
||||
if (aa==1) LOG_M("prach_rxF_comp1.m","prach_rxF_comp1",prachF,1024,1,1);
|
||||
LOG_M_END
|
||||
if (LOG_DUMPFLAG(PRACH)) {
|
||||
if (aa==0) LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1);
|
||||
if (aa==1) LOG_M("prach_rxF_comp1.m","prach_rxF_comp1",prachF,1024,1,1);
|
||||
}
|
||||
}// antennas_rx
|
||||
} // new dft
|
||||
|
||||
@@ -637,10 +633,10 @@ LOG_M_END
|
||||
eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level]))
|
||||
#endif
|
||||
{
|
||||
LOG_DEBUG_BEGIN(PRACH)
|
||||
if (LOG_DEBUGFLAG(PRACH)){
|
||||
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
|
||||
if (en>60) LOG_I(PHY,"frame %d, subframe %d: Checking for peak in time-domain (br_flag %d, en %d)\n",ru->proc.frame_prach,subframe,br_flag,en);
|
||||
LOG_DEBUG_END
|
||||
}
|
||||
preamble_shift2 = ((preamble_shift==0) ? 0 : ((preamble_shift<<log2_ifft_size)/N_ZC));
|
||||
|
||||
|
||||
@@ -652,44 +648,48 @@ LOG_DEBUG_END
|
||||
*max_preamble_energy = levdB;
|
||||
*max_preamble_delay = ((i*fft_size)>>log2_ifft_size)*update_TA/update_TA2;
|
||||
*max_preamble = preamble_index;
|
||||
LOG_DEBUG_BEGIN(PRACH)
|
||||
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
|
||||
if ((en>60) && (br_flag==1)) LOG_D(PHY,"frame %d, subframe %d : max_preamble_energy %d, max_preamble_delay %d, max_preamble %d (br_flag %d,ce_level %d, levdB %d, lev %d)\n",ru->proc.frame_prach,subframe,*max_preamble_energy,*max_preamble_delay,*max_preamble,br_flag,ce_level,levdB,lev);
|
||||
LOG_DEBUG_END
|
||||
if (LOG_DEBUGFLAG(PRACH)){
|
||||
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
|
||||
if ((en>60) && (br_flag==1))
|
||||
LOG_D(PHY,"frame %d, subframe %d : max_preamble_energy %d, max_preamble_delay %d, max_preamble %d (br_flag %d,ce_level %d, levdB %d, lev %d)\n",
|
||||
ru->proc.frame_prach,subframe,
|
||||
*max_preamble_energy,*max_preamble_delay,
|
||||
*max_preamble,br_flag,ce_level,levdB,lev);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}// preamble_index
|
||||
|
||||
LOG_M_BEGIN(PRACH)
|
||||
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
|
||||
if (en>60) {
|
||||
k = (12*n_ra_prb) - 6*fp->N_RB_UL;
|
||||
|
||||
if (k<0) k+=fp->ofdm_symbol_size;
|
||||
|
||||
k*=12;
|
||||
k+=13;
|
||||
k*=2;
|
||||
|
||||
if (br_flag == 0) {
|
||||
LOG_M("rxsigF.m","prach_rxF",&rxsigF[0][0],12288,1,1);
|
||||
LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1);
|
||||
LOG_M("Xu.m","xu",Xu,N_ZC,1,1);
|
||||
LOG_M("prach_ifft0.m","prach_t0",prach_ifft,1024,1,1);
|
||||
}
|
||||
else {
|
||||
LOG_E(PHY,"Dumping prach (br_flag %d), k = %d (n_ra_prb %d)\n",br_flag,k,n_ra_prb);
|
||||
LOG_M("rxsigF_br.m","prach_rxF_br",&rxsigF[0][0],12288,1,1);
|
||||
LOG_M("prach_rxF_comp0_br.m","prach_rxF_comp0_br",prachF,1024,1,1);
|
||||
LOG_M("Xu_br.m","xu_br",Xu,N_ZC,1,1);
|
||||
LOG_M("prach_ifft0_br.m","prach_t0_br",prach_ifft,1024,1,1);
|
||||
exit(-1);
|
||||
}
|
||||
if (LOG_DUMPFLAG(PRACH)) {
|
||||
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
|
||||
if (en>60) {
|
||||
k = (12*n_ra_prb) - 6*fp->N_RB_UL;
|
||||
|
||||
if (k<0) k+=fp->ofdm_symbol_size;
|
||||
|
||||
k*=12;
|
||||
k+=13;
|
||||
k*=2;
|
||||
|
||||
if (br_flag == 0) {
|
||||
LOG_M("rxsigF.m","prach_rxF",&rxsigF[0][0],12288,1,1);
|
||||
LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1);
|
||||
LOG_M("Xu.m","xu",Xu,N_ZC,1,1);
|
||||
LOG_M("prach_ifft0.m","prach_t0",prach_ifft,1024,1,1);
|
||||
}
|
||||
else {
|
||||
LOG_E(PHY,"Dumping prach (br_flag %d), k = %d (n_ra_prb %d)\n",br_flag,k,n_ra_prb);
|
||||
LOG_M("rxsigF_br.m","prach_rxF_br",&rxsigF[0][0],12288,1,1);
|
||||
LOG_M("prach_rxF_comp0_br.m","prach_rxF_comp0_br",prachF,1024,1,1);
|
||||
LOG_M("Xu_br.m","xu_br",Xu,N_ZC,1,1);
|
||||
LOG_M("prach_ifft0_br.m","prach_t0_br",prach_ifft,1024,1,1);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
}
|
||||
LOG_M_END
|
||||
}
|
||||
} /* LOG_DUMPFLAG(PRACH) */
|
||||
if (eNB) stop_meas(&eNB->rx_prach);
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,68 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
int16_t *d0_sss;
|
||||
int16_t *d5_sss;
|
||||
|
||||
#define MyAssert(x) { if(!(x)) { printf("Error in table intialization: %s:%d\n",__FILE__,__LINE__); exit(1);}}
|
||||
#define gen(table, formula) { \
|
||||
int x[31]= {0}; \
|
||||
x[4]=1; \
|
||||
for(int i=0; i<26; i++) \
|
||||
x[i+5]=formula; \
|
||||
for (int i=0; i<31; i++) \
|
||||
table[i]=1-2*x[i]; \
|
||||
}
|
||||
|
||||
#define mod31(a) (a)%31
|
||||
#define mod2(a) (a)%2
|
||||
#define mod8(a) (a)%8
|
||||
void init_sss(void) {
|
||||
MyAssert(0==posix_memalign((void **)&d0_sss, 16,504*31*2*sizeof(*d0_sss)));
|
||||
MyAssert(0==posix_memalign((void **)&d5_sss, 16,504*31*2*sizeof(*d5_sss)));
|
||||
int s[31];
|
||||
gen(s, mod2(x[i+2]+x[i]));
|
||||
int z[31];
|
||||
gen(z, mod2(x[i+4]+x[i+2]+x[i+1]+x[i]));
|
||||
int c[31];
|
||||
gen(c, mod2(x[i+3]+x[i]));
|
||||
|
||||
for (int Nid2=0; Nid2<3; Nid2++) {
|
||||
for (int Nid1=0; Nid1<168; Nid1++) {
|
||||
int qprime = Nid1/30;
|
||||
int q = (Nid1+(qprime*(qprime+1))/2)/30;
|
||||
int mprime = Nid1 + q*(q+1)/2;
|
||||
int m0 = mprime%31;
|
||||
int m1 = (m0+mprime/31+1)%31;
|
||||
int rowIndex=(Nid2+3*Nid1)*31*2;
|
||||
|
||||
for (int i=0; i<31; i++) {
|
||||
d0_sss[rowIndex+i*2]= s[mod31(i+m0)] * c[mod31(i+Nid2)];
|
||||
d5_sss[rowIndex+i*2]= s[mod31(i+m1)] * c[mod31(i+Nid2)];
|
||||
d0_sss[rowIndex+i*2+1]= s[mod31(i+m1)] * c[mod31(i+Nid2+3)] * z[mod31(i+mod8(m0))];
|
||||
d5_sss[rowIndex+i*2+1]= s[mod31(i+m0)] * c[mod31(i+Nid2+3)] * z[mod31(i+mod8(m1))];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SSS_TABLES_TEST
|
||||
void main () {
|
||||
printf("int16_t d0_sss[504*62] = {");
|
||||
|
||||
for (int i=0; i<504*62; i++)
|
||||
printf("%d,\n",d0_sss[i]);
|
||||
|
||||
printf("};\n\n");
|
||||
printf("int16_t d5_sss[504*62] = {");
|
||||
|
||||
for (int i=0; i<504*62; i++)
|
||||
printf("%d,\n",d5_sss[i]);
|
||||
|
||||
printf("};\n\n");
|
||||
}
|
||||
#endif
|
||||
@@ -1,53 +0,0 @@
|
||||
% generate s
|
||||
x = zeros(1,30);
|
||||
x(1:5) = [0 0 0 0 1];
|
||||
for i=1:26
|
||||
x(i+5) = rem(x(i+2) + x(i),2);
|
||||
end
|
||||
s = 1 - 2*x;
|
||||
|
||||
% generate z
|
||||
x = zeros(1,30);
|
||||
x(1:5) = [0 0 0 0 1];
|
||||
for i=1:26
|
||||
x(i+5) = rem(x(i+4)+ x(i+2) + x(i+1) + x(i),2);
|
||||
end
|
||||
z = 1 - 2*x;
|
||||
% generate c
|
||||
x = zeros(1,30);
|
||||
x(1:5) = [0 0 0 0 1];
|
||||
for i=1:26
|
||||
x(i+5) = rem(x(i+3) + x(i),2);
|
||||
end
|
||||
c = 1 - 2*x;
|
||||
d0 = zeros(504,62);
|
||||
d5 = zeros(504,62);
|
||||
for Nid2=0:2,
|
||||
c0 = [c((1+Nid2) : end) c(1:Nid2)];
|
||||
c1 = [c((4+Nid2) : end) c(1:(3+Nid2))];
|
||||
for Nid1=0:167,
|
||||
qprime = floor(Nid1/30);
|
||||
q = floor((Nid1+qprime*(qprime+1)/2)/30);
|
||||
mprime = Nid1 + q*(q+1)/2;
|
||||
m0 = rem(mprime,31);
|
||||
m1 = rem(m0+floor(mprime/31)+1,31);
|
||||
sm0 = [s((1+m0) : end) s(1:m0)];
|
||||
sm1 = [s((1+m1) : end) s(1:m1)];
|
||||
m0mod8 = rem(m0,8);
|
||||
m1mod8 = rem(m1,8);
|
||||
zm0 = [z((1+m0mod8) : end) z(1:m0mod8)];
|
||||
zm1 = [z((1+m1mod8) : end) z(1:m1mod8)];
|
||||
d0(1+Nid2+(3*Nid1),1:2:62) = sm0.*c0;
|
||||
d5(1+Nid2+(3*Nid1),1:2:62) = sm1.*c0;
|
||||
d0(1+Nid2+(3*Nid1),2:2:62) = sm1.*c1.*zm0;
|
||||
d5(1+Nid2+(3*Nid1),2:2:62) = sm0.*c1.*zm1;
|
||||
end
|
||||
end
|
||||
fd = fopen("sss.h","w");
|
||||
fprintf(fd,"s16 d0_sss[504*62] = {");
|
||||
fprintf(fd,"%d,",d0);
|
||||
fprintf(fd,"};\n\n");
|
||||
fprintf(fd,"s16 d5_sss[504*62] = {");
|
||||
fprintf(fd,"%d,",d5);
|
||||
fprintf(fd,"};\n\n");
|
||||
fclose(fd);
|
||||
@@ -25,10 +25,10 @@ extern char lte_cqi_snr_dB[15];
|
||||
extern short conjugate[8],conjugate2[8];
|
||||
extern short minus_one[8];
|
||||
extern short minus_one[8];
|
||||
extern short *ul_ref_sigs[30][2][33];
|
||||
extern short *ul_ref_sigs_rx[30][2][33];
|
||||
extern unsigned short dftsizes[33];
|
||||
extern unsigned short ref_primes[33];
|
||||
extern short *ul_ref_sigs[30][2][34];
|
||||
extern short *ul_ref_sigs_rx[30][2][34];
|
||||
extern unsigned short dftsizes[34];
|
||||
extern unsigned short ref_primes[34];
|
||||
|
||||
extern int qam64_table[8],qam16_table[4],qpsk_table[2];
|
||||
|
||||
@@ -44,7 +44,7 @@ extern unsigned short scfdma_amps[26];
|
||||
|
||||
extern char dci_format_strings[15][13];
|
||||
|
||||
extern int16_t d0_sss[504*62],d5_sss[504*62];
|
||||
extern int16_t *d0_sss,*d5_sss;
|
||||
|
||||
extern uint8_t wACK[5][4];
|
||||
extern int8_t wACK_RX[5][4];
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
#include "dlsch_tbs.h"
|
||||
//#include "dlsch_tbs_full.h"
|
||||
#include "sss.h"
|
||||
|
||||
unsigned short lte_cqi_eff1024[16] = {156, //-6, .15234
|
||||
240, //-4 .234
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "transport_eNB.h"
|
||||
//#define DEBUG_ULSCH
|
||||
#include "PHY/sse_intrin.h"
|
||||
#include "transport_common_proto.h"
|
||||
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
|
||||
@@ -67,7 +66,7 @@ void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH)
|
||||
|
||||
|
||||
|
||||
// printf("Doing lte_idft for Msc_PUSCH %d\n",Msc_PUSCH);
|
||||
LOG_T(PHY,"Doing lte_idft for Msc_PUSCH %d\n",Msc_PUSCH);
|
||||
|
||||
if (frame_parms->Ncp == 0) { // Normal prefix
|
||||
z0 = z;
|
||||
@@ -336,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);
|
||||
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:
|
||||
dft864((int16_t*)idft_in0,(int16_t*)idft_out0,1);
|
||||
dft864((int16_t*)idft_in1,(int16_t*)idft_out1,1);
|
||||
@@ -388,13 +393,13 @@ void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH)
|
||||
|
||||
for (i=0,ip=0; i<Msc_PUSCH; i++,ip+=4) {
|
||||
z0[i] = ((uint32_t*)idft_out0)[ip];
|
||||
/*
|
||||
printf("out0 (%d,%d),(%d,%d),(%d,%d),(%d,%d)\n",
|
||||
((int16_t*)&idft_out0[ip])[0],((int16_t*)&idft_out0[ip])[1],
|
||||
((int16_t*)&idft_out0[ip+1])[0],((int16_t*)&idft_out0[ip+1])[1],
|
||||
((int16_t*)&idft_out0[ip+2])[0],((int16_t*)&idft_out0[ip+2])[1],
|
||||
((int16_t*)&idft_out0[ip+3])[0],((int16_t*)&idft_out0[ip+3])[1]);
|
||||
*/
|
||||
if(LOG_DEBUGFLAG(DEBUG_ULSCH)) {
|
||||
LOG_I(PHY,"out0 (%d,%d),(%d,%d),(%d,%d),(%d,%d)\n",
|
||||
((int16_t*)&idft_out0[ip])[0],((int16_t*)&idft_out0[ip])[1],
|
||||
((int16_t*)&idft_out0[ip+1])[0],((int16_t*)&idft_out0[ip+1])[1],
|
||||
((int16_t*)&idft_out0[ip+2])[0],((int16_t*)&idft_out0[ip+2])[1],
|
||||
((int16_t*)&idft_out0[ip+3])[0],((int16_t*)&idft_out0[ip+3])[1]);
|
||||
}
|
||||
z1[i] = ((uint32_t*)idft_out0)[ip+1];
|
||||
z2[i] = ((uint32_t*)idft_out0)[ip+2];
|
||||
z3[i] = ((uint32_t*)idft_out0)[ip+3];
|
||||
@@ -479,10 +484,7 @@ int32_t ulsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
int i;
|
||||
|
||||
// printf("qpsk llr for symbol %d (pos %d), llr offset %d\n",symbol,(symbol*frame_parms->N_RB_DL*12),llr128U-(__m128i*)ulsch_llr);
|
||||
|
||||
for (i=0; i<(nb_rb*3); i++) {
|
||||
//printf("%d,%d,%d,%d,%d,%d,%d,%d\n",((int16_t *)rxF)[0],((int16_t *)rxF)[1],((int16_t *)rxF)[2],((int16_t *)rxF)[3],((int16_t *)rxF)[4],((int16_t *)rxF)[5],((int16_t *)rxF)[6],((int16_t *)rxF)[7]);
|
||||
*(*llrp128) = *rxF;
|
||||
rxF++;
|
||||
(*llrp128)++;
|
||||
@@ -593,7 +595,9 @@ void ulsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
ch_mag =(int16x8_t*)&ul_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)];
|
||||
ch_magb =(int16x8_t*)&ul_ch_magb[0][(symbol*frame_parms->N_RB_DL*12)];
|
||||
#endif
|
||||
// printf("symbol %d: mag %d, magb %d\n",symbol,_mm_extract_epi16(ch_mag[0],0),_mm_extract_epi16(ch_magb[0],0));
|
||||
if(LOG_DEBUGFLAG(DEBUG_ULSCH)) {
|
||||
LOG_UI(PHY,"symbol %d: mag %d, magb %d\n",symbol,_mm_extract_epi16(ch_mag[0],0),_mm_extract_epi16(ch_magb[0],0));
|
||||
}
|
||||
for (i=0; i<(nb_rb*3); i++) {
|
||||
|
||||
|
||||
@@ -736,9 +740,9 @@ void ulsch_extract_rbs_single(int32_t **rxdataF,
|
||||
nb_rb1 = cmin(cmax((int)(frame_parms->N_RB_UL) - (int)(2*first_rb),(int)0),(int)(2*nb_rb)); // 2 times no. RBs before the DC
|
||||
nb_rb2 = 2*nb_rb - nb_rb1; // 2 times no. RBs after the DC
|
||||
|
||||
#ifdef DEBUG_ULSCH
|
||||
printf("ulsch_extract_rbs_single: 2*nb_rb1 = %d, 2*nb_rb2 = %d\n",nb_rb1,nb_rb2);
|
||||
#endif
|
||||
if(LOG_DEBUGFLAG(DEBUG_ULSCH)) {
|
||||
LOG_UI(PHY,"ulsch_extract_rbs_single: 2*nb_rb1 = %d, 2*nb_rb2 = %d\n",nb_rb1,nb_rb2);
|
||||
}
|
||||
|
||||
rxF_ext = &rxdataF_ext[aarx][(symbol*frame_parms->N_RB_UL*12)];
|
||||
|
||||
@@ -838,7 +842,7 @@ void ulsch_channel_compensation(int32_t **rxdataF_ext,
|
||||
|
||||
#endif
|
||||
for (rb=0; rb<nb_rb; rb++) {
|
||||
// printf("comp: symbol %d rb %d\n",symbol,rb);
|
||||
LOG_D(PHY,"comp: symbol %d rb %d\n",symbol,rb);
|
||||
|
||||
// just compute channel magnitude without scaling, this is done after equalization for SC-FDMA
|
||||
|
||||
@@ -861,7 +865,7 @@ void ulsch_channel_compensation(int32_t **rxdataF_ext,
|
||||
mmtmpU1 = _mm_packs_epi32(mmtmpU0,mmtmpU0);
|
||||
ul_ch_mag128[2] = _mm_unpacklo_epi16(mmtmpU1,mmtmpU1);
|
||||
|
||||
// printf("comp: symbol %d rb %d => %d,%d,%d (output_shift %d)\n",symbol,rb,*((int16_t*)&ul_ch_mag128[0]),*((int16_t*)&ul_ch_mag128[1]),*((int16_t*)&ul_ch_mag128[2]),output_shift);
|
||||
LOG_D(PHY,"comp: symbol %d rb %d => %d,%d,%d (output_shift %d)\n",symbol,rb,*((int16_t*)&ul_ch_mag128[0]),*((int16_t*)&ul_ch_mag128[1]),*((int16_t*)&ul_ch_mag128[2]),output_shift);
|
||||
|
||||
|
||||
#elif defined(__arm__)
|
||||
@@ -1125,10 +1129,9 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
|
||||
|
||||
harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
|
||||
Qm = ulsch[UE_id]->harq_processes[harq_pid]->Qm;
|
||||
#ifdef DEBUG_ULSCH
|
||||
printf("rx_ulsch: harq_pid %d, nb_rb %d first_rb %d\n",harq_pid,ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,ulsch[UE_id]->harq_processes[harq_pid]->first_rb);
|
||||
|
||||
#endif //DEBUG_ULSCH
|
||||
if(LOG_DEBUGFLAG(DEBUG_ULSCH)) {
|
||||
LOG_I(PHY,"rx_ulsch: harq_pid %d, nb_rb %d first_rb %d\n",harq_pid,ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,ulsch[UE_id]->harq_processes[harq_pid]->first_rb);
|
||||
}
|
||||
|
||||
if (ulsch[UE_id]->harq_processes[harq_pid]->nb_rb == 0) {
|
||||
LOG_E(PHY,"PUSCH (%d/%x) nb_rb=0!\n", harq_pid,ulsch[UE_id]->rnti);
|
||||
@@ -1137,13 +1140,13 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
|
||||
|
||||
for (l=0; l<(frame_parms->symbols_per_tti-ulsch[UE_id]->harq_processes[harq_pid]->srs_active); l++) {
|
||||
|
||||
#ifdef DEBUG_ULSCH
|
||||
printf("rx_ulsch : symbol %d (first_rb %d,nb_rb %d), rxdataF %p, rxdataF_ext %p\n",l,
|
||||
if(LOG_DEBUGFLAG(DEBUG_ULSCH)) {
|
||||
LOG_I(PHY,"rx_ulsch : symbol %d (first_rb %d,nb_rb %d), rxdataF %p, rxdataF_ext %p\n",l,
|
||||
ulsch[UE_id]->harq_processes[harq_pid]->first_rb,
|
||||
ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,
|
||||
common_vars->rxdataF,
|
||||
pusch_vars->rxdataF_ext);
|
||||
#endif //DEBUG_ULSCH
|
||||
}
|
||||
|
||||
ulsch_extract_rbs_single(common_vars->rxdataF,
|
||||
pusch_vars->rxdataF_ext,
|
||||
@@ -1179,21 +1182,16 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
|
||||
|
||||
pusch_vars->ulsch_power[i] = signal_energy_nodc(pusch_vars->drs_ch_estimates[i],
|
||||
ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12)/correction_factor;
|
||||
/* printf("%4.4d.%d power harq_pid %d rb %2.2d TBS %2.2d (MPR_times_Ks %d correction %d) power %d dBtimes10\n", proc->frame_rx, proc->subframe_rx, harq_pid, ulsch[UE_id]->harq_processes[harq_pid]->nb_rb, ulsch[UE_id]->harq_processes[harq_pid]->TBS,MPR_times_100Ks,correction_factor,dB_fixed_times10(pusch_vars->ulsch_power[i]));
|
||||
*/
|
||||
LOG_D(PHY,"%4.4d.%d power harq_pid %d rb %2.2d TBS %2.2d (MPR_times_Ks %d correction %d) power %d dBtimes10\n", proc->frame_rx, proc->subframe_rx, harq_pid, ulsch[UE_id]->harq_processes[harq_pid]->nb_rb, ulsch[UE_id]->harq_processes[harq_pid]->TBS,MPR_times_100Ks,correction_factor,dB_fixed_times10(pusch_vars->ulsch_power[i]));
|
||||
|
||||
}
|
||||
|
||||
|
||||
//LOG_M("rxdataF_ext.m","rxF_ext",pusch_vars->rxdataF_ext[eNB_id][0],300*(frame_parms->symbols_per_tti-ulsch[UE_id]->srs_active),1,1);
|
||||
//LOG_M("ulsch_chest.m","drs_est",pusch_vars->drs_ch_estimates[eNB_id][0],300*(frame_parms->symbols_per_tti-ulsch[UE_id]->srs_active),1,1);
|
||||
|
||||
|
||||
ulsch_channel_level(pusch_vars->drs_ch_estimates,
|
||||
frame_parms,
|
||||
avgU,
|
||||
ulsch[UE_id]->harq_processes[harq_pid]->nb_rb);
|
||||
|
||||
// printf("[ULSCH] avg[0] %d\n",avgU[0]);
|
||||
LOG_D(PHY,"[ULSCH] avg[0] %d\n",avgU[0]);
|
||||
|
||||
|
||||
avgs = 0;
|
||||
@@ -1205,9 +1203,9 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
|
||||
|
||||
log2_maxh = (log2_approx(avgs)/2)+ log2_approx(frame_parms->nb_antennas_rx-1)+4;
|
||||
|
||||
#ifdef DEBUG_ULSCH
|
||||
printf("[ULSCH] log2_maxh = %d (%d,%d)\n",log2_maxh,avgU[0],avgs);
|
||||
#endif
|
||||
|
||||
LOG_D(PHY,"[ULSCH] log2_maxh = %d (%d,%d)\n",log2_maxh,avgU[0],avgs);
|
||||
|
||||
|
||||
|
||||
for (l=0; l<(frame_parms->symbols_per_tti-ulsch[UE_id]->harq_processes[harq_pid]->srs_active); l++) {
|
||||
@@ -1229,9 +1227,6 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
|
||||
ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,
|
||||
log2_maxh); // log2_maxh+I0_shift
|
||||
|
||||
|
||||
|
||||
|
||||
if (frame_parms->nb_antennas_rx > 1)
|
||||
ulsch_detection_mrc(frame_parms,
|
||||
pusch_vars->rxdataF_comp,
|
||||
@@ -1240,9 +1235,7 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
|
||||
l,
|
||||
ulsch[UE_id]->harq_processes[harq_pid]->nb_rb);
|
||||
|
||||
|
||||
|
||||
// if ((eNB->measurements.n0_power_dB[0]+3)<pusch_vars->ulsch_power[0]) {
|
||||
// if ((eNB->measurements.n0_power_dB[0]+3)<pusch_vars->ulsch_power[0])
|
||||
if (23<pusch_vars->ulsch_power[0]) {
|
||||
freq_equalization(frame_parms,
|
||||
pusch_vars->rxdataF_comp,
|
||||
@@ -1254,22 +1247,9 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//#ifdef DEBUG_ULSCH
|
||||
// Inverse-Transform equalized outputs
|
||||
// printf("Doing IDFTs\n");
|
||||
lte_idft(frame_parms,
|
||||
(uint32_t*)pusch_vars->rxdataF_comp[0],
|
||||
ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12);
|
||||
// printf("Done\n");
|
||||
//#endif //DEBUG_ULSCH
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
llrp = (int16_t*)&pusch_vars->llr[0];
|
||||
|
||||
@@ -1316,9 +1296,8 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
|
||||
break;
|
||||
|
||||
default:
|
||||
#ifdef DEBUG_ULSCH
|
||||
printf("ulsch_demodulation.c (rx_ulsch): Unknown Qm!!!!\n");
|
||||
#endif //DEBUG_ULSCH
|
||||
LOG_E(PHY,"ulsch_demodulation.c (rx_ulsch): Unknown Qm!!!!\n");
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1329,7 +1308,7 @@ void rx_ulsch_emul(PHY_VARS_eNB *eNB,
|
||||
eNB_rxtx_proc_t *proc,
|
||||
uint8_t UE_index)
|
||||
{
|
||||
printf("[PHY] EMUL eNB %d rx_ulsch_emul : subframe %d, UE_index %d\n",eNB->Mod_id,proc->subframe_rx,UE_index);
|
||||
LOG_I(PHY,"[PHY] EMUL eNB %d rx_ulsch_emul : subframe %d, UE_index %d\n",eNB->Mod_id,proc->subframe_rx,UE_index);
|
||||
eNB->pusch_vars[UE_index]->ulsch_power[0] = 31622; //=45dB;
|
||||
eNB->pusch_vars[UE_index]->ulsch_power[1] = 31622; //=45dB;
|
||||
|
||||
@@ -1344,7 +1323,7 @@ void rx_ulsch_emul(PHY_VARS_eNB *eNB,
|
||||
|
||||
harq_pid = subframe2harq_pid(&eNB->frame_parms,frame,subframe);
|
||||
|
||||
printf("Dumping ULSCH in subframe %d with harq_pid %d, round %d for NB_rb %d, TBS %d, Qm %d, N_symb %d\n",
|
||||
LOG_UI(PHY,"Dumping ULSCH in subframe %d with harq_pid %d, round %d for NB_rb %d, TBS %d, Qm %d, N_symb %d\n",
|
||||
subframe,harq_pid,round,eNB->ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,
|
||||
eNB->ulsch[UE_id]->harq_processes[harq_pid]->TBS,eNB->ulsch[UE_id]->harq_processes[harq_pid]->Qm,
|
||||
eNB->ulsch[UE_id]->harq_processes[harq_pid]->Nsymb_pusch);
|
||||
|
||||
@@ -179,29 +179,29 @@ void extract_dci1C_info(uint8_t N_RB_DL, lte_frame_type_t frame_type, void *dci_
|
||||
|
||||
uint32_t rballoc=0;
|
||||
uint8_t mcs=0;
|
||||
uint8_t Ngap=0;
|
||||
|
||||
switch (N_RB_DL) {
|
||||
case 6:
|
||||
mcs = ((DCI1C_5MHz_t *)dci_pdu)->mcs;
|
||||
rballoc = conv_1C_RIV(((DCI1C_5MHz_t *)dci_pdu)->rballoc,6);
|
||||
|
||||
mcs = ((DCI1C_1_5MHz_t *)dci_pdu)->mcs;
|
||||
rballoc = conv_1C_RIV(((DCI1C_1_5MHz_t *)dci_pdu)->rballoc, 6);
|
||||
break;
|
||||
|
||||
case 25:
|
||||
mcs = ((DCI1C_5MHz_t *)dci_pdu)->mcs;
|
||||
rballoc = conv_1C_RIV(((DCI1C_5MHz_t *)dci_pdu)->rballoc,6);
|
||||
|
||||
mcs = ((DCI1C_5MHz_t *)dci_pdu)->mcs;
|
||||
rballoc = conv_1C_RIV(((DCI1C_5MHz_t *)dci_pdu)->rballoc, 25);
|
||||
break;
|
||||
|
||||
case 50:
|
||||
mcs = ((DCI1C_10MHz_t *)dci_pdu)->mcs;
|
||||
rballoc = conv_1C_RIV(((DCI1C_10MHz_t *)dci_pdu)->rballoc,6);
|
||||
|
||||
mcs = ((DCI1C_10MHz_t *)dci_pdu)->mcs;
|
||||
rballoc = conv_1C_RIV(((DCI1C_10MHz_t *)dci_pdu)->rballoc, 50);
|
||||
Ngap = ((DCI1C_10MHz_t *)dci_pdu)->Ngap;
|
||||
break;
|
||||
|
||||
case 100:
|
||||
mcs = ((DCI1C_20MHz_t *)dci_pdu)->mcs;
|
||||
rballoc = conv_1C_RIV(((DCI1C_20MHz_t *)dci_pdu)->rballoc,6);
|
||||
mcs = ((DCI1C_20MHz_t *)dci_pdu)->mcs;
|
||||
rballoc = conv_1C_RIV(((DCI1C_20MHz_t *)dci_pdu)->rballoc, 100);
|
||||
Ngap = ((DCI1C_20MHz_t *)dci_pdu)->Ngap;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -211,6 +211,7 @@ void extract_dci1C_info(uint8_t N_RB_DL, lte_frame_type_t frame_type, void *dci_
|
||||
|
||||
pdci_info_extarcted->mcs1 = mcs;
|
||||
pdci_info_extarcted->rballoc = rballoc;
|
||||
pdci_info_extarcted->Ngap = Ngap;
|
||||
}
|
||||
|
||||
void extract_dci1_info(uint8_t N_RB_DL, lte_frame_type_t frame_type, void *dci_pdu, DCI_INFO_EXTRACTED_t *pdci_info_extarcted)
|
||||
|
||||
@@ -83,7 +83,7 @@ int generate_drs_pusch(PHY_VARS_UE *ue,
|
||||
// cyclic_shift1 = 0;
|
||||
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)
|
||||
Msc_RS_idx = Msc_idx_ptr - dftsizes;
|
||||
|
||||
@@ -181,7 +181,7 @@ int32_t generate_srs(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
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)
|
||||
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)
|
||||
dft720((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
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:
|
||||
dft864((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft864((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <assert.h>
|
||||
#include <complex>
|
||||
#include <cmath>
|
||||
#include <map>
|
||||
#include <PHY/MODULATION/modulation_extern.h>
|
||||
using namespace std;
|
||||
extern "C" {
|
||||
void gen_sig(int RB, int len, double ratio, int16_t *table_n, int16_t *table_e ) {
|
||||
double samplerate = 30.72e6*ratio;
|
||||
double ofdm_size = 2048*ratio;
|
||||
double PI = std::acos(-1);
|
||||
std::complex<int> tt;
|
||||
complex<double> t[len];
|
||||
int index=0;
|
||||
double cp0 = 160*ratio;
|
||||
double cp = 144*ratio;
|
||||
|
||||
for (int i=-cp0; i<ofdm_size; i++)
|
||||
t[index++] = polar( 32767.0, -2*PI*i*7.5e3/samplerate);
|
||||
|
||||
for(int x=0 ; x <6 ; x++)
|
||||
for (int i=-cp; i<ofdm_size; i++)
|
||||
t[index++] = polar( 32767.0, -2*PI*i*7.5e3/samplerate);
|
||||
|
||||
for (int i=0; i < len ; i++) {
|
||||
table_n[i*2] = floor(real(t[i]));
|
||||
table_n[i*2+1] = floor(imag(t[i]));
|
||||
}
|
||||
|
||||
index=0;
|
||||
double cpe = 512*ratio;
|
||||
|
||||
for(int x=0 ; x <6 ; x++)
|
||||
for (int i=-cpe; i<ofdm_size; i++)
|
||||
t[index++] = polar( 32767.0, -2*PI*i*7.5e3/samplerate);
|
||||
|
||||
for (int i=0; i < len ; i++) {
|
||||
table_e[i*2] = floor(real(t[i]));
|
||||
table_e[i*2+1] = floor(imag(t[i]));
|
||||
}
|
||||
}
|
||||
|
||||
int16_t *s6n_kHz_7_5;
|
||||
int16_t *s6e_kHz_7_5;
|
||||
int16_t *s15n_kHz_7_5;
|
||||
int16_t *s15e_kHz_7_5;
|
||||
int16_t *s25n_kHz_7_5;
|
||||
int16_t *s25e_kHz_7_5;
|
||||
int16_t *s50n_kHz_7_5;
|
||||
int16_t *s50e_kHz_7_5;
|
||||
int16_t *s75n_kHz_7_5;
|
||||
int16_t *s75e_kHz_7_5;
|
||||
int16_t *s100n_kHz_7_5;
|
||||
int16_t *s100e_kHz_7_5;
|
||||
int16_t **tables[12]= {&s6n_kHz_7_5,&s6e_kHz_7_5,
|
||||
&s15n_kHz_7_5,&s15e_kHz_7_5,
|
||||
&s25n_kHz_7_5,&s25e_kHz_7_5,
|
||||
&s50n_kHz_7_5,&s50e_kHz_7_5,
|
||||
&s75n_kHz_7_5,&s75e_kHz_7_5,
|
||||
&s100n_kHz_7_5,&s100e_kHz_7_5,
|
||||
};
|
||||
int tables_size_bytes[12];
|
||||
#define MyAssert(x) { if(!(x)) { printf("Error in table intialization: %s:%d\n",__FILE__,__LINE__); exit(1);}}
|
||||
void init_7_5KHz(void) {
|
||||
const map<int,double> tables_7_5KHz= {{6,1.0/16},{15,1.0/8},{25,1.0/4},{50,1.0/2},{75,3.0/4},{100,1.0}};
|
||||
int tables_idx=0;
|
||||
|
||||
for (auto it=tables_7_5KHz.begin(); it!=tables_7_5KHz.end(); ++it) {
|
||||
int len=15360*it->second;
|
||||
tables_size_bytes[tables_idx]=sizeof(int16_t)*2*len;
|
||||
tables_size_bytes[tables_idx+1]=sizeof(int16_t)*2*len;
|
||||
MyAssert(0==posix_memalign((void **)tables[tables_idx],
|
||||
16,tables_size_bytes[tables_idx]));
|
||||
MyAssert(0==posix_memalign((void **)tables[tables_idx+1],
|
||||
16,tables_size_bytes[tables_idx+1]));
|
||||
gen_sig(it->first, len, it->second, *tables[tables_idx], *tables[tables_idx+1]);
|
||||
tables_idx+=2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
|
||||
function [] = gen_7_5_kHz()
|
||||
[s6_n2, s6_e2] = gen_sig(6);
|
||||
[s15_n2, s15_e2] = gen_sig(15);
|
||||
[s25_n2, s25_e2] = gen_sig(25);
|
||||
[s50_n2, s50_e2] = gen_sig(50);
|
||||
[s75_n2, s75_e2] = gen_sig(75);
|
||||
[s100_n2, s100_e2] = gen_sig(100);
|
||||
|
||||
|
||||
fd=fopen("kHz_7_5.h","w");
|
||||
fprintf(fd,"s16 s6n_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s6_n2));
|
||||
fprintf(fd,"%d,",s6_n2(1:(end-1)));
|
||||
fprintf(fd,"%d};\n\n",s6_n2(end));
|
||||
|
||||
fprintf(fd,"s16 s6e_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s6_e2));
|
||||
fprintf(fd,"%d,",s6_e2(1:(end-1)));
|
||||
fprintf(fd,"%d};\n\n",s6_e2(end));
|
||||
|
||||
fprintf(fd,"s16 s15n_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s15_n2));
|
||||
fprintf(fd,"%d,",s15_n2(1:(end-1)));
|
||||
fprintf(fd,"%d};\n\n",s15_n2(end));
|
||||
|
||||
fprintf(fd,"s16 s15e_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s15_e2));
|
||||
fprintf(fd,"%d,",s15_e2(1:(end-1)));
|
||||
fprintf(fd,"%d};\n\n",s15_e2(end));
|
||||
|
||||
fprintf(fd,"s16 s25n_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s25_n2));
|
||||
fprintf(fd,"%d,",s25_n2(1:(end-1)));
|
||||
fprintf(fd,"%d};\n\n",s25_n2(end));
|
||||
|
||||
fprintf(fd,"s16 s25e_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s25_e2));
|
||||
fprintf(fd,"%d,",s25_e2(1:(end-1)));
|
||||
fprintf(fd,"%d};\n\n",s25_e2(end));
|
||||
|
||||
fprintf(fd,"s16 s50n_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s50_n2));
|
||||
fprintf(fd,"%d,",s50_n2(1:(end-1)));
|
||||
fprintf(fd,"%d};\n\n",s50_n2(end));
|
||||
|
||||
fprintf(fd,"s16 s50e_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s50_e2));
|
||||
fprintf(fd,"%d,",s50_e2(1:(end-1)));
|
||||
fprintf(fd,"%d};\n\n",s50_e2(end));
|
||||
|
||||
fprintf(fd,"s16 s75n_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s75_n2));
|
||||
fprintf(fd,"%d,",s75_n2(1:(end-1)));
|
||||
fprintf(fd,"%d};\n\n",s75_n2(end));
|
||||
|
||||
fprintf(fd,"s16 s75e_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s75_e2));
|
||||
fprintf(fd,"%d,",s75_e2(1:(end-1)));
|
||||
fprintf(fd,"%d};\n\n",s75_e2(end));
|
||||
|
||||
fprintf(fd,"s16 s100n_kHz_7_5[%d]__attribute__((aligned(16)))= {",length(s100_n2));
|
||||
fprintf(fd,"%d,",s100_n2(1:(end-1)));
|
||||
fprintf(fd,"%d};\n\n",s100_n2(end));
|
||||
|
||||
fprintf(fd,"s16 s100e_kHz_7_5[%d]__attribute__((aligned(16)))= {",length(s100_n2));
|
||||
fprintf(fd,"%d,",s100_e2(1:(end-1)));
|
||||
fprintf(fd,"%d};\n\n",s100_e2(end));
|
||||
|
||||
fclose(fd);
|
||||
end
|
||||
|
||||
|
||||
function [s_n2, s_e2] = gen_sig(RB)
|
||||
% 20MHz BW
|
||||
cp0 = 160;
|
||||
cp = 144;
|
||||
cpe = 512;
|
||||
samplerate = 30.72e6;
|
||||
ofdm_size = 2048;
|
||||
len = 15360;
|
||||
switch(RB)
|
||||
case 6
|
||||
ratio = 1/16;
|
||||
case 15
|
||||
ratio = 1/8;
|
||||
case 25
|
||||
ratio = 1/4;
|
||||
case 50
|
||||
ratio = 1/2;
|
||||
case 75
|
||||
ratio = 3/4;
|
||||
case 100
|
||||
ratio = 1;
|
||||
otherwise
|
||||
disp("Wrong Number of RB");
|
||||
end
|
||||
cp0 = cp0*ratio;
|
||||
cp = cp*ratio;
|
||||
cpe = cpe*ratio;
|
||||
samplerate = samplerate*ratio;
|
||||
ofdm_size = ofdm_size*ratio;
|
||||
len = len*ratio;
|
||||
|
||||
s_n0 = floor(32767*exp(-sqrt(-1)*2*pi*(-cp0:ofdm_size-1)*7.5e3/samplerate));
|
||||
s_n1 = floor(32767*exp(-sqrt(-1)*2*pi*(-cp:ofdm_size-1)*7.5e3/samplerate));
|
||||
s_n = [s_n0 s_n1 s_n1 s_n1 s_n1 s_n1 s_n1];
|
||||
s_n2 = zeros(1, 2*len);
|
||||
s_n2(1:2:end) = real(s_n);
|
||||
s_n2(2:2:end) = imag(s_n);
|
||||
s_e = floor(32767*exp(-sqrt(-1)*2*pi*(-cpe:ofdm_size-1)*7.5e3/samplerate));
|
||||
s_e = [s_e s_e s_e s_e s_e s_e];
|
||||
s_e2 = zeros(1, 2*len);
|
||||
s_e2(1:2:end) = real(s_e);
|
||||
s_e2(2:2:end) = imag(s_e);
|
||||
end
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,38 +1,44 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
; * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
extern int16_t s6n_kHz_7_5[1920];
|
||||
extern int16_t s6e_kHz_7_5[1920];
|
||||
extern int16_t s15n_kHz_7_5[3840];
|
||||
extern int16_t s15e_kHz_7_5[3840];
|
||||
extern int16_t s25n_kHz_7_5[7680];
|
||||
extern int16_t s25e_kHz_7_5[7680];
|
||||
extern int16_t s50n_kHz_7_5[15360];
|
||||
extern int16_t s50e_kHz_7_5[15360];
|
||||
extern int16_t s75n_kHz_7_5[23040];
|
||||
extern int16_t s75e_kHz_7_5[23040];
|
||||
extern int16_t s100n_kHz_7_5[30720];
|
||||
extern int16_t s100e_kHz_7_5[30720];
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
; * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-------------------------------------------------------------------------------
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int16_t *s6n_kHz_7_5;
|
||||
extern int16_t *s6e_kHz_7_5;
|
||||
extern int16_t *s15n_kHz_7_5;
|
||||
extern int16_t *s15e_kHz_7_5;
|
||||
extern int16_t *s25n_kHz_7_5;
|
||||
extern int16_t *s25e_kHz_7_5;
|
||||
extern int16_t *s50n_kHz_7_5;
|
||||
extern int16_t *s50e_kHz_7_5;
|
||||
extern int16_t *s75n_kHz_7_5;
|
||||
extern int16_t *s75e_kHz_7_5;
|
||||
extern int16_t *s100n_kHz_7_5;
|
||||
extern int16_t *s100e_kHz_7_5;
|
||||
|
||||
|
||||
extern short conjugate75[8];
|
||||
extern short conjugate75_2[8];
|
||||
extern short negate[8];
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include "kHz_7_5.h"
|
||||
|
||||
short conjugate75[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1} ;
|
||||
short conjugate75_2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1} ;
|
||||
|
||||
@@ -3097,10 +3097,10 @@ void dft128(int16_t *x,int16_t *y,int scale)
|
||||
|
||||
dft64((int16_t*)(xtmp),(int16_t*)ytmp,1);
|
||||
dft64((int16_t*)(xtmp+32),(int16_t*)(ytmp+16),1);
|
||||
|
||||
/* LOG_M("dft128a.m","dfta",ytmp,64,1,1);
|
||||
LOG_M("dft128b.m","dftb",ytmp+16,64,1,1);*/
|
||||
|
||||
if (LOG_DUMPFLAG(DEBUG_DFT)) {
|
||||
LOG_M("dft128a.m","dfta",ytmp,64,1,1);
|
||||
LOG_M("dft128b.m","dftb",ytmp+16,64,1,1);
|
||||
}
|
||||
for (i=0; i<16; i++) {
|
||||
bfly2_16(ytmpp,ytmpp+16,
|
||||
y128p,y128p+16,
|
||||
@@ -3149,9 +3149,10 @@ void dft128(int16_t *x,int16_t *y,int scale)
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* LOG_M("dft128out.m","dft128",y,128,1,1);
|
||||
exit(-1);*/
|
||||
if (LOG_DUMPFLAG(DEBUG_DFT)) {
|
||||
LOG_M("dft128out.m","dft128",y,128,1,1);
|
||||
exit(-1);
|
||||
}
|
||||
_mm_empty();
|
||||
_m_empty();
|
||||
|
||||
@@ -3176,17 +3177,17 @@ void dft128(int16_t *x,int16_t *y,int scale)
|
||||
transpose4_ooff_simd256(x256+10,xtmp+5,8);
|
||||
transpose4_ooff_simd256(x256+12,xtmp+6,8);
|
||||
transpose4_ooff_simd256(x256+14,xtmp+7,8);
|
||||
|
||||
/* LOG_M("dft128ina_256.m","dftina",xtmp,64,1,1);
|
||||
LOG_M("dft128inb_256.m","dftinb",xtmp+8,64,1,1);
|
||||
*/
|
||||
if (LOG_DUMPFLAG(DEBUG_DFT)) {
|
||||
LOG_M("dft128ina_256.m","dftina",xtmp,64,1,1);
|
||||
LOG_M("dft128inb_256.m","dftinb",xtmp+8,64,1,1);
|
||||
}
|
||||
|
||||
dft64((int16_t*)(xtmp),(int16_t*)ytmp,1);
|
||||
dft64((int16_t*)(xtmp+8),(int16_t*)(ytmp+8),1);
|
||||
|
||||
/*LOG_M("dft128outa_256.m","dftouta",ytmp,64,1,1);
|
||||
LOG_M("dft128outb_256.m","dftoutb",ytmp+8,64,1,1);
|
||||
*/
|
||||
if (LOG_DUMPFLAG(DEBUG_DFT)) {
|
||||
LOG_M("dft128outa_256.m","dftouta",ytmp,64,1,1);
|
||||
LOG_M("dft128outb_256.m","dftoutb",ytmp+8,64,1,1);
|
||||
}
|
||||
|
||||
for (i=0; i<8; i++) {
|
||||
bfly2_16_256(ytmpp,ytmpp+8,
|
||||
@@ -3219,9 +3220,10 @@ void dft128(int16_t *x,int16_t *y,int scale)
|
||||
y256[15] = mulhi_int16_simd256(y256[15],ONE_OVER_SQRT2_Q15_256);
|
||||
|
||||
}
|
||||
|
||||
/* LOG_M("dft128.m","dft",y256,128,1,1);
|
||||
exit(-1);*/
|
||||
if (LOG_DUMPFLAG(DEBUG_DFT)) {
|
||||
LOG_M("dft128.m","dft",y256,128,1,1);
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -5422,10 +5424,11 @@ void dft1536(int16_t *input, int16_t *output, int scale)
|
||||
tmpo[1][i] = tmpo[1][i<<1];
|
||||
tmpo[2][i] = tmpo[2][i<<1];
|
||||
}*/
|
||||
|
||||
// LOG_M("out0.m","o0",tmpo[0],2048,1,1);
|
||||
// LOG_M("out1.m","o1",tmpo[1],2048,1,1);
|
||||
// LOG_M("out2.m","o2",tmpo[2],2048,1,1);
|
||||
if (LOG_DUMPFLAG(DEBUG_DFT)) {
|
||||
LOG_M("dft1536out0.m","o0",tmpo[0],2048,1,1);
|
||||
LOG_M("dft1536out1.m","o1",tmpo[1],2048,1,1);
|
||||
LOG_M("dft1536out2.m","o2",tmpo[2],2048,1,1);
|
||||
}
|
||||
for (i=0,i2=0; i<1024; 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+1024+i),(simd_q15_t*)(output+2048+i),
|
||||
@@ -5585,12 +5588,20 @@ void idft6144(int16_t *input, int16_t *output,int scale)
|
||||
idft2048((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),1);
|
||||
idft2048((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),1);
|
||||
|
||||
if (LOG_DUMPFLAG(DEBUG_DFT)) {
|
||||
LOG_M("idft6144in.m","in",input,6144,1,1);
|
||||
LOG_M("idft6144out0.m","o0",tmpo[0],2048,1,1);
|
||||
LOG_M("idft6144out1.m","o1",tmpo[1],2048,1,1);
|
||||
LOG_M("idft6144out2.m","o2",tmpo[2],2048,1,1);
|
||||
}
|
||||
|
||||
for (i=0,i2=0; i<4096; 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+4096+i),(simd_q15_t*)(output+8192+i),
|
||||
(simd_q15_t*)(twa6144+i),(simd_q15_t*)(twb6144+i));
|
||||
}
|
||||
|
||||
|
||||
if (scale==1) {
|
||||
for (i=0; i<96; i++) {
|
||||
y128p[0] = mulhi_int16(y128p[0],ONE_OVER_SQRT3_Q15_128);
|
||||
@@ -5643,10 +5654,11 @@ void dft6144(int16_t *input, int16_t *output,int scale)
|
||||
tmpo[1][i] = tmpo[1][i<<1];
|
||||
tmpo[2][i] = tmpo[2][i<<1];
|
||||
}*/
|
||||
|
||||
// LOG_M("out0.m","o0",tmpo[0],2048,1,1);
|
||||
// LOG_M("out1.m","o1",tmpo[1],2048,1,1);
|
||||
// LOG_M("out2.m","o2",tmpo[2],2048,1,1);
|
||||
if (LOG_DUMPFLAG(DEBUG_DFT)) {
|
||||
LOG_M("ft6144out0.m","o0",tmpo[0],2048,1,1);
|
||||
LOG_M("ft6144out1.m","o1",tmpo[1],2048,1,1);
|
||||
LOG_M("ft6144out2.m","o2",tmpo[2],2048,1,1);
|
||||
}
|
||||
for (i=0,i2=0; i<4096; 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+4096+i),(simd_q15_t*)(output+8192+i),
|
||||
@@ -5707,10 +5719,11 @@ void dft12288(int16_t *input, int16_t *output,int scale)
|
||||
tmpo[1][i] = tmpo[1][i<<1];
|
||||
tmpo[2][i] = tmpo[2][i<<1];
|
||||
}*/
|
||||
|
||||
// LOG_M("out0.m","o0",tmpo[0],4096,1,1);
|
||||
// LOG_M("out1.m","o1",tmpo[1],4096,1,1);
|
||||
// LOG_M("out2.m","o2",tmpo[2],4096,1,1);
|
||||
if (LOG_DUMPFLAG(DEBUG_DFT)) {
|
||||
LOG_M("dft12288out0.m","o0",tmpo[0],4096,1,1);
|
||||
LOG_M("dft12288out1.m","o1",tmpo[1],4096,1,1);
|
||||
LOG_M("dft12288out2.m","o2",tmpo[2],4096,1,1);
|
||||
}
|
||||
for (i=0,i2=0; i<8192; 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+8192+i),(simd_q15_t*)(output+16384+i),
|
||||
@@ -5758,9 +5771,18 @@ void idft12288(int16_t *input, int16_t *output,int scale)
|
||||
}
|
||||
|
||||
|
||||
|
||||
idft4096((int16_t*)(tmp[0]),(int16_t*)(tmpo[0]),scale);
|
||||
idft4096((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),scale);
|
||||
idft4096((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),scale);
|
||||
|
||||
if (LOG_DUMPFLAG(DEBUG_DFT)) {
|
||||
LOG_M("idft12288in.m","in",input,12288,1,1);
|
||||
LOG_M("idft12288out0.m","o0",tmpo[0],4096,1,1);
|
||||
LOG_M("idft12288out1.m","o1",tmpo[1],4096,1,1);
|
||||
LOG_M("idft12288out2.m","o2",tmpo[2],4096,1,1);
|
||||
}
|
||||
|
||||
for (i=0,i2=0; i<8192; 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+8192+i),(simd_q15_t*)(output+16384+i),
|
||||
@@ -5790,8 +5812,9 @@ void idft12288(int16_t *input, int16_t *output,int scale)
|
||||
}
|
||||
_mm_empty();
|
||||
_m_empty();
|
||||
|
||||
// LOG_M("out.m","out",output,6144,1,1);
|
||||
if (LOG_DUMPFLAG(DEBUG_DFT)) {
|
||||
LOG_M("idft12288out.m","out",output,6144,1,1);
|
||||
}
|
||||
}
|
||||
|
||||
int16_t twa18432[12288] __attribute__((aligned(32)));
|
||||
@@ -5920,16 +5943,18 @@ void dft24576(int16_t *input, int16_t *output,int scale)
|
||||
tmpo[1][i] = tmpo[1][i<<1];
|
||||
tmpo[2][i] = tmpo[2][i<<1];
|
||||
}*/
|
||||
|
||||
// LOG_M("out0.m","o0",tmpo[0],8192,1,1);
|
||||
// LOG_M("out1.m","o1",tmpo[1],8192,1,1);
|
||||
// LOG_M("out2.m","o2",tmpo[2],8192,1,1);
|
||||
if (LOG_DUMPFLAG(DEBUG_DFT)) {
|
||||
LOG_M("dft24576out0.m","o0",tmpo[0],8192,1,1);
|
||||
LOG_M("dft24576out1.m","o1",tmpo[1],8192,1,1);
|
||||
LOG_M("dft24576out2.m","o2",tmpo[2],8192,1,1);
|
||||
}
|
||||
for (i=0,i2=0; i<16384; 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+16384+i),(simd_q15_t*)(output+32768+i),
|
||||
(simd_q15_t*)(twa24576+i),(simd_q15_t*)(twb24576+i));
|
||||
}
|
||||
|
||||
|
||||
if (scale==1) {
|
||||
for (i=0; i<384; i++) {
|
||||
y128p[0] = mulhi_int16(y128p[0],ONE_OVER_SQRT3_Q15_128);
|
||||
@@ -5953,8 +5978,9 @@ void dft24576(int16_t *input, int16_t *output,int scale)
|
||||
}
|
||||
_mm_empty();
|
||||
_m_empty();
|
||||
|
||||
// LOG_M("out.m","out",output,24576,1,1);
|
||||
if (LOG_DUMPFLAG(DEBUG_DFT)) {
|
||||
LOG_M("out.m","out",output,24576,1,1);
|
||||
}
|
||||
}
|
||||
|
||||
void idft24576(int16_t *input, int16_t *output,int scale)
|
||||
@@ -5975,12 +6001,12 @@ void idft24576(int16_t *input, int16_t *output,int scale)
|
||||
idft8192((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),1);
|
||||
idft8192((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),1);
|
||||
|
||||
/*
|
||||
LOG_M("in.m","in",input,24576,1,1);
|
||||
LOG_M("out0.m","o0",tmpo[0],8192,1,1);
|
||||
LOG_M("out1.m","o1",tmpo[1],8192,1,1);
|
||||
LOG_M("out2.m","o2",tmpo[2],8192,1,1);
|
||||
*/
|
||||
if (LOG_DUMPFLAG(DEBUG_DFT)) {
|
||||
LOG_M("idft24576in.m","in",input,24576,1,1);
|
||||
LOG_M("idft24576out0.m","o0",tmpo[0],8192,1,1);
|
||||
LOG_M("idft24576out1.m","o1",tmpo[1],8192,1,1);
|
||||
LOG_M("idft24576out2.m","o2",tmpo[2],8192,1,1);
|
||||
}
|
||||
|
||||
for (i=0,i2=0; i<16384; i+=8,i2+=4) {
|
||||
ibfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),((simd_q15_t*)&tmpo[2][i2]),
|
||||
@@ -6011,7 +6037,9 @@ void idft24576(int16_t *input, int16_t *output,int scale)
|
||||
_mm_empty();
|
||||
_m_empty();
|
||||
|
||||
// LOG_M("out.m","out",output,24576,1,1);
|
||||
if (LOG_DUMPFLAG(DEBUG_DFT)) {
|
||||
LOG_M("idft24576out.m","out",output,24576,1,1);
|
||||
}
|
||||
}
|
||||
|
||||
/// THIS SECTION IS FOR ALL PUSCH DFTS (i.e. radix 2^a * 3^b * 4^c * 5^d)
|
||||
|
||||
@@ -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 dft648(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 dft900(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft960(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
# include "COMMON/ral_messages_types.h"
|
||||
# include "UTIL/queue.h"
|
||||
# endif
|
||||
# include "log.h"
|
||||
# include "common/utils/LOG/log.h"
|
||||
# define msg(aRGS...) LOG_D(PHY, ##aRGS)
|
||||
# else
|
||||
# define msg printf
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
# include "COMMON/ral_messages_types.h"
|
||||
# include "UTIL/queue.h"
|
||||
# endif
|
||||
# include "log.h"
|
||||
# include "common/utils/LOG/log.h"
|
||||
# define msg(aRGS...) LOG_D(PHY, ##aRGS)
|
||||
# else
|
||||
# define msg printf
|
||||
|
||||
+18
-12
@@ -33,7 +33,9 @@
|
||||
#define __PHY_DEFS_COMMON_H__
|
||||
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#include <sched.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -928,7 +930,6 @@ typedef enum {
|
||||
#endif
|
||||
|
||||
|
||||
void exit_fun(const char* s);
|
||||
|
||||
#include "common/utils/LOG/log_extern.h"
|
||||
extern pthread_cond_t sync_cond;
|
||||
@@ -994,9 +995,10 @@ static inline void wait_sync(char *thread_name) {
|
||||
}
|
||||
|
||||
static inline int wakeup_thread(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
|
||||
|
||||
if (pthread_mutex_lock(mutex) != 0) {
|
||||
LOG_E( PHY, "error locking mutex for %s\n",name);
|
||||
int rc;
|
||||
if ((rc = pthread_mutex_lock(mutex)) != 0) {
|
||||
LOG_E(PHY, "wakeup_thread(): error locking mutex for %s (%d %s, %p)\n",
|
||||
name, rc, strerror(rc), (void *)mutex);
|
||||
exit_fun("nothing to add");
|
||||
return(-1);
|
||||
}
|
||||
@@ -1013,8 +1015,10 @@ static inline int wakeup_thread(pthread_mutex_t *mutex,pthread_cond_t *cond,int
|
||||
}
|
||||
|
||||
static inline int wait_on_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
|
||||
if (pthread_mutex_lock(mutex) != 0) {
|
||||
LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name);
|
||||
int rc;
|
||||
if ((rc = pthread_mutex_lock(mutex)) != 0) {
|
||||
LOG_E(PHY, "[SCHED][eNB] wait_on_condition(): error locking mutex for %s (%d %s, %p)\n",
|
||||
name, rc, strerror(rc), (void *)mutex);
|
||||
exit_fun("nothing to add");
|
||||
return(-1);
|
||||
}
|
||||
@@ -1034,9 +1038,10 @@ static inline int wait_on_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,
|
||||
}
|
||||
|
||||
static inline int wait_on_busy_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
|
||||
|
||||
if (pthread_mutex_lock(mutex) != 0) {
|
||||
LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name);
|
||||
int rc;
|
||||
if ((rc = pthread_mutex_lock(mutex)) != 0) {
|
||||
LOG_E(PHY, "[SCHED][eNB] wait_on_busy_condition(): error locking mutex for %s (%d %s, %p)\n",
|
||||
name, rc, strerror(rc), (void *)mutex);
|
||||
exit_fun("nothing to add");
|
||||
return(-1);
|
||||
}
|
||||
@@ -1056,9 +1061,10 @@ static inline int wait_on_busy_condition(pthread_mutex_t *mutex,pthread_cond_t *
|
||||
}
|
||||
|
||||
static inline int release_thread(pthread_mutex_t *mutex,int *instance_cnt,char *name) {
|
||||
|
||||
if (pthread_mutex_lock(mutex) != 0) {
|
||||
LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name);
|
||||
int rc;
|
||||
if ((rc = pthread_mutex_lock(mutex)) != 0) {
|
||||
LOG_E(PHY, "[SCHED][eNB] release_thread(): error locking mutex for %s (%d %s, %p)\n",
|
||||
name, rc, strerror(rc), (void *)mutex);
|
||||
exit_fun("nothing to add");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
@@ -347,7 +347,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
|
||||
dlsch_harq->rvidx,
|
||||
dlsch_harq->round);
|
||||
}
|
||||
#if defined(MESSAGE_CHART_GENERATOR_PHY)
|
||||
|
||||
MSC_LOG_TX_MESSAGE(
|
||||
MSC_PHY_ENB,MSC_PHY_UE,
|
||||
NULL,0,
|
||||
@@ -368,7 +368,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
|
||||
pmi2hex_2Ar1(dlsch_harq->pmi_alloc),
|
||||
dlsch_harq->rvidx,
|
||||
dlsch_harq->round);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
if (ue_stats) ue_stats->dlsch_sliding_cnt++;
|
||||
@@ -1342,16 +1342,21 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
//compute the expected ULSCH RX power (for the stats)
|
||||
ulsch_harq->delta_TF = get_hundred_times_delta_IF_eNB(eNB,i,harq_pid, 0); // 0 means bw_factor is not considered
|
||||
|
||||
if (ulsch_harq->cqi_crc_status == 1) {
|
||||
if (RC.mac != NULL) { /* ulsim dose not use RC.mac context. */
|
||||
if (ulsch_harq->cqi_crc_status == 1) {
|
||||
#ifdef DEBUG_PHY_PROC
|
||||
//if (((frame%10) == 0) || (frame < 50))
|
||||
print_CQI(ulsch_harq->o,ulsch_harq->uci_format,0,fp->N_RB_DL);
|
||||
#endif
|
||||
|
||||
fill_ulsch_cqi_indication(eNB,frame,subframe,
|
||||
ulsch_harq,
|
||||
ulsch->rnti);
|
||||
|
||||
fill_ulsch_cqi_indication(eNB,frame,subframe,ulsch_harq,ulsch->rnti);
|
||||
RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_flag &= (~(1 << subframe));
|
||||
} else {
|
||||
if(RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_flag & (1 << subframe) ){
|
||||
RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_flag &= (~(1 << subframe));
|
||||
RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_timer=30;
|
||||
LOG_D(PHY,"Frame %d,Subframe %d, We're supposed to get a cqi here. Set cqi_req_timer to 30.\n",frame,subframe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ret == (1+MAX_TURBO_ITERATIONS)) {
|
||||
@@ -1375,7 +1380,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
ulsch->harq_mask &= ~(1 << harq_pid);
|
||||
ulsch_harq->round = 0;
|
||||
}
|
||||
#if defined(MESSAGE_CHART_GENERATOR_PHY)
|
||||
|
||||
MSC_LOG_RX_DISCARDED_MESSAGE(
|
||||
MSC_PHY_ENB,MSC_PHY_UE,
|
||||
NULL,0,
|
||||
@@ -1384,7 +1389,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
ulsch->rnti,harq_pid,
|
||||
ulsch_harq->round-1
|
||||
);
|
||||
#endif
|
||||
|
||||
|
||||
/* Mark the HARQ process to release it later if max transmission reached
|
||||
* (see below).
|
||||
@@ -1403,7 +1408,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
T(T_ENB_PHY_ULSCH_UE_ACK, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe), T_INT(ulsch->rnti),
|
||||
T_INT(harq_pid));
|
||||
|
||||
#if defined(MESSAGE_CHART_GENERATOR_PHY)
|
||||
|
||||
MSC_LOG_RX_MESSAGE(
|
||||
MSC_PHY_ENB,MSC_PHY_UE,
|
||||
NULL,0,
|
||||
@@ -1411,7 +1416,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
frame,subframe,
|
||||
ulsch->rnti,harq_pid
|
||||
);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef DEBUG_PHY_PROC
|
||||
#ifdef DEBUG_ULSCH
|
||||
@@ -1604,6 +1609,16 @@ static void do_release_harq(PHY_VARS_eNB *eNB,int UE_id,int tb,uint16_t frame,ui
|
||||
dlsch1_harq = dlsch1->harq_processes[harq_pid];
|
||||
AssertFatal(dlsch0_harq!=NULL,"dlsch0_harq is null\n");
|
||||
|
||||
#if T_TRACER
|
||||
if (after_rounds != -1) {
|
||||
T(T_ENB_PHY_DLSCH_UE_NACK, T_INT(0), T_INT(frame), T_INT(subframe),
|
||||
T_INT(dlsch0->rnti), T_INT(harq_pid));
|
||||
} else {
|
||||
T(T_ENB_PHY_DLSCH_UE_ACK, T_INT(0), T_INT(frame), T_INT(subframe),
|
||||
T_INT(dlsch0->rnti), T_INT(harq_pid));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (dlsch0_harq->round >= after_rounds) {
|
||||
dlsch0_harq->status = SCH_IDLE;
|
||||
/*if ((dlsch1_harq == NULL)||
|
||||
@@ -1631,6 +1646,15 @@ static void do_release_harq(PHY_VARS_eNB *eNB,int UE_id,int tb,uint16_t frame,ui
|
||||
dlsch1_harq = dlsch1->harq_processes[harq_pid];
|
||||
AssertFatal(dlsch0_harq!=NULL,"dlsch0_harq is null\n");
|
||||
|
||||
#if T_TRACER
|
||||
if (after_rounds != -1) {
|
||||
T(T_ENB_PHY_DLSCH_UE_NACK, T_INT(0), T_INT(frame), T_INT(subframe),
|
||||
T_INT(dlsch0->rnti), T_INT(harq_pid));
|
||||
} else {
|
||||
T(T_ENB_PHY_DLSCH_UE_ACK, T_INT(0), T_INT(frame), T_INT(subframe),
|
||||
T_INT(dlsch0->rnti), T_INT(harq_pid));
|
||||
}
|
||||
#endif
|
||||
if (dlsch0_harq->round >= after_rounds) {
|
||||
dlsch0_harq->status = SCH_IDLE;
|
||||
if ((dlsch1_harq == NULL)||
|
||||
@@ -1753,22 +1777,6 @@ void fill_ulsch_harq_indication(PHY_VARS_eNB *eNB,LTE_UL_eNB_HARQ_t *ulsch_harq,
|
||||
pdu->harq_indication_fdd_rel13.harq_tb_n[i] = 2-ulsch_harq->o_ACK[i];
|
||||
// release DLSCH if needed
|
||||
release_harq(eNB,UE_id,i,frame,subframe,0xffff, ulsch_harq->o_ACK[i] == 1);
|
||||
|
||||
|
||||
#if T_TRACER
|
||||
/* TODO: get correct harq pid */
|
||||
{
|
||||
int subframe_tx = (subframe+6)%10;
|
||||
int frame_tx = subframe_tx >= 6 ? (frame+1023)%1024 : frame;
|
||||
if (ulsch_harq->o_ACK[i] != 1) {
|
||||
T(T_ENB_PHY_DLSCH_UE_NACK, T_INT(0), T_INT(frame), T_INT(subframe),
|
||||
T_INT(rnti), T_INT(eNB->dlsch[UE_id][0]->harq_ids[frame_tx%2][subframe_tx]));
|
||||
} else {
|
||||
T(T_ENB_PHY_DLSCH_UE_ACK, T_INT(0), T_INT(frame), T_INT(subframe),
|
||||
T_INT(rnti), T_INT(eNB->dlsch[UE_id][0]->harq_ids[frame_tx%2][subframe_tx]));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else { // TDD
|
||||
@@ -1857,21 +1865,6 @@ void fill_uci_harq_indication(PHY_VARS_eNB *eNB,
|
||||
pdu->harq_indication_fdd_rel13.harq_tb_n[0] = harq_ack[0];
|
||||
// release DLSCH if needed
|
||||
release_harq(eNB,UE_id,0,frame,subframe,0xffff, harq_ack[0] == 1);
|
||||
|
||||
|
||||
#if T_TRACER
|
||||
{
|
||||
int subframe_tx = (subframe+6)%10;
|
||||
int frame_tx = subframe_tx >= 6 ? (frame+1023)%1024 : frame;
|
||||
if (harq_ack[0] != 1) {
|
||||
T(T_ENB_PHY_DLSCH_UE_NACK, T_INT(0), T_INT(frame), T_INT(subframe),
|
||||
T_INT(uci->rnti), T_INT(eNB->dlsch[UE_id][0]->harq_ids[frame_tx%2][subframe_tx]));
|
||||
} else {
|
||||
T(T_ENB_PHY_DLSCH_UE_ACK, T_INT(0), T_INT(frame), T_INT(subframe),
|
||||
T_INT(uci->rnti), T_INT(eNB->dlsch[UE_id][0]->harq_ids[frame_tx%2][subframe_tx]));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if (uci->pucch_fmt == pucch_format1b) {
|
||||
pdu->harq_indication_fdd_rel13.tl.tag = NFAPI_HARQ_INDICATION_FDD_REL13_TAG;
|
||||
@@ -2041,16 +2034,15 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
|
||||
const int subframe = proc->subframe_rx;
|
||||
const int frame = proc->frame_rx;
|
||||
|
||||
|
||||
if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) return;
|
||||
|
||||
T(T_ENB_PHY_UL_TICK, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe));
|
||||
|
||||
/* TODO: use correct rxdata */
|
||||
T(T_ENB_PHY_INPUT_SIGNAL, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe), T_INT(0),
|
||||
T_BUFFER(&eNB->RU_list[0]->common.rxdata[0][subframe*eNB->frame_parms.samples_per_tti],
|
||||
eNB->frame_parms.samples_per_tti * 4));
|
||||
|
||||
if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) return;
|
||||
|
||||
T(T_ENB_PHY_UL_TICK, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe));
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC, 1 );
|
||||
|
||||
LOG_D(PHY,"[eNB %d] Frame %d: Doing phy_procedures_eNB_uespec_RX(%d)\n",eNB->Mod_id,frame, subframe);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -523,7 +523,7 @@ int main(int argc, char **argv)
|
||||
int c;
|
||||
int k,i,j,aa;
|
||||
int re;
|
||||
|
||||
int loglvl=OAILOG_DEBUG;
|
||||
|
||||
int s,Kr,Kr_bytes;
|
||||
|
||||
@@ -1001,7 +1001,7 @@ int main(int argc, char **argv)
|
||||
break;
|
||||
|
||||
case 'L':
|
||||
set_glog(atoi(optarg));
|
||||
loglvl = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
@@ -1049,7 +1049,7 @@ int main(int argc, char **argv)
|
||||
"cannot load configuration module, exiting\n");
|
||||
logInit();
|
||||
// enable these lines if you need debug info
|
||||
set_glog(LOG_DEBUG);
|
||||
set_glog(loglvl);
|
||||
// moreover you need to init itti with the following line
|
||||
// however itti will catch all signals, so ctrl-c won't work anymore
|
||||
// alternatively you can disable ITTI completely in CMakeLists.txt
|
||||
@@ -2046,24 +2046,9 @@ int main(int argc, char **argv)
|
||||
qsort (table_rx, time_vector_rx.size, sizeof(double), &compare);
|
||||
|
||||
if (dump_table == 1 ) {
|
||||
set_component_filelog(USIM); // file located in /tmp/usim.txt
|
||||
int n;
|
||||
LOG_F(USIM,"The transmitter raw data: \n");
|
||||
|
||||
for (n=0; n< time_vector_tx.size; n++) {
|
||||
printf("%f ", table_tx[n]);
|
||||
LOG_F(USIM,"%f ", table_tx[n]);
|
||||
}
|
||||
|
||||
LOG_F(USIM,"\n");
|
||||
LOG_F(USIM,"The receiver raw data: \n");
|
||||
|
||||
for (n=0; n< time_vector_rx.size; n++) {
|
||||
// printf("%f ", table_rx[n]);
|
||||
LOG_F(USIM,"%f ", table_rx[n]);
|
||||
}
|
||||
|
||||
LOG_F(USIM,"\n");
|
||||
set_component_filelog(SIM); // file located in /tmp/usim.txt
|
||||
LOG_UDUMPMSG(SIM,table_tx,time_vector_tx.size,LOG_DUMP_DOUBLE,"The transmitter raw data: \n");
|
||||
LOG_UDUMPMSG(SIM,table_rx,time_vector_rx.size,LOG_DUMP_DOUBLE,"Thereceiver raw data: \n");
|
||||
}
|
||||
|
||||
double tx_median = table_tx[time_vector_tx.size/2];
|
||||
|
||||
@@ -5016,24 +5016,11 @@ int main(int argc, char **argv)
|
||||
|
||||
if (dump_table == 1 ) {
|
||||
set_component_filelog(USIM); // file located in /tmp/usim.txt
|
||||
int n;
|
||||
LOG_F(USIM,"The transmitter raw data: \n");
|
||||
LOG_UDUMPMSG(RRC,(char *)table_tx,time_vector_tx.size,LOG_DUMP_DOUBLE,
|
||||
"The transmitter raw data: \n");
|
||||
LOG_UDUMPMSG(RRC,(char *)table_rx,time_vector_rx.size,LOG_DUMP_DOUBLE,
|
||||
"The receiver raw data: \n");
|
||||
|
||||
for (n=0; n< time_vector_tx.size; n++) {
|
||||
printf("%f ", table_tx[n]);
|
||||
LOG_F(USIM,"%f ", table_tx[n]);
|
||||
}
|
||||
|
||||
LOG_F(USIM,"\n");
|
||||
LOG_F(USIM,"The receiver raw data: \n");
|
||||
|
||||
for (n=0; n< time_vector_rx.size; n++) {
|
||||
// printf("%f ", table_rx[n]);
|
||||
LOG_F(USIM,"%f ", table_rx[n]);
|
||||
}
|
||||
|
||||
LOG_F(USIM,"\n");
|
||||
}
|
||||
|
||||
double tx_median = table_tx[time_vector_tx.size/2];
|
||||
double tx_q1 = table_tx[time_vector_tx.size/4];
|
||||
|
||||
@@ -3851,24 +3851,9 @@ PMI_FEEDBACK:
|
||||
qsort (table_rx, time_vector_rx.size, sizeof(double), &compare);
|
||||
|
||||
if (dump_table == 1 ) {
|
||||
set_component_filelog(USIM); // file located in /tmp/usim.txt
|
||||
int n;
|
||||
LOG_F(USIM,"The transmitter raw data: \n");
|
||||
|
||||
for (n=0; n< time_vector_tx.size; n++) {
|
||||
printf("%f ", table_tx[n]);
|
||||
LOG_F(USIM,"%f ", table_tx[n]);
|
||||
}
|
||||
|
||||
LOG_F(USIM,"\n");
|
||||
LOG_F(USIM,"The receiver raw data: \n");
|
||||
|
||||
for (n=0; n< time_vector_rx.size; n++) {
|
||||
// printf("%f ", table_rx[n]);
|
||||
LOG_F(USIM,"%f ", table_rx[n]);
|
||||
}
|
||||
|
||||
LOG_F(USIM,"\n");
|
||||
set_component_filelog(SIM); // file located in /tmp/usim.txt
|
||||
LOG_UDUMPMSG(SIM,table_tx,time_vector_tx.size,LOG_DUMP_DOUBLE,"The transmitter raw data: \n");
|
||||
LOG_UDUMPMSG(SIM,table_rx,time_vector_rx.size,LOG_DUMP_DOUBLE,"The receiver raw data: \n");
|
||||
}
|
||||
|
||||
double tx_median = table_tx[time_vector_tx.size/2];
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "SCHED/defs.h"
|
||||
#include "SCHED/vars.h"
|
||||
#include "LAYER2/MAC/vars.h"
|
||||
#include "intertask_interface_init.h"
|
||||
|
||||
#include "OCG_vars.h"
|
||||
#include "UTIL/LOG/log_extern.h"
|
||||
|
||||
@@ -1491,24 +1491,9 @@ int main(int argc, char **argv)
|
||||
qsort (table_rx, time_vector_rx.size, sizeof(double), &compare);
|
||||
|
||||
if (dump_table == 1 ) {
|
||||
int n;
|
||||
set_component_filelog(SIM); // file located in /tmp/usim.txt
|
||||
LOG_F(SIM,"The transmitter raw data: \n");
|
||||
|
||||
for (n=0; n< time_vector_tx.size; n++) {
|
||||
// printf("%f ", table_tx[n]);
|
||||
LOG_F(SIM,"%f ", table_tx[n]);
|
||||
}
|
||||
|
||||
LOG_F(SIM,"\n");
|
||||
LOG_F(SIM,"The receiver raw data: \n");
|
||||
|
||||
for (n=0; n< time_vector_rx.size; n++) {
|
||||
// printf("%f ", table_rx[n]);
|
||||
LOG_F(SIM,"%f ", table_rx[n]);
|
||||
}
|
||||
|
||||
LOG_F(SIM,"\n");
|
||||
LOG_UDUMPMSG(SIM,table_tx,time_vector_tx.size,LOG_DUMP_DOUBLE,"The transmitter raw data: \n");
|
||||
LOG_UDUMPMSG(SIM,table_rx,time_vector_rx.size,LOG_DUMP_DOUBLE,"The receiver raw data: \n");
|
||||
}
|
||||
|
||||
double tx_median = table_tx[time_vector_tx.size/2];
|
||||
|
||||
@@ -22,10 +22,14 @@
|
||||
openair0_device openair0;
|
||||
volatile int oai_exit=0;
|
||||
|
||||
void exit_fun(const char *s) { exit(-1); }
|
||||
void exit_function(const char* file, const char* function, const int line,const char *s) {
|
||||
const char * msg= s==NULL ? "no comment": s;
|
||||
printf("Exiting at: %s:%d %s(), %s\n", file, line, function, msg);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
extern unsigned int dlsch_tbs25[27][25],TBStable[27][110];
|
||||
extern unsigned char offset_mumimo_llr_drange_fix;
|
||||
|
||||
extern unsigned short dftsizes[33];
|
||||
extern short *ul_ref_sigs[30][2][33];
|
||||
extern unsigned short dftsizes[34];
|
||||
extern short *ul_ref_sigs[30][2][34];
|
||||
|
||||
Reference in New Issue
Block a user