modifications for eCPRI radio units, increased averaging in eNodeB subband I0 measurements

This commit is contained in:
Raymond Knopp
2020-11-03 06:01:42 +01:00
parent 6c414a80d4
commit 8b92c53141
6 changed files with 38 additions and 50 deletions
-12
View File
@@ -41,13 +41,9 @@
#define OAI_RF_LIBNAME "oai_device"
/* name of shared library implementing the transport */
#define OAI_TP_LIBNAME "oai_transpro"
<<<<<<< HEAD
/* name of shared library implementing a third-party transport */
#define OAI_THIRDPARTY_TP_LIBNAME "thirdparty_transpro"
/* name of shared library implementing the basic/rf simulator */
=======
/* name of shared library implementing the rf simulator */
>>>>>>> origin/develop
#define OAI_RFSIM_LIBNAME "rfsimulator"
/* name of shared library implementing the basic simulator */
#define OAI_BASICSIM_LIBNAME "tcp_bridge_oai"
@@ -57,14 +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
<<<<<<< HEAD
#define RAU_REMOTE_THIRDPARTY_RADIO_HEAD 2
=======
#define MAX_WRITE_THREAD_PACKAGE 10
#define MAX_WRITE_THREAD_BUFFER_SIZE 8
>>>>>>> origin/develop
#ifndef MAX_CARDS
#define MAX_CARDS 8
#endif
@@ -465,7 +456,6 @@ struct openair0_device_t {
*/
void (*configure_rru)(int idx, void *arg);
<<<<<<< HEAD
/*! \brief Pointer to generic RRU private information
*/
@@ -485,7 +475,6 @@ struct openair0_device_t {
*/
int (*thirdparty_startstreaming)(openair0_device *device);
=======
/*! \brief RRU Configuration callback
* \param idx RU index
* \param arg pointer to capabilities or configuration
@@ -496,7 +485,6 @@ struct openair0_device_t {
* \return a pointer to the parameter
*/
void *(*get_internal_parameter)(char *id);
>>>>>>> origin/develop
};
/* type of device init function, implemented in shared lib */
+8 -10
View File
@@ -298,7 +298,7 @@ int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, voi
#endif
// bring RX data into 12 LSBs for softmodem RX
// bring TX data into 12 LSBs for softmodem RX
for (int j=0; j<nsamps2; j++) {
#if defined(__x86_64__) || defined(__i386__)
#ifdef __AVX2__
@@ -332,7 +332,7 @@ int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, voi
// ECPRI PC_ID (2 bytes)
*(uint16_t *)(buff2 + 4) = cc;
// OAI modified SEQ_ID (4 bytes)
*(uint64_t *)(buff2 + 6) = ((uint64_t )timestamp)*3;
*(uint64_t *)(buff2 + 6) = ((uint64_t )timestamp)*6;
/*
printf("ECPRI TX (REV %x, MessType %d, Payload size %d, PC_ID %d, TS %llu\n",
@@ -466,7 +466,7 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, voi
/* 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/3;
*timestamp = *timestamp/6;
// handle 1.4,3,5,10,15 MHz cases
*cc = *(uint16_t*)(temp_rx0 + ECPRICOMMON_BYTES);
}
@@ -475,19 +475,17 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, voi
}
// populate receive buffer in lower 12-bits from 16-bit representation
for (int j=1; j<nsamps2; j++) {
for (int j=1; j<nsamps2; j++) {
#if defined(__x86_64__) || defined(__i386__)
#ifdef __AVX2__
// LOG_I(PHY,"((__m256i *)buff)[%d-1] = %p, temp_rx[%d] = %p\n",
// j,&((__m256i *)buff)[j-1],j,&temp_rx[j]);
((__m256i *)buff)[j-1] = _mm256_srai_epi16(temp_rx[j],4);
((__m256i *)buff)[j-1] = _mm256_srai_epi16(temp_rx[j],2);
#else
((__m128i *)buff)[j-1] = _mm_srai_epi16(temp_rx[j],4);
((__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],4);
((int16x8_t *)buff)[j] = vshrq_n_s16(temp_rx[i][j],2);
#endif
}
}
return (payload_size>>2);