[GITLAB] - UPGRADE TO v12 on Wednesday the 18th of December at 11.30AM

Commit 6858b55c authored by Cedric Roux's avatar Cedric Roux

Merge remote-tracking branch 'origin/develop_integration_2018_w08' into develop

Summary of changes:
- fix dlsim/ulsim
- fix centOS compilation
- Move the accounting phase of the DL pre-processor in a separate procedure
  and fix some issues
- additional Mac stats and Improvements
- minor fix in test setup v2
parents 5357ef20 9f1530c3
...@@ -1300,7 +1300,6 @@ set(L2_SRC ...@@ -1300,7 +1300,6 @@ set(L2_SRC
) )
set(L2_SRC_UE set(L2_SRC_UE
${OPENAIR2_DIR}/LAYER2/openair2_proc.c
${PDCP_DIR}/pdcp.c ${PDCP_DIR}/pdcp.c
${PDCP_DIR}/pdcp_fifo.c ${PDCP_DIR}/pdcp_fifo.c
${PDCP_DIR}/pdcp_sequence_manager.c ${PDCP_DIR}/pdcp_sequence_manager.c
...@@ -2148,11 +2147,12 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr ...@@ -2148,11 +2147,12 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr
${OPENAIR1_DIR}/SIMULATION/LTE_PHY/${myExe}.c ${OPENAIR1_DIR}/SIMULATION/LTE_PHY/${myExe}.c
${XFORMS_SOURCE} ${XFORMS_SOURCE}
${T_SOURCE} ${T_SOURCE}
${CONFIG_SOURCES}
) )
target_link_libraries (${myExe} target_link_libraries (${myExe}
-Wl,--start-group SIMU UTIL SCHED_LIB PHY LFDS ${ITTI_LIB} LFDS7 -Wl,--end-group -Wl,--start-group SIMU UTIL SCHED_LIB PHY LFDS ${ITTI_LIB} LFDS7 -Wl,--end-group
pthread m rt ${CONFIG_LIBRARIES} ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB} pthread m rt ${CONFIG_LIBRARIES} ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB} dl
) )
endforeach(myExe) endforeach(myExe)
......
...@@ -13,7 +13,7 @@ class connection: ...@@ -13,7 +13,7 @@ class connection:
try: try:
(pid, fd) = os.forkpty() (pid, fd) = os.forkpty()
except BaseException, e: except BaseException, e:
log("ERROR: forkpty for '" + description + "': " + e) log("ERROR: forkpty for '" + description + "': " + str(e))
(pid, fd) = (-1, -1) (pid, fd) = (-1, -1)
if pid == -1: if pid == -1:
...@@ -26,7 +26,7 @@ class connection: ...@@ -26,7 +26,7 @@ class connection:
os.execvp('sshpass', ['sshpass', '-p', password, os.execvp('sshpass', ['sshpass', '-p', password,
'ssh', user + '@' + host]) 'ssh', user + '@' + host])
except BaseException, e: except BaseException, e:
log("ERROR: execvp for '" + description + "': " + e) log("ERROR: execvp for '" + description + "': " + str(e))
log("ERROR: execvp failed for '" + description + "'") log("ERROR: execvp failed for '" + description + "'")
os._exit(1) os._exit(1)
......
...@@ -249,14 +249,14 @@ install_usrp_uhd_driver_from_source(){ ...@@ -249,14 +249,14 @@ install_usrp_uhd_driver_from_source(){
cd /tmp cd /tmp
echo "Downloading UHD driver" echo "Downloading UHD driver"
rm -rf /tmp/uhd rm -rf /tmp/uhd
git clone git://github.com/EttusResearch/uhd.git git clone https://github.com/EttusResearch/uhd.git
cd uhd cd uhd
git checkout tags/release_003_010_001_001 git checkout tags/release_003_010_001_001
mkdir -p host/build mkdir -p host/build
cd host/build cd host/build
$CMAKE ../ $CMAKE ../
echo "Compiling UHD" echo "Compiling UHD"
make make -j`nproc`
make test make test
$SUDO make install $SUDO make install
$SUDO ldconfig $SUDO ldconfig
...@@ -277,10 +277,11 @@ check_install_usrp_uhd_driver(){ ...@@ -277,10 +277,11 @@ check_install_usrp_uhd_driver(){
$SUDO apt-get -y --allow-unauthenticated install libuhd-dev libuhd003 uhd-host $SUDO apt-get -y --allow-unauthenticated install libuhd-dev libuhd003 uhd-host
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
$SUDO $INSTALLER -y install python boost libusb-devel libusbx-devel boost-devel python-mako python-docutils cmake $SUDO $INSTALLER -y install python boost libusb-devel libusbx-devel boost-devel python-mako python-docutils cmake
$SUDO pip install requests
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]]; then if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]]; then
# until EPEL repo hasn't bumped UHD driver to >=3.10 in EPEL, build driver from source # until EPEL repo hasn't bumped UHD driver to >=3.10 in EPEL, build driver from source
$SUDO $INSTALLER -y remove uhd uhd-devel uhd-firmware $SUDO $INSTALLER -y remove uhd uhd-devel uhd-firmware
install_ursp_uhd_driver_from_source install_usrp_uhd_driver_from_source
else else
$SUDO $INSTALLER -y install uhd uhd-devel uhd-firmware $SUDO $INSTALLER -y install uhd uhd-devel uhd-firmware
fi fi
...@@ -644,7 +645,8 @@ check_install_oai_software() { ...@@ -644,7 +645,8 @@ check_install_oai_software() {
lapack \ lapack \
lapack-devel \ lapack-devel \
blas \ blas \
blas-devel blas-devel \
libyaml-devel
fi fi
install_asn1c_from_source install_asn1c_from_source
......
...@@ -109,7 +109,7 @@ crc24a (unsigned char * inptr, int bitlen) ...@@ -109,7 +109,7 @@ crc24a (unsigned char * inptr, int bitlen)
resbit = (bitlen % 8); resbit = (bitlen % 8);
while (octetlen-- > 0) { while (octetlen-- > 0) {
// printf("in %x => crc %x\n",crc,*inptr); // printf("crc24a: in %x => crc %x\n",crc,*inptr);
crc = (crc << 8) ^ crc24aTable[(*inptr++) ^ (crc >> 24)]; crc = (crc << 8) ^ crc24aTable[(*inptr++) ^ (crc >> 24)];
} }
...@@ -128,6 +128,7 @@ unsigned int crc24b (unsigned char * inptr, int bitlen) ...@@ -128,6 +128,7 @@ unsigned int crc24b (unsigned char * inptr, int bitlen)
resbit = (bitlen % 8); resbit = (bitlen % 8);
while (octetlen-- > 0) { while (octetlen-- > 0) {
// printf("crc24b: in %x => crc %x (%x)\n",crc,*inptr,crc24bTable[(*inptr) ^ (crc >> 24)]);
crc = (crc << 8) ^ crc24bTable[(*inptr++) ^ (crc >> 24)]; crc = (crc << 8) ^ crc24bTable[(*inptr++) ^ (crc >> 24)];
} }
......
...@@ -463,7 +463,7 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC, ...@@ -463,7 +463,7 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC,
uint8_t Qm, uint8_t Qm,
uint8_t Nl, uint8_t Nl,
uint8_t r, uint8_t r,
uint8_t nb_rb) uint8_t nb_rb)
// uint8_t m) // uint8_t m)
{ {
...@@ -513,7 +513,7 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC, ...@@ -513,7 +513,7 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC,
// counter_buffer[rvidx][cnt]=0; // counter_buffer[rvidx][cnt]=0;
if (Ncb>(3*(RTC<<5))) 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(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(Nl>0,"Nl is 0\n");
AssertFatal(Qm>0,"Qm is 0\n"); AssertFatal(Qm>0,"Qm is 0\n");
Gp = G/Nl/Qm; Gp = G/Nl/Qm;
...@@ -749,6 +749,10 @@ int lte_rate_matching_turbo_rx(uint32_t RTC, ...@@ -749,6 +749,10 @@ int lte_rate_matching_turbo_rx(uint32_t RTC,
for (; (ind<Ncb)&&(k<E); ind++) { for (; (ind<Ncb)&&(k<E); ind++) {
if (dummy_w[ind] != LTE_NULL) { if (dummy_w[ind] != LTE_NULL) {
/*
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++]; w[ind] += soft_input2[k++];
#ifdef RM_DEBUG #ifdef RM_DEBUG
printf("RM_RX k%d Ind: %d (%d)\n",k-1,ind,w[ind]); printf("RM_RX k%d Ind: %d (%d)\n",k-1,ind,w[ind]);
......
...@@ -330,19 +330,25 @@ void init_lte_top(LTE_DL_FRAME_PARMS *lte_frame_parms); ...@@ -330,19 +330,25 @@ void init_lte_top(LTE_DL_FRAME_PARMS *lte_frame_parms);
//void copy_lte_parms_to_phy_framing(LTE_DL_FRAME_PARMS *frame_parm, PHY_FRAMING *phy_framing); //void copy_lte_parms_to_phy_framing(LTE_DL_FRAME_PARMS *frame_parm, PHY_FRAMING *phy_framing);
void lte_param_init(unsigned char N_tx_port_eNB, void lte_param_init(PHY_VARS_eNB **eNBp,
unsigned char N_tx, PHY_VARS_UE **UEp,
unsigned char N_rx, RU_t **rup,
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, unsigned char transmission_mode,
uint8_t extended_prefix_flag, uint8_t extended_prefix_flag,
frame_t frame_type, frame_t frame_type,
uint16_t Nid_cell, uint16_t Nid_cell,
uint8_t tdd_config, uint8_t tdd_config,
uint8_t N_RB_DL, uint8_t N_RB_DL,
uint8_t pa,
uint8_t threequarter_fs, uint8_t threequarter_fs,
uint8_t osf, uint8_t osf,
uint32_t perfect_ce); uint32_t perfect_ce);
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
void phy_config_dedicated_scell_ue(uint8_t Mod_id, void phy_config_dedicated_scell_ue(uint8_t Mod_id,
uint8_t eNB_index, uint8_t eNB_index,
...@@ -367,18 +373,6 @@ void phy_config_request(PHY_Config_t *phy_config); ...@@ -367,18 +373,6 @@ void phy_config_request(PHY_Config_t *phy_config);
int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf); int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf);
void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms); void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms);
void lte_param_init(unsigned char N_tx_port_eNB,
unsigned char N_tx_phy,
unsigned char N_rx,
unsigned char transmission_mode,
uint8_t extended_prefix_flag,
frame_t frame_type,
uint16_t Nid_cell,
uint8_t tdd_config,
uint8_t N_RB_DL,
uint8_t threequarter_fs,
uint8_t osf,
uint32_t perfect_ce);
/** @} */ /** @} */
#endif #endif
...@@ -882,11 +882,11 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, ...@@ -882,11 +882,11 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
AssertFatal(fp->N_RB_UL > 5, "fp->N_RB_UL %d < 6\n",fp->N_RB_UL); AssertFatal(fp->N_RB_UL > 5, "fp->N_RB_UL %d < 6\n",fp->N_RB_UL);
for (i=0; i<2; i++) { for (i=0; i<2; i++) {
// RK 2 times because of output format of FFT! // RK 2 times because of output format of FFT!
// FIXME We should get rid of this, consider also phy_free_lte_eNB() // FIXME We should get rid of this
pusch_vars[UE_id]->rxdataF_ext[i] = (int32_t*)malloc16_clear( 2*sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti ); pusch_vars[UE_id]->rxdataF_ext[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
pusch_vars[UE_id]->rxdataF_ext2[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti ); pusch_vars[UE_id]->rxdataF_ext2[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
pusch_vars[UE_id]->drs_ch_estimates[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti ); pusch_vars[UE_id]->drs_ch_estimates[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
pusch_vars[UE_id]->drs_ch_estimates_time[i] = (int32_t*)malloc16_clear( 2*2*sizeof(int32_t)*fp->ofdm_symbol_size ); pusch_vars[UE_id]->drs_ch_estimates_time[i] = (int32_t*)malloc16_clear( 2*sizeof(int32_t)*fp->ofdm_symbol_size );
pusch_vars[UE_id]->rxdataF_comp[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti ); pusch_vars[UE_id]->rxdataF_comp[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
pusch_vars[UE_id]->ul_ch_mag[i] = (int32_t*)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 ); pusch_vars[UE_id]->ul_ch_mag[i] = (int32_t*)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 );
pusch_vars[UE_id]->ul_ch_magb[i] = (int32_t*)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 ); pusch_vars[UE_id]->ul_ch_magb[i] = (int32_t*)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 );
......
...@@ -60,7 +60,7 @@ int phy_init_RU(RU_t *ru) { ...@@ -60,7 +60,7 @@ int phy_init_RU(RU_t *ru) {
} }
} // IF5 or local RF } // IF5 or local RF
else { else {
LOG_I(PHY,"No rxdata/txdata for RU\n"); // LOG_I(PHY,"No rxdata/txdata for RU\n");
ru->common.txdata = (int32_t**)NULL; ru->common.txdata = (int32_t**)NULL;
ru->common.rxdata = (int32_t**)NULL; ru->common.rxdata = (int32_t**)NULL;
...@@ -91,8 +91,8 @@ int phy_init_RU(RU_t *ru) { ...@@ -91,8 +91,8 @@ int phy_init_RU(RU_t *ru) {
} }
/* number of elements of an array X is computed as sizeof(X) / sizeof(X[0]) */ /* number of elements of an array X is computed as sizeof(X) / sizeof(X[0]) */
AssertFatal(ru->nb_rx <= sizeof(ru->prach_rxsigF) / sizeof(ru->prach_rxsigF[0]), // AssertFatal(ru->nb_rx <= sizeof(ru->prach_rxsigF) / sizeof(ru->prach_rxsigF[0]),
"nb_antennas_rx too large"); // "nb_antennas_rx too large");
ru->prach_rxsigF = (int16_t**)malloc(ru->nb_rx * sizeof(int16_t*)); ru->prach_rxsigF = (int16_t**)malloc(ru->nb_rx * sizeof(int16_t*));
for (j=0;j<4;j++) ru->prach_rxsigF_br[j] = (int16_t**)malloc(ru->nb_rx * sizeof(int16_t*)); for (j=0;j<4;j++) ru->prach_rxsigF_br[j] = (int16_t**)malloc(ru->nb_rx * sizeof(int16_t*));
......
...@@ -32,16 +32,23 @@ ...@@ -32,16 +32,23 @@
extern PHY_VARS_eNB *eNB; extern PHY_VARS_eNB *eNB;
extern PHY_VARS_UE *UE; extern PHY_VARS_UE *UE;
extern RU_t *ru;
extern void phy_init_RU(RU_t*);
void lte_param_init(unsigned char N_tx_port_eNB, 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_phy, unsigned char N_tx_phy,
unsigned char N_rx, unsigned char N_rx_ru,
unsigned char N_rx_ue,
unsigned char transmission_mode, unsigned char transmission_mode,
uint8_t extended_prefix_flag, uint8_t extended_prefix_flag,
frame_t frame_type, frame_t frame_type,
uint16_t Nid_cell, uint16_t Nid_cell,
uint8_t tdd_config, uint8_t tdd_config,
uint8_t N_RB_DL, uint8_t N_RB_DL,
uint8_t pa,
uint8_t threequarter_fs, uint8_t threequarter_fs,
uint8_t osf, uint8_t osf,
uint32_t perfect_ce) uint32_t perfect_ce)
...@@ -49,13 +56,27 @@ void lte_param_init(unsigned char N_tx_port_eNB, ...@@ -49,13 +56,27 @@ void lte_param_init(unsigned char N_tx_port_eNB,
LTE_DL_FRAME_PARMS *frame_parms; LTE_DL_FRAME_PARMS *frame_parms;
int i; int i;
PHY_VARS_eNB *eNB;
PHY_VARS_UE *UE;
RU_t *ru;
printf("Start lte_param_init\n"); printf("Start lte_param_init\n");
eNB = malloc(sizeof(PHY_VARS_eNB)); *eNBp = malloc(sizeof(PHY_VARS_eNB));
UE = malloc(sizeof(PHY_VARS_UE)); *UEp = malloc(sizeof(PHY_VARS_UE));
*rup = malloc(sizeof(RU_t));
eNB = *eNBp;
UE = *UEp;
ru = *rup;
printf("eNB %p, UE %p, ru %p\n",eNB,UE,ru);
memset((void*)eNB,0,sizeof(PHY_VARS_eNB)); memset((void*)eNB,0,sizeof(PHY_VARS_eNB));
memset((void*)UE,0,sizeof(PHY_VARS_UE)); memset((void*)UE,0,sizeof(PHY_VARS_UE));
memset((void*)ru,0,sizeof(RU_t));
ru->eNB_list[0] = eNB;
eNB->RU_list[0] = ru;
ru->num_eNB=1;
srand(0); srand(0);
randominit(0); randominit(0);
...@@ -71,7 +92,7 @@ void lte_param_init(unsigned char N_tx_port_eNB, ...@@ -71,7 +92,7 @@ void lte_param_init(unsigned char N_tx_port_eNB,
frame_parms->Nid_cell = Nid_cell; frame_parms->Nid_cell = Nid_cell;
frame_parms->nushift = Nid_cell%6; frame_parms->nushift = Nid_cell%6;
frame_parms->nb_antennas_tx = N_tx_phy; frame_parms->nb_antennas_tx = N_tx_phy;
frame_parms->nb_antennas_rx = N_rx; frame_parms->nb_antennas_rx = N_rx_ru;
frame_parms->nb_antenna_ports_eNB = N_tx_port_eNB; frame_parms->nb_antenna_ports_eNB = N_tx_port_eNB;
frame_parms->phich_config_common.phich_resource = oneSixth; frame_parms->phich_config_common.phich_resource = oneSixth;
frame_parms->phich_config_common.phich_duration = normal; frame_parms->phich_config_common.phich_duration = normal;
...@@ -90,12 +111,18 @@ void lte_param_init(unsigned char N_tx_port_eNB, ...@@ -90,12 +111,18 @@ void lte_param_init(unsigned char N_tx_port_eNB,
UE->is_secondary_ue = 0; UE->is_secondary_ue = 0;
UE->frame_parms = *frame_parms; UE->frame_parms = *frame_parms;
eNB->frame_parms = *frame_parms; UE->frame_parms.nb_antennas_rx=N_rx_ue;
// eNB->frame_parms = *frame_parms;
ru->frame_parms = *frame_parms;
ru->nb_tx = N_tx_phy;
ru->nb_rx = N_rx_ru;
ru->if_south = LOCAL_RF;
eNB->configured=1;
eNB->transmission_mode[0] = transmission_mode; eNB->transmission_mode[0] = transmission_mode;
UE->transmission_mode[0] = transmission_mode; UE->transmission_mode[0] = transmission_mode;
init_lte_top(frame_parms);
dump_frame_parms(frame_parms); dump_frame_parms(frame_parms);
UE->measurements.n_adj_cells=0; UE->measurements.n_adj_cells=0;
...@@ -105,23 +132,24 @@ void lte_param_init(unsigned char N_tx_port_eNB, ...@@ -105,23 +132,24 @@ void lte_param_init(unsigned char N_tx_port_eNB,
for (i=0; i<3; i++) for (i=0; i<3; i++)
lte_gold(frame_parms,UE->lte_gold_table[i],Nid_cell+i); lte_gold(frame_parms,UE->lte_gold_table[i],Nid_cell+i);
init_lte_ue(UE,1,0); printf("Calling init_lte_ue_signal\n");
init_lte_ue_signal(UE,1,0);
printf("Calling phy_init_lte_eNB\n");
phy_init_lte_eNB(eNB,0,0); phy_init_lte_eNB(eNB,0,0);
printf("Calling phy_init_RU (%p)\n",ru);
phy_init_RU(ru);
generate_pcfich_reg_mapping(&UE->frame_parms); generate_pcfich_reg_mapping(&UE->frame_parms);
generate_phich_reg_mapping(&UE->frame_parms); generate_phich_reg_mapping(&UE->frame_parms);
// DL power control init // DL power control init
//if (transmission_mode == 1) { //if (transmission_mode == 1) {
UE->pdsch_config_dedicated->p_a = pa;
if (transmission_mode == 1 || transmission_mode ==7) { if (transmission_mode == 1 || transmission_mode ==7) {
eNB->pdsch_config_dedicated->p_a = dB0; // 4 = 0dB
((eNB->frame_parms).pdsch_config_common).p_b = 0; ((eNB->frame_parms).pdsch_config_common).p_b = 0;
UE->pdsch_config_dedicated->p_a = dB0; // 4 = 0dB
((UE->frame_parms).pdsch_config_common).p_b = 0; ((UE->frame_parms).pdsch_config_common).p_b = 0;
} else { // rho_a = rhob } else { // rho_a = rhob
eNB->pdsch_config_dedicated->p_a = dBm3; // 4 = 0dB
((eNB->frame_parms).pdsch_config_common).p_b = 1; ((eNB->frame_parms).pdsch_config_common).p_b = 1;
UE->pdsch_config_dedicated->p_a = dBm3; // 4 = 0dB
((UE->frame_parms).pdsch_config_common).p_b = 1; ((UE->frame_parms).pdsch_config_common).p_b = 1;
} }
...@@ -130,6 +158,13 @@ void lte_param_init(unsigned char N_tx_port_eNB, ...@@ -130,6 +158,13 @@ void lte_param_init(unsigned char N_tx_port_eNB,
/* the UE code is multi-thread "aware", we need to setup this array */ /* the UE code is multi-thread "aware", we need to setup this array */
for (i = 0; i < 10; i++) UE->current_thread_id[i] = i % 2; for (i = 0; i < 10; i++) UE->current_thread_id[i] = i % 2;
if (eNB->frame_parms.frame_type == TDD) {
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"); printf("Done lte_param_init\n");
......
...@@ -306,7 +306,7 @@ void freq_equalization(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -306,7 +306,7 @@ void freq_equalization(LTE_DL_FRAME_PARMS *frame_parms,
AssertFatal(symbol<frame_parms->symbols_per_tti,"symbol %d >= %d\n", AssertFatal(symbol<frame_parms->symbols_per_tti,"symbol %d >= %d\n",
symbol,frame_parms->symbols_per_tti); symbol,frame_parms->symbols_per_tti);
AssertFatal(Msc_RS<frame_parms->N_RB_UL*12,"Msc_RS %d >= %d\n", AssertFatal(Msc_RS<=frame_parms->N_RB_UL*12,"Msc_RS %d >= %d\n",
Msc_RS,frame_parms->N_RB_UL*12); Msc_RS,frame_parms->N_RB_UL*12);
for (re=0; re<(Msc_RS>>2); re++) { for (re=0; re<(Msc_RS>>2); re++) {
......
...@@ -100,7 +100,7 @@ int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32))); ...@@ -100,7 +100,7 @@ int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32)));
return(-1); return(-1);
} }
// LOG_I(PHY,"subframe %d, Ns %d, l %d, Msc_RS = %d, Msc_RS_idx = %d, u %d, v %d, cyclic_shift %d\n",subframe,Ns,l,Msc_RS, Msc_RS_idx,u,v,cyclic_shift); LOG_D(PHY,"subframe %d, Ns %d, l %d, Msc_RS = %d, Msc_RS_idx = %d, u %d, v %d, cyclic_shift %d\n",subframe,Ns,l,Msc_RS, Msc_RS_idx,u,v,cyclic_shift);
#ifdef DEBUG_CH #ifdef DEBUG_CH
if (Ns==0) if (Ns==0)
......
...@@ -35,10 +35,10 @@ ...@@ -35,10 +35,10 @@
#include "PHY/defs.h" #include "PHY/defs.h"
#include "PHY/extern.h" #include "PHY/extern.h"
#include "SCHED/defs.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 "PHY/sse_intrin.h"
#include "assertions.h" #include "assertions.h"
#include "T.h" #include "T.h"
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
...@@ -152,7 +152,7 @@ uint16_t extract_crc(uint8_t *dci,uint8_t dci_len) ...@@ -152,7 +152,7 @@ uint16_t extract_crc(uint8_t *dci,uint8_t dci_len)
// dci[(dci_len>>3)+1] = 0; // dci[(dci_len>>3)+1] = 0;
// dci[(dci_len>>3)+2] = 0; // dci[(dci_len>>3)+2] = 0;
return((uint16_t)crc16); return((uint16_t)crc16);
} }
...@@ -177,7 +177,7 @@ void dci_encoding(uint8_t *a, ...@@ -177,7 +177,7 @@ void dci_encoding(uint8_t *a,
// encode dci // encode dci
#ifdef DEBUG_DCI_ENCODING #ifdef DEBUG_DCI_ENCODING
printf("Doing DCI encoding for %d bits, e %p, rnti %x\n",A,e,rnti); printf("Doing DCI encoding for %d bits, e %p, rnti %x, E %d\n",A,e,rnti,E);
#endif #endif
memset((void *)d,LTE_NULL,96); memset((void *)d,LTE_NULL,96);
...@@ -215,10 +215,10 @@ uint8_t *generate_dci0(uint8_t *dci, ...@@ -215,10 +215,10 @@ uint8_t *generate_dci0(uint8_t *dci,
uint16_t coded_bits; uint16_t coded_bits;
uint8_t dci_flip[8]; uint8_t dci_flip[8];
AssertFatal((aggregation_level==1) || AssertFatal((aggregation_level==1) ||
(aggregation_level==2) || (aggregation_level==2) ||
(aggregation_level==4) || (aggregation_level==4) ||
(aggregation_level==8) (aggregation_level==8)
#ifdef Rel14 // Added for EPDCCH/MPDCCH #ifdef Rel14 // Added for EPDCCH/MPDCCH
|| ||
(aggregation_level==16) || (aggregation_level==16) ||
...@@ -227,22 +227,27 @@ uint8_t *generate_dci0(uint8_t *dci, ...@@ -227,22 +227,27 @@ uint8_t *generate_dci0(uint8_t *dci,
#endif #endif
, ,
"generate_dci FATAL, illegal aggregation_level %d\n",aggregation_level); "generate_dci FATAL, illegal aggregation_level %d\n",aggregation_level);
coded_bits = 72 * aggregation_level; coded_bits = 72 * aggregation_level;
/*
#ifdef DEBUG_DCI_ENCODING #ifdef DEBUG_DCI_ENCODING
for (i=0;i<1+((DCI_LENGTH+16)/8);i++) for (int i=0;i<1+((DCI_LENGTH+16)/8);i++)
printf("i %d : %x\n",i,dci[i]); printf("i %d : %x\n",i,dci[i]);
#endif #endif
*/
if (DCI_LENGTH<=32) { if (DCI_LENGTH<=32) {
dci_flip[0] = dci[3]; dci_flip[0] = dci[3];
dci_flip[1] = dci[2]; dci_flip[1] = dci[2];
dci_flip[2] = dci[1]; dci_flip[2] = dci[1];
dci_flip[3] = dci[0]; dci_flip[3] = dci[0];
#ifdef DEBUG_DCI_ENCODING
printf("DCI => %x,%x,%x,%x\n",
dci_flip[0],dci_flip[1],dci_flip[2],dci_flip[3]);
#endif
} else { } else {
dci_flip[0] = dci[7]; dci_flip[0] = dci[7];
dci_flip[1] = dci[6]; dci_flip[1] = dci[6];
...@@ -472,7 +477,7 @@ void pdcch_deinterleaving(LTE_DL_FRAME_PARMS *frame_parms,uint16_t *z, uint16_t ...@@ -472,7 +477,7 @@ void pdcch_deinterleaving(LTE_DL_FRAME_PARMS *frame_parms,uint16_t *z, uint16_t
wptr[1] = wptr2[1]; wptr[1] = wptr2[1];
wptr[2] = wptr2[2]; wptr[2] = wptr2[2];
wptr[3] = wptr2[3]; 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, 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)[0],
((char*)wptr2)[1], ((char*)wptr2)[1],
...@@ -511,7 +516,7 @@ void pdcch_deinterleaving(LTE_DL_FRAME_PARMS *frame_parms,uint16_t *z, uint16_t ...@@ -511,7 +516,7 @@ void pdcch_deinterleaving(LTE_DL_FRAME_PARMS *frame_parms,uint16_t *z, uint16_t
zptr[2] = wptr[2]; zptr[2] = wptr[2];
zptr[3] = wptr[3]; zptr[3] = wptr[3];
/* /*
printf("deinterleaving ; k %d, index-Nd %d => (%d,%d,%d,%d,%d,%d,%d,%d)\n",k,(index-ND), 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)[0],
((int8_t *)wptr)[1], ((int8_t *)wptr)[1],
...@@ -532,7 +537,7 @@ void pdcch_deinterleaving(LTE_DL_FRAME_PARMS *frame_parms,uint16_t *z, uint16_t ...@@ -532,7 +537,7 @@ void pdcch_deinterleaving(LTE_DL_FRAME_PARMS *frame_parms,uint16_t *z, uint16_t
for (i=0; i<Mquad; i++) { for (i=0; i<Mquad; i++) {
zptr = &z[i<<2]; zptr = &z[i<<2];
/* /*
printf("deinterleaving ; quad %d => (%d,%d,%d,%d,%d,%d,%d,%d)\n",i, printf("deinterleaving ; quad %d => (%d,%d,%d,%d,%d,%d,%d,%d)\n",i,
((int8_t *)zptr)[0], ((int8_t *)zptr)[0],
((int8_t *)zptr)[1], ((int8_t *)zptr)[1],
...@@ -542,7 +547,7 @@ void pdcch_deinterleaving(LTE_DL_FRAME_PARMS *frame_parms,uint16_t *z, uint16_t ...@@ -542,7 +547,7 @@ void pdcch_deinterleaving(LTE_DL_FRAME_PARMS *frame_parms,uint16_t *z, uint16_t
((int8_t *)zptr)[5], ((int8_t *)zptr)[5],
((int8_t *)zptr)[6], ((int8_t *)zptr)[6],
((int8_t *)zptr)[7]); ((int8_t *)zptr)[7]);
*/ */
} }
} }
...@@ -1505,7 +1510,7 @@ void pdcch_channel_compensation(int32_t **rxdataF_ext, ...@@ -1505,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]; dl_ch128_2 = (__m128i *)&dl_ch_estimates_ext[2+aarx][symbol*frame_parms->N_RB_DL*12];
#elif defined(__arm__) #elif defined(__arm__)
#endif #endif
for (rb=0; rb<frame_parms->N_RB_DL; rb++) { for (rb=0; rb<frame_parms->N_RB_DL; rb++) {
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
...@@ -1869,12 +1874,6 @@ int32_t rx_pdcch(PHY_VARS_UE *ue, ...@@ -1869,12 +1874,6 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
#endif //MU_RECEIVER #endif //MU_RECEIVER
#if T_TRACER
T(