Merge remote-tracking branch 'origin/trx_thread_param' into develop_integration_2020_w26
This commit is contained in:
@@ -330,7 +330,10 @@ int trx_brf_set_gains(openair0_device* device,
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
|
||||
int trx_brf_write_init(openair0_device *device)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define RXDCLENGTH 16384
|
||||
int16_t cos_fsover8[8] = {2047, 1447, 0, -1448, -2047, -1448, 0, 1447};
|
||||
@@ -1145,6 +1148,7 @@ int device_init(openair0_device *device,
|
||||
device->trx_stop_func = trx_brf_stop;
|
||||
device->trx_set_freq_func = trx_brf_set_freq;
|
||||
device->trx_set_gains_func = trx_brf_set_gains;
|
||||
device->trx_write_init = trx_brf_write_init;
|
||||
device->openair0_cfg = openair0_cfg;
|
||||
device->priv = (void *)brf;
|
||||
|
||||
|
||||
@@ -197,6 +197,10 @@ int trx_eth_reset_stats(openair0_device* device)
|
||||
return(0);
|
||||
}
|
||||
|
||||
int trx_eth_write_init(openair0_device *device)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ethernet_tune(openair0_device *device,
|
||||
unsigned int option,
|
||||
@@ -415,8 +419,9 @@ int transport_init(openair0_device *device,
|
||||
device->trx_reset_stats_func = trx_eth_reset_stats;
|
||||
device->trx_end_func = trx_eth_end;
|
||||
device->trx_stop_func = trx_eth_stop;
|
||||
device->trx_set_freq_func = trx_eth_set_freq;
|
||||
device->trx_set_gains_func = trx_eth_set_gains;
|
||||
device->trx_set_freq_func = trx_eth_set_freq;
|
||||
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_write_func = trx_eth_write_raw;
|
||||
|
||||
@@ -510,6 +510,11 @@ int trx_iris_reset_stats(openair0_device *device) {
|
||||
|
||||
}
|
||||
|
||||
int trx_iris_write_init(openair0_device *device)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
extern "C" {
|
||||
/*! \brief Initialize Openair Iris target. It returns 0 if OK
|
||||
@@ -831,6 +836,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
|
||||
device->trx_set_freq_func = trx_iris_set_freq;
|
||||
device->trx_set_gains_func = trx_iris_set_gains;
|
||||
device->openair0_cfg = openair0_cfg;
|
||||
device->trx_write_init = trx_iris_write_init;
|
||||
|
||||
s->sample_rate = openair0_cfg[0].sample_rate;
|
||||
// TODO:
|
||||
|
||||
@@ -350,6 +350,10 @@ void trx_lms_end(openair0_device *device) {
|
||||
|
||||
}
|
||||
|
||||
int trx_lms_write_init(openair0_device *device)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
extern "C" {
|
||||
/*! \brief Initialize Openair LMSSDR target. It returns 0 if OK
|
||||
* \param device the hardware to use
|
||||
@@ -406,6 +410,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg){
|
||||
device->trx_stop_func = trx_lms_stop;
|
||||
device->trx_set_freq_func = trx_lms_set_freq;
|
||||
device->trx_set_gains_func = trx_lms_set_gains;
|
||||
device->trx_write_init = trx_lms_write_init;
|
||||
|
||||
device->openair0_cfg = openair0_cfg;
|
||||
|
||||
|
||||
@@ -70,6 +70,8 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
extern int usrp_tx_thread;
|
||||
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -345,7 +347,6 @@ static int trx_usrp_write(openair0_device *device,
|
||||
int flags_msb = (flags>>8)&0xff;
|
||||
|
||||
int end;
|
||||
int write_tread = 0;
|
||||
openair0_thread_t *write_thread = &device->write_thread;
|
||||
openair0_write_package_t *write_package = write_thread->write_package;
|
||||
|
||||
@@ -382,7 +383,7 @@ static int trx_usrp_write(openair0_device *device,
|
||||
last_packet_state = true;
|
||||
}
|
||||
|
||||
if(write_tread == 0){
|
||||
if(usrp_tx_thread == 0){
|
||||
#if defined(__x86_64) || defined(__i386__)
|
||||
#ifdef __AVX2__
|
||||
nsamps2 = (nsamps+7)>>3;
|
||||
@@ -586,7 +587,7 @@ void *trx_usrp_write_thread(void * arg){
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int trx_write_init(openair0_device *device){
|
||||
int trx_usrp_write_init(openair0_device *device){
|
||||
|
||||
uhd::set_thread_priority_safe(1.0);
|
||||
openair0_thread_t *write_thread = &device->write_thread;
|
||||
@@ -932,7 +933,7 @@ extern "C" {
|
||||
device->trx_stop_func = trx_usrp_stop;
|
||||
device->trx_set_freq_func = trx_usrp_set_freq;
|
||||
device->trx_set_gains_func = trx_usrp_set_gains;
|
||||
device->trx_write_init = trx_write_init;
|
||||
device->trx_write_init = trx_usrp_write_init;
|
||||
|
||||
|
||||
// hotfix! to be checked later
|
||||
|
||||
@@ -243,6 +243,11 @@ ts += nsamps;
|
||||
return nsamps;
|
||||
}
|
||||
|
||||
int tcp_bridge_write_init(openair0_device *device)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
__attribute__((__visibility__("default")))
|
||||
int device_init(openair0_device* device, openair0_config_t *openair0_cfg)
|
||||
{
|
||||
@@ -267,6 +272,7 @@ int device_init(openair0_device* device, openair0_config_t *openair0_cfg)
|
||||
device->trx_set_gains_func = tcp_bridge_set_gains;
|
||||
device->trx_write_func = tcp_bridge_write;
|
||||
device->trx_read_func = tcp_bridge_read;
|
||||
device->trx_write_init = tcp_bridge_write_init;
|
||||
|
||||
device->priv = tcp_bridge;
|
||||
|
||||
|
||||
+20
-13
@@ -679,7 +679,11 @@ void rx_rf(RU_t *ru,
|
||||
resynch=1;
|
||||
}
|
||||
|
||||
proc->timestamp_rx = ts-ru->ts_offset;
|
||||
if(get_softmodem_params()->emulate_rf) {
|
||||
proc->timestamp_rx = old_ts + fp->samples_per_tti;
|
||||
} else {
|
||||
proc->timestamp_rx = ts-ru->ts_offset;
|
||||
}
|
||||
|
||||
// AssertFatal(rxs == fp->samples_per_tti,
|
||||
// "rx_rf: Asked for %d samples, got %d from SDR\n",fp->samples_per_tti,rxs);
|
||||
@@ -2337,19 +2341,22 @@ 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;
|
||||
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(!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 (setup_RU_buffers(ru)!=0) {
|
||||
LOG_I(PHY,"Exiting, cannot initialize RU Buffers\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -170,6 +170,7 @@ extern void init_eNB_afterRU(void);
|
||||
int transmission_mode=1;
|
||||
int emulate_rf = 0;
|
||||
int numerology = 0;
|
||||
int usrp_tx_thread = 0;
|
||||
|
||||
THREAD_STRUCT thread_struct;
|
||||
/* struct for ethernet specific parameters given in eNB conf file */
|
||||
@@ -659,6 +660,7 @@ int main ( int argc, char **argv )
|
||||
initTpool("n", L1proc->threadPool, true);
|
||||
initNotifiedFIFO(L1proc->respEncode);
|
||||
initNotifiedFIFO(L1proc->respDecode);
|
||||
RC.eNB[x][CC_id]->proc.L1_proc_tx.threadPool = L1proc->threadPool;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -155,6 +155,10 @@ extern int sync_var;
|
||||
extern int transmission_mode;
|
||||
extern double cpuf;
|
||||
|
||||
extern int emulate_rf;
|
||||
extern int numerology;
|
||||
extern int usrp_tx_thread;
|
||||
|
||||
// In lte-enb.c
|
||||
extern void stop_eNB(int);
|
||||
extern void kill_eNB_proc(int inst);
|
||||
|
||||
@@ -171,6 +171,8 @@ extern void get_uethreads_params(void);
|
||||
|
||||
int transmission_mode=1;
|
||||
|
||||
int usrp_tx_thread = 0;
|
||||
|
||||
|
||||
char *usrp_args=NULL;
|
||||
char *usrp_clksrc=NULL;
|
||||
|
||||
Reference in New Issue
Block a user