Merge branch 'develop' into develop-new-LMSSDR
Conflicts: targets/RT/USER/lte-softmodem.c
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
# PROMGEN: Xilinx Prom Generator P.20131013
|
||||
# Copyright (c) 1995-2013 Xilinx, Inc. All rights reserved.
|
||||
# PROMGEN: Xilinx Prom Generator O.76xd
|
||||
# Copyright (c) 1995-2011 Xilinx, Inc. All rights reserved.
|
||||
|
||||
SOFTWARE_VERSION P.20131013
|
||||
DATE 6/16/2015 - 16:10
|
||||
SOURCE /homes/maatalla/openair/openair0/express-mimo2/backup_houssem/express-mimo2/grlib-gpl-1.1.0-b4113/designs/express-mimo2/exmimo2_prom.mcs
|
||||
SOFTWARE_VERSION O.76xd
|
||||
DATE 1/ 3/2017 - 11:49
|
||||
SOURCE /homes/kaltenbe/Devel/openair/openairinterface5g/targets/ARCH/EXMIMO/BITSTREAM/exmimo2_prom.mcs
|
||||
DEVICE 8192K
|
||||
DATA_WIDTH 4
|
||||
FILL_DATA 0xFF
|
||||
SIGNATURE 0x41521D58
|
||||
SIGNATURE 0x416AB633
|
||||
START_ADDRESS 0x00000000 END_ADDRESS 0x00406577 DIRECTION_UP "express-mimo2.bit" 6slx150tfgg900
|
||||
|
||||
+139070
-139070
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,9 @@
|
||||
PROMGEN: Xilinx Prom Generator P.20131013
|
||||
Copyright (c) 1995-2013 Xilinx, Inc. All rights reserved.
|
||||
PROMGEN: Xilinx Prom Generator O.76xd
|
||||
Copyright (c) 1995-2011 Xilinx, Inc. All rights reserved.
|
||||
|
||||
promgen -w -p mcs -c FF -o /homes/maatalla/openair/openair0/express-mimo2/backup_houssem/express-mimo2/grlib-gpl-1.1.0-b4113/designs/express-mimo2//exmimo2_prom -s 8192 -u 0000 express-mimo2.bit -spi
|
||||
promgen -w -p mcs -c FF -o /homes/kaltenbe/Devel/openair/openairinterface5g/targets/ARCH/EXMIMO/BITSTREAM//exmimo2_prom -s 8192 -u 0000 express-mimo2.bit -spi
|
||||
|
||||
PROM /homes/maatalla/openair/openair0/express-mimo2/backup_houssem/express-mimo2/grlib-gpl-1.1.0-b4113/designs/express-mimo2/exmimo2_prom.prm map: Tue Jun 16 16:10:48 2015
|
||||
PROM /homes/kaltenbe/Devel/openair/openairinterface5g/targets/ARCH/EXMIMO/BITSTREAM/exmimo2_prom.prm map: Tue Jan 3 11:49:20 2017
|
||||
|
||||
Calculating PROM checksum with fill value ff
|
||||
|
||||
@@ -11,7 +11,7 @@ Format Mcs86 (32-bit)
|
||||
Size 8192K
|
||||
PROM start 0000:0000
|
||||
PROM end 007f:ffff
|
||||
PROM checksum 41521d58
|
||||
PROM checksum 416ab633
|
||||
|
||||
Addr1 Addr2 Date File(s)
|
||||
0000:0000 0040:6577 Jun 16 16:10:43 2015 express-mimo2.bit
|
||||
0000:0000 0040:6577 Jan 3 10:48:16 2017 express-mimo2.bit
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -298,6 +298,8 @@ static void *watchdog_thread(void *arg) {
|
||||
int first_acquisition;
|
||||
struct timespec sleep_time,wait;
|
||||
|
||||
int ret;
|
||||
|
||||
|
||||
wait.tv_sec=0;
|
||||
wait.tv_nsec=50000000L;
|
||||
@@ -405,10 +407,10 @@ static void *watchdog_thread(void *arg) {
|
||||
|
||||
first_acquisition=1;
|
||||
printf("Locking watchdog for first acquisition\n");
|
||||
pthread_mutex_timedlock(&exm->watchdog_mutex,&wait);
|
||||
ret = pthread_mutex_timedlock(&exm->watchdog_mutex,&wait);
|
||||
// main loop to keep up with DMA transfers from exmimo2
|
||||
|
||||
int cnt_diff0=0;
|
||||
unsigned long long cnt_diff0=0;
|
||||
while ((!oai_exit) && (!exm->watchdog_exit)) {
|
||||
|
||||
if (exm->daq_state == running) {
|
||||
@@ -425,7 +427,15 @@ static void *watchdog_thread(void *arg) {
|
||||
exm->last_mbox = mbox;
|
||||
|
||||
if (first_acquisition==0)
|
||||
pthread_mutex_timedlock(&exm->watchdog_mutex,&wait);
|
||||
{
|
||||
ret = pthread_mutex_timedlock(&exm->watchdog_mutex,&wait);
|
||||
if(ret)
|
||||
{
|
||||
// exm->watchdog_exit = 1;
|
||||
printf("watchdog_thread pthread_mutex_timedlock error = %d\n", ret);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
exm->ts += (diff*exm->samples_per_frame/150) ;
|
||||
|
||||
@@ -434,7 +444,7 @@ static void *watchdog_thread(void *arg) {
|
||||
(diff > 16)&&
|
||||
(first_acquisition==0)) {// we're too late so exit
|
||||
exm->watchdog_exit = 1;
|
||||
printf("exiting, too late to keep up\n");
|
||||
printf("exiting, too late to keep up - diff = %d\n", diff);
|
||||
}
|
||||
first_acquisition=0;
|
||||
|
||||
@@ -443,7 +453,7 @@ static void *watchdog_thread(void *arg) {
|
||||
cnt_diff0++;
|
||||
if (cnt_diff0 == 10) {
|
||||
exm->watchdog_exit = 1;
|
||||
printf("exiting, HW stopped\n");
|
||||
printf("exiting, HW stopped %llu\n", cnt_diff0);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -454,9 +464,11 @@ static void *watchdog_thread(void *arg) {
|
||||
(exm->ts - exm->last_ts_rx > exm->samples_per_frame)) {
|
||||
exm->watchdog_exit = 1;
|
||||
printf("RX Overflow, exiting (TS %llu, TS last read %llu)\n",
|
||||
exm->ts,exm->last_ts_rx);
|
||||
(long long unsigned int)exm->ts,(long long unsigned int)exm->last_ts_rx);
|
||||
}
|
||||
// printf("ts %lu, last_ts_rx %lu, mbox %d, diff %d\n",exm->ts, exm->last_ts_rx,mbox,diff);
|
||||
|
||||
if ( !ret )
|
||||
pthread_mutex_unlock(&exm->watchdog_mutex);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -17,12 +17,15 @@ eNBs =
|
||||
|
||||
mobile_country_code = "208";
|
||||
|
||||
mobile_network_code = "95";
|
||||
mobile_network_code = "93";
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "eNodeB_3GPP";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
@@ -34,6 +37,7 @@ eNBs =
|
||||
N_RB_DL = 50;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 110;
|
||||
@@ -46,7 +50,7 @@ eNBs =
|
||||
pucch_nRB_CQI = 1;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pdsch_referenceSignalPower = -15;
|
||||
pdsch_referenceSignalPower = -23;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
@@ -64,9 +68,9 @@ eNBs =
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -90;
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -96;
|
||||
pucch_p0_Nominal = -104;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
@@ -98,6 +102,7 @@ eNBs =
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
|
||||
ue_TransmissionMode = 1;
|
||||
}
|
||||
);
|
||||
|
||||
@@ -133,7 +138,7 @@ eNBs =
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.170";
|
||||
mme_ip_address = ( { ipv4 = "127.0.0.3";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -142,11 +147,11 @@ eNBs =
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.241/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "lo";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24";
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.241/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "lo";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.5/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
|
||||
@@ -19,19 +19,13 @@ eNBs =
|
||||
|
||||
mobile_network_code = "92";
|
||||
|
||||
////////// Channel parameters:
|
||||
// Default Paging DRX of the eNB as defined in TS 36.304
|
||||
default_paging_drx = "PAGING_DRX_256";
|
||||
|
||||
////////// Physical parameters:
|
||||
frame_type = "TDD";
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 39;
|
||||
downlink_frequency = 1910000000L;
|
||||
uplink_frequency_offset = 0;
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "eNodeB_3GPP";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "TDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
@@ -43,15 +37,16 @@ eNBs =
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 25;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 120;
|
||||
prach_root = 22;
|
||||
prach_config_index = 3;
|
||||
rx_gain = 125;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 0;
|
||||
prach_freq_offset = 0;
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 1;
|
||||
pucch_nCS_AN = 0;
|
||||
@@ -61,7 +56,7 @@ eNBs =
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 4;
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "DISABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
@@ -74,9 +69,9 @@ eNBs =
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -95;
|
||||
pusch_alpha = "AL08";
|
||||
pucch_p0_Nominal = -108;
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -103;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
@@ -84,16 +79,16 @@ eNBs =
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 52;
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 2;
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -104;
|
||||
rach_preambleTransMax = 6;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
@@ -107,6 +102,8 @@ eNBs =
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
|
||||
ue_TransmissionMode = 1;
|
||||
}
|
||||
);
|
||||
|
||||
@@ -161,12 +158,12 @@ eNBs =
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="debug";
|
||||
global_log_verbosity ="high";
|
||||
global_log_level ="info";
|
||||
global_log_verbosity ="medium";
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="debug";
|
||||
phy_log_verbosity ="high";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="info";
|
||||
mac_log_verbosity ="high";
|
||||
rlc_log_level ="info";
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
|
||||
mobile_country_code = "208";
|
||||
|
||||
mobile_network_code = "94";
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "eNodeB_3GPP";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "TDD";
|
||||
tdd_config = 1;
|
||||
tdd_config_s = 5;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 40;
|
||||
downlink_frequency = 2350000000L;
|
||||
uplink_frequency_offset = 0;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 25;
|
||||
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 = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 1;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pdsch_referenceSignalPower = -24;
|
||||
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 = -103;
|
||||
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 = -104;
|
||||
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 = "127.0.0.3";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "lo";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "lo";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.4/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
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";
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -149,7 +149,7 @@ eNBs =
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24";
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "lo";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.4/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.5/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ extern pthread_cond_t sync_cond;
|
||||
extern pthread_mutex_t sync_mutex;
|
||||
extern int sync_var;
|
||||
|
||||
extern transmission_mode;
|
||||
extern int transmission_mode;
|
||||
|
||||
//pthread_t main_eNB_thread;
|
||||
|
||||
@@ -934,12 +934,12 @@ void rx_fh_if5(PHY_VARS_eNB *eNB,int *frame, int *subframe) {
|
||||
|
||||
if (proc->first_rx == 0) {
|
||||
if (proc->subframe_rx != *subframe){
|
||||
LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->subframe_rx %d, subframe %d)\n",proc->subframe_rx,subframe);
|
||||
LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->subframe_rx %d, subframe %d)\n",proc->subframe_rx,*subframe);
|
||||
exit_fun("Exiting");
|
||||
}
|
||||
|
||||
if (proc->frame_rx != *frame) {
|
||||
LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->frame_rx %d frame %d)\n",proc->frame_rx,frame);
|
||||
LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->frame_rx %d frame %d)\n",proc->frame_rx,*frame);
|
||||
exit_fun("Exiting");
|
||||
}
|
||||
} else {
|
||||
@@ -1083,7 +1083,9 @@ void wakeup_slaves(eNB_proc_t *proc) {
|
||||
// wake up slave FH thread
|
||||
// lock the FH mutex and make sure the thread is ready
|
||||
if (pthread_mutex_timedlock(&slave_proc->mutex_FH,&wait) != 0) {
|
||||
LOG_E( PHY, "[eNB] ERROR pthread_mutex_lock for eNB CCid %d slave CCid %d (IC %d)\n",proc->CC_id,slave_proc->CC_id);
|
||||
/* TODO: fix this log, what is 'IC'? */
|
||||
/*LOG_E( PHY, "[eNB] ERROR pthread_mutex_lock for eNB CCid %d slave CCid %d (IC %d)\n",proc->CC_id,slave_proc->CC_id);*/
|
||||
LOG_E( PHY, "[eNB] ERROR pthread_mutex_lock for eNB CCid %d slave CCid %d\n",proc->CC_id,slave_proc->CC_id);
|
||||
exit_fun( "error locking mutex_rxtx" );
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1658,7 +1658,17 @@ int main( int argc, char **argv )
|
||||
|
||||
PHY_vars_eNB_g[0][CC_id]->rx_total_gain_dB = (int)rx_gain[CC_id][0];
|
||||
|
||||
PHY_vars_eNB_g[0][CC_id]->N_TA_offset = 0;
|
||||
if (frame_parms[CC_id]->frame_type==FDD) {
|
||||
PHY_vars_eNB_g[0][CC_id]->N_TA_offset = 0;
|
||||
}
|
||||
else {
|
||||
if (frame_parms[CC_id]->N_RB_DL == 100)
|
||||
PHY_vars_eNB_g[0][CC_id]->N_TA_offset = 624;
|
||||
else if (frame_parms[CC_id]->N_RB_DL == 50)
|
||||
PHY_vars_eNB_g[0][CC_id]->N_TA_offset = 624/2;
|
||||
else if (frame_parms[CC_id]->N_RB_DL == 25)
|
||||
PHY_vars_eNB_g[0][CC_id]->N_TA_offset = 624/4;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
+49
-35
@@ -75,6 +75,8 @@
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#include "UTIL/OPT/opt.h"
|
||||
|
||||
#include "T.h"
|
||||
|
||||
#define FRAME_PERIOD 100000000ULL
|
||||
#define DAQ_PERIOD 66667ULL
|
||||
|
||||
@@ -732,7 +734,7 @@ static void *UE_thread_rxn_txnp4(void *arg)
|
||||
printf("Starting UE RXN_TXNP4 thread (%s)\n", threadname);
|
||||
|
||||
while (!oai_exit) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_COND_WAIT0+(proc->subframe_rx&1), 1 );
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_COND_WAIT0+(proc->proc_id), 1 );
|
||||
if (pthread_mutex_lock(&proc->mutex_rxtx) != 0) {
|
||||
LOG_E( PHY, "[SCHED][UE] error locking mutex for UE RXTX\n" );
|
||||
exit_fun("nothing to add");
|
||||
@@ -740,24 +742,24 @@ static void *UE_thread_rxn_txnp4(void *arg)
|
||||
}
|
||||
|
||||
while (proc->instance_cnt_rxtx < 0) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_WAIT_COND_RXTX0+(proc->subframe_rx&1), 1 );
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_WAIT_COND_RXTX0+(proc->proc_id), 1 );
|
||||
// most of the time, the thread is waiting here
|
||||
pthread_cond_wait( &proc->cond_rxtx, &proc->mutex_rxtx );
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_WAIT_COND_RXTX0+(proc->subframe_rx&1), 0 );
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_WAIT_COND_RXTX0+(proc->proc_id), 0 );
|
||||
|
||||
if (pthread_mutex_unlock(&proc->mutex_rxtx) != 0) {
|
||||
LOG_E( PHY, "[SCHED][UE] error unlocking mutex for UE RXn_TXnp4\n" );
|
||||
exit_fun("nothing to add");
|
||||
return &UE_thread_rxtx_retval;
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_COND_WAIT0+(proc->subframe_rx&1), 0 );
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_COND_WAIT0+(proc->proc_id), 0 );
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_RXTX0+(proc->subframe_rx&1), 1 );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX0_UE+(proc->subframe_rx&1), proc->subframe_rx );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_UE+(proc->subframe_tx&1), proc->subframe_tx );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_UE+(proc->subframe_rx&1), proc->frame_rx );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_UE+(proc->subframe_tx&1), proc->frame_tx );
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_RXTX0+(proc->proc_id), 1 );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX0_UE+(proc->proc_id), proc->subframe_rx );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_UE+(proc->proc_id), proc->subframe_tx );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_UE+(proc->proc_id), proc->frame_rx );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_UE+(proc->proc_id), proc->frame_tx );
|
||||
|
||||
lte_subframe_t sf_type = subframe_select( &UE->frame_parms, proc->subframe_rx);
|
||||
if ((sf_type == SF_DL) ||
|
||||
@@ -825,10 +827,10 @@ static void *UE_thread_rxn_txnp4(void *arg)
|
||||
}
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_RXTX0+(proc->subframe_rx&1), 0 );
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_RXTX0+(proc->proc_id), 0 );
|
||||
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_CNT_DECREMENT0+(proc->subframe_rx&1), 1 );
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_CNT_DECREMENT0+(proc->proc_id), 1 );
|
||||
if (pthread_mutex_lock(&proc->mutex_rxtx) != 0) {
|
||||
LOG_E( PHY, "[SCHED][UE] error locking mutex for UE RXTX\n" );
|
||||
exit_fun("noting to add");
|
||||
@@ -843,7 +845,7 @@ static void *UE_thread_rxn_txnp4(void *arg)
|
||||
exit_fun("noting to add");
|
||||
return &UE_thread_rxtx_retval;
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_CNT_DECREMENT0+(proc->subframe_rx&1), 0 );
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_CNT_DECREMENT0+(proc->proc_id), 0 );
|
||||
}
|
||||
|
||||
// thread finished
|
||||
@@ -873,7 +875,7 @@ void *UE_thread(void *arg) {
|
||||
static int UE_thread_retval;
|
||||
PHY_VARS_UE *UE = PHY_vars_UE_g[0][0];
|
||||
// int tx_enabled = 0;
|
||||
unsigned int rxs,txs;
|
||||
uint32_t rxs=0,txs=0;
|
||||
int dummy_rx[UE->frame_parms.nb_antennas_rx][UE->frame_parms.samples_per_tti] __attribute__((aligned(32)));
|
||||
openair0_timestamp timestamp,timestamp1;
|
||||
void* rxp[2], *txp[2];
|
||||
@@ -958,7 +960,7 @@ void *UE_thread(void *arg) {
|
||||
if (instance_cnt_synch < 0) { // we can invoke the synch
|
||||
// grab 10 ms of signal and wakeup synch thread
|
||||
for (int i=0; i<UE->frame_parms.nb_antennas_rx; i++)
|
||||
rxp[i] = (void*)&rxdata[i][0];
|
||||
rxp[i] = (void*)&UE->common_vars.rxdata[i][0];
|
||||
|
||||
if (UE->mode != loop_through_memory) {
|
||||
rxs = UE->rfdevice.trx_read_func(&UE->rfdevice,
|
||||
@@ -969,7 +971,7 @@ void *UE_thread(void *arg) {
|
||||
|
||||
|
||||
if (rxs!=UE->frame_parms.samples_per_tti*10) {
|
||||
LOG_E(PHY, "problem in rx 1! want #samples=%d but got only %d!\n", UE->frame_parms.samples_per_tti*10, rxs);
|
||||
LOG_E(PHY, "problem in rx 1! expect #samples=%d but got only %d!\n", UE->frame_parms.samples_per_tti*10, rxs);
|
||||
exit_fun("problem in rx 1");
|
||||
return &UE_thread_retval;
|
||||
}
|
||||
@@ -1003,7 +1005,7 @@ void *UE_thread(void *arg) {
|
||||
UE->frame_parms.nb_antennas_rx);
|
||||
|
||||
if (rxs!=UE->frame_parms.samples_per_tti){
|
||||
LOG_E(PHY, "problem in rx 2! want #samples=%d but got only %d!\n", UE->frame_parms.samples_per_tti, rxs);
|
||||
LOG_E(PHY, "problem in rx 2! expect #samples=%d but got only %d!\n", UE->frame_parms.samples_per_tti, rxs);
|
||||
exit_fun("problem in rx 2");
|
||||
return &UE_thread_retval;
|
||||
}
|
||||
@@ -1022,11 +1024,11 @@ void *UE_thread(void *arg) {
|
||||
LOG_I(PHY,"Resynchronizing RX by %d samples (mode = %d)\n",UE->rx_offset,UE->mode);
|
||||
rxs = UE->rfdevice.trx_read_func(&UE->rfdevice,
|
||||
×tamp,
|
||||
(void**)rxdata,
|
||||
(void**)UE->common_vars.rxdata,
|
||||
UE->rx_offset,
|
||||
UE->frame_parms.nb_antennas_rx);
|
||||
if (rxs != UE->rx_offset) {
|
||||
LOG_E(PHY, "problem in rx 3! want #samples=%d but got only %d!\n", UE->rx_offset, rxs);
|
||||
LOG_E(PHY, "problem in rx 3! expect #samples=%d but got only %d!\n", UE->rx_offset, rxs);
|
||||
exit_fun("problem in rx 3!");
|
||||
return &UE_thread_retval;
|
||||
}
|
||||
@@ -1038,11 +1040,11 @@ void *UE_thread(void *arg) {
|
||||
// read in first symbol
|
||||
rxs = UE->rfdevice.trx_read_func(&UE->rfdevice,
|
||||
×tamp,
|
||||
(void**)rxdata,
|
||||
(void**)UE->common_vars.rxdata,
|
||||
UE->frame_parms.ofdm_symbol_size+UE->frame_parms.nb_prefix_samples0,
|
||||
UE->frame_parms.nb_antennas_rx);
|
||||
if (rxs != (UE->frame_parms.ofdm_symbol_size+UE->frame_parms.nb_prefix_samples0)) {
|
||||
LOG_E(PHY, "problem in rx 4! want #samples=%d but got only %d!\n", UE->frame_parms.ofdm_symbol_size+UE->frame_parms.nb_prefix_samples0, rxs);
|
||||
LOG_E(PHY, "problem in rx 4! expect #samples=%d but got only %d!\n", UE->frame_parms.ofdm_symbol_size+UE->frame_parms.nb_prefix_samples0, rxs);
|
||||
exit_fun("problem in rx 4!");
|
||||
return &UE_thread_retval;
|
||||
}
|
||||
@@ -1067,7 +1069,7 @@ void *UE_thread(void *arg) {
|
||||
|
||||
for (int sf=0;sf<10;sf++) {
|
||||
for (i=0; i<UE->frame_parms.nb_antennas_rx; i++)
|
||||
rxp[i] = (void*)&rxdata[i][UE->frame_parms.ofdm_symbol_size+UE->frame_parms.nb_prefix_samples0+(sf*UE->frame_parms.samples_per_tti)];
|
||||
rxp[i] = (void*)&UE->common_vars.rxdata[i][UE->frame_parms.ofdm_symbol_size+UE->frame_parms.nb_prefix_samples0+(sf*UE->frame_parms.samples_per_tti)];
|
||||
// grab signal for subframe
|
||||
if (UE->mode != loop_through_memory) {
|
||||
if (sf<9) {
|
||||
@@ -1079,8 +1081,9 @@ void *UE_thread(void *arg) {
|
||||
UE->frame_parms.nb_antennas_rx);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 0 );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_READ_NS, rxs );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_READ_NS_MISSING, UE->frame_parms.samples_per_tti - rxs);
|
||||
if (rxs != UE->frame_parms.samples_per_tti) {
|
||||
LOG_E(PHY, "problem in rx 5! want #samples=%d but got only %d!\n", UE->frame_parms.samples_per_tti, rxs);
|
||||
LOG_E(PHY, "problem in rx 5! expect #samples=%d but got only %d!\n", UE->frame_parms.samples_per_tti, rxs);
|
||||
exit_fun("problem in rx 5!");
|
||||
return &UE_thread_retval;
|
||||
}
|
||||
@@ -1100,11 +1103,13 @@ void *UE_thread(void *arg) {
|
||||
UE->frame_parms.nb_antennas_tx,
|
||||
1);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_WRITE_NS, rxs );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_WRITE_NS, txs );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_WRITE_NS_MISSING, UE->frame_parms.samples_per_tti - txs);
|
||||
if (txs != UE->frame_parms.samples_per_tti) {
|
||||
LOG_E(PHY,"TX : Timeout (sent %d/%d)\n",txs, UE->frame_parms.samples_per_tti);
|
||||
exit_fun( "problem transmitting samples" );
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_WRITE_NS_MISSING, UE->frame_parms.samples_per_tti - txs);
|
||||
}
|
||||
|
||||
else {
|
||||
@@ -1116,8 +1121,9 @@ void *UE_thread(void *arg) {
|
||||
UE->frame_parms.nb_antennas_rx);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_SF9, 0 );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_READ_NS, rxs );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_READ_NS_MISSING, (UE->frame_parms.samples_per_tti-UE->frame_parms.ofdm_symbol_size-UE->frame_parms.nb_prefix_samples0) - rxs);
|
||||
if (rxs != (UE->frame_parms.samples_per_tti-UE->frame_parms.ofdm_symbol_size-UE->frame_parms.nb_prefix_samples0)) {
|
||||
LOG_E(PHY, "problem in rx 6! want #samples=%d but got only %d!\n", UE->frame_parms.samples_per_tti-UE->frame_parms.ofdm_symbol_size-UE->frame_parms.nb_prefix_samples0, rxs);
|
||||
LOG_E(PHY, "problem in rx 6! expect #samples=%d but got only %d!\n", UE->frame_parms.samples_per_tti-UE->frame_parms.ofdm_symbol_size-UE->frame_parms.nb_prefix_samples0, rxs);
|
||||
exit_fun("problem in rx 6!");
|
||||
return &UE_thread_retval;
|
||||
}
|
||||
@@ -1137,7 +1143,8 @@ void *UE_thread(void *arg) {
|
||||
UE->frame_parms.nb_antennas_tx,
|
||||
1);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_SF9, 0 );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_WRITE_NS, rxs );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_WRITE_NS, txs );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_WRITE_NS_MISSING, (UE->frame_parms.samples_per_tti - rx_off_diff) - txs);
|
||||
if (txs != UE->frame_parms.samples_per_tti - rx_off_diff) {
|
||||
LOG_E(PHY,"TX : Timeout (sent %d/%d)\n",txs, UE->frame_parms.samples_per_tti-rx_off_diff);
|
||||
exit_fun( "problem transmitting samples" );
|
||||
@@ -1147,13 +1154,13 @@ void *UE_thread(void *arg) {
|
||||
// read in first symbol of next frame and adjust for timing drift
|
||||
rxs = UE->rfdevice.trx_read_func(&UE->rfdevice,
|
||||
×tamp1,
|
||||
(void**)rxdata,
|
||||
(void**)UE->common_vars.rxdata,
|
||||
UE->frame_parms.ofdm_symbol_size + UE->frame_parms.nb_prefix_samples0 - rx_off_diff,
|
||||
UE->frame_parms.nb_antennas_rx);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_SF9, 0 );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_READ_NS, rxs );
|
||||
if (rxs != (UE->frame_parms.ofdm_symbol_size + UE->frame_parms.nb_prefix_samples0 - rx_off_diff)) {
|
||||
LOG_E(PHY, "problem in rx 7! want #samples=%d but got only %d! rx_off_diff=%d\n", UE->frame_parms.ofdm_symbol_size+UE->frame_parms.nb_prefix_samples0 - rx_off_diff, rxs, rx_off_diff);
|
||||
LOG_E(PHY, "problem in rx 7! expect #samples=%d but got only %d! rx_off_diff=%d\n", UE->frame_parms.ofdm_symbol_size+UE->frame_parms.nb_prefix_samples0 - rx_off_diff, rxs, rx_off_diff);
|
||||
exit_fun("problem in rx 7!");
|
||||
return &UE_thread_retval;
|
||||
}
|
||||
@@ -1161,9 +1168,10 @@ void *UE_thread(void *arg) {
|
||||
}
|
||||
}
|
||||
// operate on thread sf mod 2
|
||||
UE_rxtx_proc_t *proc = &UE->proc.proc_rxtx[sf&1];
|
||||
uint8_t proc_select = sf&1;
|
||||
UE_rxtx_proc_t *proc = &UE->proc.proc_rxtx[proc_select];
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_CNT_INCREMENT0+(proc->subframe_rx&1), 1 );
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_CNT_INCREMENT0+proc_select, 1 );
|
||||
// lock mutex
|
||||
if (pthread_mutex_lock(&proc->mutex_rxtx) != 0) {
|
||||
LOG_E( PHY, "[SCHED][UE] error locking mutex for UE RX\n" );
|
||||
@@ -1172,6 +1180,7 @@ void *UE_thread(void *arg) {
|
||||
}
|
||||
// increment instance count and change proc subframe/frame variables
|
||||
int instance_cnt_rxtx = ++proc->instance_cnt_rxtx;
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE_INST_CNT_RX, proc->instance_cnt_rxtx);
|
||||
if(sf == 0)
|
||||
{
|
||||
UE->proc.proc_rxtx[0].frame_rx++;
|
||||
@@ -1182,6 +1191,9 @@ void *UE_thread(void *arg) {
|
||||
proc->frame_tx = proc->frame_rx + ((proc->subframe_rx>5)?1:0);
|
||||
proc->timestamp_tx = timestamp+(4*UE->frame_parms.samples_per_tti)-UE->frame_parms.ofdm_symbol_size-UE->frame_parms.nb_prefix_samples0;
|
||||
|
||||
#if T_TRACER
|
||||
T(T_UE_MASTER_TICK, T_INT(0), T_INT(proc->frame_rx%1024), T_INT(proc->subframe_rx));
|
||||
#endif
|
||||
/*
|
||||
if (sf != (timestamp/UE->frame_parms.samples_per_tti)%10) {
|
||||
LOG_E(PHY,"steady-state UE_thread error : frame_rx %d, subframe_rx %d, frame_tx %d, subframe_tx %d, rx subframe %d\n",proc->frame_rx,proc->subframe_rx,proc->frame_tx,proc->subframe_tx,(timestamp/UE->frame_parms.samples_per_tti)%10);
|
||||
@@ -1193,19 +1205,19 @@ void *UE_thread(void *arg) {
|
||||
exit_fun("nothing to add");
|
||||
return &UE_thread_retval;
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_CNT_INCREMENT0+(proc->subframe_rx&1), 0 );
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_CNT_INCREMENT0+proc_select, 0 );
|
||||
|
||||
|
||||
if (instance_cnt_rxtx == 0) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SIGNAL_COND_RXTX, 1 );
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SIGNAL_COND_RXTX0+proc_select, 1 );
|
||||
if (pthread_cond_signal(&proc->cond_rxtx) != 0) {
|
||||
LOG_E( PHY, "[SCHED][UE] ERROR pthread_cond_signal for UE RX thread\n" );
|
||||
exit_fun("nothing to add");
|
||||
return &UE_thread_retval;
|
||||
}
|
||||
LOG_D(PHY, "firing up rxtx_thread[%d] at subframe %d\n", sf&1, sf);
|
||||
LOG_D(PHY, "firing up rxtx_thread[%d] at subframe %d\n", proc_select, sf);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SIGNAL_COND_RXTX, 0 );
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SIGNAL_COND_RXTX0+proc_select, 0 );
|
||||
|
||||
} else {
|
||||
LOG_E( PHY, "[SCHED][UE] UE RX thread busy (IC %d)!!\n", instance_cnt_rxtx);
|
||||
@@ -1653,6 +1665,8 @@ void init_UE_threads(int inst)
|
||||
// the threads are not yet active, therefore access is allowed without locking
|
||||
UE->proc.proc_rxtx[0].instance_cnt_rxtx = -1;
|
||||
UE->proc.proc_rxtx[1].instance_cnt_rxtx = -1;
|
||||
UE->proc.proc_rxtx[0].proc_id = 0;
|
||||
UE->proc.proc_rxtx[1].proc_id = 1;
|
||||
UE->proc.instance_cnt_synch = -1;
|
||||
pthread_mutex_init(&UE->proc.proc_rxtx[0].mutex_rxtx,NULL);
|
||||
pthread_mutex_init(&UE->proc.proc_rxtx[1].mutex_rxtx,NULL);
|
||||
@@ -1661,9 +1675,9 @@ void init_UE_threads(int inst)
|
||||
pthread_cond_init(&UE->proc.proc_rxtx[1].cond_rxtx,NULL);
|
||||
pthread_cond_init(&UE->proc.cond_synch,NULL);
|
||||
pthread_create(&UE->proc.proc_rxtx[0].pthread_rxtx,NULL,UE_thread_rxn_txnp4,(void*)&UE->proc.proc_rxtx[0]);
|
||||
pthread_setname_np( UE->proc.proc_rxtx[0].pthread_rxtx, "UE_thread_rxn_txnp4_even" );
|
||||
pthread_setname_np( UE->proc.proc_rxtx[0].pthread_rxtx, "rxn_txnp4_even" );
|
||||
pthread_create(&UE->proc.proc_rxtx[1].pthread_rxtx,NULL,UE_thread_rxn_txnp4,(void*)&UE->proc.proc_rxtx[1]);
|
||||
pthread_setname_np( UE->proc.proc_rxtx[1].pthread_rxtx, "UE_thread_rxn_txnp4_odd" );
|
||||
pthread_setname_np( UE->proc.proc_rxtx[1].pthread_rxtx, "rxn_txnp4_odd" );
|
||||
pthread_create(&UE->proc.pthread_synch,NULL,UE_thread_synch,(void*)UE);
|
||||
pthread_setname_np( UE->proc.pthread_synch, "UE_thread_synch" );
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t abstraction_flag)
|
||||
{
|
||||
|
||||
int i,j,layer,aa,re;
|
||||
int i,j;
|
||||
PHY_VARS_eNB* PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB));
|
||||
memset(PHY_vars_eNB,0,sizeof(PHY_VARS_eNB));
|
||||
PHY_vars_eNB->Mod_id=eNB_id;
|
||||
|
||||
@@ -132,7 +132,7 @@ void pdcp_rlc_test_mac_rlc_loop (struct mac_data_ind *data_indP, struct mac_dat
|
||||
*tx_packetsP = *tx_packetsP + 1;
|
||||
|
||||
if (*drop_countP == 0) {
|
||||
tb_dst = get_free_mem_block(sizeof (mac_rlc_max_rx_header_size_t) + tb_size);
|
||||
tb_dst = get_free_mem_block(sizeof (mac_rlc_max_rx_header_size_t) + tb_size, __func__);
|
||||
|
||||
if (tb_dst != NULL) {
|
||||
((struct mac_tb_ind *) (tb_dst->data))->first_bit = 0;
|
||||
@@ -156,7 +156,7 @@ void pdcp_rlc_test_mac_rlc_loop (struct mac_data_ind *data_indP, struct mac_dat
|
||||
*dropped_tx_packetsP = *dropped_tx_packetsP + 1;
|
||||
}
|
||||
|
||||
free_mem_block(tb_src);
|
||||
free_mem_block(tb_src, __func__);
|
||||
|
||||
if (data_indP->no_tb > 0) {
|
||||
printf("[RLC-LOOP] Exchange %d TBs\n",data_indP->no_tb);
|
||||
|
||||
Reference in New Issue
Block a user