Commit 5f0e15a4 authored by Sandeep Kumar's avatar Sandeep Kumar

save for switching pc

parent 9cbf5819
...@@ -210,8 +210,11 @@ void recv_IF4(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_typ ...@@ -210,8 +210,11 @@ void recv_IF4(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_typ
*subframe = ((packet_header->frame_status)>>22)&0x000f; *subframe = ((packet_header->frame_status)>>22)&0x000f;
if (*packet_type == IF4_PDLFFT) { if (*packet_type == IF4_PDLFFT) {
// Find and return symbol_number
*symbol_number = ((packet_header->frame_status)>>26)&0x000f;
// Calculate from received packet // Calculate from received packet
slotoffsetF = (*subframe)*(fp->ofdm_symbol_size)*((fp->Ncp==1) ? 12 : 14) + 1; slotoffsetF = (*symbol_number)*(fp->ofdm_symbol_size) + (*subframe)*(fp->ofdm_symbol_size)*((fp->Ncp==1) ? 12 : 14) + 1;
blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength; blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength;
// Do decompression of the two parts and generate txdataF // Do decompression of the two parts and generate txdataF
...@@ -223,12 +226,12 @@ void recv_IF4(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_typ ...@@ -223,12 +226,12 @@ void recv_IF4(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_typ
txdataF[0][slotoffsetF+element_id] |= alaw2lin[ (data_block[element_id+db_halflength]>>8) ]<<16; txdataF[0][slotoffsetF+element_id] |= alaw2lin[ (data_block[element_id+db_halflength]>>8) ]<<16;
} }
} else if (*packet_type == IF4_PULFFT) {
// Find and return symbol_number // Find and return symbol_number
*symbol_number = ((packet_header->frame_status)>>26)&0x000f; *symbol_number = ((packet_header->frame_status)>>26)&0x000f;
} else if (*packet_type == IF4_PULFFT) {
// Calculate from received packet // Calculate from received packet
slotoffsetF = (*subframe)*(fp->ofdm_symbol_size)*((fp->Ncp==1) ? 12 : 14) + 1; slotoffsetF = (*symbol_number)*(fp->ofdm_symbol_size) + (*subframe)*(fp->ofdm_symbol_size)*((fp->Ncp==1) ? 12 : 14) + 1;
blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength; blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength;
// Do decompression of the two parts and generate rxdataF // Do decompression of the two parts and generate rxdataF
...@@ -240,9 +243,6 @@ void recv_IF4(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_typ ...@@ -240,9 +243,6 @@ void recv_IF4(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_typ
rxdataF[0][slotoffsetF+element_id] |= alaw2lin[ (data_block[element_id+db_halflength]>>8) ]<<16; rxdataF[0][slotoffsetF+element_id] |= alaw2lin[ (data_block[element_id+db_halflength]>>8) ]<<16;
} }
// Find and return symbol_number
*symbol_number = ((packet_header->frame_status)>>26)&0x000f;
} else if (*packet_type == IF4_PRACH) { } else if (*packet_type == IF4_PRACH) {
// FIX: hard coded prach samples length // FIX: hard coded prach samples length
db_fulllength = 839*2; db_fulllength = 839*2;
......
...@@ -501,6 +501,14 @@ static void* eNB_thread_rxtx( void* param ) { ...@@ -501,6 +501,14 @@ static void* eNB_thread_rxtx( void* param ) {
do { do {
recv_IF4(PHY_vars_eNB_g[0][proc->CC_id], &proc->frame_tx, &proc->subframe_tx, &packet_type, &symbol_number); recv_IF4(PHY_vars_eNB_g[0][proc->CC_id], &proc->frame_tx, &proc->subframe_tx, &packet_type, &symbol_number);
} while (symbol_number < PHY_vars_eNB_g[0][proc->CC_id]->frame_parms.symbols_per_tti-1); } while (symbol_number < PHY_vars_eNB_g[0][proc->CC_id]->frame_parms.symbols_per_tti-1);
if (proc->subframe_tx == 0 && proc->frame_tx == 0) {
write_output("eNBtxsigF.m","txF",PHY_vars_eNB_g[0][proc->CC_id]->common_vars.txdataF[0][0],
PHY_vars_eNB_g[0][proc->CC_id]->frame_parms.symbols_per_tti * PHY_vars_eNB_g[0][proc->CC_id]->frame_parms.ofdm_symbol_size,
1,1);
exit(1);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4, 0 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4, 0 );
} else if (PHY_vars_eNB_g[0][proc->CC_id]->node_function == NGFI_RRU_IF5) { } else if (PHY_vars_eNB_g[0][proc->CC_id]->node_function == NGFI_RRU_IF5) {
...@@ -571,6 +579,13 @@ static void* eNB_thread_rxtx( void* param ) { ...@@ -571,6 +579,13 @@ static void* eNB_thread_rxtx( void* param ) {
send_IF4(PHY_vars_eNB_g[0][proc->CC_id], proc->frame_tx, proc->subframe_tx, IF4_PDLFFT, 0); send_IF4(PHY_vars_eNB_g[0][proc->CC_id], proc->frame_tx, proc->subframe_tx, IF4_PDLFFT, 0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 0 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 0 );
if (proc->subframe_tx == 0 && proc->frame_tx == 0) {
write_output("fr_bf_comp.m","txF",PHY_vars_eNB_g[0][proc->CC_id]->common_vars.txdataF[0][0],
PHY_vars_eNB_g[0][proc->CC_id]->frame_parms.symbols_per_tti * PHY_vars_eNB_g[0][proc->CC_id]->frame_parms.ofdm_symbol_size,
1,1);
exit(1);
}
} }
if (pthread_mutex_lock(&proc->mutex_rxtx) != 0) { if (pthread_mutex_lock(&proc->mutex_rxtx) != 0) {
......
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