Merge develop(w51 2) to nfapi_nr
Setting of nFAPI mode in NR yet to be updated
This commit is contained in:
@@ -112,6 +112,9 @@ int load_lib(openair0_device *device,
|
||||
else
|
||||
deflibname=OAI_RF_LIBNAME;
|
||||
shlib_fdesc[0].fname="device_init";
|
||||
} else if (flag == RAU_REMOTE_THIRDPARTY_RADIO_HEAD) {
|
||||
deflibname=OAI_THIRDPARTY_TP_LIBNAME;
|
||||
shlib_fdesc[0].fname="transport_init";
|
||||
} else {
|
||||
deflibname=OAI_TP_LIBNAME;
|
||||
shlib_fdesc[0].fname="transport_init";
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
#define OAI_RF_LIBNAME "oai_device"
|
||||
/* name of shared library implementing the transport */
|
||||
#define OAI_TP_LIBNAME "oai_transpro"
|
||||
/* name of shared library implementing a third-party transport */
|
||||
#define OAI_THIRDPARTY_TP_LIBNAME "thirdparty_transpro"
|
||||
/* name of shared library implementing the rf simulator */
|
||||
#define OAI_RFSIM_LIBNAME "rfsimulator"
|
||||
/* name of shared library implementing the basic simulator */
|
||||
@@ -51,10 +53,9 @@
|
||||
/* flags for BBU to determine whether the attached radio head is local or remote */
|
||||
#define RAU_LOCAL_RADIO_HEAD 0
|
||||
#define RAU_REMOTE_RADIO_HEAD 1
|
||||
|
||||
#define RAU_REMOTE_THIRDPARTY_RADIO_HEAD 2
|
||||
#define MAX_WRITE_THREAD_PACKAGE 10
|
||||
#define MAX_WRITE_THREAD_BUFFER_SIZE 8
|
||||
|
||||
#ifndef MAX_CARDS
|
||||
#define MAX_CARDS 8
|
||||
#endif
|
||||
@@ -367,12 +368,22 @@ struct openair0_device_t {
|
||||
/*! \brief Called to send samples to the RF target
|
||||
@param device pointer to the device structure specific to the RF hardware target
|
||||
@param timestamp The timestamp at whicch the first sample MUST be sent
|
||||
@param buff Buffer which holds the samples
|
||||
@param buff Buffer which holds the samples (2 dimensional)
|
||||
@param nsamps number of samples to be sent
|
||||
@param number of antennas
|
||||
@param flags flags must be set to TRUE if timestamp parameter needs to be applied
|
||||
*/
|
||||
int (*trx_write_func)(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps,int antenna_id, int flags);
|
||||
|
||||
/*! \brief Called to send samples to the RF target
|
||||
@param device pointer to the device structure specific to the RF hardware target
|
||||
@param timestamp The timestamp at whicch the first sample MUST be sent
|
||||
@param buff Buffer which holds the samples (1 dimensional)
|
||||
@param nsamps number of samples to be sent
|
||||
@param antenna_id index of the antenna if the device has multiple anteannas
|
||||
@param flags flags must be set to TRUE if timestamp parameter needs to be applied
|
||||
*/
|
||||
int (*trx_write_func)(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps,int antenna_id, int flags);
|
||||
int (*trx_write_func2)(openair0_device *device, openair0_timestamp timestamp, void *buff, int nsamps,int antenna_id, int flags);
|
||||
|
||||
/*! \brief Receive samples from hardware.
|
||||
* Read \ref nsamps samples from each channel to buffers. buff[0] is the array for
|
||||
@@ -382,10 +393,24 @@ struct openair0_device_t {
|
||||
* \param[out] ptimestamp the time at which the first sample was received.
|
||||
* \param[out] buff An array of pointers to buffers for received samples. The buffers must be large enough to hold the number of samples \ref nsamps.
|
||||
* \param nsamps Number of samples. One sample is 2 byte I + 2 byte Q => 4 byte.
|
||||
* \param antenna_id Index of antenna for which to receive samples
|
||||
* \param num_antennas number of antennas from which to receive samples
|
||||
* \returns the number of sample read
|
||||
*/
|
||||
int (*trx_read_func)(openair0_device *device, openair0_timestamp *ptimestamp, void **buff, int nsamps,int antenna_id);
|
||||
|
||||
int (*trx_read_func)(openair0_device *device, openair0_timestamp *ptimestamp, void **buff, int nsamps,int num_antennas);
|
||||
|
||||
/*! \brief Receive samples from hardware, this version provides a single antenna at a time and returns.
|
||||
* Read \ref nsamps samples from each channel to buffers. buff[0] is the array for
|
||||
* the first channel. *ptimestamp is the time at which the first sample
|
||||
* was received.
|
||||
* \param device the hardware to use
|
||||
* \param[out] ptimestamp the time at which the first sample was received.
|
||||
* \param[out] buff A pointers to a buffer for received samples. The buffer must be large enough to hold the number of samples \ref nsamps.
|
||||
* \param nsamps Number of samples. One sample is 2 byte I + 2 byte Q => 4 byte.
|
||||
* \param antenna_id Index of antenna from which samples were received
|
||||
* \returns the number of sample read
|
||||
*/
|
||||
int (*trx_read_func2)(openair0_device *device, openair0_timestamp *ptimestamp, void *buff, int nsamps,int *antenna_id);
|
||||
|
||||
/*! \brief print the device statistics
|
||||
* \param device the hardware to use
|
||||
@@ -431,6 +456,25 @@ struct openair0_device_t {
|
||||
*/
|
||||
void (*configure_rru)(int idx, void *arg);
|
||||
|
||||
/*! \brief Pointer to generic RRU private information
|
||||
*/
|
||||
|
||||
void *thirdparty_priv;
|
||||
|
||||
/*! \brief Callback for Third-party RRU Initialization routine
|
||||
\param device the hardware configuration to use
|
||||
*/
|
||||
int (*thirdparty_init)(openair0_device *device);
|
||||
/*! \brief Callback for Third-party RRU Cleanup routine
|
||||
\param device the hardware configuration to use
|
||||
*/
|
||||
int (*thirdparty_cleanup)(openair0_device *device);
|
||||
|
||||
/*! \brief Callback for Third-party start streaming routine
|
||||
\param device the hardware configuration to use
|
||||
*/
|
||||
int (*thirdparty_startstreaming)(openair0_device *device);
|
||||
|
||||
/*! \brief RRU Configuration callback
|
||||
* \param idx RU index
|
||||
* \param arg pointer to capabilities or configuration
|
||||
|
||||
@@ -102,23 +102,15 @@ int eth_socket_init_raw(openair0_device *device) {
|
||||
eth->local_addrd_ll.sll_family = AF_PACKET;
|
||||
eth->local_addrd_ll.sll_ifindex = eth->if_index.ifr_ifindex;
|
||||
/* hear traffic from specific protocol*/
|
||||
if (eth->flags == ETH_RAW_IF5_MOBIPASS) {
|
||||
eth->local_addrd_ll.sll_protocol = htons(0xbffe);
|
||||
} else{
|
||||
eth->local_addrc_ll.sll_protocol = htons((short)device->eth_params->my_portc);
|
||||
eth->local_addrd_ll.sll_protocol = htons((short)device->eth_params->my_portd);
|
||||
}
|
||||
eth->local_addrc_ll.sll_protocol = htons((short)device->eth_params->my_portc);
|
||||
eth->local_addrd_ll.sll_protocol = htons((short)device->eth_params->my_portd);
|
||||
|
||||
eth->local_addrc_ll.sll_halen = ETH_ALEN;
|
||||
eth->local_addrc_ll.sll_pkttype = PACKET_OTHERHOST;
|
||||
eth->local_addrd_ll.sll_halen = ETH_ALEN;
|
||||
eth->local_addrd_ll.sll_pkttype = PACKET_OTHERHOST;
|
||||
eth->addr_len = sizeof(struct sockaddr_ll);
|
||||
|
||||
if ((eth->flags != ETH_RAW_IF5_MOBIPASS ) &&
|
||||
(bind(eth->sockfdc,(struct sockaddr *)ð->local_addrc_ll,eth->addr_len)<0)) {
|
||||
perror("ETHERNET: Cannot bind to socket (control)");
|
||||
exit(0);
|
||||
}
|
||||
if (bind(eth->sockfdd,(struct sockaddr *)ð->local_addrd_ll,eth->addr_len)<0) {
|
||||
perror("ETHERNET: Cannot bind to socket (user)");
|
||||
exit(0);
|
||||
@@ -127,12 +119,9 @@ int eth_socket_init_raw(openair0_device *device) {
|
||||
/* Construct the Ethernet header */
|
||||
ether_aton_r(local_mac, (struct ether_addr *)(&(eth->ehd.ether_shost)));
|
||||
ether_aton_r(remote_mac, (struct ether_addr *)(&(eth->ehd.ether_dhost)));
|
||||
if (eth->flags == ETH_RAW_IF5_MOBIPASS) {
|
||||
eth->ehd.ether_type = htons(0xbffe);
|
||||
} else {
|
||||
eth->ehc.ether_type = htons((short)device->eth_params->my_portc);
|
||||
eth->ehd.ether_type = htons((short)device->eth_params->my_portd);
|
||||
}
|
||||
eth->ehc.ether_type = htons((short)device->eth_params->my_portc);
|
||||
eth->ehd.ether_type = htons((short)device->eth_params->my_portd);
|
||||
|
||||
printf("[%s] binding to hardware address %x:%x:%x:%x:%x:%x\n",((device->host_type == RAU_HOST) ? "RAU": "RRU"),eth->ehd.ether_shost[0],eth->ehd.ether_shost[1],eth->ehd.ether_shost[2],eth->ehd.ether_shost[3],eth->ehd.ether_shost[4],eth->ehd.ether_shost[5]);
|
||||
|
||||
return 0;
|
||||
@@ -216,8 +205,6 @@ int trx_eth_write_raw_IF4p5(openair0_device *device, openair0_timestamp timestam
|
||||
packet_size = RAW_IF4p5_PULFFT_SIZE_BYTES(nblocks);
|
||||
} else if (flags == IF4p5_PULTICK) {
|
||||
packet_size = RAW_IF4p5_PULTICK_SIZE_BYTES;
|
||||
} else if (flags == IF5_MOBIPASS) {
|
||||
packet_size = RAW_IF5_MOBIPASS_SIZE_BYTES;
|
||||
} else {
|
||||
packet_size = RAW_IF4p5_PRACH_SIZE_BYTES;
|
||||
}
|
||||
@@ -430,53 +417,6 @@ int trx_eth_read_raw_IF4p5(openair0_device *device, openair0_timestamp *timestam
|
||||
}
|
||||
|
||||
|
||||
int trx_eth_read_raw_IF5_mobipass(openair0_device *device, openair0_timestamp *timestamp, void **buff, int nsamps, int cc) {
|
||||
// Read nblocks info from packet itself
|
||||
|
||||
int bytes_received=0;
|
||||
eth_state_t *eth = (eth_state_t*)device->priv;
|
||||
int ret;
|
||||
|
||||
ssize_t packet_size = 28; //MAC_HEADER_SIZE_BYTES + sizeof_IF5_mobipass_header_t ;
|
||||
// ssize_t packet_size = MAC_HEADER_SIZE_BYTES + sizeof_IF5_mobipass_header_t + 640*sizeof(int16_t);
|
||||
|
||||
bytes_received = recv(eth->sockfdd,
|
||||
buff[0],
|
||||
packet_size,
|
||||
MSG_PEEK);
|
||||
|
||||
if (bytes_received ==-1) {
|
||||
eth->num_rx_errors++;
|
||||
perror("[MOBIPASS]ETHERNET IF5 READ (header): ");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
IF5_mobipass_header_t *test_header = (IF5_mobipass_header_t*)((uint8_t *)buff[0] + MAC_HEADER_SIZE_BYTES);
|
||||
*timestamp = test_header->time_stamp;
|
||||
packet_size = MAC_HEADER_SIZE_BYTES + sizeof_IF5_mobipass_header_t + 640*sizeof(int16_t);
|
||||
|
||||
while(bytes_received < packet_size) {
|
||||
ret = recv(eth->sockfdd,
|
||||
buff[0],
|
||||
packet_size,
|
||||
0);
|
||||
if (bytes_received ==-1) {
|
||||
eth->num_rx_errors++;
|
||||
perror("[MOBIPASS] ETHERNET IF5 READ (payload): ");
|
||||
return(-1);
|
||||
} else {
|
||||
bytes_received+=ret;
|
||||
eth->rx_actual_nsamps = bytes_received>>1;
|
||||
eth->rx_count++;
|
||||
}
|
||||
}
|
||||
|
||||
eth->rx_nsamps = nsamps;
|
||||
return(bytes_received);
|
||||
|
||||
|
||||
}
|
||||
|
||||
int eth_set_dev_conf_raw(openair0_device *device) {
|
||||
|
||||
eth_state_t *eth = (eth_state_t*)device->priv;
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
#include "ethernet_lib.h"
|
||||
#include "common/ran_context.h"
|
||||
|
||||
#define DEBUG 0
|
||||
//#define DEBUG 1
|
||||
|
||||
// These are for IF5 and must be put into the device structure if multiple RUs in the same RAU !!!!!!!!!!!!!!!!!
|
||||
uint16_t pck_seq_num = 1;
|
||||
@@ -142,8 +142,8 @@ int eth_socket_init_udp(openair0_device *device) {
|
||||
perror("ETHERNET: Cannot set SO_REUSEADDR option on socket (control)");
|
||||
exit(0);
|
||||
}
|
||||
if (setsockopt(eth->sockfdd, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(int))) {
|
||||
perror("ETHERNET: Cannot set SO_REUSEADDR option on socket (user)");
|
||||
if (setsockopt(eth->sockfdd, SOL_SOCKET, SO_NO_CHECK, &enable, sizeof(int))) {
|
||||
perror("ETHERNET: Cannot set SO_NO_CHECK option on socket (user)");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -202,8 +202,9 @@ int trx_eth_read_udp_IF4p5(openair0_device *device, openair0_timestamp *timestam
|
||||
goto again;
|
||||
}
|
||||
} else {
|
||||
perror("ETHERNET IF4p5 READ");
|
||||
printf("(%s):\n", strerror(errno));
|
||||
return(-1);
|
||||
//perror("ETHERNET IF4p5 READ");
|
||||
//printf("(%s):\n", strerror(errno));
|
||||
}
|
||||
} else {
|
||||
*timestamp = test_header->sub_type;
|
||||
@@ -264,36 +265,82 @@ int trx_eth_write_udp_IF4p5(openair0_device *device, openair0_timestamp timestam
|
||||
return (bytes_sent);
|
||||
}
|
||||
|
||||
int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps,int cc, int flags) {
|
||||
int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, void *buff, int nsamps,int cc, int flags) {
|
||||
|
||||
int bytes_sent=0;
|
||||
eth_state_t *eth = (eth_state_t*)device->priv;
|
||||
int sendto_flag =0;
|
||||
int i=0;
|
||||
|
||||
//sendto_flag|=flags;
|
||||
eth->tx_nsamps=nsamps;
|
||||
|
||||
|
||||
|
||||
for (i=0;i<cc;i++) {
|
||||
/* buff[i] points to the position in tx buffer where the payload to be sent is
|
||||
|
||||
int nsamps2; // aligned to upper 32 or 16 byte boundary
|
||||
|
||||
#if defined(__x86_64) || defined(__i386__)
|
||||
#ifdef __AVX2__
|
||||
nsamps2 = (nsamps+7)>>3;
|
||||
__m256i buff_tx[nsamps2+1];
|
||||
__m256i *buff_tx2=buff_tx+1;
|
||||
#else
|
||||
nsamps2 = (nsamps+3)>>2;
|
||||
__m128i buff_tx[nsamps2+2];
|
||||
__m128i *buff_tx2=buff_tx+2;
|
||||
#endif
|
||||
#elif defined(__arm__) || defined(__aarch64__)
|
||||
nsamps2 = (nsamps+3)>>2;
|
||||
int16x8_t buff_tx[nsamps2+2];
|
||||
int16x8_t *buff_tx2=buff_tx+2;
|
||||
#else
|
||||
#error Unsupported CPU architecture, ethernet device cannot be built
|
||||
#endif
|
||||
|
||||
|
||||
// bring TX data into 12 LSBs for softmodem RX
|
||||
for (int j=0; j<nsamps2; j++) {
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
#ifdef __AVX2__
|
||||
buff_tx2[j] = _mm256_slli_epi16(((__m256i *)buff)[j],4);
|
||||
#else
|
||||
buff_tx2[j] = _mm_slli_epi16(((__m128i *)buff)[j],4);
|
||||
#endif
|
||||
#elif defined(__arm__)
|
||||
buff_tx2[j] = vshlq_n_s16(((int16x8_t *)buff)[j],4);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* buff[i] points to the position in tx buffer where the payload to be sent is
|
||||
buff2 points to the position in tx buffer where the packet header will be placed */
|
||||
void *buff2 = (void*)(buff[i]- APP_HEADER_SIZE_BYTES);
|
||||
|
||||
/* we don't want to ovewrite with the header info the previous tx buffer data so we store it*/
|
||||
int32_t temp0 = *(int32_t *)buff2;
|
||||
openair0_timestamp temp1 = *(openair0_timestamp *)(buff2 + sizeof(int32_t));
|
||||
void *buff2 = ((void*)buff_tx2)- APP_HEADER_SIZE_BYTES;
|
||||
|
||||
|
||||
|
||||
bytes_sent = 0;
|
||||
|
||||
/* constract application header */
|
||||
// eth->pck_header.seq_num = pck_seq_num;
|
||||
//eth->pck_header.antenna_id = 1+(i<<1);
|
||||
//eth->pck_header.timestamp = timestamp;
|
||||
*(uint16_t *)buff2 = eth->pck_seq_num;
|
||||
*(uint16_t *)(buff2 + sizeof(uint16_t)) = 1+(i<<1);
|
||||
*(openair0_timestamp *)(buff2 + sizeof(int32_t)) = timestamp;
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TX_SEQ_NUM, eth->pck_seq_num);
|
||||
// ECPRI Protocol revision + reserved bits (1 byte)
|
||||
*(uint8_t *)buff2 = ECPRIREV;
|
||||
// ECPRI Message type (1 byte)
|
||||
*(uint8_t *)(buff2 + 1) = 64;
|
||||
// ECPRI Payload Size (2 bytes)
|
||||
AssertFatal(nsamps<16381,"nsamps > 16381\n");
|
||||
*(uint8_t *)(buff2 + 2) = (nsamps<<2)>>8;
|
||||
*(uint8_t *)(buff2 + 3) = (nsamps<<2)&0xff;
|
||||
// ECPRI PC_ID (2 bytes)
|
||||
*(uint16_t *)(buff2 + 4) = cc;
|
||||
// OAI modified SEQ_ID (4 bytes)
|
||||
*(uint64_t *)(buff2 + 6) = ((uint64_t )timestamp)*6;
|
||||
|
||||
/*
|
||||
printf("ECPRI TX (REV %x, MessType %d, Payload size %d, PC_ID %d, TS %llu\n",
|
||||
*(uint8_t *)buff2,
|
||||
*(uint8_t *)(buff2+1),
|
||||
*(uint16_t *)(buff2+2),
|
||||
*(uint16_t *)(buff2+4),
|
||||
*(uint64_t *)(buff2+6));
|
||||
*/
|
||||
|
||||
int sent_byte;
|
||||
if (eth->compression == ALAW_COMPRESS) {
|
||||
@@ -311,7 +358,7 @@ int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, voi
|
||||
bytes_sent);
|
||||
#endif
|
||||
/* Send packet */
|
||||
bytes_sent += sendto(eth->sockfdd,
|
||||
bytes_sent = sendto(eth->sockfdd,
|
||||
buff2,
|
||||
sent_byte,
|
||||
sendto_flag,
|
||||
@@ -339,17 +386,13 @@ int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, voi
|
||||
}
|
||||
//}
|
||||
|
||||
/* tx buffer values restored */
|
||||
*(int32_t *)buff2 = temp0;
|
||||
*(openair0_timestamp *)(buff2 + sizeof(int32_t)) = temp1;
|
||||
}
|
||||
|
||||
return (bytes_sent-APP_HEADER_SIZE_BYTES)>>2;
|
||||
}
|
||||
|
||||
|
||||
#define NOSHIFT 1
|
||||
|
||||
int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, void **buff, int nsamps, int cc) {
|
||||
int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, void *buff, int nsamps, int *cc) {
|
||||
|
||||
int bytes_received=0;
|
||||
eth_state_t *eth = (eth_state_t*)device->priv;
|
||||
@@ -357,105 +400,98 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, voi
|
||||
int rcvfrom_flag =0;
|
||||
int block_cnt=0;
|
||||
int again_cnt=0;
|
||||
int i=0;
|
||||
static int packet_cnt=0;
|
||||
int payload_size = UDP_PACKET_SIZE_BYTES(nsamps);
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
#ifdef __AVX2__
|
||||
int nsamps2 = (payload_size>>5)+1;
|
||||
__m256i temp_rx[nsamps2];
|
||||
char *temp_rx0 = ((char *)&temp_rx[1])-APP_HEADER_SIZE_BYTES;
|
||||
#else
|
||||
int nsamps2 = (payload_size>>4)+1;
|
||||
__m128i temp_rx[nsamps2];
|
||||
char *temp_rx0 = ((char *)&temp_rx[1])-APP_HEADER_SIZE_BYTES;
|
||||
#endif
|
||||
#elif defined(__arm__) || defined(__aarch64__)
|
||||
int nsamps2 = (payload_size>>4)+1
|
||||
int16x8_t temp_rx[nsamps2];
|
||||
char *temp_rx0 = ((char *)&temp_rx[1])-APP_HEADER_SIZE_BYTES;
|
||||
#else
|
||||
#error Unsupported CPU architecture device cannot be built
|
||||
int nsamps2 = (payload_size>>2)+1;
|
||||
int32_t temp_rx[payload_size>>2];
|
||||
char* *temp_rx0 = ((char *)&temp_rx[1]) - APP_HEADER_SIZE_BYTES;
|
||||
#endif
|
||||
|
||||
eth->rx_nsamps=nsamps;
|
||||
|
||||
for (i=0;i<cc;i++) {
|
||||
/* buff[i] points to the position in rx buffer where the payload to be received will be placed
|
||||
buff2 points to the position in rx buffer where the packet header will be placed */
|
||||
void *buff2 = (void*)(buff[i]- APP_HEADER_SIZE_BYTES);
|
||||
|
||||
/* we don't want to ovewrite with the header info the previous rx buffer data so we store it*/
|
||||
int32_t temp0 = *(int32_t *)buff2;
|
||||
openair0_timestamp temp1 = *(openair0_timestamp *)(buff2 + sizeof(int32_t));
|
||||
|
||||
bytes_received=0;
|
||||
block_cnt=0;
|
||||
int receive_bytes;
|
||||
if (eth->compression == ALAW_COMPRESS) {
|
||||
receive_bytes = UDP_PACKET_SIZE_BYTES_ALAW(nsamps);
|
||||
} else {
|
||||
receive_bytes = UDP_PACKET_SIZE_BYTES(nsamps);
|
||||
}
|
||||
|
||||
while(bytes_received < receive_bytes) {
|
||||
again:
|
||||
#if DEBUG
|
||||
printf("------- RX------: buff2 current position=%d remaining_bytes=%d bytes_recv=%d \n",
|
||||
(void *)(buff2+bytes_received),
|
||||
receive_bytes - bytes_received,
|
||||
bytes_received);
|
||||
#endif
|
||||
bytes_received +=recvfrom(eth->sockfdd,
|
||||
buff2,
|
||||
receive_bytes,
|
||||
rcvfrom_flag,
|
||||
(struct sockaddr *)ð->dest_addrd,
|
||||
(socklen_t *)ð->addr_len);
|
||||
|
||||
if (bytes_received ==-1) {
|
||||
eth->num_rx_errors++;
|
||||
if (errno == EAGAIN) {
|
||||
again_cnt++;
|
||||
usleep(10);
|
||||
if (again_cnt == 1000) {
|
||||
bytes_received=0;
|
||||
block_cnt=0;
|
||||
AssertFatal(eth->compression == NO_COMPRESS, "IF5 compression not supported for now\n");
|
||||
|
||||
while(bytes_received < payload_size) {
|
||||
again:
|
||||
bytes_received +=recvfrom(eth->sockfdd,
|
||||
temp_rx0,
|
||||
payload_size,
|
||||
rcvfrom_flag,
|
||||
(struct sockaddr *)ð->dest_addrd,
|
||||
(socklen_t *)ð->addr_len);
|
||||
packet_cnt++;
|
||||
if (bytes_received ==-1) {
|
||||
eth->num_rx_errors++;
|
||||
if (errno == EAGAIN) {
|
||||
again_cnt++;
|
||||
usleep(10);
|
||||
if (again_cnt == 1000) {
|
||||
perror("ETHERNET READ: ");
|
||||
exit(-1);
|
||||
} else {
|
||||
printf("AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN \n");
|
||||
goto again;
|
||||
}
|
||||
} else if (errno == EWOULDBLOCK) {
|
||||
block_cnt++;
|
||||
usleep(10);
|
||||
if (block_cnt == 1000) {
|
||||
perror("ETHERNET READ: ");
|
||||
exit(-1);
|
||||
} else {
|
||||
printf("BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK \n");
|
||||
goto again;
|
||||
}
|
||||
} else {
|
||||
bytes_received=0;
|
||||
goto again;
|
||||
}
|
||||
} else if (errno == EWOULDBLOCK) {
|
||||
block_cnt++;
|
||||
usleep(10);
|
||||
if (block_cnt == 1000) {
|
||||
perror("ETHERNET READ: ");
|
||||
exit(-1);
|
||||
} else {
|
||||
printf("BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK \n");
|
||||
goto again;
|
||||
}
|
||||
} else {
|
||||
#if DEBUG
|
||||
printf("------- RX------: nu=%d an_id=%d ts%d bytes_recv=%d\n",
|
||||
*(int16_t *)buff2,
|
||||
*(int16_t *)(buff2 + sizeof(int16_t)),
|
||||
*(openair0_timestamp *)(buff2 + sizeof(int32_t)),
|
||||
bytes_received);
|
||||
|
||||
dump_packet((device->host_type == RAU_HOST)? "RAU":"RRU", buff2, UDP_PACKET_SIZE_BYTES(nsamps),RX_FLAG);
|
||||
#endif
|
||||
|
||||
/* store the timestamp value from packet's header */
|
||||
*timestamp = *(openair0_timestamp *)(buff2 + sizeof(int32_t));
|
||||
/* store the sequence number of the previous packet received */
|
||||
if (eth->pck_seq_num_cur == 0) {
|
||||
eth->pck_seq_num_prev = *(uint16_t *)buff2;
|
||||
} else {
|
||||
eth->pck_seq_num_prev = eth->pck_seq_num_cur;
|
||||
}
|
||||
/* get the packet sequence number from packet's header */
|
||||
eth->pck_seq_num_cur = *(uint16_t *)buff2;
|
||||
if ( ( eth->pck_seq_num_cur != (eth->pck_seq_num_prev + 1) ) && !((eth->pck_seq_num_prev==MAX_PACKET_SEQ_NUM(nsamps,device->openair0_cfg->samples_per_frame)) && (eth->pck_seq_num_cur==1 )) && !((eth->pck_seq_num_prev==1) && (eth->pck_seq_num_cur==1))) {
|
||||
//#if DEBUG
|
||||
printf("Out of order packet received: current_packet=%d previous_packet=%d timestamp=%"PRId64"\n",eth->pck_seq_num_cur,eth->pck_seq_num_prev,*timestamp);
|
||||
//#endif
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RX_SEQ_NUM,eth->pck_seq_num_cur);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RX_SEQ_NUM_PRV,eth->pck_seq_num_prev);
|
||||
eth->rx_actual_nsamps=bytes_received>>2;
|
||||
eth->rx_count++;
|
||||
}
|
||||
|
||||
}
|
||||
/* tx buffer values restored */
|
||||
*(int32_t *)buff2 = temp0;
|
||||
*(openair0_timestamp *)(buff2 + sizeof(int32_t)) = temp1;
|
||||
|
||||
}
|
||||
return (bytes_received-APP_HEADER_SIZE_BYTES)>>2;
|
||||
} else {
|
||||
/* store the timestamp value from packet's header */
|
||||
*timestamp = *(openair0_timestamp *)(temp_rx0 + ECPRICOMMON_BYTES+ECPRIPCID_BYTES);
|
||||
// convert TS to samples, /3 for 30.72 Ms/s, /6 for 15.36 Ms/s, /12 for 7.68 Ms/s, etc.
|
||||
*timestamp = *timestamp/6;
|
||||
// handle 1.4,3,5,10,15 MHz cases
|
||||
*cc = *(uint16_t*)(temp_rx0 + ECPRICOMMON_BYTES);
|
||||
}
|
||||
eth->rx_actual_nsamps=payload_size>>2;
|
||||
eth->rx_count++;
|
||||
}
|
||||
|
||||
#ifdef NOSHIFT
|
||||
memcpy(buff,(void*)(temp_rx+1),payload_size);
|
||||
#else
|
||||
// populate receive buffer in lower 12-bits from 16-bit representation
|
||||
for (int j=1; j<nsamps2; j++) {
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
#ifdef __AVX2__
|
||||
((__m256i *)buff)[j-1] = _mm256_srai_epi16(temp_rx[j],2);
|
||||
#else
|
||||
((__m128i *)buff)[j-1] = _mm_srai_epi16(temp_rx[j],2);
|
||||
#endif
|
||||
#elif defined(__arm__)
|
||||
((int16x8_t *)buff)[j] = vshrq_n_s16(temp_rx[i][j],2);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
return (payload_size>>2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -52,11 +52,20 @@ int num_devices_eth = 0;
|
||||
struct sockaddr_in dest_addr[MAX_INST];
|
||||
int dest_addr_len[MAX_INST];
|
||||
|
||||
int load_lib(openair0_device *device,
|
||||
openair0_config_t *openair0_cfg,
|
||||
eth_params_t *cfg,
|
||||
uint8_t flag);
|
||||
|
||||
int trx_eth_start(openair0_device *device)
|
||||
{
|
||||
eth_state_t *eth = (eth_state_t*)device->priv;
|
||||
|
||||
if (eth->flags == ETH_UDP_IF5_ECPRI_MODE) {
|
||||
AssertFatal(device->thirdparty_init != NULL, "device->thirdparty_init is null\n");
|
||||
AssertFatal(device->thirdparty_init(device) == 0, "third-party init failed\n");
|
||||
device->openair0_cfg->samples_per_packet = 256;
|
||||
}
|
||||
/* initialize socket */
|
||||
if (eth->flags == ETH_RAW_MODE) {
|
||||
printf("Setting ETHERNET to ETH_RAW_IF5_MODE\n");
|
||||
@@ -121,11 +130,6 @@ int trx_eth_start(openair0_device *device)
|
||||
|
||||
|
||||
|
||||
} else if (eth->flags == ETH_RAW_IF5_MOBIPASS) {
|
||||
printf("Setting ETHERNET to RAW_IF5_MODE\n");
|
||||
if (eth_socket_init_raw(device)!=0) return -1;
|
||||
if(ethernet_tune (device,RCV_TIMEOUT,999999)!=0) return -1;
|
||||
|
||||
} else {
|
||||
printf("Setting ETHERNET to UDP_IF5_MODE\n");
|
||||
if (eth_socket_init_udp(device)!=0) return -1;
|
||||
@@ -137,8 +141,7 @@ int trx_eth_start(openair0_device *device)
|
||||
if(eth_get_dev_conf_udp(device)!=0) return -1;
|
||||
}*/
|
||||
|
||||
/* adjust MTU wrt number of samples per packet */
|
||||
if(ethernet_tune (device,MTU_SIZE,UDP_IF4p5_PRACH_SIZE_BYTES)!=0) return -1;
|
||||
//if(ethernet_tune (device,MTU_SIZE,UDP_IF4p5_PRACH_SIZE_BYTES)!=0) return -1;
|
||||
|
||||
if(ethernet_tune (device,RCV_TIMEOUT,999999)!=0) return -1;
|
||||
}
|
||||
@@ -166,9 +169,15 @@ void trx_eth_end(openair0_device *device)
|
||||
}
|
||||
|
||||
|
||||
int trx_eth_stop(openair0_device *device)
|
||||
{
|
||||
return(0);
|
||||
|
||||
int trx_eth_stop(openair0_device *device) {
|
||||
eth_state_t *eth = (eth_state_t*)device->priv;
|
||||
|
||||
if (eth->flags == ETH_UDP_IF5_ECPRI_MODE) {
|
||||
AssertFatal(device->thirdparty_cleanup != NULL, "device->thirdparty_cleanup is null\n");
|
||||
AssertFatal(device->thirdparty_cleanup(device) == 0, "third-party cleanup failed\n");
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -387,20 +396,11 @@ int transport_init(openair0_device *device,
|
||||
eth_state_t *eth = (eth_state_t*)malloc(sizeof(eth_state_t));
|
||||
memset(eth, 0, sizeof(eth_state_t));
|
||||
|
||||
if (eth_params->transp_preference == 1) {
|
||||
eth->flags = ETH_RAW_MODE;
|
||||
} else if (eth_params->transp_preference == 0) {
|
||||
eth->flags = ETH_UDP_MODE;
|
||||
} else if (eth_params->transp_preference == 3) {
|
||||
eth->flags = ETH_RAW_IF4p5_MODE;
|
||||
} else if (eth_params->transp_preference == 2) {
|
||||
eth->flags = ETH_UDP_IF4p5_MODE;
|
||||
} else if (eth_params->transp_preference == 4) {
|
||||
eth->flags = ETH_RAW_IF5_MOBIPASS;
|
||||
} else {
|
||||
printf("transport_init: Unknown transport preference %d - default to RAW", eth_params->transp_preference);
|
||||
eth->flags = ETH_RAW_MODE;
|
||||
}
|
||||
eth->flags = eth_params->transp_preference;
|
||||
|
||||
// load third-party driver
|
||||
if (eth->flags == ETH_UDP_IF5_ECPRI_MODE) load_lib(device,openair0_cfg,eth_params,RAU_REMOTE_THIRDPARTY_RADIO_HEAD);
|
||||
|
||||
|
||||
if (eth_params->if_compress == 0) {
|
||||
eth->compression = NO_COMPRESS;
|
||||
@@ -423,12 +423,17 @@ int transport_init(openair0_device *device,
|
||||
device->trx_set_gains_func = trx_eth_set_gains;
|
||||
device->trx_write_init = trx_eth_write_init;
|
||||
|
||||
if (eth->flags == ETH_RAW_MODE) {
|
||||
device->trx_read_func2 = NULL;
|
||||
device->trx_read_func = NULL;
|
||||
device->trx_write_func2 = NULL;
|
||||
device->trx_write_func = NULL;
|
||||
|
||||
if (eth->flags == ETH_RAW_MODE) {
|
||||
device->trx_write_func = trx_eth_write_raw;
|
||||
device->trx_read_func = trx_eth_read_raw;
|
||||
} else if (eth->flags == ETH_UDP_MODE) {
|
||||
device->trx_write_func = trx_eth_write_udp;
|
||||
device->trx_read_func = trx_eth_read_udp;
|
||||
} else if (eth->flags == ETH_UDP_MODE || eth->flags == ETH_UDP_IF5_ECPRI_MODE) {
|
||||
device->trx_write_func2 = trx_eth_write_udp;
|
||||
device->trx_read_func2 = trx_eth_read_udp;
|
||||
device->trx_ctlsend_func = trx_eth_ctlsend_udp;
|
||||
device->trx_ctlrecv_func = trx_eth_ctlrecv_udp;
|
||||
} else if (eth->flags == ETH_RAW_IF4p5_MODE) {
|
||||
@@ -439,9 +444,6 @@ int transport_init(openair0_device *device,
|
||||
device->trx_read_func = trx_eth_read_udp_IF4p5;
|
||||
device->trx_ctlsend_func = trx_eth_ctlsend_udp;
|
||||
device->trx_ctlrecv_func = trx_eth_ctlrecv_udp;
|
||||
} else if (eth->flags == ETH_RAW_IF5_MOBIPASS) {
|
||||
device->trx_write_func = trx_eth_write_raw_IF4p5;
|
||||
device->trx_read_func = trx_eth_read_raw_IF5_mobipass;
|
||||
} else {
|
||||
//device->trx_write_func = trx_eth_write_udp_IF4p5;
|
||||
//device->trx_read_func = trx_eth_read_udp_IF4p5;
|
||||
|
||||
@@ -49,7 +49,10 @@
|
||||
#define RX_FLAG 0
|
||||
|
||||
#include "if_defs.h"
|
||||
#define APP_HEADER_SIZE_BYTES (sizeof(int32_t) + sizeof(openair0_timestamp))
|
||||
#define ECPRICOMMON_BYTES 4
|
||||
#define ECPRIPCID_BYTES 2
|
||||
#define APP_HEADER_SIZE_BYTES (ECPRICOMMON_BYTES + ECPRIPCID_BYTES + sizeof(openair0_timestamp))
|
||||
#define ECPRIREV 1 // ECPRI Version 1, C=0 - single ECPRI message per OAI TX packet
|
||||
|
||||
/*!\brief opaque ethernet data structure */
|
||||
typedef struct {
|
||||
@@ -234,8 +237,8 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value);
|
||||
* @ingroup _oai
|
||||
*/
|
||||
int eth_socket_init_udp(openair0_device *device);
|
||||
int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps,int cc, int flags);
|
||||
int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, void **buff, int nsamps, int cc);
|
||||
int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, void *buff, int nsamps,int cc, int flags);
|
||||
int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, void *buff, int nsamps, int *cc);
|
||||
|
||||
|
||||
int eth_socket_init_raw(openair0_device *device);
|
||||
|
||||
@@ -36,15 +36,17 @@
|
||||
#include <netinet/ether.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef LITE_COMPILATION
|
||||
#include "PHY/LTE_TRANSPORT/if4_tools.h"
|
||||
#include "PHY/LTE_TRANSPORT/if5_tools.h"
|
||||
#endif
|
||||
|
||||
// ETH transport preference modes
|
||||
#define ETH_UDP_MODE 0
|
||||
#define ETH_RAW_MODE 1
|
||||
#define ETH_UDP_MODE 0
|
||||
#define ETH_RAW_MODE 1
|
||||
#define ETH_UDP_IF4p5_MODE 2
|
||||
#define ETH_RAW_IF4p5_MODE 3
|
||||
#define ETH_RAW_IF5_MOBIPASS 4
|
||||
#define ETH_UDP_IF5_ECPRI_MODE 4
|
||||
|
||||
// COMMOM HEADER LENGTHS
|
||||
|
||||
|
||||
@@ -59,6 +59,29 @@ The RF simulator is using the configuration module, and its parameters are defin
|
||||
|
||||
Setting the env variable RFSIMULATOR can be used instead of using the serveraddr parameter; it is to preserve compatibility with previous version.
|
||||
|
||||
## How to use the RF simulator options
|
||||
|
||||
Add the following options to the command line to enable the channel model and the IQ samples saving for future replay:
|
||||
```bash
|
||||
--rfsimulator.options chanmod,saviq
|
||||
```
|
||||
or just:
|
||||
```bash
|
||||
--rfsimulator.options chanmod
|
||||
```
|
||||
to enable the channel model.
|
||||
|
||||
set the model with:
|
||||
```bash
|
||||
--rfsimulator.modelname AWGN
|
||||
```
|
||||
|
||||
Example run:
|
||||
|
||||
```bash
|
||||
sudo RFSIMULATOR=server ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf --parallel-config PARALLEL_SINGLE_THREAD --rfsim --phy-test --rfsimulator.options chanmod --rfsimulator.modelname AWGN
|
||||
```
|
||||
|
||||
## 4G case
|
||||
|
||||
For the UE, it should be set to the IP address of the eNB. For example:
|
||||
@@ -165,5 +188,50 @@ Only the input noise can be changed on command line with the `-s` parameter.
|
||||
|
||||
With path loss = 0 set `-s 5` to see a little noise. `-s` is a shortcut to `channelmod.s`. It is expected to enhance the channel modelization flexibility by the addition of more parameters in the channelmod section.
|
||||
|
||||
Example to add a very small noise:
|
||||
```bash
|
||||
-s 30
|
||||
```
|
||||
to add a lot of noise:
|
||||
```bash
|
||||
-s 5
|
||||
```
|
||||
|
||||
Example run commands:
|
||||
```bash
|
||||
sudo RFSIMULATOR=server ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf --parallel-config PARALLEL_SINGLE_THREAD --rfsim --phy-test --rfsimulator.options chanmod --rfsimulator.modelname AWGN
|
||||
|
||||
```
|
||||
# Real time control and monitoring
|
||||
|
||||
Add the `--telnetsrv` option to the command line. Then in a new shell, connect to the telnet server, example:
|
||||
```bash
|
||||
telnet 127.0.0.1 9090
|
||||
```
|
||||
once connected it is possible to monitor the current status:
|
||||
```bash
|
||||
channelmod show current
|
||||
```
|
||||
|
||||
see the available channel models:
|
||||
```bash
|
||||
channelmod show predef
|
||||
```
|
||||
|
||||
or modify the channel model, for example setting a new model:
|
||||
```bash
|
||||
rfsimu setmodel AWGN
|
||||
```
|
||||
setting the pathloss, etc...:
|
||||
```bash
|
||||
channelmod modify <channelid> <param> <value>
|
||||
channelmod modify 0 ploss 15
|
||||
```
|
||||
where:
|
||||
```bash
|
||||
<param name> can be one of "riceanf", "aoa", "randaoa", "ploss", "offset", "forgetf"
|
||||
```
|
||||
|
||||
# Caveats
|
||||
Still issues in power control: txgain, rxgain are not used.
|
||||
|
||||
|
||||
@@ -555,7 +555,7 @@ static bool flushInput(rfsimulator_state_t *t, int timeout, int nsamps_for_initi
|
||||
memset(b->circularBuf, 0, sampleToByte(CirSize,1));
|
||||
}
|
||||
|
||||
if (b->lastReceivedTS != 0 && b->th.timestamp-b->lastReceivedTS > 50 )
|
||||
if (b->lastReceivedTS != 0 && b->th.timestamp-b->lastReceivedTS < 1000)
|
||||
LOG_W(HW,"UEsock: %d gap of: %ld in reception\n", fd, b->th.timestamp-b->lastReceivedTS );
|
||||
|
||||
b->lastReceivedTS=b->th.timestamp;
|
||||
@@ -628,7 +628,7 @@ int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimestamp, vo
|
||||
t->nextTimestamp+=nsamps;
|
||||
|
||||
if ( ((t->nextTimestamp/nsamps)%100) == 0)
|
||||
LOG_W(HW,"No UE, Generated void samples for Rx: %ld\n", t->nextTimestamp);
|
||||
LOG_D(HW,"No UE, Generated void samples for Rx: %ld\n", t->nextTimestamp);
|
||||
|
||||
*ptimestamp = t->nextTimestamp-nsamps;
|
||||
return nsamps;
|
||||
|
||||
@@ -71,6 +71,11 @@ gNBs =
|
||||
initialDLBWPmappingType_2 = 0;
|
||||
#this is SS=1,L=12
|
||||
initialDLBWPstartSymbolAndLength_2 = 54;
|
||||
|
||||
initialDLBWPk0_3 = 0;
|
||||
initialDLBWPmappingType_3 = 0;
|
||||
#this is SS=1,L=4 //5 (4 is for 43, 5 is for 57)
|
||||
initialDLBWPstartSymbolAndLength_3 = 57; //43; //57;
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
ul_frequencyBand = 257;
|
||||
@@ -89,7 +94,7 @@ gNBs =
|
||||
initialULBWPsubcarrierSpacing = 3;
|
||||
#rach-ConfigCommon
|
||||
#rach-ConfigGeneric
|
||||
prach_ConfigurationIndex = 98;
|
||||
prach_ConfigurationIndex = 52;
|
||||
#prach_msg1_FDM
|
||||
#0 = one, 1=two, 2=four, 3=eight
|
||||
prach_msg1_FDM = 0;
|
||||
@@ -103,12 +108,12 @@ gNBs =
|
||||
powerRampingStep = 1;
|
||||
#ra_ReponseWindow
|
||||
#1,2,4,8,10,20,40,80
|
||||
ra_ResponseWindow = 4;
|
||||
ra_ResponseWindow = 7;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
#0=oneeighth,1=onefourth,2=half,3=one,4=two,5=four,6=eight,7=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 7;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
ra_ContentionResolutionTimer = 7;
|
||||
@@ -119,22 +124,26 @@ gNBs =
|
||||
prach_RootSequenceIndex = 1;
|
||||
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
|
||||
#
|
||||
msg1_SubcarrierSpacing = 1,
|
||||
msg1_SubcarrierSpacing = 3,
|
||||
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
# pusch-ConfigCommon (up to 16 elements)
|
||||
initialULBWPk2_0 = 2;
|
||||
initialULBWPk2_0 = 6;
|
||||
initialULBWPmappingType_0 = 1
|
||||
# this is SS=0 L=11
|
||||
initialULBWPstartSymbolAndLength_0 = 55;
|
||||
|
||||
initialULBWPk2_1 = 2;
|
||||
|
||||
initialULBWPk2_1 = 6;
|
||||
initialULBWPmappingType_1 = 1;
|
||||
# this is SS=0 L=12
|
||||
initialULBWPstartSymbolAndLength_1 = 69;
|
||||
|
||||
initialULBWPk2_2 = 7;
|
||||
initialULBWPmappingType_2 = 1;
|
||||
# this is SS=10 L=4
|
||||
initialULBWPstartSymbolAndLength_2 = 52;
|
||||
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant =-90;
|
||||
|
||||
@@ -47,7 +47,7 @@ gNBs =
|
||||
dl_carrierBandwidth = 32;
|
||||
#initialDownlinkBWP
|
||||
#genericParameters
|
||||
# this is RBstart=0,L=50 (275*(L-1))+RBstart
|
||||
# this is RBstart=0,L=32 (275*(L-1))+RBstart
|
||||
initialDLBWPlocationAndBandwidth = 8525;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
@@ -121,8 +121,8 @@ gNBs =
|
||||
ra_ContentionResolutionTimer = 7;
|
||||
rsrp_ThresholdSSB = 19;
|
||||
#prach-RootSequenceIndex_PR
|
||||
#0 = 839, 1 = 139
|
||||
prach_RootSequenceIndex_PR = 1;
|
||||
#1 = 839, 2 = 139
|
||||
prach_RootSequenceIndex_PR = 2;
|
||||
prach_RootSequenceIndex = 1;
|
||||
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
|
||||
#
|
||||
@@ -132,12 +132,12 @@ gNBs =
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
# pusch-ConfigCommon (up to 16 elements)
|
||||
initialULBWPk2_0 = 2;
|
||||
initialULBWPk2_0 = 6;
|
||||
initialULBWPmappingType_0 = 1
|
||||
# this is SS=0 L=11
|
||||
initialULBWPstartSymbolAndLength_0 = 55;
|
||||
|
||||
initialULBWPk2_1 = 2;
|
||||
|
||||
initialULBWPk2_1 = 6;
|
||||
initialULBWPmappingType_1 = 1;
|
||||
# this is SS=0 L=12
|
||||
initialULBWPstartSymbolAndLength_1 = 69;
|
||||
@@ -211,7 +211,7 @@ gNBs =
|
||||
);
|
||||
|
||||
///X2
|
||||
enable_x2 = "yes";
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Active_gNBs = ( "gNB-Eurecom-5GNRBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
Num_Threads_PUSCH = 8;
|
||||
|
||||
gNBs =
|
||||
(
|
||||
|
||||
@@ -0,0 +1,243 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_VCO_B38");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
# real_time choice in {hard, rt-preempt, no}
|
||||
real_time = "no";
|
||||
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_VCO_B38";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
|
||||
plmn_list = ( { mcc = 222; mnc = 01; mnc_length = 2; } );
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "NGFI_RCC_IF5";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "TDD";
|
||||
tdd_config = 1;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 38;
|
||||
downlink_frequency = 2585000000L;
|
||||
uplink_frequency_offset = 0;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 100;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 5;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 1;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = 10;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -106;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
|
||||
ue_TransmissionMode = 1;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.18.150";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "yes";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000;
|
||||
t_dc_overall = 2000;
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "bond0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.18.203/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "bond0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.18.203/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.18.203/24";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="debug";
|
||||
global_log_verbosity ="medium";
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="info";
|
||||
mac_log_verbosity ="high";
|
||||
rlc_log_level ="info";
|
||||
rlc_log_verbosity ="medium";
|
||||
pdcp_log_level ="info";
|
||||
pdcp_log_verbosity ="medium";
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="medium";
|
||||
};
|
||||
|
||||
}
|
||||
);
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
scheduler_mode = "fairRR";
|
||||
puSch10xSnr = 100;
|
||||
puCch10xSnr = 100;
|
||||
}
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
prach_dtx_threshold = 150;
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
{
|
||||
local_if_name = "bond0";
|
||||
remote_address = "192.168.18.222";
|
||||
local_address = "192.168.18.203";
|
||||
local_portc = 50000;
|
||||
remote_portc = 55444;
|
||||
local_portd = 52001;
|
||||
remote_portd = 52183;
|
||||
local_rf = "no"
|
||||
tr_preference = "udp_ecpri_if5"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
att_tx = 5
|
||||
att_rx = 0;
|
||||
eNB_instances = [0];
|
||||
}
|
||||
);
|
||||
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_CONTROLLER :
|
||||
{
|
||||
FLEXRAN_ENABLED = "no";
|
||||
FLEXRAN_INTERFACE_NAME = "lo";
|
||||
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
|
||||
FLEXRAN_PORT = 2210;
|
||||
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
|
||||
FLEXRAN_AWAIT_RECONF = "no";
|
||||
};
|
||||
@@ -1,6 +1,7 @@
|
||||
Active_gNBs = ( "gNB-Eurecom-5GNRBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
Num_Threads_PUSCH = 8;
|
||||
|
||||
gNBs =
|
||||
(
|
||||
|
||||
@@ -461,10 +461,9 @@ void eNB_top(PHY_VARS_eNB *eNB,
|
||||
L1_proc->subframe_rx = ru_proc->tti_rx;
|
||||
L1_proc->frame_tx = (L1_proc->subframe_rx > (9-sf_ahead)) ? (L1_proc->frame_rx+1)&1023 : L1_proc->frame_rx;
|
||||
L1_proc->subframe_tx = (L1_proc->subframe_rx + sf_ahead)%10;
|
||||
|
||||
|
||||
if (rxtx(eNB,L1_proc,string) < 0)
|
||||
LOG_E(PHY,"eNB %d CC_id %d failed during execution\n",eNB->Mod_id,eNB->CC_id);
|
||||
|
||||
LOG_E(PHY,"eNB %d CC_id %d failed during execution\n",eNB->Mod_id,eNB->CC_id);
|
||||
ru_proc->timestamp_tx = L1_proc->timestamp_tx;
|
||||
ru_proc->tti_tx = L1_proc->subframe_tx;
|
||||
ru_proc->frame_tx = L1_proc->frame_tx;
|
||||
@@ -1168,6 +1167,7 @@ void init_eNB_afterRU(void) {
|
||||
|
||||
for (ru_id=0,aa=0; ru_id<eNB->num_RU; ru_id++) {
|
||||
eNB->frame_parms.nb_antennas_rx += eNB->RU_list[ru_id]->nb_rx;
|
||||
|
||||
AssertFatal(eNB->RU_list[ru_id]->common.rxdataF!=NULL,
|
||||
"RU %d : common.rxdataF is NULL\n",
|
||||
eNB->RU_list[ru_id]->idx);
|
||||
|
||||
+134
-181
@@ -120,6 +120,8 @@ void configure_rru(int idx,
|
||||
void reset_proc(RU_t *ru);
|
||||
int connect_rau(RU_t *ru);
|
||||
|
||||
void wait_eNBs(void);
|
||||
|
||||
const char ru_states[6][9] = {"RU_IDLE","RU_CONFIG","RU_READY","RU_RUN","RU_ERROR","RU_SYNC"};
|
||||
|
||||
extern uint16_t sf_ahead;
|
||||
@@ -141,16 +143,12 @@ extern uint16_t sf_ahead;
|
||||
static inline void fh_if5_south_out(RU_t *ru,int frame, int subframe, uint64_t timestamp) {
|
||||
if (ru == RC.ru[0]) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff );
|
||||
|
||||
ru->south_out_cnt++;
|
||||
|
||||
send_IF5(ru, timestamp, subframe, &ru->seqno, IF5_RRH_GW_DL);
|
||||
}
|
||||
|
||||
|
||||
// southbound IF5 fronthaul for Mobipass packet format
|
||||
static inline void fh_if5_mobipass_south_out(RU_t *ru,int frame, int subframe, uint64_t timestamp) {
|
||||
if (ru == RC.ru[0]) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff );
|
||||
|
||||
send_IF5(ru, timestamp, subframe, &ru->seqno, IF5_MOBIPASS);
|
||||
}
|
||||
|
||||
|
||||
// southbound IF4p5 fronthaul
|
||||
@@ -189,11 +187,12 @@ void fh_if5_south_in(RU_t *ru,
|
||||
recv_IF5(ru, &proc->timestamp_rx, *subframe, IF5_RRH_GW_UL);
|
||||
proc->frame_rx = (proc->timestamp_rx / (fp->samples_per_tti*10))&1023;
|
||||
proc->tti_rx = (proc->timestamp_rx / fp->samples_per_tti)%10;
|
||||
|
||||
|
||||
if (proc->first_rx == 0) {
|
||||
if (proc->tti_rx != *subframe) {
|
||||
LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->tti_rx %d, subframe %d)\n",proc->tti_rx,*subframe);
|
||||
exit_fun("Exiting");
|
||||
LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->tti_rx %d, subframe %d), resynching\n",proc->tti_rx,*subframe);
|
||||
*frame=proc->frame_rx;
|
||||
*subframe=proc->tti_rx;
|
||||
}
|
||||
|
||||
if (proc->frame_rx != *frame) {
|
||||
@@ -324,48 +323,6 @@ void fh_slave_south_in(RU_t *ru,
|
||||
}
|
||||
|
||||
|
||||
// asynchronous inbound if5 fronthaul from south (Mobipass)
|
||||
void fh_if5_south_asynch_in_mobipass(RU_t *ru,
|
||||
int *frame,
|
||||
int *subframe) {
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
|
||||
recv_IF5(ru, &proc->timestamp_rx, *subframe, IF5_MOBIPASS);
|
||||
pthread_mutex_lock(&proc->mutex_asynch_rxtx);
|
||||
int offset_mobipass = 40120;
|
||||
pthread_mutex_lock(&proc->mutex_asynch_rxtx);
|
||||
proc->tti_rx = ((proc->timestamp_rx-offset_mobipass)/fp->samples_per_tti)%10;
|
||||
proc->frame_rx = ((proc->timestamp_rx-offset_mobipass)/(fp->samples_per_tti*10))&1023;
|
||||
proc->tti_rx = (proc->timestamp_rx/fp->samples_per_tti)%10;
|
||||
proc->frame_rx = (proc->timestamp_rx/(10*fp->samples_per_tti))&1023;
|
||||
|
||||
if (proc->first_rx == 1) {
|
||||
proc->first_rx =2;
|
||||
*subframe = proc->tti_rx;
|
||||
*frame = proc->frame_rx;
|
||||
LOG_E(PHY,"[Mobipass]timestamp_rx:%llu, frame_rx %d, subframe: %d\n",(unsigned long long int)proc->timestamp_rx,proc->frame_rx,proc->tti_rx);
|
||||
} else {
|
||||
if (proc->tti_rx != *subframe) {
|
||||
proc->first_rx++;
|
||||
LOG_E(PHY,"[Mobipass]timestamp:%llu, tti_rx %d is not what we expect %d, first_rx:%d\n",(unsigned long long int)proc->timestamp_rx, proc->tti_rx,*subframe, proc->first_rx);
|
||||
//exit_fun("Exiting");
|
||||
}
|
||||
|
||||
if (proc->frame_rx != *frame) {
|
||||
proc->first_rx++;
|
||||
LOG_E(PHY,"[Mobipass]timestamp:%llu, frame_rx %d is not what we expect %d, first_rx:%d\n",(unsigned long long int)proc->timestamp_rx,proc->frame_rx,*frame, proc->first_rx);
|
||||
// exit_fun("Exiting");
|
||||
}
|
||||
|
||||
// temporary solution
|
||||
*subframe = proc->tti_rx;
|
||||
*frame = proc->frame_rx;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&proc->mutex_asynch_rxtx);
|
||||
} // eNodeB_3GPP_BBU
|
||||
|
||||
|
||||
// asynchronous inbound if4p5 fronthaul from south
|
||||
void fh_if4p5_south_asynch_in(RU_t *ru,
|
||||
int *frame,
|
||||
@@ -456,7 +413,7 @@ void fh_if5_north_asynch_in(RU_t *ru,
|
||||
int tti_tx,frame_tx;
|
||||
openair0_timestamp timestamp_tx;
|
||||
recv_IF5(ru, ×tamp_tx, *subframe, IF5_RRH_GW_DL);
|
||||
// printf("Received subframe %d (TS %llu) from RCC\n",tti_tx,timestamp_tx);
|
||||
// LOG_I(PHY,"Received subframe %d (TS %llu) from RCC\n",tti_tx,timestamp_tx);
|
||||
tti_tx = (timestamp_tx/fp->samples_per_tti)%10;
|
||||
frame_tx = (timestamp_tx/(fp->samples_per_tti*10))&1023;
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, proc->frame_tx );
|
||||
@@ -696,7 +653,7 @@ void rx_rf(RU_t *ru,
|
||||
ru->ts_offset = proc->timestamp_rx;
|
||||
proc->timestamp_rx = 0;
|
||||
} else if (resynch==0 && (proc->timestamp_rx - old_ts != fp->samples_per_tti)) {
|
||||
LOG_I(PHY,"rx_rf: rfdevice timing drift of %"PRId64" samples (ts_off %"PRId64")\n",proc->timestamp_rx - old_ts - fp->samples_per_tti,ru->ts_offset);
|
||||
LOG_D(PHY,"rx_rf: rfdevice timing drift of %"PRId64" samples (ts_off %"PRId64")\n",proc->timestamp_rx - old_ts - fp->samples_per_tti,ru->ts_offset);
|
||||
ru->ts_offset += (proc->timestamp_rx - old_ts - fp->samples_per_tti);
|
||||
proc->timestamp_rx = ts-ru->ts_offset;
|
||||
}
|
||||
@@ -761,7 +718,7 @@ void rx_rf(RU_t *ru,
|
||||
*subframe = proc->tti_rx;
|
||||
}
|
||||
|
||||
//printf("timestamp_rx %lu, frame %d(%d), subframe %d(%d)\n",ru->timestamp_rx,proc->frame_rx,frame,proc->tti_rx,subframe);
|
||||
//LOG_I(PHY,"timestamp_rx %lu, frame %d(%d), subframe %d(%d)\n",ru->timestamp_rx,proc->frame_rx,frame,proc->tti_rx,subframe);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, proc->timestamp_rx&0xffffffff );
|
||||
|
||||
if (rxs != fp->samples_per_tti) {
|
||||
@@ -929,12 +886,8 @@ static void *ru_thread_asynch_rxtx( void *param ) {
|
||||
|
||||
LOG_D(PHY,"ru_thread_asynch_rxtx: Waiting on incoming fronthaul\n");
|
||||
|
||||
// asynchronous receive from south (Mobipass)
|
||||
if (ru->fh_south_asynch_in) {
|
||||
ru->fh_south_asynch_in(ru, &frame, &subframe);
|
||||
}
|
||||
// asynchronous receive from north (RRU IF4/IF5)
|
||||
else if (ru->fh_north_asynch_in) {
|
||||
if (ru->fh_north_asynch_in) {
|
||||
if (subframe_select(ru->frame_parms,subframe)!=SF_UL)
|
||||
ru->fh_north_asynch_in(ru, &frame, &subframe);
|
||||
} else
|
||||
@@ -1185,21 +1138,22 @@ void wakeup_L1s(RU_t *ru) {
|
||||
L1_proc_t *proc = &eNB->proc;
|
||||
struct timespec t;
|
||||
LOG_D(PHY, "wakeup_L1s (num %d) for RU %d (%d.%d) ru->eNB_top:%p\n", ru->num_eNB, ru->idx, ru->proc.frame_rx, ru->proc.tti_rx, ru->eNB_top);
|
||||
// call eNB function directly
|
||||
char string[20];
|
||||
sprintf(string, "Incoming RU %d", ru->idx);
|
||||
|
||||
// call eNB function directly
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.frame_rx);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.tti_rx);
|
||||
AssertFatal(0==pthread_mutex_lock(&proc->mutex_RU),"");
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU+ru->idx, 1);
|
||||
//printf("wakeup_L1s: Frame %d, Subframe %d: RU %d done (wait_cnt %d),RU_mask[%d] %x\n",
|
||||
// ru->proc.frame_rx,ru->proc.subframe_rx,ru->idx,ru->wait_cnt,ru->proc.subframe_rx,proc->RU_mask[ru->proc.subframe_rx]);
|
||||
//LOG_I(PHY,"wakeup_L1s: Frame %d, Subframe %d: RU %d done (wait_cnt %d),RU_mask[%d] %x\n",
|
||||
// ru->proc.frame_rx,ru->proc.tti_rx,ru->idx,ru->wait_cnt,ru->proc.tti_rx,proc->RU_mask[ru->proc.tti_rx]);
|
||||
//VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.frame_rx);
|
||||
//VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.subframe_rx);
|
||||
//VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.tti_rx);
|
||||
clock_gettime(CLOCK_MONOTONIC, &ru->proc.t[ru->proc.tti_rx]);
|
||||
|
||||
if (proc->RU_mask[ru->proc.tti_rx] == 0) {
|
||||
//clock_gettime(CLOCK_MONOTONIC,&proc->t[ru->proc.subframe_rx]);
|
||||
//clock_gettime(CLOCK_MONOTONIC,&proc->t[ru->proc.tti_rx]);
|
||||
proc->t[ru->proc.tti_rx] = ru->proc.t[ru->proc.tti_rx];
|
||||
//start_meas(&proc->ru_arrival_time);
|
||||
LOG_D(PHY,"RU %d starting timer for frame %d subframe %d\n", ru->idx, ru->proc.frame_rx, ru->proc.tti_rx);
|
||||
@@ -1212,13 +1166,13 @@ void wakeup_L1s(RU_t *ru) {
|
||||
eNB->RU_list[i]->idx, eNB->RU_list[i]->proc.frame_rx, eNB->RU_list[i]->proc.tti_rx, ru_states[eNB->RU_list[i]->state]);
|
||||
|
||||
if (ru == eNB->RU_list[i] && eNB->RU_list[i]->wait_cnt == 0) {
|
||||
//AssertFatal((proc->RU_mask&(1<<i)) == 0, "eNB %d frame %d, subframe %d : previous information from RU %d (num_RU %d,mask %x) has not been served yet!\n", eNB->Mod_id,ru->proc.frame_rx,ru->proc.subframe_rx,ru->idx,eNB->num_RU,proc->RU_mask);
|
||||
//AssertFatal((proc->RU_mask&(1<<i)) == 0, "eNB %d frame %d, subframe %d : previous information from RU %d (num_RU %d,mask %x) has not been served yet!\n", eNB->Mod_id,ru->proc.frame_rx,ru->proc.tti_rx,ru->idx,eNB->num_RU,proc->RU_mask);
|
||||
proc->RU_mask[ru->proc.tti_rx] |= (1<<i);
|
||||
} else if (/*eNB->RU_list[i]->state == RU_SYNC ||*/(eNB->RU_list[i]->is_slave==1 && eNB->RU_list[i]->wait_cnt>0 && ru!=eNB->RU_list[i] && ru->is_slave==0) ) {
|
||||
proc->RU_mask[ru->proc.tti_rx] |= (1<<i);
|
||||
}
|
||||
|
||||
//printf("RU %d, RU_mask[%d] %d, i %d, frame %d, slave %d, ru->cnt %d, i->cnt %d\n",ru->idx,ru->proc.subframe_rx,proc->RU_mask[ru->proc.subframe_rx],i,ru->proc.frame_rx,ru->is_slave,ru->wait_cnt,eNB->RU_list[i]->wait_cnt);
|
||||
//LOG_I(PHY,"RU %d, RU_mask[%d] %d, i %d, frame %d, slave %d, ru->cnt %d, i->cnt %d\n",ru->idx,ru->proc.tti_rx,proc->RU_mask[ru->proc.tti_rx],i,ru->proc.frame_rx,ru->is_slave,ru->wait_cnt,eNB->RU_list[i]->wait_cnt);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_MASK_RU, proc->RU_mask[ru->proc.tti_rx]);
|
||||
|
||||
if (ru->is_slave == 0 && ( (proc->RU_mask[ru->proc.tti_rx]&(1<<i)) == 1 ) && eNB->RU_list[i]->state == RU_RUN) { //This is master & the RRU has already been received
|
||||
@@ -1233,21 +1187,21 @@ void wakeup_L1s(RU_t *ru) {
|
||||
}
|
||||
|
||||
//clock_gettime(CLOCK_MONOTONIC,&t);
|
||||
//LOG_I(PHY,"RU mask is now %x, time is %lu\n",proc->RU_mask[ru->proc.subframe_rx], t.tv_nsec - proc->t[ru->proc.subframe_rx].tv_nsec);
|
||||
//LOG_I(PHY,"RU mask is now %x, time is %lu\n",proc->RU_mask[ru->proc.tti_rx], t.tv_nsec - proc->t[ru->proc.tti_rx].tv_nsec);
|
||||
|
||||
if (proc->RU_mask[ru->proc.tti_rx] == (1<<eNB->num_RU)-1) { // all RUs have provided their information so continue on and wakeup eNB top
|
||||
LOG_D(PHY,"ru_mask is %d \n ", proc->RU_mask[ru->proc.tti_rx]);
|
||||
LOG_D(PHY,"the number of RU is %d, the current ru is RU %d \n ", (1<<eNB->num_RU)-1, ru->idx);
|
||||
LOG_D(PHY,"ru->proc.subframe_rx is %d \n", ru->proc.tti_rx);
|
||||
LOG_D(PHY,"ru->proc.tti_rx is %d \n", ru->proc.tti_rx);
|
||||
LOG_D(PHY,"Resetting mask frame %d, subframe %d, this is RU %d\n", ru->proc.frame_rx, ru->proc.tti_rx, ru->idx);
|
||||
proc->RU_mask[ru->proc.tti_rx] = 0;
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_MASK_RU, proc->RU_mask[ru->proc.tti_rx]);
|
||||
clock_gettime(CLOCK_MONOTONIC,&t);
|
||||
//stop_meas(&proc->ru_arrival_time);
|
||||
/*AssertFatal(t.tv_nsec < proc->t[ru->proc.subframe_rx].tv_nsec+5000000, "Time difference for subframe %d (Frame %d) => %lu > 5ms, this is RU %d\n",
|
||||
ru->proc.subframe_rx, ru->proc.frame_rx, t.tv_nsec - proc->t[ru->proc.subframe_rx].tv_nsec, ru->idx);*/
|
||||
/*AssertFatal(t.tv_nsec < proc->t[ru->proc.tti_rx].tv_nsec+5000000, "Time difference for subframe %d (Frame %d) => %lu > 5ms, this is RU %d\n",
|
||||
ru->proc.tti_rx, ru->proc.frame_rx, t.tv_nsec - proc->t[ru->proc.tti_rx].tv_nsec, ru->idx);*/
|
||||
//VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.frame_rx);
|
||||
//VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.subframe_rx);
|
||||
//VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.tti_rx);
|
||||
AssertFatal(0==pthread_mutex_unlock(&proc->mutex_RU),"");
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU+ru->idx, 0 );
|
||||
// unlock RUs that are waiting for eNB processing to be completed
|
||||
@@ -1280,8 +1234,8 @@ void wakeup_L1s(RU_t *ru) {
|
||||
}
|
||||
|
||||
// pthread_mutex_unlock(&proc->mutex_RU);
|
||||
// LOG_D(PHY,"wakeup eNB top for for subframe %d\n", ru->proc.subframe_rx);
|
||||
// ru->eNB_top(eNB_list[0],ru->proc.frame_rx,ru->proc.subframe_rx,string);
|
||||
// LOG_D(PHY,"wakeup eNB top for for subframe %d\n", ru->proc.tti_rx);
|
||||
// ru->eNB_top(eNB_list[0],ru->proc.frame_rx,ru->proc.tti_rx,string);
|
||||
ru->proc.emulate_rf_busy = 0;
|
||||
}
|
||||
|
||||
@@ -1350,7 +1304,7 @@ void fill_rf_config(RU_t *ru,
|
||||
char *rf_config_file) {
|
||||
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
|
||||
openair0_config_t *cfg = &ru->openair0_cfg;
|
||||
//printf("////////////////numerology in config = %d\n",numerology);
|
||||
//LOG_I(PHY,"////////////////numerology in config = %d\n",numerology);
|
||||
int numerology = get_softmodem_params()->numerology;
|
||||
|
||||
if(fp->N_RB_DL == 100) {
|
||||
@@ -1377,7 +1331,7 @@ void fill_rf_config(RU_t *ru,
|
||||
cfg->tx_bw = 40e6;
|
||||
cfg->rx_bw = 40e6;
|
||||
} else {
|
||||
printf("Wrong input for numerology %d\n setting to 20MHz normal CP configuration",numerology);
|
||||
LOG_I(PHY,"Wrong input for numerology %d\n setting to 20MHz normal CP configuration",numerology);
|
||||
cfg->sample_rate=30.72e6;
|
||||
cfg->samples_per_frame = 307200;
|
||||
cfg->tx_bw = 10e6;
|
||||
@@ -1416,7 +1370,7 @@ void fill_rf_config(RU_t *ru,
|
||||
cfg->tx_gain[i] = (double)ru->att_tx;
|
||||
cfg->rx_gain[i] = ru->max_rxgain-(double)ru->att_rx;
|
||||
cfg->configFilename = rf_config_file;
|
||||
printf("channel %d, Setting tx_gain offset %f, rx_gain offset %f, tx_freq %f, rx_freq %f\n",
|
||||
LOG_I(PHY,"channel %d, Setting tx_gain offset %f, rx_gain offset %f, tx_freq %f, rx_freq %f\n",
|
||||
i, cfg->tx_gain[i],
|
||||
cfg->rx_gain[i],
|
||||
cfg->tx_freq[i],
|
||||
@@ -1437,9 +1391,9 @@ int setup_RU_buffers(RU_t *ru) {
|
||||
|
||||
if (ru) {
|
||||
frame_parms = ru->frame_parms;
|
||||
printf("setup_RU_buffers: frame_parms = %p\n",frame_parms);
|
||||
LOG_I(PHY,"setup_RU_buffers: frame_parms = %p\n",frame_parms);
|
||||
} else {
|
||||
printf("RU not initialized (NULL pointer)\n");
|
||||
LOG_I(PHY,"RU not initialized (NULL pointer)\n");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
@@ -1462,7 +1416,7 @@ int setup_RU_buffers(RU_t *ru) {
|
||||
ru->sf_extension /= 4;
|
||||
ru->end_of_burst_delay /= 4;
|
||||
} else {
|
||||
printf("not handled, todo\n");
|
||||
LOG_I(PHY,"not handled, todo\n");
|
||||
exit(1);
|
||||
}
|
||||
} else {
|
||||
@@ -1476,13 +1430,13 @@ int setup_RU_buffers(RU_t *ru) {
|
||||
for (i=0; i<ru->nb_rx; i++) {
|
||||
card = i/4;
|
||||
ant = i%4;
|
||||
printf("Mapping RU id %d, rx_ant %d, on card %d, chain %d\n",ru->idx,i,ru->rf_map.card+card, ru->rf_map.chain+ant);
|
||||
LOG_I(PHY,"Mapping RU id %d, rx_ant %d, on card %d, chain %d\n",ru->idx,i,ru->rf_map.card+card, ru->rf_map.chain+ant);
|
||||
free(ru->common.rxdata[i]);
|
||||
ru->common.rxdata[i] = ru->openair0_cfg.rxbase[ru->rf_map.chain+ant];
|
||||
printf("rxdata[%d] @ %p\n",i,ru->common.rxdata[i]);
|
||||
LOG_I(PHY,"rxdata[%d] @ %p\n",i,ru->common.rxdata[i]);
|
||||
|
||||
for (j=0; j<16; j++) {
|
||||
printf("rxbuffer %d: %x\n",j,ru->common.rxdata[i][j]);
|
||||
LOG_I(PHY,"rxbuffer %d: %x\n",j,ru->common.rxdata[i][j]);
|
||||
ru->common.rxdata[i][j] = 16-j;
|
||||
}
|
||||
}
|
||||
@@ -1490,13 +1444,13 @@ int setup_RU_buffers(RU_t *ru) {
|
||||
for (i=0; i<ru->nb_tx; i++) {
|
||||
card = i/4;
|
||||
ant = i%4;
|
||||
printf("Mapping RU id %d, tx_ant %d, on card %d, chain %d\n",ru->idx,i,ru->rf_map.card+card, ru->rf_map.chain+ant);
|
||||
LOG_I(PHY,"Mapping RU id %d, tx_ant %d, on card %d, chain %d\n",ru->idx,i,ru->rf_map.card+card, ru->rf_map.chain+ant);
|
||||
free(ru->common.txdata[i]);
|
||||
ru->common.txdata[i] = ru->openair0_cfg.txbase[ru->rf_map.chain+ant];
|
||||
printf("txdata[%d] @ %p\n",i,ru->common.txdata[i]);
|
||||
LOG_I(PHY,"txdata[%d] @ %p\n",i,ru->common.txdata[i]);
|
||||
|
||||
for (j=0; j<16; j++) {
|
||||
printf("txbuffer %d: %x\n",j,ru->common.txdata[i][j]);
|
||||
LOG_I(PHY,"txbuffer %d: %x\n",j,ru->common.txdata[i][j]);
|
||||
ru->common.txdata[i][j] = 16-j;
|
||||
}
|
||||
}
|
||||
@@ -1623,7 +1577,7 @@ static void *ru_thread_tx( void *param ) {
|
||||
}
|
||||
|
||||
if (eNB_proc->RU_mask_tx != (1<<eNB->num_RU)-1) { // not all RUs have provided their information so return
|
||||
//printf("Not all RUs have provided their info (mask = %d), RU %d, num_RUs %d\n", eNB_proc->RU_mask_tx,ru->idx,eNB->num_RU);
|
||||
//LOG_I(PHY,"Not all RUs have provided their info (mask = %d), RU %d, num_RUs %d\n", eNB_proc->RU_mask_tx,ru->idx,eNB->num_RU);
|
||||
AssertFatal((ret=pthread_mutex_unlock(&eNB_proc->mutex_RU_tx))==0,"mutex_unlock returns %d\n",ret);
|
||||
} else { // all RUs TX are finished so send the ready signal to eNB processing
|
||||
eNB_proc->RU_mask_tx = 0;
|
||||
@@ -1644,7 +1598,7 @@ static void *ru_thread_tx( void *param ) {
|
||||
}
|
||||
}
|
||||
|
||||
//printf("ru_thread_tx: Frame %d, Subframe %d: RU %d done (wait_cnt %d),RU_mask_tx %d\n",
|
||||
//LOG_I(PHY,"ru_thread_tx: Frame %d, Subframe %d: RU %d done (wait_cnt %d),RU_mask_tx %d\n",
|
||||
//eNB_proc->frame_rx,eNB_proc->subframe_rx,ru->idx,ru->wait_cnt,eNB_proc->RU_mask_tx);
|
||||
}
|
||||
|
||||
@@ -1676,12 +1630,10 @@ static void *ru_thread( void *param ) {
|
||||
LOG_I(PHY,"Starting RU %d (%s,%s),\n", ru->idx, NB_functions[ru->function], NB_timing[ru->if_timing]);
|
||||
|
||||
if(get_softmodem_params()->emulate_rf) {
|
||||
fill_rf_config(ru,ru->rf_config_file);
|
||||
init_frame_parms(ru->frame_parms,1);
|
||||
phy_init_RU(ru);
|
||||
|
||||
if (setup_RU_buffers(ru)!=0) {
|
||||
printf("Exiting, cannot initialize RU Buffers\n");
|
||||
LOG_I(PHY,"Exiting, cannot initialize RU Buffers\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
@@ -1693,24 +1645,20 @@ static void *ru_thread( void *param ) {
|
||||
ru->state = RU_RUN;
|
||||
} else if (ru->has_ctrl_prt == 0) {
|
||||
// There is no control port: start everything here
|
||||
LOG_I(PHY, "RU %d has not ctrl port\n",ru->idx);
|
||||
LOG_I(PHY, "RU %d has no OAI ctrl port\n",ru->idx);
|
||||
|
||||
if (ru->if_south == LOCAL_RF) {
|
||||
fill_rf_config(ru,ru->rf_config_file);
|
||||
init_frame_parms(ru->frame_parms,1);
|
||||
ru->frame_parms->nb_antennas_rx = ru->nb_rx;
|
||||
phy_init_RU(ru);
|
||||
openair0_device_load(&ru->rfdevice,&ru->openair0_cfg);
|
||||
fill_rf_config(ru,ru->rf_config_file);
|
||||
init_frame_parms(ru->frame_parms,1);
|
||||
ru->frame_parms->nb_antennas_rx = ru->nb_rx;
|
||||
|
||||
if (setup_RU_buffers(ru)!=0) {
|
||||
printf("Exiting, cannot initialize RU Buffers\n");
|
||||
exit(-1);
|
||||
}
|
||||
if (ru->if_south == LOCAL_RF) openair0_device_load(&ru->rfdevice,&ru->openair0_cfg);
|
||||
|
||||
AssertFatal((ret=pthread_mutex_lock(&RC.ru_mutex))==0,"mutex_lock returns %d\n",ret);
|
||||
RC.ru_mask &= ~(1<<ru->idx);
|
||||
pthread_cond_signal(&RC.ru_cond);
|
||||
AssertFatal((ret=pthread_mutex_unlock(&RC.ru_mutex))==0,"mutex_unlock returns %d\n",ret);
|
||||
phy_init_RU(ru);
|
||||
|
||||
|
||||
if (setup_RU_buffers(ru)!=0) {
|
||||
LOG_I(PHY,"Exiting, cannot initialize RU Buffers\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
AssertFatal((ret=pthread_mutex_lock(&RC.ru_mutex))==0,"mutex_lock returns %d\n",ret);
|
||||
@@ -1745,9 +1693,9 @@ static void *ru_thread( void *param ) {
|
||||
|
||||
// Start RF device if any
|
||||
if (ru->start_rf) {
|
||||
if (ru->start_rf(ru) != 0)
|
||||
LOG_E(HW,"Could not start the RF device\n");
|
||||
else LOG_I(PHY,"RU %d rf device ready\n",ru->idx);
|
||||
if (ru->start_rf(ru) != 0)
|
||||
AssertFatal(1==0,"Could not start the RF device\n");
|
||||
else LOG_I(PHY,"RU %d rf device ready\n",ru->idx);
|
||||
} else LOG_D(PHY,"RU %d no rf device\n",ru->idx);
|
||||
}
|
||||
|
||||
@@ -1781,7 +1729,6 @@ static void *ru_thread( void *param ) {
|
||||
// synchronization on input FH interface, acquire signals/data and block
|
||||
if (ru->fh_south_in) ru->fh_south_in(ru,&frame,&subframe);
|
||||
else AssertFatal(1==0, "No fronthaul interface at south port");
|
||||
|
||||
#ifdef PHY_TX_THREAD
|
||||
|
||||
if(first_phy_tx == 0) {
|
||||
@@ -1945,7 +1892,7 @@ static void *ru_thread( void *param ) {
|
||||
} // ru->state = RU_RUN
|
||||
} // while !oai_exit
|
||||
|
||||
printf( "Exiting ru_thread \n");
|
||||
LOG_I(PHY, "Exiting ru_thread \n");
|
||||
|
||||
if (!(get_softmodem_params()->emulate_rf)) {
|
||||
if (ru->stop_rf != NULL) {
|
||||
@@ -2190,6 +2137,12 @@ static void *rf_tx( void *param ) {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
int start_streaming(RU_t *ru) {
|
||||
LOG_I(PHY,"Starting streaming on third-party RRU\n");
|
||||
return(ru->ifdevice.thirdparty_startstreaming(&ru->ifdevice));
|
||||
}
|
||||
|
||||
int start_if(struct RU_t_s *ru,struct PHY_VARS_eNB_s *eNB) {
|
||||
return(ru->ifdevice.trx_start_func(&ru->ifdevice));
|
||||
}
|
||||
@@ -2235,7 +2188,7 @@ void reset_proc(RU_t *ru) {
|
||||
|
||||
|
||||
void init_RU_proc(RU_t *ru) {
|
||||
int i=0, ret;
|
||||
int i=0;
|
||||
RU_proc_t *proc;
|
||||
pthread_attr_t *attr_FH=NULL, *attr_FH1=NULL, *attr_prach=NULL, *attr_asynch=NULL, *attr_synch=NULL, *attr_emulateRF=NULL, *attr_ctrl=NULL, *attr_prach_br=NULL;
|
||||
//pthread_attr_t *attr_fep=NULL;
|
||||
@@ -2304,7 +2257,17 @@ void init_RU_proc(RU_t *ru) {
|
||||
attr_prach_br = &proc->attr_prach_br;
|
||||
#endif
|
||||
|
||||
if (ru->function!=eNodeB_3GPP) pthread_create( &proc->pthread_ctrl, attr_ctrl, ru_thread_control, (void *)ru );
|
||||
if (ru->has_ctrl_prt == 1) pthread_create( &proc->pthread_ctrl, attr_ctrl, ru_thread_control, (void*)ru );
|
||||
else {
|
||||
if (ru->start_if) {
|
||||
LOG_I(PHY,"Starting IF interface for RU %d\n",ru->idx);
|
||||
AssertFatal(
|
||||
ru->start_if(ru,NULL) == 0, "Could not start the IF device\n");
|
||||
|
||||
if (ru->if_south != LOCAL_RF) wait_eNBs();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pthread_create( &proc->pthread_FH, attr_FH, ru_thread, (void *)ru );
|
||||
#if defined(PRE_SCD_THREAD)
|
||||
@@ -2343,23 +2306,6 @@ void init_RU_proc(RU_t *ru) {
|
||||
LOG_I(PHY,"%s() DJP - added creation of pthread_prach\n", __FUNCTION__);
|
||||
pthread_create( &proc->pthread_prach, attr_prach, ru_thread_prach, (void *)ru );
|
||||
ru->state=RU_RUN;
|
||||
if(!get_softmodem_params()->emulate_rf)
|
||||
{
|
||||
fill_rf_config(ru,ru->rf_config_file);
|
||||
init_frame_parms(ru->frame_parms,1);
|
||||
ru->frame_parms->nb_antennas_rx = ru->nb_rx;
|
||||
phy_init_RU(ru);
|
||||
ret = openair0_device_load(&ru->rfdevice,&ru->openair0_cfg);
|
||||
if (ret < 0) {
|
||||
LOG_I(PHY,"Exiting, cannot load device. Make sure that your SDR board is connected!\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (setup_RU_buffers(ru)!=0) {
|
||||
LOG_I(PHY,"Exiting, cannot initialize RU Buffers\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (get_thread_worker_conf() == WORKER_ENABLE) {
|
||||
@@ -2368,7 +2314,7 @@ void init_RU_proc(RU_t *ru) {
|
||||
}
|
||||
|
||||
if (opp_enabled == 1) pthread_create(&ru->ru_stats_thread,NULL,ru_stats_thread,(void *)ru);
|
||||
|
||||
/*
|
||||
if (ru->function == eNodeB_3GPP) {
|
||||
usleep(10000);
|
||||
LOG_I(PHY, "Signaling main thread that RU %d (is_slave %d,send_dmrs %d) is ready in state %s\n",ru->idx,ru->is_slave,ru->generate_dmrs_sync,ru_states[ru->state]);
|
||||
@@ -2377,6 +2323,7 @@ void init_RU_proc(RU_t *ru) {
|
||||
pthread_cond_signal(&RC.ru_cond);
|
||||
AssertFatal((ret=pthread_mutex_unlock(&RC.ru_mutex))==0,"mutex_unlock returns %d\n",ret);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -2539,6 +2486,7 @@ void init_precoding_weights(PHY_VARS_eNB *eNB) {
|
||||
void set_function_spec_param(RU_t *ru) {
|
||||
int ret;
|
||||
|
||||
|
||||
switch (ru->if_south) {
|
||||
case LOCAL_RF: // this is an RU with integrated RF (RRU, eNB)
|
||||
if (ru->function == NGFI_RRU_IF5) { // IF5 RRU
|
||||
@@ -2559,10 +2507,10 @@ void set_function_spec_param(RU_t *ru) {
|
||||
reset_meas(&ru->compression);
|
||||
reset_meas(&ru->transport);
|
||||
ret = openair0_transport_load(&ru->ifdevice,&ru->openair0_cfg,&ru->eth_params);
|
||||
printf("openair0_transport_init returns %d for ru_id %d\n", ret, ru->idx);
|
||||
LOG_I(PHY,"NGFI_RRU_IF5: openair0_transport_init returns %d for ru_id %d\n", ret, ru->idx);
|
||||
|
||||
if (ret<0) {
|
||||
printf("Exiting, cannot initialize transport protocol\n");
|
||||
LOG_I(PHY,"Exiting, cannot initialize transport protocol\n");
|
||||
exit(-1);
|
||||
}
|
||||
} else if (ru->function == NGFI_RRU_IF4p5) {
|
||||
@@ -2583,10 +2531,10 @@ void set_function_spec_param(RU_t *ru) {
|
||||
reset_meas(&ru->compression);
|
||||
reset_meas(&ru->transport);
|
||||
ret = openair0_transport_load(&ru->ifdevice,&ru->openair0_cfg,&ru->eth_params);
|
||||
printf("openair0_transport_init returns %d for ru_id %d\n", ret, ru->idx);
|
||||
LOG_I(PHY,"NGFI_RRU_if4p5 : openair0_transport_init returns %d for ru_id %d\n", ret, ru->idx);
|
||||
|
||||
if (ret<0) {
|
||||
printf("Exiting, cannot initialize transport protocol\n");
|
||||
LOG_I(PHY,"Exiting, cannot initialize transport protocol\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
@@ -2606,7 +2554,7 @@ void set_function_spec_param(RU_t *ru) {
|
||||
ru->fh_south_out = tx_rf; // local synchronous RF TX
|
||||
ru->start_rf = start_rf; // need to start the local RF interface
|
||||
ru->stop_rf = stop_rf;
|
||||
printf("configuring ru_id %d (start_rf %p)\n", ru->idx, start_rf);
|
||||
LOG_I(PHY,"NFGI_RRU_IF4p5: configuring ru_id %d (start_rf %p)\n", ru->idx, start_rf);
|
||||
/*
|
||||
if (ru->function == eNodeB_3GPP) { // configure RF parameters only for 3GPP eNodeB, we need to get them from RAU otherwise
|
||||
fill_rf_config(ru,rf_config_file);
|
||||
@@ -2616,7 +2564,7 @@ void set_function_spec_param(RU_t *ru) {
|
||||
|
||||
ret = openair0_device_load(&ru->rfdevice,&ru->openair0_cfg);
|
||||
if (setup_RU_buffers(ru)!=0) {
|
||||
printf("Exiting, cannot initialize RU Buffers\n");
|
||||
LOG_I(PHY,"Exiting, cannot initialize RU Buffers\n");
|
||||
exit(-1);
|
||||
}*/
|
||||
break;
|
||||
@@ -2629,25 +2577,22 @@ void set_function_spec_param(RU_t *ru) {
|
||||
|
||||
if (ru->if_timing == synch_to_other) {
|
||||
ru->fh_south_in = fh_slave_south_in; // synchronize to master
|
||||
ru->fh_south_out = fh_if5_mobipass_south_out; // use send_IF5 for mobipass
|
||||
ru->fh_south_asynch_in = fh_if5_south_asynch_in_mobipass; // UL is asynchronous
|
||||
} else {
|
||||
ru->fh_south_in = fh_if5_south_in; // synchronous IF5 reception
|
||||
ru->fh_south_out = fh_if5_south_out; // synchronous IF5 transmission
|
||||
ru->fh_south_asynch_in = NULL; // no asynchronous UL
|
||||
}
|
||||
|
||||
ru->start_rf = NULL; // no local RF
|
||||
ru->start_rf = ru->eth_params.transp_preference == ETH_UDP_IF5_ECPRI_MODE ? start_streaming : NULL;
|
||||
ru->stop_rf = NULL;
|
||||
ru->start_if = start_if; // need to start if interface for IF5
|
||||
ru->ifdevice.host_type = RAU_HOST;
|
||||
ru->ifdevice.eth_params = &ru->eth_params;
|
||||
ru->ifdevice.configure_rru = configure_ru;
|
||||
ret = openair0_transport_load(&ru->ifdevice,&ru->openair0_cfg,&ru->eth_params);
|
||||
printf("openair0_transport_init returns %d for ru_id %d\n", ret, ru->idx);
|
||||
LOG_I(PHY,"REMOTE_IF5: openair0_transport_init returns %d for ru_id %d\n", ret, ru->idx);
|
||||
|
||||
if (ret<0) {
|
||||
printf("Exiting, cannot initialize transport protocol\n");
|
||||
LOG_I(PHY,"Exiting, cannot initialize transport protocol\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
@@ -2670,10 +2615,10 @@ void set_function_spec_param(RU_t *ru) {
|
||||
ru->ifdevice.eth_params = &ru->eth_params;
|
||||
ru->ifdevice.configure_rru = configure_ru;
|
||||
ret = openair0_transport_load(&ru->ifdevice, &ru->openair0_cfg, &ru->eth_params);
|
||||
printf("openair0_transport_init returns %d for ru_id %d\n", ret, ru->idx);
|
||||
LOG_I(PHY,"REMOTE IF4p5: openair0_transport_init returns %d for ru_id %d\n", ret, ru->idx);
|
||||
|
||||
if (ret<0) {
|
||||
printf("Exiting, cannot initialize transport protocol\n");
|
||||
LOG_I(PHY,"Exiting, cannot initialize transport protocol\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
@@ -2687,12 +2632,14 @@ void set_function_spec_param(RU_t *ru) {
|
||||
}
|
||||
|
||||
malloc_IF4p5_buffer(ru);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(PHY,"RU with invalid or unknown southbound interface type %d\n",ru->if_south);
|
||||
break;
|
||||
} // switch on interface type
|
||||
|
||||
}
|
||||
|
||||
//extern void RCconfig_RU(void);
|
||||
@@ -2782,6 +2729,11 @@ void init_RU(char *rf_config_file, int send_dmrssync) {
|
||||
|
||||
LOG_I(PHY, "Initializing RRU descriptor %d : (%s,%s,%d)\n", ru_id, ru_if_types[ru->if_south], NB_timing[ru->if_timing], ru->function);
|
||||
set_function_spec_param(ru);
|
||||
if (ru->function != NGFI_RRU_IF4p5 && ru->function != NGFI_RRU_IF5) {
|
||||
fill_rf_config(ru,ru->rf_config_file);
|
||||
init_frame_parms(ru->frame_parms,1);
|
||||
}
|
||||
|
||||
LOG_I(PHY, "Starting ru_thread %d, is_slave %d, send_dmrs %d\n", ru_id, ru->is_slave, ru->generate_dmrs_sync);
|
||||
init_RU_proc(ru);
|
||||
} // for ru_id
|
||||
@@ -2795,7 +2747,7 @@ void stop_ru(RU_t *ru) {
|
||||
#if defined(PRE_SCD_THREAD) || defined(PHY_TX_THREAD)
|
||||
int *status;
|
||||
#endif
|
||||
printf("Stopping RU %p processing threads\n",(void *)ru);
|
||||
LOG_I(PHY,"Stopping RU %p processing threads\n",(void *)ru);
|
||||
#if defined(PRE_SCD_THREAD)
|
||||
|
||||
if(ru) {
|
||||
@@ -2849,7 +2801,7 @@ void init_ru_vnf(void) {
|
||||
pthread_mutex_init(&RC.ru_mutex,NULL);
|
||||
pthread_cond_init(&RC.ru_cond,NULL);
|
||||
// read in configuration file)
|
||||
printf("configuring RU from file\n");
|
||||
LOG_I(PHY,"configuring RU from file\n");
|
||||
RCconfig_RU();
|
||||
LOG_I(PHY,"number of L1 instances %d, number of RU %d, number of CPU cores %d\n",RC.nb_L1_inst,RC.nb_RU,get_nprocs());
|
||||
|
||||
@@ -2939,7 +2891,7 @@ void RCconfig_RU(void) {
|
||||
RC.ru[j] = (RU_t *)malloc(sizeof(RU_t));
|
||||
memset((void *)RC.ru[j],0,sizeof(RU_t));
|
||||
RC.ru[j]->idx = j;
|
||||
printf("Creating RC.ru[%d]:%p\n", j, RC.ru[j]);
|
||||
LOG_I(PHY,"Creating RC.ru[%d]:%p\n", j, RC.ru[j]);
|
||||
RC.ru[j]->if_timing = synch_to_ext_device;
|
||||
|
||||
if (RC.nb_L1_inst >0)
|
||||
@@ -2949,7 +2901,7 @@ void RCconfig_RU(void) {
|
||||
|
||||
for (i=0; i<RC.ru[j]->num_eNB; i++) RC.ru[j]->eNB_list[i] = RC.eNB[RUParamList.paramarray[j][RU_ENB_LIST_IDX].iptr[i]][0];
|
||||
|
||||
RC.ru[j]->has_ctrl_prt = 1;
|
||||
RC.ru[j]->has_ctrl_prt = 0;
|
||||
|
||||
if (config_isparamset(RUParamList.paramarray[j], RU_SDR_ADDRS)) {
|
||||
RC.ru[j]->openair0_cfg.sdr_addrs = strdup(*(RUParamList.paramarray[j][RU_SDR_ADDRS].strptr));
|
||||
@@ -2996,7 +2948,7 @@ void RCconfig_RU(void) {
|
||||
RC.ru[j]->if_south = LOCAL_RF;
|
||||
RC.ru[j]->function = eNodeB_3GPP;
|
||||
RC.ru[j]->state = RU_RUN;
|
||||
printf("Setting function for RU %d to eNodeB_3GPP\n",j);
|
||||
LOG_I(PHY,"Setting function for RU %d to eNodeB_3GPP\n",j);
|
||||
} else {
|
||||
RC.ru[j]->eth_params.local_if_name = strdup(*(RUParamList.paramarray[j][RU_LOCAL_IF_NAME_IDX].strptr));
|
||||
RC.ru[j]->eth_params.my_addr = strdup(*(RUParamList.paramarray[j][RU_LOCAL_ADDRESS_IDX].strptr));
|
||||
@@ -3006,42 +2958,43 @@ void RCconfig_RU(void) {
|
||||
|
||||
// Check if control port set
|
||||
if (!(config_isparamset(RUParamList.paramarray[j],RU_REMOTE_PORTC_IDX)) ) {
|
||||
printf("Removing control port for RU %d\n",j);
|
||||
LOG_I(PHY,"Removing control port for RU %d\n",j);
|
||||
RC.ru[j]->has_ctrl_prt = 0;
|
||||
} else {
|
||||
RC.ru[j]->eth_params.my_portc = *(RUParamList.paramarray[j][RU_LOCAL_PORTC_IDX].uptr);
|
||||
RC.ru[j]->eth_params.remote_portc = *(RUParamList.paramarray[j][RU_REMOTE_PORTC_IDX].uptr);
|
||||
printf(" Control port %u \n",RC.ru[j]->eth_params.my_portc);
|
||||
LOG_I(PHY," Control port %u \n",RC.ru[j]->eth_params.my_portc);
|
||||
}
|
||||
|
||||
if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp") == 0) {
|
||||
RC.ru[j]->if_south = LOCAL_RF;
|
||||
RC.ru[j]->function = NGFI_RRU_IF5;
|
||||
RC.ru[j]->eth_params.transp_preference = ETH_UDP_MODE;
|
||||
printf("Setting function for RU %d to NGFI_RRU_IF5 (udp)\n",j);
|
||||
LOG_I(PHY,"Setting function for RU %d to NGFI_RRU_IF5 (udp)\n",j);
|
||||
} else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw") == 0) {
|
||||
RC.ru[j]->if_south = LOCAL_RF;
|
||||
RC.ru[j]->function = NGFI_RRU_IF5;
|
||||
RC.ru[j]->eth_params.transp_preference = ETH_RAW_MODE;
|
||||
printf("Setting function for RU %d to NGFI_RRU_IF5 (raw)\n",j);
|
||||
LOG_I(PHY,"Setting function for RU %d to NGFI_RRU_IF5 (raw)\n",j);
|
||||
} else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp_if4p5") == 0) {
|
||||
RC.ru[j]->if_south = LOCAL_RF;
|
||||
RC.ru[j]->function = NGFI_RRU_IF4p5;
|
||||
RC.ru[j]->eth_params.transp_preference = ETH_UDP_IF4p5_MODE;
|
||||
printf("Setting function for RU %d to NGFI_RRU_IF4p5 (udp)\n",j);
|
||||
RC.ru[j]->has_ctrl_prt =1;
|
||||
LOG_I(PHY,"Setting function for RU %d to NGFI_RRU_IF4p5 (udp)\n",j);
|
||||
} else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw_if4p5") == 0) {
|
||||
RC.ru[j]->if_south = LOCAL_RF;
|
||||
RC.ru[j]->function = NGFI_RRU_IF4p5;
|
||||
RC.ru[j]->eth_params.transp_preference = ETH_RAW_IF4p5_MODE;
|
||||
printf("Setting function for RU %d to NGFI_RRU_IF4p5 (raw)\n",j);
|
||||
LOG_I(PHY,"Setting function for RU %d to NGFI_RRU_IF4p5 (raw)\n",j);
|
||||
}
|
||||
|
||||
printf("RU %d is_slave=%s\n",j,*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr));
|
||||
LOG_I(PHY,"RU %d is_slave=%s\n",j,*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr));
|
||||
|
||||
if (strcmp(*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr), "yes") == 0) RC.ru[j]->is_slave=1;
|
||||
else RC.ru[j]->is_slave=0;
|
||||
|
||||
printf("RU %d ota_sync_enabled=%s\n",j,*(RUParamList.paramarray[j][RU_OTA_SYNC_ENABLE_IDX].strptr));
|
||||
LOG_I(PHY,"RU %d ota_sync_enabled=%s\n",j,*(RUParamList.paramarray[j][RU_OTA_SYNC_ENABLE_IDX].strptr));
|
||||
|
||||
if (strcmp(*(RUParamList.paramarray[j][RU_OTA_SYNC_ENABLE_IDX].strptr), "yes") == 0) RC.ru[j]->ota_sync_enable=1;
|
||||
else RC.ru[j]->ota_sync_enable=0;
|
||||
@@ -3055,8 +3008,8 @@ void RCconfig_RU(void) {
|
||||
|
||||
for (i=0; i<RC.ru[j]->num_bands; i++) RC.ru[j]->band[i] = RUParamList.paramarray[j][RU_BAND_LIST_IDX].iptr[i];
|
||||
} //strcmp(local_rf, "yes") == 0
|
||||
else {
|
||||
printf("RU %d: Transport %s\n",j,*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr));
|
||||
else {
|
||||
LOG_I(PHY,"RU %d: Transport %s\n",j,*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr));
|
||||
RC.ru[j]->eth_params.local_if_name = strdup(*(RUParamList.paramarray[j][RU_LOCAL_IF_NAME_IDX].strptr));
|
||||
RC.ru[j]->eth_params.my_addr = strdup(*(RUParamList.paramarray[j][RU_LOCAL_ADDRESS_IDX].strptr));
|
||||
RC.ru[j]->eth_params.remote_addr = strdup(*(RUParamList.paramarray[j][RU_REMOTE_ADDRESS_IDX].strptr));
|
||||
@@ -3064,34 +3017,34 @@ void RCconfig_RU(void) {
|
||||
RC.ru[j]->eth_params.remote_portc = *(RUParamList.paramarray[j][RU_REMOTE_PORTC_IDX].uptr);
|
||||
RC.ru[j]->eth_params.my_portd = *(RUParamList.paramarray[j][RU_LOCAL_PORTD_IDX].uptr);
|
||||
RC.ru[j]->eth_params.remote_portd = *(RUParamList.paramarray[j][RU_REMOTE_PORTD_IDX].uptr);
|
||||
|
||||
|
||||
if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp") == 0) {
|
||||
RC.ru[j]->if_south = REMOTE_IF5;
|
||||
RC.ru[j]->function = NGFI_RAU_IF5;
|
||||
RC.ru[j]->eth_params.transp_preference = ETH_UDP_MODE;
|
||||
RC.ru[j]->if_south = REMOTE_IF5;
|
||||
RC.ru[j]->function = NGFI_RAU_IF5;
|
||||
RC.ru[j]->eth_params.transp_preference = ETH_UDP_MODE;
|
||||
} else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp_ecpri_if5") == 0) {
|
||||
RC.ru[j]->if_south = REMOTE_IF5;
|
||||
RC.ru[j]->function = NGFI_RAU_IF5;
|
||||
RC.ru[j]->eth_params.transp_preference = ETH_UDP_IF5_ECPRI_MODE;
|
||||
} else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw") == 0) {
|
||||
RC.ru[j]->if_south = REMOTE_IF5;
|
||||
RC.ru[j]->function = NGFI_RAU_IF5;
|
||||
RC.ru[j]->eth_params.transp_preference = ETH_RAW_MODE;
|
||||
RC.ru[j]->if_south = REMOTE_IF5;
|
||||
RC.ru[j]->function = NGFI_RAU_IF5;
|
||||
RC.ru[j]->eth_params.transp_preference = ETH_RAW_MODE;
|
||||
} else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp_if4p5") == 0) {
|
||||
RC.ru[j]->if_south = REMOTE_IF4p5;
|
||||
RC.ru[j]->function = NGFI_RAU_IF4p5;
|
||||
RC.ru[j]->eth_params.transp_preference = ETH_UDP_IF4p5_MODE;
|
||||
RC.ru[j]->if_south = REMOTE_IF4p5;
|
||||
RC.ru[j]->function = NGFI_RAU_IF4p5;
|
||||
RC.ru[j]->eth_params.transp_preference = ETH_UDP_IF4p5_MODE;
|
||||
RC.ru[j]->has_ctrl_prt = 1;
|
||||
} else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw_if4p5") == 0) {
|
||||
RC.ru[j]->if_south = REMOTE_IF4p5;
|
||||
RC.ru[j]->function = NGFI_RAU_IF4p5;
|
||||
RC.ru[j]->eth_params.transp_preference = ETH_RAW_IF4p5_MODE;
|
||||
} else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw_if5_mobipass") == 0) {
|
||||
RC.ru[j]->if_south = REMOTE_IF5;
|
||||
RC.ru[j]->function = NGFI_RAU_IF5;
|
||||
RC.ru[j]->if_timing = synch_to_other;
|
||||
RC.ru[j]->eth_params.transp_preference = ETH_RAW_IF5_MOBIPASS;
|
||||
RC.ru[j]->if_south = REMOTE_IF4p5;
|
||||
RC.ru[j]->function = NGFI_RAU_IF4p5;
|
||||
RC.ru[j]->eth_params.transp_preference = ETH_RAW_IF4p5_MODE;
|
||||
|
||||
if (strcmp(*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr), "yes") == 0) RC.ru[j]->is_slave=1;
|
||||
else RC.ru[j]->is_slave=0;
|
||||
}
|
||||
|
||||
if (strcmp(*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr), "yes") == 0) RC.ru[j]->is_slave=1;
|
||||
else RC.ru[j]->is_slave=0;
|
||||
} /* strcmp(local_rf, "yes") != 0 */
|
||||
|
||||
|
||||
RC.ru[j]->nb_tx = *(RUParamList.paramarray[j][RU_NB_TX_IDX].uptr);
|
||||
RC.ru[j]->nb_rx = *(RUParamList.paramarray[j][RU_NB_RX_IDX].uptr);
|
||||
RC.ru[j]->att_tx = *(RUParamList.paramarray[j][RU_ATT_TX_IDX].uptr);
|
||||
|
||||
@@ -1,41 +1,67 @@
|
||||
[*]
|
||||
[*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI
|
||||
[*] Sun Jul 31 13:30:42 2016
|
||||
[*] GTKWave Analyzer v3.3.66 (w)1999-2015 BSI
|
||||
[*] Tue Sep 24 06:59:08 2019
|
||||
[*]
|
||||
[dumpfile] "/tmp/openair_dump_eNB.vcd"
|
||||
[dumpfile_mtime] "Sun Jul 31 13:21:59 2016"
|
||||
[dumpfile_size] 18273240
|
||||
[savefile] "/home/fourmi/openairinterface5g/targets/RT/USER/rcc_if5.gtkw"
|
||||
[timestart] 24070893000
|
||||
[size] 1301 716
|
||||
[pos] 309 0
|
||||
*-19.793451 29026062100 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
|
||||
[sst_width] 284
|
||||
[signals_width] 262
|
||||
[dumpfile_mtime] "Mon Sep 23 20:04:56 2019"
|
||||
[dumpfile_size] 1625759
|
||||
[savefile] "/home/orange/aw2s/openairinterface5g/targets/RT/USER/rcc_if5.gtkw"
|
||||
[timestart] 12600104000
|
||||
[size] 1215 1000
|
||||
[pos] 0 22
|
||||
*-19.506693 12600920638 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
|
||||
[sst_width] 386
|
||||
[signals_width] 344
|
||||
[sst_expanded] 1
|
||||
[sst_vpaned_height] 294
|
||||
[sst_vpaned_height] 303
|
||||
@29
|
||||
functions.send_if5
|
||||
@28
|
||||
functions.recv_if5
|
||||
@24
|
||||
variables.trx_ts[63:0]
|
||||
variables.trx_tst[63:0]
|
||||
@28
|
||||
functions.send_if5
|
||||
functions.recv_if5
|
||||
functions.eNB_thread_rxtx0
|
||||
@24
|
||||
variables.frame_number_RX0_RU[63:0]
|
||||
variables.subframe_number_RX0_RU[63:0]
|
||||
variables.frame_number_TX0_RU[63:0]
|
||||
variables.subframe_number_TX0_RU[63:0]
|
||||
@28
|
||||
functions.mac_schedule_dlsch
|
||||
functions.macxface_eNB_dlsch_ulsch_scheduler
|
||||
functions.macxface_ue_scheduler
|
||||
functions.phy_eNB_ofdm_mod_l
|
||||
@24
|
||||
variables.frame_number_RX0_eNB[63:0]
|
||||
variables.subframe_number_RX0_eNB[63:0]
|
||||
variables.frame_number_TX0_eNB[63:0]
|
||||
variables.subframe_number_TX0_eNB[63:0]
|
||||
@28
|
||||
functions.eNB_thread_rxtx1
|
||||
@24
|
||||
variables.frame_number_RX1_eNB[63:0]
|
||||
variables.subframe_number_RX1_eNB[63:0]
|
||||
variables.frame_number_TX1_eNB[63:0]
|
||||
variables.subframe_number_TX1_eNB[63:0]
|
||||
@28
|
||||
functions.phy_eNB_dlsch_modulation
|
||||
functions.phy_eNB_dlsch_encoding
|
||||
functions.phy_eNB_dlsch_scrambling
|
||||
functions.phy_eNB_beam_precoding
|
||||
functions.phy_enb_pdcch_tx
|
||||
functions.phy_enb_prach_rx
|
||||
functions.phy_procedures_ru_feprx0
|
||||
functions.phy_procedures_eNb_rx_uespec0
|
||||
functions.phy_procedures_eNb_rx_uespec1
|
||||
functions.phy_enb_sfgen
|
||||
functions.phy_procedures_eNb_tx0
|
||||
functions.phy_procedures_eNb_tx1
|
||||
functions.phy_procedures_ru_feprx1
|
||||
functions.phy_procedures_ru_feptx_ofdm0
|
||||
functions.phy_procedures_ru_feptx_ofdm1
|
||||
functions.phy_procedures_ru_feptx_prec0
|
||||
functions.phy_procedures_ru_feptx_prec1
|
||||
functions.eNB_thread_rxtx1
|
||||
functions.phy_enb_sfgen
|
||||
functions.phy_eNB_slot_fep
|
||||
functions.phy_enb_prach_rx
|
||||
@24
|
||||
variables.dci_info[63:0]
|
||||
|
||||
@@ -524,7 +524,7 @@ void* ru_thread_control( void* param )
|
||||
}
|
||||
|
||||
|
||||
ru->state = (ru->function==eNodeB_3GPP)? RU_RUN : RU_IDLE;
|
||||
ru->state = (ru->function==eNodeB_3GPP || ru->if_south == REMOTE_IF5)? RU_RUN : RU_IDLE;
|
||||
LOG_I(PHY,"Control channel ON for RU %d\n", ru->idx);
|
||||
|
||||
while (!oai_exit) // Change the cond
|
||||
|
||||
Reference in New Issue
Block a user