Commit c5d1a8b8 authored by knopp's avatar knopp
Browse files

fixed IF4p5 2x2 functionality (especially PRACH was broken on both ends)

configuration files for CU/DU (thread policy)
parent 9fb2f736
......@@ -117,3 +117,12 @@ NETWORK_CONTROLLER : {
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";
};
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_SINGLE_THREAD";
# #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
......@@ -117,3 +117,12 @@ NETWORK_CONTROLLER : {
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";
};
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_SINGLE_THREAD";
# #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
......@@ -117,3 +117,12 @@ NETWORK_CONTROLLER : {
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";
};
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_SINGLE_THREAD";
# #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
......@@ -232,12 +232,13 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
for (int antenna_id=0;antenna_id<ru->nb_rx;antenna_id++) {
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (packet_type > IF4p5_PRACH)
rxF = &prach_rxsigF_br[packet_type - IF4p5_PRACH - 1][0][0];
else
if (packet_type > IF4p5_PRACH)
rxF = &prach_rxsigF_br[packet_type - IF4p5_PRACH - 1][0][0];
else
#endif
rxF = &prach_rxsigF[antenna_id][0];
rxF = &prach_rxsigF[antenna_id][0];
LOG_D(PHY,"PRACH_if4P5: rxsigF%d energy %d\n",antenna_id,dB_fixed(signal_energy(rxF,839)));
AssertFatal(rxF!=NULL,"rxF is null\n");
if (eth->flags == ETH_RAW_IF4p5_MODE) {
memcpy((void *)(tx_buffer_prach + MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t+PRACH_BLOCK_SIZE_BYTES*antenna_id),
......@@ -248,7 +249,8 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
(void *)rxF,
PRACH_BLOCK_SIZE_BYTES);
}
if (frame == 0) LOG_D(PHY,"signal energy prach %d\n",dB_fixed(signal_energy((int*)rxF,839)));
LOG_D(PHY,"signal energy prach antenna %d => %d dB\n",
antenna_id, dB_fixed(signal_energy((int*)rxF,839)));
}
if (ru->idx<=1) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF0+ru->idx, 1 );
if ((ru->ifdevice.trx_write_func(&ru->ifdevice,
......@@ -259,7 +261,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
packet_type)) < 0) {
perror("ETHERNET write for IF4p5_PRACH\n");
}
if (ru->idx<=1) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF0+ru->idx, 0 );
} else {
AssertFatal(1==0, "send_IF4p5 - Unknown packet_type %x", packet_type);
......@@ -284,6 +286,7 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
int slotoffsetF=0, blockoffsetF=0;
eth_state_t *eth = (eth_state_t*) (ru->ifdevice.priv);
int idx;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4_RU+ru->idx,1);
if (ru->function == NGFI_RRU_IF4p5) {
......@@ -314,6 +317,7 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
LOG_E(PHY,"if4p5 read_cnt %d\n",read_cnt);
}
if (ru->idx<=1) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF0+ru->idx, 0 );
if (eth->flags == ETH_RAW_IF4p5_MODE) {
packet_header = (IF4p5_header_t*) (rx_buffer+MAC_HEADER_SIZE_BYTES);
data_block = (uint16_t*) (rx_buffer+MAC_HEADER_SIZE_BYTES+sizeof_IF4p5_header_t);
......@@ -396,23 +400,21 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
#endif
rxF = &prach_rxsigF[antenna_id][0];
// FIX: hard coded prach samples length
db_fulllength = PRACH_NUM_SAMPLES;
AssertFatal(rxF!=NULL,"rxF is null\n");
if (eth->flags == ETH_RAW_IF4p5_MODE) {
memcpy(rxF,
(int16_t*) (rx_buffer+MAC_HEADER_SIZE_BYTES+sizeof_IF4p5_header_t)+PRACH_BLOCK_SIZE_BYTES*antenna_id,
(int16_t*) (rx_buffer+MAC_HEADER_SIZE_BYTES+sizeof_IF4p5_header_t+(PRACH_BLOCK_SIZE_BYTES*antenna_id)),
PRACH_BLOCK_SIZE_BYTES);
} else {
memcpy(rxF,
(int16_t*) (rx_buffer+sizeof_IF4p5_header_t)+PRACH_BLOCK_SIZE_BYTES*antenna_id,
(int16_t*) (rx_buffer+sizeof_IF4p5_header_t+(PRACH_BLOCK_SIZE_BYTES*antenna_id)),
PRACH_BLOCK_SIZE_BYTES);
}
}
if (*frame == 0) LOG_D(PHY,"PRACH_IF4p5: CC_id %d : frame %d, subframe %d => %d dB\n",ru->idx,*frame,*subframe,
dB_fixed(signal_energy((int*)&prach_rxsigF[0][0],839)));
if (*frame == 0) LOG_D(PHY,"PRACH_IF4p5: CC_id %d : frame %d, subframe %d => (%d,%d) dB\n",ru->idx,*frame,*subframe,
dB_fixed(signal_energy((int*)&prach_rxsigF[0][0],839)),
dB_fixed(signal_energy((int*)&prach_rxsigF[1][0],839)));
for (idx=0;idx<ru->num_eNB;idx++) ru->wakeup_prach_eNB(ru->eNB_list[idx],ru,*frame,*subframe);
} else if (*packet_type == IF4p5_PULTICK) {
......
......@@ -590,8 +590,8 @@ void rx_prach0(PHY_VARS_eNB *eNB,
if (prach[0]!= NULL) LOG_M("prach_rx0.m","prach_rx0",prach[0],6144+792,1,1);
LOG_M("prach_rx1.m","prach_rx1",prach[1],6144+792,1,1);
LOG_M("prach_rxF0.m","prach_rxF0",rxsigF[0],24576,1,1);
LOG_M("prach_rxF1.m","prach_rxF1",rxsigF[1],6144,1,1);
LOG_M("prach_rxF0.m","prach_rxF0",rxsigF[0],12288,1,1);
LOG_M("prach_rxF1.m","prach_rxF1",rxsigF[1],12288,1,1);
}
for (aa=0; aa<nb_rx; aa++) {
......@@ -614,14 +614,14 @@ void rx_prach0(PHY_VARS_eNB *eNB,
// compute energy and accumulate over receive antennas and repetitions for BR
for (i=0; i<2048; i++)
prach_ifft[i] += (prach_ifft_tmp[i<<1]*prach_ifft_tmp[i<<1] + prach_ifft_tmp[1+(i<<1)]*prach_ifft_tmp[1+(i<<1)])>>8;
prach_ifft[i] += (prach_ifft_tmp[i<<1]*prach_ifft_tmp[i<<1] + prach_ifft_tmp[1+(i<<1)]*prach_ifft_tmp[1+(i<<1)])>>9;
} else {
idft256(prachF,prach_ifft_tmp,1);
log2_ifft_size = 8;
// compute energy and accumulate over receive antennas and repetitions for BR
for (i=0; i<256; i++)
prach_ifft[i] += (prach_ifft_tmp[i<<1]*prach_ifft_tmp[(i<<1)] + prach_ifft_tmp[1+(i<<1)]*prach_ifft_tmp[1+(i<<1)])>>10;
prach_ifft[i] += (prach_ifft_tmp[i<<1]*prach_ifft_tmp[(i<<1)] + prach_ifft_tmp[1+(i<<1)]*prach_ifft_tmp[1+(i<<1)])>>9;
}
if (LOG_DUMPFLAG(PRACH)) {
......@@ -689,6 +689,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1);
LOG_M("Xu.m","xu",Xu,N_ZC,1,1);
LOG_M("prach_ifft0.m","prach_t0",prach_ifft,1024,1,1);
exit(-1);
} else {
LOG_E(PHY,"Dumping prach (br_flag %d), k = %d (n_ra_prb %d)\n",br_flag,k,n_ra_prb);
LOG_M("rxsigF_br.m","prach_rxF_br",&rxsigF[0][0],12288,1,1);
......
......@@ -176,7 +176,8 @@ int trx_eth_read_udp_IF4p5(openair0_device *device, openair0_timestamp *timestam
int block_cnt=0;
packet_size = max(UDP_IF4p5_PRACH_SIZE_BYTES, max(UDP_IF4p5_PULFFT_SIZE_BYTES(nblocks), UDP_IF4p5_PDLFFT_SIZE_BYTES(nblocks)));
// *2 because of 2 antennas PUL/DLFFT are controlled by nsamps, PRACH is not
packet_size = max(UDP_IF4p5_PRACH_SIZE_BYTES*2, max(UDP_IF4p5_PULFFT_SIZE_BYTES(nblocks), UDP_IF4p5_PDLFFT_SIZE_BYTES(nblocks)));
while(bytes_received == -1) {
again:
......@@ -210,7 +211,6 @@ int trx_eth_read_udp_IF4p5(openair0_device *device, openair0_timestamp *timestam
eth->rx_count++;
}
}
//printf("size of third %d subtype %d frame %d subframe %d symbol %d \n", bytes_received, test_header->sub_type, ((test_header->frame_status)>>6)&0xffff, ((test_header->frame_status)>>22)&0x000f, ((test_header->frame_status)>>26)&0x000f) ;
eth->rx_nsamps = nsamps;
return(bytes_received);
......@@ -238,7 +238,7 @@ int trx_eth_write_udp_IF4p5(openair0_device *device, openair0_timestamp timestam
packet_size = UDP_IF4p5_PULTICK_SIZE_BYTES;
} else if ((flags >= IF4p5_PRACH)&&
(flags <= (IF4p5_PRACH+4))) {
packet_size = UDP_IF4p5_PRACH_SIZE_BYTES;
packet_size = UDP_HEADER_SIZE_BYTES + IPV4_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + (nsamps<<1);
} else {
printf("trx_eth_write_udp_IF4p5: unknown flags %d\n",flags);
return(-1);
......
......@@ -651,7 +651,7 @@ int main( int argc, char **argv ) {
// for (CC_id=0;CC_id<RC.nb_L1_CC[inst];CC_id++) phy_init_lte_eNB(RC.eNB[inst][CC_id],0,0);
}
}
printf("wait_eNBs()\n");
wait_eNBs();
printf("About to Init RU threads RC.nb_RU:%d\n", RC.nb_RU);
......
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