Commit 8ca5fb4e authored by Cedric Roux's avatar Cedric Roux

integration: cleanup

- remove spaces at the end of lines
- remove useless dead code
  use: git show -p <this commit> -w
  to see it clearly
parent 58eab751
......@@ -463,7 +463,7 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC,
uint8_t Qm,
uint8_t Nl,
uint8_t r,
uint8_t nb_rb)
uint8_t nb_rb)
// uint8_t m)
{
......@@ -513,7 +513,7 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC,
// counter_buffer[rvidx][cnt]=0;
if (Ncb>(3*(RTC<<5)))
AssertFatal(1==0,"Exiting, RM condition (Ncb %d, RTC %d, Nir/C %d, Nsoft %d, Kw %d)\n",Ncb,RTC,Nir/C,Nsoft,3*(RTC<<5));
AssertFatal(Nl>0,"Nl is 0\n");
AssertFatal(Qm>0,"Qm is 0\n");
Gp = G/Nl/Qm;
......@@ -750,8 +750,8 @@ int lte_rate_matching_turbo_rx(uint32_t RTC,
for (; (ind<Ncb)&&(k<E); ind++) {
if (dummy_w[ind] != LTE_NULL) {
/*
if ((w[ind]>0 && soft_input2[k]<0) ||
(w[ind]<0 && soft_input2[k]>0))
if ((w[ind]>0 && soft_input2[k]<0) ||
(w[ind]<0 && soft_input2[k]>0))
printf("ind %d: w %d => soft_in %d\n",ind,w[ind],soft_input2[k]);*/
w[ind] += soft_input2[k++];
#ifdef RM_DEBUG
......
......@@ -333,13 +333,13 @@ void init_lte_top(LTE_DL_FRAME_PARMS *lte_frame_parms);
void lte_param_init(PHY_VARS_eNB **eNBp,
PHY_VARS_UE **UEp,
RU_t **rup,
unsigned char N_tx_port_eNB,
unsigned char N_tx_port_eNB,
unsigned char N_tx_phy,
unsigned char N_rx_ru,
unsigned char N_rx_ue,
unsigned char transmission_mode,
uint8_t extended_prefix_flag,
frame_t frame_type,
frame_t frame_type,
uint16_t Nid_cell,
uint8_t tdd_config,
uint8_t N_RB_DL,
......
......@@ -32,11 +32,6 @@
#include "assertions.h"
#include <math.h>
#undef LOG_I
#define LOG_I(A,B,C...) printf(B,C)
#undef LOG_D
#define LOG_D(A,B,C...) printf(B,C)
int phy_init_RU(RU_t *ru) {
LTE_DL_FRAME_PARMS *fp = &ru->frame_parms;
......
......@@ -37,13 +37,13 @@ extern RU_t *ru;
void lte_param_init(PHY_VARS_eNB **eNBp,
PHY_VARS_UE **UEp,
RU_t **rup,
unsigned char N_tx_port_eNB,
unsigned char N_tx_port_eNB,
unsigned char N_tx_phy,
unsigned char N_rx_ru,
unsigned char N_rx_ue,
unsigned char transmission_mode,
uint8_t extended_prefix_flag,
frame_t frame_type,
frame_t frame_type,
uint16_t Nid_cell,
uint8_t tdd_config,
uint8_t N_RB_DL,
......@@ -142,7 +142,7 @@ void lte_param_init(PHY_VARS_eNB **eNBp,
// DL power control init
//if (transmission_mode == 1) {
UE->pdsch_config_dedicated->p_a = pa;
UE->pdsch_config_dedicated->p_a = pa;
if (transmission_mode == 1 || transmission_mode ==7) {
((eNB->frame_parms).pdsch_config_common).p_b = 0;
......@@ -161,7 +161,7 @@ void lte_param_init(PHY_VARS_eNB **eNBp,
if (eNB->frame_parms.N_RB_DL == 100) ru->N_TA_offset = 624;
else if (eNB->frame_parms.N_RB_DL == 50) ru->N_TA_offset = 624/2;
else if (eNB->frame_parms.N_RB_DL == 25) ru->N_TA_offset = 624/4;
}
}
else ru->N_TA_offset=0;
printf("Done lte_param_init\n");
......
......@@ -34,9 +34,6 @@ static int16_t ru_90c[2*128] = {32767, 0,32766, -402,32758, -804,32746, -1206,32
#define SCALE 0x3FFF
//#undef LOG_D
//#define LOG_D(A,B,C...) printf(B,C)
int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
eNB_rxtx_proc_t *proc,
uint8_t UE_id,
......
......@@ -35,10 +35,10 @@
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "SCHED/defs.h"
#include "SIMULATION/TOOLS/defs.h" // for taus
#include "SIMULATION/TOOLS/defs.h" // for taus
#include "PHY/sse_intrin.h"
#include "assertions.h"
#include "assertions.h"
#include "T.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
......@@ -52,9 +52,6 @@
//extern uint16_t phich_reg[MAX_NUM_PHICH_GROUPS][3];
//extern uint16_t pcfich_reg[4];
//#undef LOG_D
//#define LOG_D(A,B,C...) printf(B,C)
uint32_t check_phich_reg(LTE_DL_FRAME_PARMS *frame_parms,uint32_t kprime,uint8_t lprime,uint8_t mi)
{
......@@ -155,7 +152,7 @@ uint16_t extract_crc(uint8_t *dci,uint8_t dci_len)
// dci[(dci_len>>3)+1] = 0;
// dci[(dci_len>>3)+2] = 0;
return((uint16_t)crc16);
}
......@@ -218,10 +215,10 @@ uint8_t *generate_dci0(uint8_t *dci,
uint16_t coded_bits;
uint8_t dci_flip[8];
AssertFatal((aggregation_level==1) ||
(aggregation_level==2) ||
(aggregation_level==4) ||
(aggregation_level==8)
AssertFatal((aggregation_level==1) ||
(aggregation_level==2) ||
(aggregation_level==4) ||
(aggregation_level==8)
#ifdef Rel14 // Added for EPDCCH/MPDCCH
||
(aggregation_level==16) ||
......@@ -230,17 +227,17 @@ uint8_t *generate_dci0(uint8_t *dci,
#endif
,
"generate_dci FATAL, illegal aggregation_level %d\n",aggregation_level);
coded_bits = 72 * aggregation_level;
#ifdef DEBUG_DCI_ENCODING
for (int i=0;i<1+((DCI_LENGTH+16)/8);i++)
printf("i %d : %x\n",i,dci[i]);
#endif
if (DCI_LENGTH<=32) {
dci_flip[0] = dci[3];
dci_flip[1] = dci[2];
......@@ -480,7 +477,7 @@ void pdcch_deinterleaving(LTE_DL_FRAME_PARMS *frame_parms,uint16_t *z, uint16_t
wptr[1] = wptr2[1];
wptr[2] = wptr2[2];
wptr[3] = wptr2[3];
/*
/*
printf("pdcch_deinterleaving (%p,%p): quad %d (%d) -> (%d,%d %d,%d %d,%d %d,%d)\n",wptr,wptr2,i,(i+frame_parms->Nid_cell)%Mquad,
((char*)wptr2)[0],
((char*)wptr2)[1],
......@@ -519,7 +516,7 @@ void pdcch_deinterleaving(LTE_DL_FRAME_PARMS *frame_parms,uint16_t *z, uint16_t
zptr[2] = wptr[2];
zptr[3] = wptr[3];
/*
/*
printf("deinterleaving ; k %d, index-Nd %d => (%d,%d,%d,%d,%d,%d,%d,%d)\n",k,(index-ND),
((int8_t *)wptr)[0],
((int8_t *)wptr)[1],
......@@ -540,7 +537,7 @@ void pdcch_deinterleaving(LTE_DL_FRAME_PARMS *frame_parms,uint16_t *z, uint16_t
for (i=0; i<Mquad; i++) {
zptr = &z[i<<2];
/*
/*
printf("deinterleaving ; quad %d => (%d,%d,%d,%d,%d,%d,%d,%d)\n",i,
((int8_t *)zptr)[0],
((int8_t *)zptr)[1],
......@@ -550,7 +547,7 @@ void pdcch_deinterleaving(LTE_DL_FRAME_PARMS *frame_parms,uint16_t *z, uint16_t
((int8_t *)zptr)[5],
((int8_t *)zptr)[6],
((int8_t *)zptr)[7]);
*/
*/
}
}
......@@ -1513,7 +1510,7 @@ void pdcch_channel_compensation(int32_t **rxdataF_ext,
dl_ch128_2 = (__m128i *)&dl_ch_estimates_ext[2+aarx][symbol*frame_parms->N_RB_DL*12];
#elif defined(__arm__)
#endif
for (rb=0; rb<frame_parms->N_RB_DL; rb++) {
#if defined(__x86_64__) || defined(__i386__)
......@@ -2114,7 +2111,7 @@ void pdcch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
reset = 0;
}
// printf("unscrambling %d : e %d, c %d => ",i,llr[i],((s>>(i&0x1f))&1));
if (((s>>(i%32))&1)==0)
llr[i] = -llr[i];
......@@ -2348,7 +2345,7 @@ uint8_t generate_dci_top(uint8_t num_pdcch_symbols,
for (i=0; i<Msymb2; i++) {
//((int16_t*)(&(y[0][i])))[0] = (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
//((int16_t*)(&(y[1][i])))[0] = (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
((int16_t*)(&(y[0][i])))[0] = (*e_ptr == 2) ? 0 : (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
......@@ -2662,15 +2659,15 @@ uint16_t get_nCCE_mac(uint8_t Mod_id,uint8_t CC_id,int num_pdcch_symbols,int sub
// check for eNB only !
return(get_nCCE(num_pdcch_symbols,
&RC.eNB[Mod_id][CC_id]->frame_parms,
get_mi(&RC.eNB[Mod_id][CC_id]->frame_parms,subframe)));
get_mi(&RC.eNB[Mod_id][CC_id]->frame_parms,subframe)));
}
int get_nCCE_offset_l1(int *CCE_table,
const unsigned char L,
const int nCCE,
const int common_dci,
const unsigned short rnti,
const unsigned char L,
const int nCCE,
const int common_dci,
const unsigned short rnti,
const unsigned char subframe)
{
......@@ -2700,7 +2697,7 @@ int get_nCCE_offset_l1(int *CCE_table,
break;
}
}
if (search_space_free == 1) {
// printf("returning %d\n",m*L);
......@@ -3023,7 +3020,7 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars,
return;
} // rnti match
} // CCEmap_cand == 0
/*
/*
if ( agregationLevel != 0xFF &&
(format_c == format0 && m==0 && si_rnti != SI_RNTI))
{
......@@ -4246,6 +4243,3 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
return(dci_cnt);
}
......@@ -44,12 +44,6 @@
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/defs.h"
/*#undef LOG_D
#define LOG_D(A,B,C...) printf(B,C)
#undef LOG_I
#define LOG_I(A,B,C...) printf(B,C)
*/
//#define DEBUG_DCI
uint32_t localRIV2alloc_LUT6[32];
......
......@@ -39,11 +39,6 @@
//#define DEBUG_DLSCH_DECODING
//#define UE_DEBUG_TRACE 1
//#undef LOG_D
//#define LOG_D(A,B,C...) printf(B,C)
//#undef LOG_I
//#define LOG_I(A,B,C...) printf(B,C)
extern double cpuf;
void free_ue_dlsch(LTE_UE_DLSCH_t *dlsch)
......
......@@ -48,11 +48,6 @@ int16_t interf_unaw_shift = 13;
//#define DEBUG_HARQ
//#undef LOG_D
//#define LOG_D(A,B,C...) printf(B,C)
//#undef LOG_I
//#define LOG_I(A,B,C...) printf(B,C)
#define DEBUG_PHY 1
//#define DEBUG_DLSCH_DEMOD 1
......@@ -847,7 +842,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
pllr_symbol_cw1 = (int8_t*)pdsch_vars[eNB_id]->llr[1];
pllr_symbol_cw0 += llr_offset_symbol;
pllr_symbol_cw1 += llr_offset_symbol;
LOG_I(PHY,"compute LLRs [AbsSubframe %d.%d-%d] NbRB %d Qm %d LLRs-Length %d LLR-Offset %d @LLR Buff %x @LLR Buff(symb) %x\n",
frame, subframe,symbol,
nb_rb,dlsch0_harq->Qm,
......@@ -855,7 +850,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
pdsch_vars[eNB_id]->llr_offset[symbol],
(int16_t*)pdsch_vars[eNB_id]->llr[0],
pllr_symbol_cw0);
switch (dlsch0_harq->Qm) {
case 2 :
if ((rx_type==rx_standard) || (codeword_TB1 == -1)) {
......
......@@ -94,7 +94,7 @@ int generate_drs_pusch(PHY_VARS_UE *ue,
l<frame_parms->symbols_per_tti;
l += (7 - frame_parms->Ncp),u=u1,v=v1,cyclic_shift=cyclic_shift1) {
drs_offset = 0;
drs_offset = 0;
#ifdef DEBUG_DRS
printf("drs_modulation: Msc_RS = %d, Msc_RS_idx = %d, u=%d,v=%d\n",Msc_RS, Msc_RS_idx,u,v);
#endif
......
......@@ -24,9 +24,6 @@
#include "defs.h"
//#define DEBUG_FEP
//#undef LOG_D
//#define LOG_D(A,B,C...) printf(B,C)
int slot_fep_ul(RU_t *ru,
unsigned char l,
unsigned char Ns,
......
......@@ -37,12 +37,6 @@
#include "nfapi_interface.h"
#include "fapi_l1.h"
/*#undef LOG_D
#define LOG_D(A,B,C...) printf(B,C)
#undef LOG_I
#define LOG_I(A,B,C...) printf(B,C)
*/
int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req);
int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req);
int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req);
......@@ -539,7 +533,7 @@ void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
int8_t UE_id;
// check if we have received a dci for this ue and ulsch descriptor is configured
if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_PDU_TYPE) {
AssertFatal((UE_id = find_ulsch(ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE))>=0,
"No existing UE ULSCH for rnti %x\n",rel8->rnti);
......
......@@ -50,11 +50,6 @@
# include "intertask_interface.h"
#endif
/*
#undef LOG_D
#define LOG_D(A,B,C...) printf(B,C)
*/
extern uint8_t nfapi_mode;
int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
......
......@@ -73,10 +73,6 @@
extern double cpuf;
//#undef LOG_D
//#define LOG_D(A,B,C...) printf(B,C)
void Msg1_transmitted(module_id_t module_idP,uint8_t CC_id,frame_t frameP, uint8_t eNB_id);
void Msg3_transmitted(module_id_t module_idP,uint8_t CC_id,frame_t frameP, uint8_t eNB_id);
......@@ -1301,7 +1297,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
#endif
nsymb>>1,
&ue->frame_parms);
normal_prefix_mod(&ue->common_vars.txdataF[aa][((subframe_tx*nsymb)+(nsymb>>1))*frame_parms->ofdm_symbol_size],
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
dummy_tx_buffer+(frame_parms->samples_per_tti>>1),
......
......@@ -536,7 +536,7 @@ void fep_full(RU_t *ru) {
start_meas(&ru->ofdm_demod_stats);
if (ru->idx == 0) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX, 1 );
remove_7_5_kHz(ru,proc->subframe_rx<<1);
remove_7_5_kHz(ru,1+(proc->subframe_rx<<1));
......
......@@ -254,9 +254,9 @@ void DL_channel(RU_t *ru,PHY_VARS_UE *UE,uint subframe,int awgn_flag,double SNR,
uint16_t
fill_tx_req(nfapi_tx_request_body_t *tx_req_body,
uint16_t absSF,
uint16_t absSF,
uint16_t pdu_length,
uint16_t pdu_index,
uint16_t pdu_index,
uint8_t *pdu)
{
nfapi_tx_request_pdu_t *TX_req = &tx_req_body->tx_pdu_list[tx_req_body->number_of_pdus];
......@@ -384,7 +384,7 @@ void fill_DCI(PHY_VARS_eNB *eNB,
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = n_rnti+k;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = 0;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = TPC; // dont adjust power when retransmitting
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = ndi;
......@@ -403,14 +403,14 @@ void fill_DCI(PHY_VARS_eNB *eNB,
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
fill_dlsch_config(dl_req,
get_TBS_DL(mcs1,NB_RB),
fill_dlsch_config(dl_req,
get_TBS_DL(mcs1,NB_RB),
(retrans > 0) ? -1 : 0, /* retransmission, no pdu_index */
n_rnti,
n_rnti,
0, // type 0 allocation from 7.1.6 in 36.213
0, // virtual_resource_block_assignment_flag, unused here
DLSCH_RB_ALLOC, // resource_block_coding,
get_Qm(mcs1),
DLSCH_RB_ALLOC, // resource_block_coding,
get_Qm(mcs1),
rv, // redundancy version
1, // transport blocks
0, // transport block to codeword swap flag
......@@ -419,7 +419,7 @@ void fill_DCI(PHY_VARS_eNB *eNB,
1, // number of subbands
// uint8_t codebook_index,
4, // UE category capacity
pa, // pa
pa, // pa
0, // delta_power_offset for TM5
0, // ngap
0, // nprb
......@@ -429,7 +429,7 @@ void fill_DCI(PHY_VARS_eNB *eNB,
);
fill_tx_req(TX_req,
(frame * 10) + subframe,
get_TBS_DL(mcs1,NB_RB),
get_TBS_DL(mcs1,NB_RB),
0,
input_buffer[k]);
}
......@@ -441,26 +441,26 @@ void fill_DCI(PHY_VARS_eNB *eNB,
case 3:
if (common_flag == 0) {
if (eNB->frame_parms.nb_antennas_tx == 2) {
if (eNB->frame_parms.frame_type == TDD) {
}
else {
}
}
}
break;
case 4:
if (common_flag == 0) {
if (eNB->frame_parms.nb_antennas_tx == 2) {
if (eNB->frame_parms.frame_type == TDD) {
}
......@@ -564,7 +564,7 @@ int main(int argc, char **argv)
// char input_val_str[50],input_val_str2[50];
char input_trch_val[16];
// unsigned char pbch_pdu[6];
......@@ -651,7 +651,7 @@ int main(int argc, char **argv)
nfapi_dl_config_request_t DL_req;
nfapi_ul_config_request_t UL_req;
nfapi_hi_dci0_request_t HI_DCI0_req;
nfapi_dl_config_request_pdu_t dl_config_pdu_list[MAX_NUM_DL_PDU];
nfapi_dl_config_request_pdu_t dl_config_pdu_list[MAX_NUM_DL_PDU];
nfapi_tx_request_pdu_t tx_pdu_list[MAX_NUM_TX_REQUEST_PDU];
nfapi_tx_request_t TX_req;
Sched_Rsp_t sched_resp;
......@@ -1155,7 +1155,7 @@ int main(int argc, char **argv)
uint8_t input_buffer[NUMBER_OF_UE_MAX][20000];
for (i=0;i<n_users;i++)
for (i=0;i<n_users;i++)
for (j=0;j<20000;j++) input_buffer[i][j] = (uint8_t)((taus())&255);
frame_parms = &eNB->frame_parms;
......@@ -1585,7 +1585,7 @@ int main(int argc, char **argv)
(TB0_active==1)?mcs1:0,mcs2,!(trials&1),(TB0_active==1)?round&3:0,pa,&num_common_dci,&num_ue_spec_dci,&num_dci);
}
}
proc_eNB->subframe_tx = subframe;
sched_resp.subframe=subframe;
sched_resp.frame=proc_eNB->frame_tx;
......@@ -1610,7 +1610,7 @@ int main(int argc, char **argv)
0,
subframe,
transmission_mode>=7?transmission_mode:0);
uncoded_ber_bit = (short*) malloc(sizeof(short)*coded_bits_per_codeword);
printf("uncoded_ber_bit=%p\n",uncoded_ber_bit);
}
......@@ -1736,13 +1736,13 @@ int main(int argc, char **argv)
write_output("pdcch_rxF_comp0.m","pdcch0_rxF_comp0",UE->pdcch_vars[0][eNB_id]->rxdataF_comp[0],4*300,1,1);
write_output("pdcch_rxF_llr.m","pdcch_llr",UE->pdcch_vars[0][eNB_id]->llr,2400,1,4);
write_output("rxsig0.m","rxs0", &UE->common_vars.rxdata[0][0],10*UE->frame_parms.samples_per_tti,1,1);
write_output("rxsigF0.m","rxsF0", &UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].rxdataF[0][0],UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
exit(-1);
}
int bit_errors=0;
......@@ -1755,9 +1755,9 @@ int main(int argc, char **argv)
UE->pdsch_vars[UE->current_thread_id[subframe]][0]->llr[0],
0,
subframe<<1);
for (i=0;i<coded_bits_per_codeword;i++)
for (i=0;i<coded_bits_per_codeword;i++)
if ((eNB->dlsch[0][0]->harq_processes[0]->e[i]==1 && UE->pdsch_vars[UE->current_thread_id[subframe]][0]->llr[0][i] > 0)||
(eNB->dlsch[0][0]->harq_processes[0]->e[i]==0 && UE->pdsch_vars[UE->current_thread_id[subframe]][0]->llr[0][i] < 0)) {
(eNB->dlsch[0][0]->harq_processes[0]->e[i]==0 && UE->pdsch_vars[UE->current_thread_id[subframe]][0]->llr[0][i] < 0)) {
uncoded_ber_bit[bit_errors++] = 1;
printf("error in pos %d : %d => %d\n",i,
eNB->dlsch[0][0]->harq_processes[0]->e[i],
......@@ -1770,10 +1770,10 @@ int main(int argc, char **argv)
UE->pdsch_vars[UE->current_thread_id[subframe]][0]->llr[0][i]);
*/
}
write_output("dlsch_ber_bit.m","ber_bit",uncoded_ber_bit,coded_bits_per_codeword,1,0);
write_output("ch0.m","ch0",eNB2UE[0]->ch[0],eNB2UE[0]->channel_length,1,8);
if (eNB->frame_parms.nb_antennas_tx>1)
write_output("ch1.m","ch1",eNB2UE[0]->ch[eNB->frame_parms.nb_antennas_rx],eNB2UE[0]->channel_length,1,8);
......@@ -2488,7 +2488,7 @@ int main(int argc, char **argv)
if (test_perf && !test_passed)
return(-1);
else
else
return(0);
}
......
......@@ -84,20 +84,20 @@ extern void ru_fep_full_2thread(RU_t *ru);
nfapi_dl_config_request_t DL_req;
nfapi_ul_config_request_t UL_req;
nfapi_hi_dci0_request_t HI_DCI0_req;
nfapi_ul_config_request_pdu_t ul_config_pdu_list[MAX_NUM_DL_PDU];
nfapi_ul_config_request_pdu_t ul_config_pdu_list[MAX_NUM_DL_PDU];
nfapi_tx_request_pdu_t tx_pdu_list[MAX_NUM_TX_REQUEST_PDU];
nfapi_tx_request_t TX_req;
Sched_Rsp_t sched_resp;
void
fill_nfapi_ulsch_config_request(nfapi_ul_config_request_pdu_t *ul_config_pdu,
fill_nfapi_ulsch_config_request(nfapi_ul_config_request_pdu_t *ul_config_pdu,
uint8_t cqi_req,
uint8_t p_eNB,
uint8_t cqi_ReportModeAperiodic,
uint8_t betaOffset_CQI_Index,
uint8_t betaOffset_RI_Index,
uint8_t dl_cqi_pmi_size,
uint8_t tmode,
uint8_t tmode,
uint32_t handle,
uint16_t rnti,
uint8_t resource_block_start,
......@@ -111,7 +111,7 @@ fill_nfapi_ulsch_config_request(nfapi_ul_config_request_pdu_t *ul_config_pdu,
uint8_t harq_process_number,
uint8_t ul_tx_mode,
uint8_t current_tx_nb,
uint8_t n_srs,
uint8_t n_srs,
uint16_t size)
{
memset((void *) ul_config_pdu, 0, sizeof(nfapi_ul_config_request_pdu_t));
......@@ -152,11 +152,11 @@ fill_nfapi_ulsch_config_request(nfapi_ul_config_request_pdu_t *ul_config_pdu,
else if (p_eNB <= 2) ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].ri_size = 0;
else if (p_eNB == 4) ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].ri_size = 2;
for (int ri = 0;
ri < (1 << ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].ri_size);
for (int ri = 0;
ri < (1 << ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].ri_size);
ri++)
ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].dl_cqi_pmi_size[ri] = dl_cqi_pmi_size;
ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.delta_offset_cqi = betaOffset_CQI_Index;
ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.delta_offset_ri = betaOffset_RI_Index;
}
......@@ -263,17 +263,17 @@ void fill_ulsch_dci(PHY_VARS_eNB *eNB,
break;
}
fill_nfapi_ulsch_config_request(&ul_req->ul_config_pdu_list[0],
cqi_flag&1,
fill_nfapi_ulsch_config_request(&ul_req->ul_config_pdu_list[0],
cqi_flag&1,
1, // p_eNB
0, // reportmode Aperiodic
beta_CQI,
beta_RI,
cqi_size,
//cc,
//UE_template->physicalConfigDedicated,
//cc,
//UE_template->physicalConfigDedicated,
1,
0,
0,
14, // rnti
first_rb, // resource_block_start
nb_rb, // number_of_resource_blocks
......@@ -292,7 +292,7 @@ void fill_ulsch_dci(PHY_VARS_eNB *eNB,
sched_resp->UL_req->header.message_id = NFAPI_UL_CONFIG_REQUEST;
ul_req->number_of_pdus=1;
ul_req->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
}
extern void eNB_fep_full(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc);
......@@ -740,7 +740,7 @@ int main(int argc, char **argv)
for (int k=0;k<eNB->RU_list[0]->nb_rx;k++) eNB->common_vars.rxdataF[k] = eNB->RU_list[0]->common.rxdataF[k];
memset((void*)&eNB->UL_INFO,0,sizeof(eNB->UL_INFO));
printf("Setting indication lists\n");
eNB->UL_INFO.rx_ind.rx_indication_body.rx_pdu_list = eNB->rx_pdu_list;
eNB->UL_INFO.crc_ind.crc_indication_body.crc_pdu_list = eNB->crc_pdu_list;
......@@ -922,7 +922,7 @@ int main(int argc, char **argv)
UE->mac_enabled=0;
eNB_rxtx_proc_t *proc_rxtx = &eNB->proc.proc_rxtx[subframe&1];
UE_rxtx_proc_t *proc_rxtx_ue = &UE->proc.proc_rxtx[subframe&1];
proc_rxtx->frame_rx=1;
......@@ -1102,7 +1102,7 @@ int main(int argc, char **argv)
reset_meas(&eNB->ulsch_tc_intl1_stats);
reset_meas(&eNB->ulsch_tc_intl2_stats);
// initialization
// initialization
struct list time_vector_tx;
initialize(&time_vector_tx);
struct list time_vector_tx_ifft;
......@@ -1137,10 +1137,10 @@ int main(int argc, char **argv)
while (round < 4) {
proc_rxtx->frame_rx=1;
proc_rxtx->subframe_rx=subframe;
proc_rxtx->frame_tx=pdcch_alloc2ul_frame(&eNB->frame_parms,1,subframe);
proc_rxtx->subframe_tx=pdcch_alloc2ul_subframe(&eNB->frame_parms,subframe);
proc_rxtx_ue->frame_tx = proc_rxtx->frame_rx;
proc_rxtx_ue->frame_rx = (subframe<4)?(proc_rxtx->frame_tx-1):(proc_rxtx->frame_tx);
proc_rxtx_ue->subframe_tx = proc_rxtx->subframe_rx;
......@@ -1158,7 +1158,7 @@ int main(int argc, char **argv)
if (mcs < 11) modulation_type = 2;
else if (mcs < 21) modulation_type = 4;
else if (mcs < 29) modulation_type = 6;
fill_ulsch_dci(eNB,proc_rxtx->frame_rx,subframe,&sched_resp,14,(void*)&UL_alloc_pdu,first_rb,nb_rb,(round==0)?mcs:(28+rvidx[round]),modulation_type,ndi,cqi_flag,beta_CQI,beta_RI,cqi_size);
UE->ulsch_Msg3_active[eNB_id] = 0;
......@@ -1216,16 +1216,16 @@ int main(int argc, char **argv)
tx_lev = signal_energy(&UE->common_vars.txdata[0][eNB->frame_parms.samples_per_tti*subframe],
eNB->frame_parms.samples_per_tti);
if (n_frames==1) {