diff --git a/openair1/PHY/LTE_TRANSPORT/if4_tools.c b/openair1/PHY/LTE_TRANSPORT/if4_tools.c index 0fb5404538f02f7fb1feb5fd46e491f7b190d4f7..572bcd73b70413d4962d5d124bf3e69a6fc31144 100644 --- a/openair1/PHY/LTE_TRANSPORT/if4_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/if4_tools.c @@ -139,7 +139,7 @@ void send_IF4(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type, gen_IF4_prach_header(prach_header, frame, subframe); memcpy((int16_t*)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF4_header_t), - (&rxsigF[0][0]+k), + (&rxsigF[0][k]), db_fulllength*sizeof(int16_t)); if ((eNB->ifdevice.trx_write_func(&eNB->ifdevice, diff --git a/openair1/PHY/LTE_TRANSPORT/prach.c b/openair1/PHY/LTE_TRANSPORT/prach.c index 4634be7321aed7821d63124a68729c40abcc20b8..752aee11cd5ea3b6de936b4f93e0137607026a36 100644 --- a/openair1/PHY/LTE_TRANSPORT/prach.c +++ b/openair1/PHY/LTE_TRANSPORT/prach.c @@ -1104,7 +1104,12 @@ void rx_prach(PHY_VARS_eNB *eNB, for (aa=0; aa<nb_ant_rx; aa++) { prach[aa] = (int16_t*)&eNB->common_vars.rxdata[0][aa][subframe*eNB->frame_parms.samples_per_tti-eNB->N_TA_offset]; } - + + int energy = dB_fixed(signal_energy(prach[0], eNB->frame_parms.samples_per_tti)); + //if (energy >= 45) { + // printf("prach subframe energy %d\n",energy); + //} + // First compute physical root sequence if (restricted_set == 0) { if (Ncs_config>15) { @@ -1285,7 +1290,36 @@ void rx_prach(PHY_VARS_eNB *eNB, send_IF4(eNB, eNB->proc.frame_rx, eNB->proc.subframe_rx, IF4_PRACH, k); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 0 ); + energy = dB_fixed(signal_energy(&rxsigF[0][k], 839)); + if (energy >=45) { + printf("<frame %d> prach freq-domain energy %d\n",eNB->proc.frame_rx, energy); + //write_output("beforecomp.m","rxF",&rxsigF[0][k],839*2,1,0); + //exit(1); + } + return; + } else if (eNB->node_function == NGFI_RCC_IF4) { + k = (12*n_ra_prb) - 6*eNB->frame_parms.N_RB_UL; + + if (k<0) { + k+=(eNB->frame_parms.ofdm_symbol_size); + } + + k*=12; + k+=13; + k*=2; + + // Adjust received rxsigF offset + memmove((&rxsigF[0][k]), + (&rxsigF[0][0]), + 839*2*sizeof(int16_t)); + + energy = dB_fixed(signal_energy(&rxsigF[0][k], 839)); + if (energy >=45) { + printf("<frame %d> prach freq-domain energy %d\n",eNB->proc.frame_rx, energy); + //write_output("aftercomp.m","rxF",&rxsigF[0][k],839*2,1,0); + //exit(1); + } } // in case of RCC and prach received rx_thread wakes up prach diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index 79a6a1d0b7888316af70d306c8ce947b65892a2e..9262afcdb9c2b517ba68aceaf1781f47d4a1628b 100755 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -2641,11 +2641,12 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_SLOT_FEP,0); - if (eNB->node_function == NGFI_RRU_IF4 && is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx)<=0) { + if (eNB->node_function == NGFI_RRU_IF4) { /// **** send_IF4 of rxdataF to RCC (no prach now) **** /// VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 1 ); - send_IF4(eNB, frame, subframe, IF4_PULFFT, 0); + send_IF4(eNB, proc->frame_rx, proc->subframe_rx, IF4_PULFFT, 0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 0 ); + } /// **** send_IF4 of prach to RCC **** /// done in prach thread (below) @@ -2735,7 +2736,7 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl } } - } while( (symbol_mask != symbol_mask_full) && (prach_rx == 0)); + } while(symbol_mask != symbol_mask_full); if (proc->first_rx == 0) { if (proc->subframe_rx != subframe){ @@ -2753,8 +2754,6 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, proc->timestamp_rx&0xffffffff ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX_ENB, proc->frame_rx ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX_ENB, proc->subframe_rx ); - - // Tobi aka mr monaco: ETH } else { // should not get here AssertFatal(1==0, "Unknown eNB->node_function %d",eNB->node_function);