Commit 07b3a0a9 authored by Sandeep Kumar's avatar Sandeep Kumar

prach data seems ok but no rx yet

parent bbe47d6f
......@@ -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,
......
......@@ -1105,6 +1105,11 @@ void rx_prach(PHY_VARS_eNB *eNB,
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
......
......@@ -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){
......@@ -2754,8 +2755,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_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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment