From d930378e13209ce0c6eedd1dcc9f2e2a30b6bb03 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Mon, 13 Feb 2017 16:05:40 +0100 Subject: [PATCH 01/47] calibration for new firmware/gateware --- targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp b/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp index a6f7837a70..1e3e1a8cbf 100644 --- a/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp +++ b/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp @@ -320,7 +320,7 @@ rx_gain_calib_table_t calib_table_lmssdr[] = { {2660000000.0,110.0}, // on H PAD {2300000000.0,106.0}, // on H PAD {1880000000.0,106.0}, // on H PAD - {816000000.0,102.0}, // on W PAD + {816000000.0,116.0}, // on W PAD {-1,0}}; From aefb958a6fc5489360d32b47dc240cc690f6fcfc Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Mon, 13 Feb 2017 17:12:10 +0100 Subject: [PATCH 02/47] tx calibration for LimeSDR band 13 --- .../CONF/enb.band13.tm1.50PRB.lmssdr.conf | 159 +++++++++--------- .../CONF/enb.band13.tm1.lmssdr.conf | 12 +- .../CONF/enb.band7.tm1.50PRB.lmssdr.conf | 14 +- 3 files changed, 94 insertions(+), 91 deletions(-) diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.50PRB.lmssdr.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.50PRB.lmssdr.conf index b81ac861f6..3eea96059b 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.50PRB.lmssdr.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.50PRB.lmssdr.conf @@ -23,85 +23,89 @@ eNBs = component_carriers = ( { - frame_type = "FDD"; - tdd_config = 3; - tdd_config_s = 0; - prefix_type = "NORMAL"; - eutra_band = 13; - downlink_frequency = 751000000L; - uplink_frequency_offset = 31000000; - Nid_cell = 0; - N_RB_DL = 50; - Nid_cell_mbsfn = 0; - 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 = -20; - 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 =;*/ + node_function = "eNodeB_3GPP"; + node_timing = "synch_to_ext_device"; + node_synch_ref = 0; + frame_type = "FDD"; + tdd_config = 3; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 13; + downlink_frequency = 751000000L; + uplink_frequency_offset = 31000000; + Nid_cell = 0; + N_RB_DL = 50; + Nid_cell_mbsfn = 0; + nb_antenna_ports = 1; + nb_antennas_tx = 1; + nb_antennas_rx = 1; + tx_gain = 20; + rx_gain = 116; + 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 = -30; + 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 = -90; - pusch_alpha = "AL1"; - pucch_p0_Nominal = -96; - msg3_delta_Preamble = 6; - pucch_deltaF_Format1 = "deltaF2"; - pucch_deltaF_Format1b = "deltaF3"; - pucch_deltaF_Format2 = "deltaF0"; - pucch_deltaF_Format2a = "deltaF0"; - pucch_deltaF_Format2b = "deltaF0"; + pusch_p0_Nominal = -96; + pusch_alpha = "AL1"; + pucch_p0_Nominal = -104; + 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; + 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; + 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] @@ -131,9 +135,8 @@ eNBs = SCTP_OUTSTREAMS = 2; }; - ////////// MME parameters: - mme_ip_address = ( { ipv4 = "127.0.0.3"; + mme_ip_address = ( { ipv4 = "192.168.12.70"; ipv6 = "192:168:30::17"; active = "yes"; preference = "ipv4"; @@ -142,11 +145,11 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "lo"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24"; + ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.150/24"; - ENB_INTERFACE_NAME_FOR_S1U = "lo"; - ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.4/24"; + ENB_INTERFACE_NAME_FOR_S1U = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.150/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.lmssdr.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.lmssdr.conf index 266e5aae25..02ff6b3e0b 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.lmssdr.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.lmssdr.conf @@ -31,12 +31,12 @@ eNBs = downlink_frequency = 751000000L; uplink_frequency_offset = 31000000; Nid_cell = 0; - N_RB_DL = 25; + N_RB_DL = 50; Nid_cell_mbsfn = 0; nb_antennas_tx = 1; nb_antennas_rx = 1; - tx_gain = 90; - rx_gain = 107; + tx_gain = 70; + rx_gain = 116; prach_root = 0; prach_config_index = 0; prach_high_speed = "DISABLE"; @@ -46,7 +46,7 @@ eNBs = pucch_nRB_CQI = 1; pucch_nCS_AN = 0; pucch_n1_AN = 32; - pdsch_referenceSignalPower = -17; + pdsch_referenceSignalPower = -30; pdsch_p_b = 0; pusch_n_SB = 1; pusch_enable64QAM = "DISABLE"; @@ -64,9 +64,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"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.lmssdr.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.lmssdr.conf index e12acef703..22bcae3c80 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.lmssdr.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.lmssdr.conf @@ -39,8 +39,8 @@ eNBs = nb_antenna_ports = 1; nb_antennas_tx = 1; nb_antennas_rx = 1; - tx_gain = 100; - rx_gain = 111; + tx_gain = 70; + rx_gain = 116; prach_root = 0; prach_config_index = 0; prach_high_speed = "DISABLE"; @@ -136,7 +136,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "127.0.0.3"; + mme_ip_address = ( { ipv4 = "192.168.12.70"; ipv6 = "192:168:30::17"; active = "yes"; preference = "ipv4"; @@ -145,11 +145,11 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "lo"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24"; + ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.150/24"; - ENB_INTERFACE_NAME_FOR_S1U = "lo"; - ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.5/24"; + ENB_INTERFACE_NAME_FOR_S1U = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.150/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 }; From b45e9a68a834474a24d868d6008e76254f5b2e75 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Mon, 6 Mar 2017 13:46:41 +0100 Subject: [PATCH 03/47] adding config file for band 38, TM1, usrp --- .../CONF/enb.band38.tm1.usrpb210.conf | 175 ++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpb210.conf diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpb210.conf new file mode 100644 index 0000000000..091997de9b --- /dev/null +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpb210.conf @@ -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 = 3; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 38; + downlink_frequency = 2580000000L; + 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 = -90; + pusch_alpha = "AL1"; + pucch_p0_Nominal = -96; + 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 = "192.168.12.70"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + + ENB_INTERFACE_NAME_FOR_S1_MME = "eth1"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.146/24"; + ENB_INTERFACE_NAME_FOR_S1U = "eth1"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.146/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"; + }; + } +); From 477a171fbcbb3568ef9fdf8b97f7302f1b0dfd50 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Tue, 7 Mar 2017 16:53:50 +0100 Subject: [PATCH 04/47] adding config file for TDD testing --- .../CONF/enb.band38.tm1.usrpb210.conf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpb210.conf index 091997de9b..024be3b775 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpb210.conf @@ -17,7 +17,7 @@ eNBs = mobile_country_code = "208"; - mobile_network_code = "94"; + mobile_network_code = "92"; ////////// Physical parameters: @@ -137,7 +137,7 @@ eNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.70"; + mme_ip_address = ( { ipv4 = "192.168.12.26"; ipv6 = "192:168:30::17"; active = "yes"; preference = "ipv4"; @@ -147,10 +147,10 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth1"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.146/24"; - ENB_INTERFACE_NAME_FOR_S1U = "eth1"; - ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.146/24"; + ENB_INTERFACE_NAME_FOR_S1_MME = "eth6"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.82/24"; + ENB_INTERFACE_NAME_FOR_S1U = "eth6"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.82/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 }; From ff6d41b6e83b3daa1d552d6d7379f491785c763e Mon Sep 17 00:00:00 2001 From: hbilel Date: Wed, 1 Mar 2017 18:36:10 +0100 Subject: [PATCH 05/47] [OAI-UE] Mimo feature --- .../lte_dl_bf_channel_estimation.c | 4 +- openair1/PHY/LTE_TRANSPORT/dci.c | 37 +- openair1/PHY/LTE_TRANSPORT/dci_tools.c | 83 ++-- openair1/PHY/LTE_TRANSPORT/defs.h | 2 +- openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c | 39 +- .../PHY/LTE_TRANSPORT/dlsch_demodulation.c | 87 +++- openair1/PHY/LTE_TRANSPORT/print_stats.c | 22 +- openair1/PHY/LTE_TRANSPORT/ulsch_coding.c | 4 +- openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c | 2 +- openair1/PHY/MODULATION/slot_fep.c | 2 +- openair1/PHY/TOOLS/lte_phy_scope.c | 18 +- openair1/PHY/TOOLS/lte_phy_scope_tm4.c | 28 +- openair1/PHY/defs.h | 10 +- openair1/SCHED/phy_procedures_lte_ue.c | 401 ++++++++++++------ openair1/SCHED/pucch_pc.c | 10 +- openair2/RRC/LITE/L2_interface.c | 8 +- openair3/NAS/TOOLS/network.h | 2 +- openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf | 8 +- targets/RT/USER/lte-ue.c | 9 + targets/SIMU/USER/init_lte.c | 36 +- 20 files changed, 561 insertions(+), 251 deletions(-) diff --git a/openair1/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c index 02b5102ae5..7e112342ce 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c @@ -51,10 +51,10 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue, int uespec_pilot[300]; LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_ue->frame_parms; - LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch[eNB_id]; + LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch[(Ns>>1)&0x1][eNB_id]; LTE_DL_UE_HARQ_t *dlsch0_harq; - harq_pid = dlsch_ue[0]->current_harq_pid; + harq_pid = dlsch_ue[0]->current_harq_pid; dlsch0_harq = dlsch_ue[0]->harq_processes[harq_pid]; if (((frame_parms->Ncp == NORMAL) && (symbol>=7)) || diff --git a/openair1/PHY/LTE_TRANSPORT/dci.c b/openair1/PHY/LTE_TRANSPORT/dci.c index 49fe90bf15..44cc3fffbf 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci.c +++ b/openair1/PHY/LTE_TRANSPORT/dci.c @@ -2893,15 +2893,15 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars, break; case 2: - *CCEmap|=(0x03<<(CCEind&0x1f)); + *CCEmap|=(1<<(CCEind&0x1f)); break; case 4: - *CCEmap|=(0x0f<<(CCEind&0x1f)); + *CCEmap|=(1<<(CCEind&0x1f)); break; case 8: - *CCEmap|=(0xff<<(CCEind&0x1f)); + *CCEmap|=(1<<(CCEind&0x1f)); break; } @@ -3518,7 +3518,9 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, } else if (tmode == 3) { + LOG_D(PHY," Now check UE_SPEC format 2A_2A search aggregation 1\n"); // Now check UE_SPEC format 2A_2A search spaces at aggregation 1 + old_dci_cnt=dci_cnt; dci_decoding_procedure0(pdcch_vars,0,mode, subframe, dci_alloc, @@ -3527,7 +3529,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, mi, SI_RNTI, ra_rnti, - P_RNTI, + P_RNTI, 0, format1A, format1A, @@ -3542,14 +3544,18 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, &CCEmap1, &CCEmap2); + LOG_D(PHY," format 2A_2A search CCEmap0 %x, format0_found %d, format_c_found %d \n", CCEmap0, format0_found, format_c_found); if ((CCEmap0==0xffff)|| ((format0_found==1)&&(format_c_found==1))) return(dci_cnt); + LOG_D(PHY," format 2A_2A search dci_cnt %d, old_dci_cn t%d \n", dci_cnt, old_dci_cnt); if (dci_cnt>old_dci_cnt) return(dci_cnt); // Now check UE_SPEC format 2 search spaces at aggregation 2 + LOG_D(PHY," Now check UE_SPEC format 2A_2A search aggregation 2\n"); + old_dci_cnt=dci_cnt; dci_decoding_procedure0(pdcch_vars,0,mode, subframe, dci_alloc, @@ -3577,10 +3583,13 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, ((format0_found==1)&&(format_c_found==1))) return(dci_cnt); + LOG_D(PHY," format 2A_2A search dci_cnt %d, old_dci_cn t%d \n", dci_cnt, old_dci_cnt); if (dci_cnt>old_dci_cnt) return(dci_cnt); // Now check UE_SPEC format 2_2A search spaces at aggregation 4 + LOG_D(PHY," Now check UE_SPEC format 2_2A search spaces at aggregation 4 \n"); + old_dci_cnt=dci_cnt; dci_decoding_procedure0(pdcch_vars,0,mode, subframe, dci_alloc, @@ -3589,7 +3598,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, mi, SI_RNTI, ra_rnti, - P_RNTI, + P_RNTI, 2, format1A, format1A, @@ -3608,11 +3617,14 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, ((format0_found==1)&&(format_c_found==1))) return(dci_cnt); + LOG_D(PHY," format 2A_2A search dci_cnt %d, old_dci_cn t%d \n", dci_cnt, old_dci_cnt); if (dci_cnt>old_dci_cnt) return(dci_cnt); //#ifdef ALL_AGGREGATION // Now check UE_SPEC format 2_2A search spaces at aggregation 8 + LOG_D(PHY," Now check UE_SPEC format 2_2A search spaces at aggregation 8 \n"); + old_dci_cnt=dci_cnt; dci_decoding_procedure0(pdcch_vars,0,mode, subframe, dci_alloc, @@ -3636,9 +3648,17 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, &CCEmap1, &CCEmap2); //#endif + if ((CCEmap0==0xffff)|| + ((format0_found==1)&&(format_c_found==1))) + return(dci_cnt); + + LOG_D(PHY," format 2A_2A search dci_cnt %d, old_dci_cn t%d \n", dci_cnt, old_dci_cnt); + if (dci_cnt>old_dci_cnt) + return(dci_cnt); } else if (tmode == 4) { // Now check UE_SPEC format 2_2A search spaces at aggregation 1 + old_dci_cnt=dci_cnt; dci_decoding_procedure0(pdcch_vars,0,mode, subframe, dci_alloc, @@ -3670,6 +3690,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, return(dci_cnt); // Now check UE_SPEC format 2 search spaces at aggregation 2 + old_dci_cnt=dci_cnt; dci_decoding_procedure0(pdcch_vars,0,mode, subframe, dci_alloc, @@ -3701,6 +3722,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, return(dci_cnt); // Now check UE_SPEC format 2_2A search spaces at aggregation 4 + old_dci_cnt=dci_cnt; dci_decoding_procedure0(pdcch_vars,0,mode, subframe, dci_alloc, @@ -3733,6 +3755,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, //#ifdef ALL_AGGREGATION // Now check UE_SPEC format 2_2A search spaces at aggregation 8 + old_dci_cnt=dci_cnt; dci_decoding_procedure0(pdcch_vars,0,mode, subframe, dci_alloc, @@ -3762,6 +3785,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, #ifdef DEBUG_DCI_DECODING LOG_I(PHY," MU-MIMO check UE_SPEC format 1E_2A_M10PRB\n"); #endif + old_dci_cnt=dci_cnt; dci_decoding_procedure0(pdcch_vars,0,mode, subframe, dci_alloc, @@ -3794,6 +3818,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, return(dci_cnt); // Now check UE_SPEC format 1E_2A_M10PRB search spaces aggregation 2 + old_dci_cnt=dci_cnt; dci_decoding_procedure0(pdcch_vars,0,mode, subframe, dci_alloc, @@ -3825,6 +3850,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, return(dci_cnt); // Now check UE_SPEC format 1E_2A_M10PRB search spaces aggregation 4 + old_dci_cnt=dci_cnt; dci_decoding_procedure0(pdcch_vars,0,mode, subframe, dci_alloc, @@ -3858,6 +3884,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, //#ifdef ALL_AGGREGATION // Now check UE_SPEC format 1E_2A_M10PRB search spaces at aggregation 8 + old_dci_cnt=dci_cnt; dci_decoding_procedure0(pdcch_vars,0,mode, subframe, dci_alloc, diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c index 9f4749cdc6..b9b1f6c0ad 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c @@ -4769,10 +4769,12 @@ int check_dci_format1_1a_coherency(DCI_format_t dci_format, uint8_t harq_pid = pdci_info_extarcted->harq_pid; uint32_t rballoc = pdci_info_extarcted->rballoc; uint8_t mcs1 = pdci_info_extarcted->mcs1; - uint8_t rv1 = pdci_info_extarcted->rv1; - uint8_t ndi1 = pdci_info_extarcted->ndi1; uint8_t TPC = pdci_info_extarcted->TPC; uint8_t rah = pdci_info_extarcted->rah; +#ifdef DEBUG_DCI + uint8_t rv1 = pdci_info_extarcted->rv1; + uint8_t ndi1 = pdci_info_extarcted->ndi1; +#endif uint8_t NPRB = 0; long long int RIV_max = 0; @@ -4983,13 +4985,18 @@ int check_dci_format2_2a_coherency(DCI_format_t dci_format, uint8_t rv2 = pdci_info_extarcted->rv2; uint8_t harq_pid = pdci_info_extarcted->harq_pid; uint32_t rballoc = pdci_info_extarcted->rballoc; + +#ifdef DEBUG_DCI uint8_t ndi1 = pdci_info_extarcted->ndi1; uint8_t ndi2 = pdci_info_extarcted->ndi2; +#endif uint8_t NPRB = 0; long long RIV_max = 0; +#ifdef DEBUG_DCI LOG_I(PHY, "extarcted dci - dci_format %d \n", dci_format); + LOG_I(PHY, "extarcted dci - rnti %d \n", rnti); LOG_I(PHY, "extarcted dci - rah %d \n", rah); LOG_I(PHY, "extarcted dci - mcs1 %d \n", mcs1); LOG_I(PHY, "extarcted dci - mcs2 %d \n", mcs2); @@ -5001,6 +5008,7 @@ int check_dci_format2_2a_coherency(DCI_format_t dci_format, LOG_I(PHY, "extarcted dci - harq pif %d \n", harq_pid); LOG_I(PHY, "extarcted dci - round0 %d \n", pdlsch0_harq->round); LOG_I(PHY, "extarcted dci - round1 %d \n", pdlsch1_harq->round); +#endif // I- check dci content minimum coherency if(harq_pid >8) @@ -5043,6 +5051,21 @@ int check_dci_format2_2a_coherency(DCI_format_t dci_format, }*/ + if((pdlsch0_harq->round == 0) && (rv1 > 0)) + { + // DCI false detection + LOG_I(PHY,"bad rv1\n"); + return(0); + } + + if((pdlsch1_harq->round == 0) && (rv2 > 0)) + { + // DCI false detection + LOG_I(PHY,"bad rv2\n"); + return(0); + } + + switch (N_RB_DL) { case 6: if (rah == 0) @@ -5606,6 +5629,7 @@ void compute_precoding_info_format2A(uint8_t tpmi, void prepare_dl_decoding_format2_2A(DCI_format_t dci_format, DCI_INFO_EXTRACTED_t *pdci_info_extarcted, LTE_DL_FRAME_PARMS *frame_parms, + uint16_t rnti, uint8_t subframe, LTE_DL_UE_HARQ_t *dlsch0_harq, LTE_DL_UE_HARQ_t *dlsch1_harq, @@ -5663,15 +5687,17 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format, dlsch1_harq->dl_power_off = 1; pdlsch0->current_harq_pid = harq_pid; - pdlsch0->harq_ack[subframe].harq_id = harq_pid; + pdlsch0->harq_ack[subframe].harq_id = harq_pid; pdlsch1->current_harq_pid = harq_pid; - pdlsch1->harq_ack[subframe].harq_id = harq_pid; + pdlsch1->harq_ack[subframe].harq_id = harq_pid; // assume two CW are active dlsch0_harq->status = ACTIVE; dlsch1_harq->status = ACTIVE; pdlsch0->active = 1; pdlsch1->active = 1; + pdlsch0->rnti = rnti; + pdlsch1->rnti = rnti; if (TB0_active && TB1_active && tbswap==1) { @@ -5690,12 +5716,8 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format, if (TB1_active==0) { dlsch1_harq->status = SCH_IDLE; pdlsch1->active = 0; -#ifdef DEBUG_HARQ - printf("[DCI UE]: TB1 is deactivated, retransmit TB0 transmit in TM6\n"); -#endif } - #ifdef DEBUG_HARQ printf("[DCI UE]: dlsch0_harq status %d , dlsch1_harq status %d\n", dlsch0_harq->status, dlsch1_harq->status); #endif @@ -5727,6 +5749,9 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format, dlsch1_harq->rb_alloc_odd[3] = dlsch0_harq->rb_alloc_odd[3]; dlsch1_harq->nb_rb = dlsch0_harq->nb_rb; + + //dlsch0_harq->Nl = 1; + //dlsch1_harq->Nl = 1; } } else if ((TB0_active == 0) && (TB1_active == 1)){ @@ -5774,24 +5799,28 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format, if ((ndi1!=dlsch0_harq->DCINdi) || (dlsch0_harq->first_tx==1)) { dlsch0_harq->round = 0; + //LOG_I(PHY,"[UE] DLSCH: New Data Indicator CW0 subframe %d (pid %d, round %d)\n", + // subframe,harq_pid,dlsch0_harq->round); if ( dlsch0_harq->first_tx==1) { LOG_D(PHY,"Format 2 DCI First TX0: Clearing flag\n"); dlsch0_harq->first_tx = 0; } }else{ if(dlsch0_harq->round == 0) { +#if 0 // skip pdsch decoding and report ack dlsch0_harq->status = SCH_IDLE; pdlsch0->active = 0; pdlsch0->harq_ack[subframe].ack = 1; pdlsch0->harq_ack[subframe].harq_id = harq_pid; pdlsch0->harq_ack[subframe].send_harq_status = 1; +#endif } } dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][dlsch0_harq->nb_rb-1]; - if(dlsch0_harq->Nl == 2) - dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][(dlsch0_harq->nb_rb<<1)-1]; + //if(dlsch0_harq->Nl == 2) + //dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][(dlsch0_harq->nb_rb<<1)-1]; if (mcs1 <= 28) dlsch0_harq->Qm = get_Qm(mcs1); else if (mcs1<=31) @@ -5801,11 +5830,14 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format, if (TB1_active) { if ((ndi2!=dlsch1_harq->DCINdi) || (dlsch1_harq->first_tx==1)) { dlsch1_harq->round = 0; + //LOG_I(PHY,"[UE] DLSCH: New Data Indicator CW1 subframe %d (pid %d, round %d)\n", + // subframe,harq_pid,dlsch0_harq->round); if (dlsch1_harq->first_tx==1) { LOG_D(PHY,"Format 2 DCI First TX1: Clearing flag\n"); dlsch1_harq->first_tx = 0; } }else{ +#if 0 if(dlsch1_harq->round == 0) { // skip pdsch decoding and report ack dlsch1_harq->status = SCH_IDLE; @@ -5814,11 +5846,12 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format, pdlsch1->harq_ack[subframe].harq_id = harq_pid; pdlsch1->harq_ack[subframe].send_harq_status = 1; } +#endif } dlsch1_harq->TBS = TBStable[get_I_TBS(dlsch1_harq->mcs)][dlsch1_harq->nb_rb-1]; - if(dlsch0_harq->Nl == 2) - dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][(dlsch0_harq->nb_rb<<1)-1]; + //if(dlsch0_harq->Nl == 2) + //dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][(dlsch0_harq->nb_rb<<1)-1]; if (mcs2 <= 28) dlsch1_harq->Qm = get_Qm(mcs2); @@ -6047,7 +6080,7 @@ int generate_ue_dlsch_params_from_dci(int frame, case format2: { // extract dci infomation - LOG_I(PHY,"[DCI-format2] extract dci infomation \n"); + //LOG_I(PHY,"[DCI-format2] AbsSubframe %d.%d extract dci infomation \n", frame, subframe); extract_dci2_info(frame_parms->N_RB_DL, frame_type, frame_parms->nb_antenna_ports_eNB, @@ -6069,7 +6102,7 @@ int generate_ue_dlsch_params_from_dci(int frame, dlsch0_harq = dlsch0->harq_processes[harq_pid]; dlsch1_harq = dlsch1->harq_processes[harq_pid]; - LOG_I(PHY,"[DCI-format2] check dci content \n"); + //LOG_I(PHY,"[DCI-format2] check dci content \n"); status = check_dci_format2_2a_coherency(format2, frame_parms->N_RB_DL, &dci_info_extarcted, @@ -6083,10 +6116,11 @@ int generate_ue_dlsch_params_from_dci(int frame, return(-1); // dci is correct ==> update internal structure and prepare dl decoding - LOG_I(PHY,"[DCI-format2] update internal structure and prepare dl decoding \n"); + //LOG_I(PHY,"[DCI-format2] update internal structure and prepare dl decoding \n"); prepare_dl_decoding_format2_2A(format2, &dci_info_extarcted, frame_parms, + rnti, subframe, dlsch0_harq, dlsch1_harq, @@ -6099,7 +6133,7 @@ int generate_ue_dlsch_params_from_dci(int frame, case format2A: { // extract dci infomation - LOG_I(PHY,"[DCI-format2A] extract dci infomation \n"); + //LOG_I(PHY,"[DCI-format2] AbsSubframe %d.%d extract dci infomation \n", frame%1024, subframe); extract_dci2A_info(frame_parms->N_RB_DL, frame_type, frame_parms->nb_antenna_ports_eNB, @@ -6107,10 +6141,10 @@ int generate_ue_dlsch_params_from_dci(int frame, &dci_info_extarcted); // check dci content - LOG_I(PHY,"[DCI-format2A] check dci content \n"); - LOG_I(PHY,"[DCI-format2A] tb_swap %d harq_pid %d\n", dci_info_extarcted.tb_swap, dci_info_extarcted.harq_pid); - dlsch[0]->active = 0; - dlsch[1]->active = 0; + //LOG_I(PHY,"[DCI-format2A] check dci content \n"); + //LOG_I(PHY,"[DCI-format2A] tb_swap %d harq_pid %d\n", dci_info_extarcted.tb_swap, dci_info_extarcted.harq_pid); + //dlsch[0]->active = 0; + //dlsch[1]->active = 0; if (dci_info_extarcted.tb_swap == 0) { dlsch0 = dlsch[0]; @@ -6122,7 +6156,7 @@ int generate_ue_dlsch_params_from_dci(int frame, dlsch0_harq = dlsch0->harq_processes[dci_info_extarcted.harq_pid]; dlsch1_harq = dlsch1->harq_processes[dci_info_extarcted.harq_pid]; - LOG_I(PHY,"[DCI-format2A] check dci content \n"); + //LOG_I(PHY,"[DCI-format2A] check dci content \n"); status = check_dci_format2_2a_coherency(format2A, frame_parms->N_RB_DL, &dci_info_extarcted, @@ -6136,10 +6170,11 @@ int generate_ue_dlsch_params_from_dci(int frame, return(-1); // dci is correct ==> update internal structure and prepare dl decoding - LOG_I(PHY,"[DCI-format2A] update internal structure and prepare dl decoding \n"); + //LOG_I(PHY,"[DCI-format2A] update internal structure and prepare dl decoding \n"); prepare_dl_decoding_format2_2A(format2A, &dci_info_extarcted, frame_parms, + rnti, subframe, dlsch0_harq, dlsch1_harq, @@ -7142,7 +7177,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu, uint8_t transmission_mode = ue->transmission_mode[eNB_id]; ANFBmode_t AckNackFBMode; LTE_UE_ULSCH_t *ulsch = ue->ulsch[eNB_id]; - LTE_UE_DLSCH_t **dlsch = ue->dlsch[0]; + LTE_UE_DLSCH_t **dlsch = ue->dlsch[subframe&0x1][0]; PHY_MEASUREMENTS *meas = &ue->measurements; LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; // uint32_t current_dlsch_cqi = ue->current_dlsch_cqi[eNB_id]; @@ -7947,7 +7982,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu, if (frame_parms->frame_type == FDD) { int dl_subframe = (subframe<4) ? (subframe+6) : (subframe-4); - if (ue->dlsch[eNB_id][0]->harq_ack[dl_subframe].send_harq_status>0) { // we have downlink transmission + if (ue->dlsch[dl_subframe&0x1][eNB_id][0]->harq_ack[dl_subframe].send_harq_status>0) { // we have downlink transmission ulsch->harq_processes[harq_pid]->O_ACK = 1; } else { ulsch->harq_processes[harq_pid]->O_ACK = 0; diff --git a/openair1/PHY/LTE_TRANSPORT/defs.h b/openair1/PHY/LTE_TRANSPORT/defs.h index 3b13c01c52..f6293bf1b2 100755 --- a/openair1/PHY/LTE_TRANSPORT/defs.h +++ b/openair1/PHY/LTE_TRANSPORT/defs.h @@ -708,7 +708,7 @@ typedef struct { int16_t sqrt_rho_a; /// amplitude of PDSCH (compared to RS) in symbols containing pilots int16_t sqrt_rho_b; - /// Current HARQ process id + /// Current HARQ process id threadRx Odd and threadRx Even uint8_t current_harq_pid; /// Current subband antenna selection uint32_t antenna_alloc; diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c index 04794e3ffc..48d6bb86be 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c @@ -38,6 +38,7 @@ #include "SIMULATION/TOOLS/defs.h" //#define DEBUG_DLSCH_DECODING +extern double cpuf; void free_ue_dlsch(LTE_UE_DLSCH_t *dlsch) { @@ -270,7 +271,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, return(max_turbo_iterations); }*/ - /*harq_pid = dlsch->current_harq_pid; + /*harq_pid = dlsch->current_harq_pid[subframe&0x1]; if (harq_pid >= 8) { printf("dlsch_decoding.c: Illegal harq_pid %d\n",harq_pid); return(max_turbo_iterations); @@ -341,6 +342,8 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, printf("Segmentation: C %d, Cminus %d, Kminus %d, Kplus %d\n",harq_process->C,harq_process->Cminus,harq_process->Kminus,harq_process->Kplus); #endif + opp_enabled=1; + for (r=0; rC; r++) { @@ -376,7 +379,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, (r==0) ? harq_process->F : 0); #ifdef DEBUG_DLSCH_DECODING - LOG_I(PHY,"HARQ_PID %d Rate Matching Segment %d (coded bits %d,unpunctured/repeated bits %d, TBS %d, mod_order %d, nb_rb %d, Nl %d, rv %d, round %d)...\n", + LOG_D(PHY,"HARQ_PID %d Rate Matching Segment %d (coded bits %d,unpunctured/repeated bits %d, TBS %d, mod_order %d, nb_rb %d, Nl %d, rv %d, round %d)...\n", harq_pid,r, G, Kr*3, harq_process->TBS, @@ -459,6 +462,10 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, #if 1 if (err_flag == 0) { + LOG_D(PHY, "turbo algo Kr=%d cb_cnt=%d C=%d nbRB=%d TBSInput=%d TBSHarq=%d TBSplus24=%d mcs=%d Qm=%d RIV=%d round=%d maxIter %d\n", + Kr,r,harq_process->C,harq_process->nb_rb,A,harq_process->TBS, + harq_process->B,harq_process->mcs,harq_process->Qm,harq_process->rvidx,harq_process->round,dlsch->max_turbo_iterations); + if (llr8_flag) { AssertFatal (Kr >= 256, "turbo algo issue Kr=%d cb_cnt=%d C=%d nbRB=%d TBSInput=%d TBSHarq=%d TBSplus24=%d mcs=%d Qm=%d RIV=%d round=%d\n", Kr,r,harq_process->C,harq_process->nb_rb,A,harq_process->TBS,harq_process->B,harq_process->mcs,harq_process->Qm,harq_process->rvidx,harq_process->round); @@ -605,6 +612,13 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, &phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1); stop_meas(dlsch_turbo_decoding_stats); + printf("Segmentation: C %d r %d, dlsch_rate_unmatching_stats %5.3f dlsch_deinterleaving_stats %5.3f dlsch_turbo_decoding_stats %5.3f \n", + harq_process->C, + r, + dlsch_rate_unmatching_stats->p_time/(cpuf*1000.0), + dlsch_deinterleaving_stats->p_time/(cpuf*1000.0), + dlsch_turbo_decoding_stats->p_time/(cpuf*1000.0)); + } } } @@ -636,25 +650,28 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, harq_process->round++; - if(is_crnti) - { - LOG_D(PHY,"[UE %d] DLSCH: Setting NACK for subframe %d (pid %d, round %d, TBS %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round,harq_process->TBS); - } // printf("Rate: [UE %d] DLSCH: Setting NACK for subframe %d (pid %d, round %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round); if (harq_process->round >= dlsch->Mdlharq) { harq_process->status = SCH_IDLE; + harq_process->round = 0; + } + if(is_crnti) + { + LOG_D(PHY,"[UE %d] DLSCH: Setting NACK for subframe %d (pid %d, pid status %d, round %d/Max %d, TBS %d)\n", + phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->status,harq_process->round,dlsch->Mdlharq,harq_process->TBS); } return((1+dlsch->max_turbo_iterations)); } else { - LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for SFN/SF %d/%d (pid %d, round %d, subframe %d)\n", - phy_vars_ue->Mod_id, frame_rx_prev, subframe_rx_prev, harq_pid, harq_process->round, subframe); harq_process->status = SCH_IDLE; harq_process->round = 0; dlsch->harq_ack[subframe].ack = 1; dlsch->harq_ack[subframe].harq_id = harq_pid; dlsch->harq_ack[subframe].send_harq_status = 1; + LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for SFN/SF %d/%d (pid %d, pid status %d, round %d, subframe %d)\n", + phy_vars_ue->Mod_id, frame_rx_prev, subframe_rx_prev, harq_pid, harq_process->status, harq_process->round, subframe); + if(is_crnti) { LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for subframe %d (pid %d, round %d, TBS %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round,harq_process->TBS); @@ -908,7 +925,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, break; case PDSCH: // TB0 - dlsch_ue = phy_vars_ue->dlsch[eNB_id][0]; + dlsch_ue = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]; harq_pid = dlsch_ue->current_harq_pid; ue_id= (uint32_t)find_ue((int16_t)phy_vars_ue->pdcch_vars[(uint32_t)eNB_id]->crnti,PHY_vars_eNB_g[eNB_id2][CC_id]); DevAssert( ue_id != (uint32_t)-1 ); @@ -954,7 +971,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, break; case PDSCH1: { // TB1 - dlsch_ue = phy_vars_ue->dlsch[eNB_id][1]; + dlsch_ue = phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]; harq_pid = dlsch_ue->current_harq_pid; int8_t UE_id = find_ue( phy_vars_ue->pdcch_vars[eNB_id]->crnti, PHY_vars_eNB_g[eNB_id2][CC_id] ); DevAssert( UE_id != -1 ); @@ -1008,7 +1025,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, break; default: - dlsch_ue = phy_vars_ue->dlsch[eNB_id][0]; + dlsch_ue = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]; LOG_E(PHY,"dlsch_decoding_emul: FATAL, unknown DLSCH_id %d\n",dlsch_id); dlsch_ue->last_iteration_cnt = 1+dlsch_ue->max_turbo_iterations; return(1+dlsch_ue->max_turbo_iterations); diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c index 601eacc620..9ae212cd27 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c @@ -121,6 +121,7 @@ int rx_pdsch(PHY_VARS_UE *ue, + switch (type) { case SI_PDSCH: pdsch_vars = &ue->pdsch_vars_SI[eNB_id]; @@ -138,16 +139,18 @@ int rx_pdsch(PHY_VARS_UE *ue, case PDSCH: pdsch_vars = &ue->pdsch_vars[subframe&0x1][eNB_id]; - dlsch = ue->dlsch[eNB_id]; + dlsch = ue->dlsch[subframe&0x1][eNB_id]; + LOG_D(PHY,"AbsSubframe %d.%d / Sym %d harq_pid %d, harq status %d.%d \n", + frame,subframe,symbol,harq_pid, + dlsch[0]->harq_processes[harq_pid]->status, + dlsch[1]->harq_processes[harq_pid]->status); + if ((dlsch[0]->harq_processes[harq_pid]->status == ACTIVE) && (dlsch[1]->harq_processes[harq_pid]->status == ACTIVE)){ codeword_TB0 = dlsch[0]->harq_processes[harq_pid]->codeword; codeword_TB1 = dlsch[1]->harq_processes[harq_pid]->codeword; dlsch0_harq = dlsch[codeword_TB0]->harq_processes[harq_pid]; dlsch1_harq = dlsch[codeword_TB1]->harq_processes[harq_pid]; -#ifdef DEBUG_HARQ - printf("I am assuming both CW active\n"); -#endif } else if ((dlsch[0]->harq_processes[harq_pid]->status == ACTIVE) && (dlsch[1]->harq_processes[harq_pid]->status != ACTIVE) ) { @@ -159,8 +162,8 @@ int rx_pdsch(PHY_VARS_UE *ue, else if ((dlsch[0]->harq_processes[harq_pid]->status != ACTIVE) && (dlsch[1]->harq_processes[harq_pid]->status == ACTIVE) ){ codeword_TB1 = dlsch[1]->harq_processes[harq_pid]->codeword; - dlsch0_harq = dlsch[1]->harq_processes[harq_pid]; - dlsch1_harq = NULL; + dlsch0_harq = dlsch[1]->harq_processes[harq_pid]; + dlsch1_harq = NULL; codeword_TB0 = -1; } else { @@ -230,6 +233,9 @@ int rx_pdsch(PHY_VARS_UE *ue, } } + //LOG_I(PHY,"[rx_pdsch %d] AbsSubframe %d.%d symbol %d rxType %d beamformingMode %d, antennaPorts %d, eNB_id_i %d, n_connected_eNB %d\n", + // harq_pid, frame,subframe, symbol,rx_type, beamforming_mode, frame_parms->nb_antenna_ports_eNB,eNB_id_i,ue->n_connected_eNB); + if (frame_parms->nb_antenna_ports_eNB>1 && beamforming_mode==0) { #ifdef DEBUG_DLSCH_MOD LOG_I(PHY,"dlsch: using pmi %x (%p), rb_alloc %x\n",pmi2hex_2Ar1(dlsch0_harq->pmi_alloc),dlsch[0],dlsch0_harq->rb_alloc_even[0]); @@ -336,7 +342,7 @@ int rx_pdsch(PHY_VARS_UE *ue, LOG_W(PHY,"dlsch_demodulation: beamforming mode not supported yet.\n"); } - // printf("nb_rb = %d, eNB_id %d\n",nb_rb,eNB_id); + //printf("nb_rb = %d, eNB_id %d\n",nb_rb,eNB_id); if (nb_rb==0) { LOG_D(PHY,"dlsch_demodulation.c: nb_rb=0\n"); return(-1); @@ -383,6 +389,7 @@ int rx_pdsch(PHY_VARS_UE *ue, ((dlsch0_harq->mimo_mode >=DUALSTREAM_UNIFORM_PRECODING1) && (dlsch0_harq->mimo_mode <=DUALSTREAM_PUSCH_PRECODING))) { + //LOG_I(PHY,"Channel Level TM34 !!!!!!!! \n"); dlsch_channel_level_TM34(pdsch_vars[eNB_id]->dl_ch_estimates_ext, frame_parms, pdsch_vars[eNB_id]->pmi_ext, @@ -392,21 +399,23 @@ int rx_pdsch(PHY_VARS_UE *ue, nb_rb, dlsch0_harq->mimo_mode); + LOG_D(PHY,"Channel Level TM34 avg_0 %d, avg_1 %d, rx_type %d, rx_standard %d, interf_unaw_shift %d \n", avg_0[0], + avg_1[0], rx_type, rx_standard, interf_unaw_shift); if (rx_type>rx_standard) { - avg_0[0] = (log2_approx(avg_0[0])/2) -13 + interf_unaw_shift; - avg_1[0] = (log2_approx(avg_1[0])/2) -13 + interf_unaw_shift; + avg_0[0] = (log2_approx(avg_0[0])/2) - 5 + 2 ;//+ 2; + avg_1[0] = (log2_approx(avg_1[0])/2) - 5 + 2 ;//+ 2; pdsch_vars[eNB_id]->log2_maxh0 = cmax(avg_0[0],0); pdsch_vars[eNB_id]->log2_maxh1 = cmax(avg_1[0],0); - //printf("TM4 I-A log2_maxh0 = %d\n", lte_ue_pdsch_vars[eNB_id]->log2_maxh0); - //printf("TM4 I-A log2_maxh1 = %d\n", lte_ue_pdsch_vars[eNB_id]->log2_maxh1); + //printf("TM4 I-A log2_maxh0 = %d\n", pdsch_vars[eNB_id]->log2_maxh0); + //printf("TM4 I-A log2_maxh1 = %d\n", pdsch_vars[eNB_id]->log2_maxh1); } else { avg_0[0] = (log2_approx(avg_0[0])/2) - 13 + interf_unaw_shift; avg_1[0] = (log2_approx(avg_1[0])/2) - 13 + interf_unaw_shift; pdsch_vars[eNB_id]->log2_maxh0 = cmax(avg_0[0],0); pdsch_vars[eNB_id]->log2_maxh1 = cmax(avg_1[0],0); - //printf("TM4 I-UA log2_maxh0 = %d\n", lte_ue_pdsch_vars[eNB_id]->log2_maxh0); - //printf("TM4 I-UA log2_maxh1 = %d\n", lte_ue_pdsch_vars[eNB_id]->log2_maxh1); + //printf("TM4 I-UA log2_maxh0 = %d\n", pdsch_vars[eNB_id]->log2_maxh0); + //printf("TM4 I-UA log2_maxh1 = %d\n", pdsch_vars[eNB_id]->log2_maxh1); } } else if (dlsch0_harq->mimo_modelog2_maxh,avg[0],avgs); - LOG_D(PHY,"[DLSCH] mimo_mode = %d\n", dlsch0_harq->mimo_mode); + LOG_I(PHY,"[DLSCH] log2_maxh = %d [log2_maxh0 %d log2_maxh1 %d] (%d,%d)\n",pdsch_vars[eNB_id]->log2_maxh, + pdsch_vars[eNB_id]->log2_maxh0, + pdsch_vars[eNB_id]->log2_maxh1, + avg[0],avgs); + LOG_I(PHY,"[DLSCH] mimo_mode = %d\n", dlsch0_harq->mimo_mode); #endif } @@ -511,6 +523,7 @@ int rx_pdsch(PHY_VARS_UE *ue, } } else if ((dlsch0_harq->mimo_mode == LARGE_CDD) || ((dlsch0_harq->mimo_mode >=DUALSTREAM_UNIFORM_PRECODING1) && (dlsch0_harq->mimo_mode <=DUALSTREAM_PUSCH_PRECODING))){ + //LOG_I(PHY,"channel compensation TM34 !!!!!!!!!!!!!!!!!\n"); dlsch_channel_compensation_TM34(frame_parms, pdsch_vars[eNB_id], measurements, @@ -663,6 +676,7 @@ int rx_pdsch(PHY_VARS_UE *ue, ((dlsch0_harq->mimo_mode >=DUALSTREAM_UNIFORM_PRECODING1) && (dlsch0_harq->mimo_mode <=DUALSTREAM_PUSCH_PRECODING))){ // TM3 or TM4 if (frame_parms->nb_antenna_ports_eNB == 2) { + //LOG_I(PHY,"MRC Detection TM34 !!!!!!!!!\n"); dlsch_detection_mrc_TM34(frame_parms, pdsch_vars[eNB_id], harq_pid, @@ -724,6 +738,10 @@ int rx_pdsch(PHY_VARS_UE *ue, //i_mod should have been passed as a parameter } + //LOG_I(PHY,"compute LLRs rx_type dual ? %d rx_standard %d codeword_TB0 %d codeword_TB1 %d\n", rx_type==rx_IC_dual_stream, rx_standard, codeword_TB0, codeword_TB1); + //if (rx_type >= rx_IC_single_stream) + //LOG_I(PHY,"LLR0 Qm ? %d LLR1 Qm \n", dlsch0_harq->Qm, dlsch1_harq->Qm); + switch (dlsch0_harq->Qm) { case 2 : if ((rx_type==rx_standard) || (codeword_TB0 == -1) || (codeword_TB1 == -1)) { @@ -805,6 +823,7 @@ int rx_pdsch(PHY_VARS_UE *ue, } break; case 4 : + if ((rx_type==rx_standard ) || (codeword_TB0 == -1) || (codeword_TB1 == -1)) { dlsch_16qam_llr(frame_parms, pdsch_vars[eNB_id]->rxdataF_comp0, @@ -978,6 +997,7 @@ int rx_pdsch(PHY_VARS_UE *ue, return(-1); break; } + if (dlsch1_harq) { switch (get_Qm(dlsch1_harq->mcs)) { case 2 : @@ -1023,6 +1043,43 @@ int rx_pdsch(PHY_VARS_UE *ue, } } +#if 0 + if( (symbol == 13) && (dlsch0_harq->mimo_mode == 2) ) + { + LOG_E(PHY,"Dump Phy Chan Est \n"); + if(subframe&0x1) + { +#if 1 + //write_output("rxdataF0.m" , "rxdataF0", &common_vars->common_vars_rx_data_per_thread[subframe&0x1].rxdataF[0][0],14*frame_parms->ofdm_symbol_size,1,1); + //write_output("rxdataF1.m" , "rxdataF1", &common_vars->common_vars_rx_data_per_thread[subframe&0x1].rxdataF[0][0],14*frame_parms->ofdm_symbol_size,1,1); + //write_output("dl_ch_estimates00.m", "dl_ch_estimates00", &common_vars->common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][0][0],14*frame_parms->ofdm_symbol_size,1,1); + //write_output("dl_ch_estimates01.m", "dl_ch_estimates01", &common_vars->common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][1][0],14*frame_parms->ofdm_symbol_size,1,1); + //write_output("dl_ch_estimates10.m", "dl_ch_estimates10", &common_vars->common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][2][0],14*frame_parms->ofdm_symbol_size,1,1); + //write_output("dl_ch_estimates11.m", "dl_ch_estimates11", &common_vars->common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][3][0],14*frame_parms->ofdm_symbol_size,1,1); + + + //write_output("rxdataF_ext00.m" , "rxdataF_ext00", &pdsch_vars[eNB_id]->rxdataF_ext[0][0],14*frame_parms->N_RB_DL*12,1,1); + //write_output("rxdataF_ext01.m" , "rxdataF_ext01", &pdsch_vars[eNB_id]->rxdataF_ext[1][0],14*frame_parms->N_RB_DL*12,1,1); + //write_output("rxdataF_ext10.m" , "rxdataF_ext10", &pdsch_vars[eNB_id]->rxdataF_ext[2][0],14*frame_parms->N_RB_DL*12,1,1); + //write_output("rxdataF_ext11.m" , "rxdataF_ext11", &pdsch_vars[eNB_id]->rxdataF_ext[3][0],14*frame_parms->N_RB_DL*12,1,1); + write_output("dl_ch_estimates_ext00.m", "dl_ch_estimates_ext00", &pdsch_vars[eNB_id]->dl_ch_estimates_ext[0][0],14*frame_parms->N_RB_DL*12,1,1); + write_output("dl_ch_estimates_ext01.m", "dl_ch_estimates_ext01", &pdsch_vars[eNB_id]->dl_ch_estimates_ext[1][0],14*frame_parms->N_RB_DL*12,1,1); + write_output("dl_ch_estimates_ext10.m", "dl_ch_estimates_ext10", &pdsch_vars[eNB_id]->dl_ch_estimates_ext[2][0],14*frame_parms->N_RB_DL*12,1,1); + write_output("dl_ch_estimates_ext11.m", "dl_ch_estimates_ext11", &pdsch_vars[eNB_id]->dl_ch_estimates_ext[3][0],14*frame_parms->N_RB_DL*12,1,1); + write_output("rxdataF_comp00.m","rxdataF_comp00", &pdsch_vars[eNB_id]->rxdataF_comp0[0][0],14*frame_parms->N_RB_DL*12,1,1); + write_output("rxdataF_comp01.m","rxdataF_comp01", &pdsch_vars[eNB_id]->rxdataF_comp0[0][0],14*frame_parms->N_RB_DL*12,1,1); + write_output("rxdataF_comp10.m","rxdataF_comp10", &pdsch_vars[eNB_id]->rxdataF_comp0[0][0],14*frame_parms->N_RB_DL*12,1,1); + write_output("rxdataF_comp11.m","rxdataF_comp11", &pdsch_vars[eNB_id]->rxdataF_comp0[0][0],14*frame_parms->N_RB_DL*12,1,1); +#endif + write_output("llr0.m","llr0", &pdsch_vars[eNB_id]->llr[0][0],(14*nb_rb*12*dlsch1_harq->Qm) - 4*(nb_rb*4*dlsch1_harq->Qm),1,0); + write_output("llr1.m","llr1", &pdsch_vars[eNB_id]->llr[1][0],(14*nb_rb*12*dlsch1_harq->Qm) - 4*(nb_rb*4*dlsch1_harq->Qm),1,0); + + + AssertFatal(0," "); + } + + } +#endif #if T_TRACER T(T_UE_PHY_PDSCH_IQ, T_INT(eNB_id), T_INT(ue->Mod_id), T_INT(frame%1024), diff --git a/openair1/PHY/LTE_TRANSPORT/print_stats.c b/openair1/PHY/LTE_TRANSPORT/print_stats.c index c8d4292e8d..c3e40e1e72 100644 --- a/openair1/PHY/LTE_TRANSPORT/print_stats.c +++ b/openair1/PHY/LTE_TRANSPORT/print_stats.c @@ -107,9 +107,9 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char* buffer, int length len += sprintf(&buffer[len], "[UE PROC] Po_PUCCH = %d dBm (Po_NOMINAL_PUCCH %d dBm, g_pucch %d dB)\n", get_PL(ue->Mod_id,ue->CC_id,0)+ ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH+ - ue->dlsch[0][0]->g_pucch, + ue->dlsch[0][0][0]->g_pucch, ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH, - ue->dlsch[0][0]->g_pucch); + ue->dlsch[0][0][0]->g_pucch); } //for (eNB=0;eNBmeasurements.precoded_cqi_dB[eNB][0]); for (harq_pid=0;harq_pid<8;harq_pid++) { - len+=sprintf(&buffer[len],"[UE PROC] eNB %d: CW 0 harq_pid %d, mcs %d:",eNB,harq_pid,ue->dlsch[0][0]->harq_processes[harq_pid]->mcs); + len+=sprintf(&buffer[len],"[UE PROC] eNB %d: CW 0 harq_pid %d, mcs %d:",eNB,harq_pid,ue->dlsch[0][0][0]->harq_processes[harq_pid]->mcs); for (round=0;round<8;round++) len+=sprintf(&buffer[len],"%d/%d ", - ue->dlsch[0][0]->harq_processes[harq_pid]->errors[round], - ue->dlsch[0][0]->harq_processes[harq_pid]->trials[round]); + ue->dlsch[0][0][0]->harq_processes[harq_pid]->errors[round], + ue->dlsch[0][0][0]->harq_processes[harq_pid]->trials[round]); len+=sprintf(&buffer[len],"\n"); } - if (ue->dlsch[0] && ue->dlsch[0][0] && ue->dlsch[0][1]) { - len += sprintf(&buffer[len], "[UE PROC] Saved PMI for DLSCH eNB %d : %jx (%p)\n",eNB,pmi2hex_2Ar1(ue->dlsch[0][0]->pmi_alloc),ue->dlsch[0][0]); + if (ue->dlsch[0][0] && ue->dlsch[0][0][0] && ue->dlsch[0][0][1]) { + len += sprintf(&buffer[len], "[UE PROC] Saved PMI for DLSCH eNB %d : %jx (%p)\n",eNB,pmi2hex_2Ar1(ue->dlsch[0][0][0]->pmi_alloc),ue->dlsch[0][0][0]); - len += sprintf(&buffer[len], "[UE PROC] eNB %d: dl_power_off = %d\n",eNB,ue->dlsch[0][0]->harq_processes[0]->dl_power_off); + len += sprintf(&buffer[len], "[UE PROC] eNB %d: dl_power_off = %d\n",eNB,ue->dlsch[0][0][0]->harq_processes[0]->dl_power_off); for (harq_pid=0;harq_pid<8;harq_pid++) { - len+=sprintf(&buffer[len],"[UE PROC] eNB %d: CW 1 harq_pid %d, mcs %d:",eNB,harq_pid,ue->dlsch[0][1]->harq_processes[0]->mcs); + len+=sprintf(&buffer[len],"[UE PROC] eNB %d: CW 1 harq_pid %d, mcs %d:",eNB,harq_pid,ue->dlsch[0][0][1]->harq_processes[0]->mcs); for (round=0;round<8;round++) len+=sprintf(&buffer[len],"%d/%d ", - ue->dlsch[0][1]->harq_processes[harq_pid]->errors[round], - ue->dlsch[0][1]->harq_processes[harq_pid]->trials[round]); + ue->dlsch[0][0][1]->harq_processes[harq_pid]->errors[round], + ue->dlsch[0][0][1]->harq_processes[harq_pid]->trials[round]); len+=sprintf(&buffer[len],"\n"); } } diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_coding.c b/openair1/PHY/LTE_TRANSPORT/ulsch_coding.c index 9571ea6cd5..dbb7a16ac9 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_coding.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_coding.c @@ -233,7 +233,7 @@ uint32_t ulsch_encoding(uint8_t *a, LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms; PHY_MEASUREMENTS *meas = &ue->measurements; LTE_UE_ULSCH_t *ulsch=ue->ulsch[eNB_id]; - LTE_UE_DLSCH_t **dlsch = ue->dlsch[eNB_id]; + LTE_UE_DLSCH_t **dlsch = ue->dlsch[0][eNB_id]; uint16_t rnti = 0xffff; if (!ulsch) { @@ -966,7 +966,7 @@ int ulsch_encoding_emul(uint8_t *ulsch_buffer, { LTE_UE_ULSCH_t *ulsch = ue->ulsch[eNB_id]; - LTE_UE_DLSCH_t **dlsch = ue->dlsch[eNB_id]; + LTE_UE_DLSCH_t **dlsch = ue->dlsch[0][eNB_id]; PHY_MEASUREMENTS *meas = &ue->measurements; uint8_t tmode = ue->transmission_mode[eNB_id]; uint16_t rnti=ue->pdcch_vars[eNB_id]->crnti; diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c index ca67ccdb3c..bb2a5b3e22 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c @@ -2066,7 +2066,7 @@ uint32_t ulsch_decoding_emul(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc, // get local ue's ack if ((UE_index >= oai_emulation.info.first_ue_local) ||(UE_index <(oai_emulation.info.first_ue_local+oai_emulation.info.nb_ue_local))) { get_ack(&eNB->frame_parms, - PHY_vars_UE_g[UE_id][CC_id]->dlsch[0][0]->harq_ack, + PHY_vars_UE_g[UE_id][CC_id]->dlsch[0][0][0]->harq_ack, subframe, eNB->ulsch[UE_index]->harq_processes[harq_pid]->o_ACK,0); } else { // get remote UEs' ack diff --git a/openair1/PHY/MODULATION/slot_fep.c b/openair1/PHY/MODULATION/slot_fep.c index 3a3b3b4c0d..4b663776df 100644 --- a/openair1/PHY/MODULATION/slot_fep.c +++ b/openair1/PHY/MODULATION/slot_fep.c @@ -48,7 +48,7 @@ int slot_fep(PHY_VARS_UE *ue, unsigned int rx_offset; /*LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch_ue[eNB_id]; - unsigned char harq_pid = dlsch_ue[0]->current_harq_pid; + unsigned char harq_pid = dlsch_ue[0]->current_harq_pid; LTE_DL_UE_HARQ_t *dlsch0_harq = dlsch_ue[0]->harq_processes[harq_pid]; int uespec_pilot[9][1200];*/ diff --git a/openair1/PHY/TOOLS/lte_phy_scope.c b/openair1/PHY/TOOLS/lte_phy_scope.c index ca08f87519..681ee0b51c 100644 --- a/openair1/PHY/TOOLS/lte_phy_scope.c +++ b/openair1/PHY/TOOLS/lte_phy_scope.c @@ -510,16 +510,16 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, int beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0; - if (phy_vars_ue->dlsch[eNB_id][0]!=NULL) { - harq_pid = phy_vars_ue->dlsch[eNB_id][0]->current_harq_pid; + if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]!=NULL) { + harq_pid = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid; if (harq_pid>=8) return; - mcs = phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->mcs; + mcs = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->mcs; // Button 0 - if(!phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->dl_power_off) { + if(!phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->dl_power_off) { // we are in TM5 fl_show_object(form->button_0); } @@ -530,12 +530,12 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, } // coded_bits_per_codeword = frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti); - if (phy_vars_ue->dlsch[eNB_id][0]!=NULL) { + if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]!=NULL) { coded_bits_per_codeword = get_G(frame_parms, - phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->nb_rb, - phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even, + phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->nb_rb, + phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even, get_Qm(mcs), - phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->Nl, + phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->Nl, num_pdcch_symbols, frame, subframe, @@ -768,4 +768,4 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, } free(chest_t_abs); -} \ No newline at end of file +} diff --git a/openair1/PHY/TOOLS/lte_phy_scope_tm4.c b/openair1/PHY/TOOLS/lte_phy_scope_tm4.c index 60c5ace2c5..6807f1f6f4 100755 --- a/openair1/PHY/TOOLS/lte_phy_scope_tm4.c +++ b/openair1/PHY/TOOLS/lte_phy_scope_tm4.c @@ -448,11 +448,11 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, int mcs1=0; unsigned char harq_pid = 0; int beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0; - if (phy_vars_ue->dlsch[eNB_id][0]!=NULL) { - harq_pid = phy_vars_ue->dlsch[eNB_id][0]->current_harq_pid; + if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]!=NULL) { + harq_pid = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid; if (harq_pid>=8) return; - mcs0 = phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->mcs; + mcs0 = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->mcs; // Button 0 /* if(!phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->dl_power_off) { @@ -461,23 +461,23 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, } */ } - if (phy_vars_ue->dlsch[eNB_id][1]!=NULL) { - harq_pid = phy_vars_ue->dlsch[eNB_id][1]->current_harq_pid; + if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]!=NULL) { + harq_pid = phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]->current_harq_pid; if (harq_pid>=8) return; - mcs1 = phy_vars_ue->dlsch[eNB_id][1]->harq_processes[harq_pid]->mcs; + mcs1 = phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]->harq_processes[harq_pid]->mcs; } if (phy_vars_ue->pdcch_vars[eNB_id]!=NULL) { num_pdcch_symbols = phy_vars_ue->pdcch_vars[eNB_id]->num_pdcch_symbols; } // coded_bits_per_codeword = frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti); - if (phy_vars_ue->dlsch[eNB_id][0]!=NULL) { + if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]!=NULL) { mod0 = get_Qm(mcs0); coded_bits_per_codeword0 = get_G(frame_parms, - phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->nb_rb, - phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even, + phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->nb_rb, + phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even, get_Qm(mcs0), - phy_vars_ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->Nl, + phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->Nl, num_pdcch_symbols, frame, subframe, @@ -486,13 +486,13 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, coded_bits_per_codeword0 = 0; //frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti); mod0=0; } - if (phy_vars_ue->dlsch[eNB_id][1]!=NULL) { + if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]!=NULL) { mod1 = get_Qm(mcs1); coded_bits_per_codeword1 = get_G(frame_parms, - phy_vars_ue->dlsch[eNB_id][1]->harq_processes[harq_pid]->nb_rb, - phy_vars_ue->dlsch[eNB_id][1]->harq_processes[harq_pid]->rb_alloc_even, + phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]->harq_processes[harq_pid]->nb_rb, + phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]->harq_processes[harq_pid]->rb_alloc_even, get_Qm(mcs1), - phy_vars_ue->dlsch[eNB_id][1]->harq_processes[harq_pid]->Nl, + phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]->harq_processes[harq_pid]->Nl, num_pdcch_symbols, frame, subframe, diff --git a/openair1/PHY/defs.h b/openair1/PHY/defs.h index d70bfb3f72..024e8ddf59 100644 --- a/openair1/PHY/defs.h +++ b/openair1/PHY/defs.h @@ -706,7 +706,7 @@ typedef struct { LTE_DL_FRAME_PARMS frame_parms_before_ho; LTE_UE_COMMON common_vars; - LTE_UE_PDSCH *pdsch_vars[2][NUMBER_OF_CONNECTED_eNB_MAX+1]; + LTE_UE_PDSCH *pdsch_vars[2][NUMBER_OF_CONNECTED_eNB_MAX+1]; // two RxTx Threads LTE_UE_PDSCH_FLP *pdsch_vars_flp[NUMBER_OF_CONNECTED_eNB_MAX+1]; LTE_UE_PDSCH *pdsch_vars_SI[NUMBER_OF_CONNECTED_eNB_MAX+1]; LTE_UE_PDSCH *pdsch_vars_ra[NUMBER_OF_CONNECTED_eNB_MAX+1]; @@ -715,7 +715,7 @@ typedef struct { LTE_UE_PBCH *pbch_vars[NUMBER_OF_CONNECTED_eNB_MAX]; LTE_UE_PDCCH *pdcch_vars[NUMBER_OF_CONNECTED_eNB_MAX]; LTE_UE_PRACH *prach_vars[NUMBER_OF_CONNECTED_eNB_MAX]; - LTE_UE_DLSCH_t *dlsch[NUMBER_OF_CONNECTED_eNB_MAX][2]; + LTE_UE_DLSCH_t *dlsch[2][NUMBER_OF_CONNECTED_eNB_MAX][2]; // two RxTx Threads LTE_UE_ULSCH_t *ulsch[NUMBER_OF_CONNECTED_eNB_MAX]; LTE_UE_DLSCH_t *dlsch_SI[NUMBER_OF_CONNECTED_eNB_MAX]; LTE_UE_DLSCH_t *dlsch_ra[NUMBER_OF_CONNECTED_eNB_MAX]; @@ -872,7 +872,7 @@ typedef struct { time_stats_t phy_proc; time_stats_t phy_proc_tx; - time_stats_t phy_proc_rx; + time_stats_t phy_proc_rx[2]; uint32_t use_ia_receiver; @@ -885,6 +885,10 @@ typedef struct { time_stats_t ulsch_interleaving_stats; time_stats_t ulsch_multiplexing_stats; + time_stats_t generic_stat; + time_stats_t pdsch_procedures_stat; + time_stats_t dlsch_procedures_stat; + time_stats_t ofdm_demod_stats; time_stats_t dlsch_rx_pdcch_stats; time_stats_t rx_dft_stats; diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c index cd8fbdbc8e..42c75bdc7c 100644 --- a/openair1/SCHED/phy_procedures_lte_ue.c +++ b/openair1/SCHED/phy_procedures_lte_ue.c @@ -75,6 +75,7 @@ fifo_dump_emos_UE emos_dump_UE; extern int oai_exit; +extern double cpuf; @@ -90,10 +91,10 @@ void dump_dlsch(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t subf uint8_t nsymb = (ue->frame_parms.Ncp == 0) ? 14 : 12; coded_bits_per_codeword = get_G(&ue->frame_parms, - ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->nb_rb, - ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even, - ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->Qm, - ue->dlsch[eNB_id][0]->harq_processes[harq_pid]->Nl, + ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->nb_rb, + ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even, + ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->Qm, + ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->Nl, ue->pdcch_vars[eNB_id]->num_pdcch_symbols, proc->frame_rx, subframe, @@ -268,37 +269,39 @@ void phy_reset_ue(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index) uint8_t i,j,k,s; PHY_VARS_UE *ue = PHY_vars_UE_g[Mod_id][CC_id]; - //[NUMBER_OF_CONNECTED_eNB_MAX][2]; - for(i=0; idlsch[i][j]) { - for(k=0; kdlsch[i][j]->harq_processes[k]; k++) { - ue->dlsch[i][j]->harq_processes[k]->status = SCH_IDLE; - for (s=0; s<10; s++) { - // reset ACK/NACK bit to DTX for all subframes s = 0..9 - ue->dlsch[i][j]->harq_ack[s].ack = 2; - ue->dlsch[i][j]->harq_ack[s].send_harq_status = 0; - ue->dlsch[i][j]->harq_ack[s].vDAI_UL = 0xff; - ue->dlsch[i][j]->harq_ack[s].vDAI_DL = 0xff; + //[NUMBER_OF_RX_THREAD=2][NUMBER_OF_CONNECTED_eNB_MAX][2]; + for(int l=0; l<2; l++) { + for(i=0; idlsch[l][i][j]) { + for(k=0; kdlsch[l][i][j]->harq_processes[k]; k++) { + ue->dlsch[l][i][j]->harq_processes[k]->status = SCH_IDLE; + for (s=0; s<10; s++) { + // reset ACK/NACK bit to DTX for all subframes s = 0..9 + ue->dlsch[l][i][j]->harq_ack[s].ack = 2; + ue->dlsch[l][i][j]->harq_ack[s].send_harq_status = 0; + ue->dlsch[l][i][j]->harq_ack[s].vDAI_UL = 0xff; + ue->dlsch[l][i][j]->harq_ack[s].vDAI_DL = 0xff; + } + } + } } - } - } - } - //UL HARQ - if(ue->ulsch[i]) { - for(k=0; kulsch[i]->harq_processes[k]; k++) { - ue->ulsch[i]->harq_processes[k]->status = SCH_IDLE; - //Set NDIs for all UL HARQs to 0 - // ue->ulsch[i]->harq_processes[k]->Ndi = 0; + //UL HARQ + if(ue->ulsch[i]) { + for(k=0; kulsch[i]->harq_processes[k]; k++) { + ue->ulsch[i]->harq_processes[k]->status = SCH_IDLE; + //Set NDIs for all UL HARQs to 0 + // ue->ulsch[i]->harq_processes[k]->Ndi = 0; + + } + } + + // flush Msg3 buffer + ue->ulsch_Msg3_active[i] = 0; } - } - - // flush Msg3 buffer - ue->ulsch_Msg3_active[i] = 0; - } } @@ -327,7 +330,8 @@ void ra_succeeded(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index) for (i=0; i<8; i++) { if (PHY_vars_UE_g[Mod_id][CC_id]->ulsch[eNB_index]->harq_processes[i]) { PHY_vars_UE_g[Mod_id][CC_id]->ulsch[eNB_index]->harq_processes[i]->status=IDLE; - PHY_vars_UE_g[Mod_id][CC_id]->dlsch[eNB_index][0]->harq_processes[i]->round=0; + PHY_vars_UE_g[Mod_id][CC_id]->dlsch[0][eNB_index][0]->harq_processes[i]->round=0; + PHY_vars_UE_g[Mod_id][CC_id]->dlsch[1][eNB_index][0]->harq_processes[i]->round=0; } } @@ -364,7 +368,7 @@ void process_timing_advance(uint8_t Mod_id,uint8_t CC_id,int16_t timing_advance) PHY_vars_UE_g[Mod_id][CC_id]->timing_advance = PHY_vars_UE_g[Mod_id][CC_id]->timing_advance+timing_advance*4; //this is for 25RB only!!! - LOG_D(PHY,"[UE %d] Got timing advance %d from MAC, new value %d\n",Mod_id, timing_advance, PHY_vars_UE_g[Mod_id][CC_id]->timing_advance); + LOG_I(PHY,"[UE %d] Got timing advance %d from MAC, new value %d\n",Mod_id, timing_advance, PHY_vars_UE_g[Mod_id][CC_id]->timing_advance); } @@ -638,7 +642,7 @@ void ue_compute_srs_occasion(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id uint8_t pucch_ack_payload[2]; if (get_ack(&ue->frame_parms, - ue->dlsch[eNB_id][0]->harq_ack, + ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->harq_ack, subframe_tx,pucch_ack_payload,0) > 0) { is_sr_an_subframe = 1; @@ -790,6 +794,7 @@ PUCCH_FMT_t get_pucch_format(lte_frame_type_t frame_type, return pucch_format2; } } + return pucch_format1a; } uint16_t get_n1_pucch(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, @@ -929,11 +934,11 @@ uint16_t get_n1_pucch(PHY_VARS_UE *ue, n1_pucch1 = get_Np(frame_parms->N_RB_DL,nCCE1,1) + nCCE1 + frame_parms->pucch_config_common.n1PUCCH_AN; // set ACK/NAK to values if not DTX - if (ue->dlsch[eNB_id][0]->harq_ack[(6+last_dl)%10].send_harq_status>0) // n-6 // subframe 6 is to be ACK/NAKed - harq_ack1 = ue->dlsch[eNB_id][0]->harq_ack[(6+last_dl)%10].ack; + if (ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->harq_ack[(6+last_dl)%10].send_harq_status>0) // n-6 // subframe 6 is to be ACK/NAKed + harq_ack1 = ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->harq_ack[(6+last_dl)%10].ack; - if (ue->dlsch[eNB_id][0]->harq_ack[5+last_dl].send_harq_status>0) // n-6 // subframe 5 is to be ACK/NAKed - harq_ack0 = ue->dlsch[eNB_id][0]->harq_ack[5+last_dl].ack; + if (ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->harq_ack[5+last_dl].send_harq_status>0) // n-6 // subframe 5 is to be ACK/NAKed + harq_ack0 = ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->harq_ack[5+last_dl].ack; if (harq_ack1!=2) { // n-6 // subframe 6,8,0 and maybe 5,7,9 is to be ACK/NAKed @@ -1040,10 +1045,10 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt int subframe_tx = proc->subframe_tx; int frame_tx = proc->frame_tx; int ulsch_start; - int overflow=0; #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) + int overflow=0; int k,l; - int dummy_tx_buffer[frame_parms->samples_per_tti] __attribute__((aligned(16))); + int dummy_tx_buffer[3840*4] __attribute__((aligned(16))); #endif VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_ULSCH_COMMON,VCD_FUNCTION_IN); @@ -1069,22 +1074,18 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt ulsch_start = (frame_parms->samples_per_tti*subframe_tx)-ue->N_TA_offset; //-ue->timing_advance; #endif //else EXMIMO -//#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) +#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) if (empty_subframe) { //#if 1 overflow = ulsch_start - 9*frame_parms->samples_per_tti; for (aa=0; aanb_antennas_tx; aa++) { - if (overflow > 0) - { - memset(&ue->common_vars.txdata[aa][ulsch_start],0,4*(frame_parms->samples_per_tti-overflow)); - memset(&ue->common_vars.txdata[aa][0],0,4*overflow); - } - else - { - memset(&ue->common_vars.txdata[aa][ulsch_start],0,4*frame_parms->samples_per_tti); - } + memset(&ue->common_vars.txdata[aa][ulsch_start],0, + 4*cmin(frame_parms->samples_per_tti-overflow,frame_parms->samples_per_tti)); + + if (overflow> 0) + memset(&ue->common_vars.txdata[aa][0],0,4*overflow); } /*#else overflow = ulsch_start - 9*frame_parms->samples_per_tti; @@ -1102,7 +1103,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt #endif*/ return; } -//#endif +#endif if ((frame_tx%100) == 0) LOG_D(PHY,"[UE %d] Frame %d, subframe %d: ulsch_start = %d (rxoff %d, HW TA %d, timing advance %d, TA_offset %d\n", @@ -1336,7 +1337,8 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB uint8_t ulsch_input_buffer[5477] __attribute__ ((aligned(32))); uint8_t access_mode; uint8_t Nbundled=0; - uint8_t ack_status=0; + uint8_t ack_status_cw0=0; + uint8_t ack_status_cw1=0; VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_ULSCH_UESPEC,VCD_FUNCTION_IN); @@ -1437,11 +1439,16 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB ue->ulsch[eNB_id]->harq_processes[harq_pid]->round = 0; } - ack_status = reset_ack(&ue->frame_parms, - ue->dlsch[eNB_id][0]->harq_ack, - subframe_tx, - ue->ulsch[eNB_id]->o_ACK,0); - Nbundled = ack_status; + ack_status_cw0 = reset_ack(&ue->frame_parms, + ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->harq_ack, + subframe_tx, + ue->ulsch[eNB_id]->o_ACK,0); + ack_status_cw1 = reset_ack(&ue->frame_parms, + ue->dlsch[proc->subframe_rx&0x1][eNB_id][1]->harq_ack, + subframe_tx, + ue->ulsch[eNB_id]->o_ACK,1); + + Nbundled = ack_status_cw0; first_rb = ue->ulsch[eNB_id]->harq_processes[harq_pid]->first_rb; nb_rb = ue->ulsch[eNB_id]->harq_processes[harq_pid]->nb_rb; @@ -1449,31 +1456,31 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB - if (ack_status > 0) { + if (ack_status_cw0 > 0) { // check if we received a PDSCH at subframe_tx - 4 // ==> send ACK/NACK on PUSCH - ue->ulsch[eNB_id]->harq_processes[harq_pid]->O_ACK = 1; + ue->ulsch[eNB_id]->harq_processes[harq_pid]->O_ACK = ack_status_cw0 + ack_status_cw1; #if T_TRACER if(ue->ulsch[eNB_id]->o_ACK[0]) { LOG_I(PHY,"PUSCH ACK\n"); - T(T_UE_PHY_DLSCH_UE_ACK, T_INT(eNB_id), T_INT(frame_tx%1024), T_INT(subframe_tx), T_INT(Mod_id), T_INT(ue->dlsch[eNB_id][0]->rnti), - T_INT(ue->dlsch[eNB_id][0]->current_harq_pid)); + T(T_UE_PHY_DLSCH_UE_ACK, T_INT(eNB_id), T_INT(frame_tx%1024), T_INT(subframe_tx), T_INT(Mod_id), T_INT(ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->rnti), + T_INT(ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->current_harq_pid)); } else { LOG_I(PHY,"PUSCH NACK\n"); - T(T_UE_PHY_DLSCH_UE_NACK, T_INT(eNB_id), T_INT(frame_tx%1024), T_INT(subframe_tx), T_INT(Mod_id), T_INT(ue->dlsch[eNB_id][0]->rnti), - T_INT(ue->dlsch[eNB_id][0]->current_harq_pid)); + T(T_UE_PHY_DLSCH_UE_NACK, T_INT(eNB_id), T_INT(frame_tx%1024), T_INT(subframe_tx), T_INT(Mod_id), T_INT(ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->rnti), + T_INT(ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->current_harq_pid)); } #endif - LOG_D(PHY,"[UE %d][PDSCH %x] AbsSubFrame %d.%d Generating ACK (%d,%d) for %d bits on PUSCH\n", + LOG_I(PHY,"[UE %d][PDSCH %x] AbsSubFrame %d.%d Generating ACK (%d,%d) for %d bits on PUSCH\n", Mod_id, ue->ulsch[eNB_id]->rnti, - frame_tx%1024,subframe_tx, + frame_tx,subframe_tx, ue->ulsch[eNB_id]->o_ACK[0],ue->ulsch[eNB_id]->o_ACK[1], ue->ulsch[eNB_id]->harq_processes[harq_pid]->O_ACK); } @@ -1530,6 +1537,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB mac_xface->macphy_exit("Error in ulsch_coding"); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX, VCD_FUNCTION_OUT); stop_meas(&ue->phy_proc_tx); + printf("------FULL TX PROC : %5.2f ------\n",ue->phy_proc_tx.p_time/(cpuf*1000.0)); return; } } @@ -1636,8 +1644,8 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB T(T_UE_PHY_PUSCH_TX_POWER, T_INT(eNB_id),T_INT(Mod_id), T_INT(frame_tx%1024), T_INT(subframe_tx),T_INT(ue->tx_power_dBm[subframe_tx]), T_INT(tx_amp),T_INT(ue->ulsch[eNB_id]->f_pusch),T_INT(get_PL(Mod_id,0,eNB_id)),T_INT(nb_rb)); #endif - LOG_D(PHY,"[UE %d][PUSCH %d] AbsSubFrame %d.%d, generating PUSCH, Po_PUSCH: %d dBm (max %d dBm), amp %d\n", - Mod_id,harq_pid,frame_tx%1024,subframe_tx,ue->tx_power_dBm[subframe_tx],ue->tx_power_max_dBm, tx_amp); + LOG_D(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d, generating PUSCH, Po_PUSCH: %d dBm (max %d dBm), amp %d\n", + Mod_id,harq_pid,frame_tx,subframe_tx,ue->tx_power_dBm[subframe_tx],ue->tx_power_max_dBm, tx_amp); start_meas(&ue->ulsch_modulation_stats); ulsch_modulation(ue->common_vars.txdataF, tx_amp, @@ -1770,13 +1778,13 @@ void get_pucch_param(PHY_VARS_UE *ue, { pucch_resource[0] = get_n1_pucch(ue, proc, - ue->dlsch[eNB_id][0]->harq_ack, + ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->harq_ack, eNB_id, ack_payload, SR); pucch_payload[0] = ack_payload[0]; - //pucch_payload[1] = ack_payload[1]; - pucch_payload[1] = 1; + pucch_payload[1] = ack_payload[1]; + //pucch_payload[1] = 1; } break; @@ -1785,7 +1793,7 @@ void get_pucch_param(PHY_VARS_UE *ue, pucch_resource[0] = ue->cqi_report_config[eNB_id].CQI_ReportPeriodic.cqi_PUCCH_ResourceIndex; if(cqi_report) { - pucch_payload[0] = get_pucch2_cqi(ue,eNB_id,plength); + pucch_payload[0] = get_pucch2_cqi(ue,eNB_id,(int*)plength); } else { @@ -1806,14 +1814,12 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin uint8_t pucch_ack_payload[2]; - uint8_t n1_pucch,n2_pucch; + uint8_t n2_pucch; uint16_t pucch_resource; ANFBmode_t bundling_flag; PUCCH_FMT_t format; uint8_t SR_payload; - uint16_t CQI_payload; - uint16_t RI_payload; uint8_t pucch_payload[2]; uint16_t len; @@ -1824,13 +1830,11 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin int CC_id = ue->CC_id; int tx_amp; int16_t Po_PUCCH; - uint8_t ack_status=0; uint8_t ack_status_cw0=0; uint8_t ack_status_cw1=0; uint8_t nb_cw=0; uint8_t cqi_status=0; uint8_t ri_status=0; - uint8_t ack_sr_generated = 0; VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PUCCH,VCD_FUNCTION_IN); @@ -1891,13 +1895,13 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin } ack_status_cw0 = reset_ack(&ue->frame_parms, - ue->dlsch[eNB_id][0]->harq_ack, + ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->harq_ack, subframe_tx, pucch_ack_payload, 0); ack_status_cw1 = reset_ack(&ue->frame_parms, - ue->dlsch[eNB_id][1]->harq_ack, + ue->dlsch[proc->subframe_rx&0x1][eNB_id][1]->harq_ack, subframe_tx, pucch_ack_payload, 1); @@ -1936,11 +1940,10 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin SR_payload, cqi_status, &pucch_resource, - &pucch_payload, + (uint8_t *)&pucch_payload, &len); - LOG_D(PHY,"PUCCH feedback AbsSubframe %d.%d SR %d NbCW %d AckNack %d.%d CQI %d RI %d format %d pucch_resource %d pucch_payload %d %d \n", - frame_tx%1024, subframe_tx, SR_payload, nb_cw, pucch_ack_payload[0], pucch_ack_payload[1], cqi_status, ri_status, format, pucch_resource,pucch_payload[0],pucch_payload[1]); + LOG_D(PHY,"PUCCH feedback AbsSubframe %d.%d SR %d NbCW %d AckNack %d.%d CQI %d RI %d format %d pucch_resource %d pucch_payload %d %d \n", frame_tx, subframe_tx, SR_payload, nb_cw, pucch_ack_payload[0], pucch_ack_payload[1], cqi_status, ri_status, format, pucch_resource,pucch_payload[0],pucch_payload[1]); // Part - IV @@ -1971,13 +1974,13 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin #endif #if T_TRACER T(T_UE_PHY_PUCCH_TX_POWER, T_INT(eNB_id),T_INT(Mod_id), T_INT(frame_tx%1024), T_INT(subframe_tx),T_INT(ue->tx_power_dBm[subframe_tx]), - T_INT(tx_amp),T_INT(ue->dlsch[eNB_id][0]->g_pucch),T_INT(get_PL(ue->Mod_id,ue->CC_id,eNB_id))); + T_INT(tx_amp),T_INT(ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->g_pucch),T_INT(get_PL(ue->Mod_id,ue->CC_id,eNB_id))); #endif if(format == pucch_format1) { LOG_D(PHY,"[UE %d][SR %x] AbsSubframe %d.%d Generating PUCCH 1 (SR for PUSCH), an_srs_simultanous %d, shorten_pucch %d, n1_pucch %d, Po_PUCCH %d\n", Mod_id, - ue->dlsch[eNB_id][0]->rnti, + ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->rnti, frame_tx, subframe_tx, frame_parms->soundingrs_ul_config_common.ackNackSRS_SimultaneousTransmission, isShortenPucch, @@ -1989,7 +1992,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin if (SR_payload>0) { LOG_D(PHY,"[UE %d][SR %x] AbsSubFrame %d.%d Generating PUCCH %s payload %d,%d (with SR for PUSCH), an_srs_simultanous %d, shorten_pucch %d, n1_pucch %d, Po_PUCCH %d, amp %d\n", Mod_id, - ue->dlsch[eNB_id][0]->rnti, + ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->rnti, frame_tx % 1024, subframe_tx, (format == pucch_format1a? "1a": ( format == pucch_format1b? "1b" : "??")), @@ -2002,7 +2005,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin } else { LOG_D(PHY,"[UE %d][PDSCH %x] AbsSubFrame %d.%d rx_offset_diff: %d, Generating PUCCH %s, an_srs_simultanous %d, shorten_pucch %d, n1_pucch %d, b[0]=%d,b[1]=%d (SR_Payload %d), Po_PUCCH %d, amp %d\n", Mod_id, - ue->dlsch[eNB_id][0]->rnti, + ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->rnti, frame_tx%1024, subframe_tx,ue->rx_offset_diff, (format == pucch_format1a? "1a": ( format == pucch_format1b? "1b" : "??")), @@ -2017,13 +2020,13 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin #if T_TRACER if(pucch_payload[0]) { - T(T_UE_PHY_DLSCH_UE_ACK, T_INT(eNB_id), T_INT(frame_tx%1024), T_INT(subframe_tx), T_INT(Mod_id), T_INT(ue->dlsch[eNB_id][0]->rnti), - T_INT(ue->dlsch[eNB_id][0]->current_harq_pid)); + T(T_UE_PHY_DLSCH_UE_ACK, T_INT(eNB_id), T_INT(frame_tx%1024), T_INT(subframe_tx), T_INT(Mod_id), T_INT(ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->rnti), + T_INT(ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->current_harq_pid)); } else { - T(T_UE_PHY_DLSCH_UE_NACK, T_INT(eNB_id), T_INT(frame_tx%1024), T_INT(subframe_tx), T_INT(Mod_id), T_INT(ue->dlsch[eNB_id][0]->rnti), - T_INT(ue->dlsch[eNB_id][0]->current_harq_pid)); + T(T_UE_PHY_DLSCH_UE_NACK, T_INT(eNB_id), T_INT(frame_tx%1024), T_INT(subframe_tx), T_INT(Mod_id), T_INT(ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->rnti), + T_INT(ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->current_harq_pid)); } #endif @@ -2076,12 +2079,12 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin #endif #if T_TRACER T(T_UE_PHY_PUCCH_TX_POWER, T_INT(eNB_id),T_INT(Mod_id), T_INT(frame_tx%1024), T_INT(subframe_tx),T_INT(ue->tx_power_dBm[subframe_tx]), - T_INT(tx_amp),T_INT(ue->dlsch[eNB_id][0]->g_pucch),T_INT(get_PL(ue->Mod_id,ue->CC_id,eNB_id))); + T_INT(tx_amp),T_INT(ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->g_pucch),T_INT(get_PL(ue->Mod_id,ue->CC_id,eNB_id))); #endif - LOG_D(PHY,"[UE %d][RNTI %x] AbsSubFrame %d.%d Generating PUCCH 2 (RI or CQI), n2_pucch %d, Po_PUCCH %d, isShortenPucch %d, amp %d\n", + LOG_I(PHY,"[UE %d][RNTI %x] AbsSubFrame %d.%d Generating PUCCH 2 (RI or CQI), n2_pucch %d, Po_PUCCH %d, isShortenPucch %d, amp %d\n", Mod_id, - ue->dlsch[eNB_id][0]->rnti, + ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->rnti, frame_tx%1024, subframe_tx, n2_pucch, Po_PUCCH, @@ -2106,13 +2109,13 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin case pucch_format2a: LOG_I(PHY,"[UE %d][RNTI %x] AbsSubFrame %d.%d Generating PUCCH 2a (RI or CQI) Ack/Nack 1bit \n", Mod_id, - ue->dlsch[eNB_id][0]->rnti, + ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->rnti, frame_tx%1024, subframe_tx); break; case pucch_format2b: LOG_I(PHY,"[UE %d][RNTI %x] AbsSubFrame %d.%d Generating PUCCH 2b (RI or CQI) Ack/Nack 2bits\n", Mod_id, - ue->dlsch[eNB_id][0]->rnti, + ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->rnti, frame_tx%1024, subframe_tx); break; default: @@ -2254,7 +2257,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,ui // reset DL ACK/NACK status reset_ack(&ue->frame_parms, - ue->dlsch[eNB_id][0]->harq_ack, + ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->harq_ack, subframe_tx, ue->ulsch[eNB_id]->o_ACK,0); @@ -2451,8 +2454,8 @@ void phy_procedures_emos_UE_RX(PHY_VARS_UE *ue,uint8_t last_slot,uint8_t eNB_id) emos_dump_UE.total_TBS_last = ue->total_TBS_last[eNB_id]; emos_dump_UE.bitrate = ue->bitrate[eNB_id]; emos_dump_UE.total_received_bits = ue->total_received_bits[eNB_id]; - emos_dump_UE.pmi_saved = ue->dlsch[eNB_id][0]->pmi_alloc; - emos_dump_UE.mcs = ue->dlsch[eNB_id][0]->harq_processes[ue->dlsch[eNB_id][0]->current_harq_pid]->mcs; + emos_dump_UE.pmi_saved = ue->dlsch[subframe&0x1][eNB_id][0]->pmi_alloc; + emos_dump_UE.mcs = ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[ue->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]->mcs; emos_dump_UE.use_ia_receiver = openair_daq_vars.use_ia_receiver; bytes = rtf_put(CHANSOUNDER_FIFO_MINOR, &emos_dump_UE, sizeof(fifo_dump_emos_UE)); @@ -2859,7 +2862,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint (void *)&dci_alloc_rx[i].dci_pdu, ue->pdcch_vars[eNB_id]->crnti, dci_alloc_rx[i].format, - ue->dlsch[eNB_id], + ue->dlsch[subframe_rx&0x1][eNB_id], &ue->frame_parms, ue->pdsch_config_dedicated, SI_RNTI, @@ -2876,7 +2879,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint (dci_alloc_rx[i].format == format2A) || (dci_alloc_rx[i].format == format2B)) { - ue->dlsch[eNB_id][0]->g_pucch += ue->dlsch[eNB_id][0]->harq_processes[ue->dlsch[eNB_id][0]->current_harq_pid]->delta_PUCCH; + ue->dlsch[subframe_rx&0x1][eNB_id][0]->g_pucch += ue->dlsch[subframe_rx&0x1][eNB_id][0]->harq_processes[ue->dlsch[subframe_rx&0x1][eNB_id][0]->current_harq_pid]->delta_PUCCH; } ue->dlsch_received[eNB_id]++; @@ -2884,7 +2887,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint #ifdef DEBUG_PHY_PROC LOG_D(PHY,"[UE %d] Generated UE DLSCH C_RNTI format %d\n",ue->Mod_id,dci_alloc_rx[i].format); dump_dci(&ue->frame_parms, &dci_alloc_rx[i]); - LOG_D(PHY,"[UE %d] *********** dlsch->active in subframe %d=> %d\n",ue->Mod_id,subframe_rx,ue->dlsch[eNB_id][0]->active); + LOG_D(PHY,"[UE %d] *********** dlsch->active in subframe %d=> %d\n",ue->Mod_id,subframe_rx,ue->dlsch[subframe_rx&0x1][eNB_id][0]->active); #endif // we received a CRNTI, so we're in PUSCH @@ -3262,7 +3265,14 @@ void ue_pdsch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, PDSC dual_stream_UE = 1; eNB_id_i = ue->n_connected_eNB; i_mod = dlsch0->harq_processes[harq_pid]->Qm; - } else { + } + else if((pdsch==PDSCH) && (ue->transmission_mode[eNB_id]==3)) + { + dual_stream_UE = rx_IC_dual_stream; + eNB_id_i = eNB_id; + i_mod = 0; + } + else { dual_stream_UE = 0; eNB_id_i = eNB_id+1; i_mod = 0; @@ -3401,11 +3411,34 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, int harq_pid; int frame_rx = proc->frame_rx; int subframe_rx = proc->subframe_rx; - int ret=0; + int ret=0, ret1=0; int CC_id = ue->CC_id; LTE_UE_PDSCH *pdsch_vars; + uint8_t is_cw0_active = 0; + uint8_t is_cw1_active = 0; - if (dlsch0 && (!dlsch1)) { + if (dlsch0==NULL) + AssertFatal(0,"dlsch0 should be defined at this level \n"); + + harq_pid = dlsch0->current_harq_pid; + is_cw0_active = dlsch0->harq_processes[harq_pid]->status; + + if(dlsch1) + is_cw1_active = dlsch1->harq_processes[harq_pid]->status; + + LOG_D(PHY,"AbsSubframe %d.%d Start Turbo Decoder for CW0 [harq_pid %d] ? %d \n", frame_rx%1024, subframe_rx, harq_pid, is_cw0_active); + LOG_D(PHY,"AbsSubframe %d.%d Start Turbo Decoder for CW1 [harq_pid %d] ? %d \n", frame_rx%1024, subframe_rx, harq_pid, is_cw1_active); + + if(is_cw0_active && is_cw1_active) + { + dlsch0->Kmimo = 2; + dlsch1->Kmimo = 2; + } + else + { + dlsch0->Kmimo = 1; + } + if (1) { switch (pdsch) { case SI_PDSCH: pdsch_vars = ue->pdsch_vars_SI[eNB_id]; @@ -3431,8 +3464,6 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, break; } - - harq_pid = dlsch0->current_harq_pid; if (frame_rx < *dlsch_errors) *dlsch_errors=0; @@ -3449,6 +3480,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, if (abstraction_flag == 0) { + // start turbo decode for CW 0 dlsch0->harq_processes[harq_pid]->G = get_G(&ue->frame_parms, dlsch0->harq_processes[harq_pid]->nb_rb, dlsch0->harq_processes[harq_pid]->rb_alloc_even, @@ -3468,6 +3500,13 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, subframe_rx<<1); stop_meas(&ue->dlsch_unscrambling_stats); + //LOG_I(PHY,"start turbo decode for CW 0 --> nb_rb %d \n", dlsch0->harq_processes[harq_pid]->nb_rb); + //LOG_I(PHY,"start turbo decode for CW 0 --> rb_alloc_even %x \n", dlsch0->harq_processes[harq_pid]->rb_alloc_even); + //LOG_I(PHY,"start turbo decode for CW 0 --> Qm %d \n", dlsch0->harq_processes[harq_pid]->Qm); + //LOG_I(PHY,"start turbo decode for CW 0 --> Nl %d \n", dlsch0->harq_processes[harq_pid]->Nl); + //LOG_I(PHY,"start turbo decode for CW 0 --> G %d \n", dlsch0->harq_processes[harq_pid]->G); + //LOG_I(PHY,"start turbo decode for CW 0 --> Kmimo %d \n", dlsch0->Kmimo); + start_meas(&ue->dlsch_decoding_stats); ret = dlsch_decoding(ue, pdsch_vars->llr[0], @@ -3480,6 +3519,60 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, pdsch==PDSCH?1:0, dlsch0->harq_processes[harq_pid]->TBS>256?1:0); stop_meas(&ue->dlsch_decoding_stats); + + printf(" --> Unscrambling for CW0 %5.3f\n", + (ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0)); + printf(" --> Turbo Decoding for CW0 %5.3f\n", + (ue->dlsch_decoding_stats.p_time)/(cpuf*1000.0)); + + if(is_cw1_active) + { + // start turbo decode for CW 1 + dlsch1->harq_processes[harq_pid]->G = get_G(&ue->frame_parms, + dlsch1->harq_processes[harq_pid]->nb_rb, + dlsch1->harq_processes[harq_pid]->rb_alloc_even, + dlsch1->harq_processes[harq_pid]->Qm, + dlsch1->harq_processes[harq_pid]->Nl, + ue->pdcch_vars[eNB_id]->num_pdcch_symbols, + frame_rx, + subframe_rx, + ue->transmission_mode[eNB_id]<7?0:ue->transmission_mode[eNB_id]); + + start_meas(&ue->dlsch_unscrambling_stats); + dlsch_unscrambling(&ue->frame_parms, + 0, + dlsch1, + dlsch1->harq_processes[harq_pid]->G, + pdsch_vars->llr[1], + 1, + subframe_rx<<1); + stop_meas(&ue->dlsch_unscrambling_stats); + + //LOG_I(PHY,"start turbo decode for CW 1 --> nb_rb %d \n", dlsch1->harq_processes[harq_pid]->nb_rb); + //LOG_I(PHY,"start turbo decode for CW 1 --> rb_alloc_even %x \n", dlsch1->harq_processes[harq_pid]->rb_alloc_even); + //LOG_I(PHY,"start turbo decode for CW 1 --> Qm %d \n", dlsch1->harq_processes[harq_pid]->Qm); + //LOG_I(PHY,"start turbo decode for CW 1 --> Nl %d \n", dlsch1->harq_processes[harq_pid]->Nl); + //LOG_I(PHY,"start turbo decode for CW 1 --> G %d \n", dlsch1->harq_processes[harq_pid]->G); + //LOG_I(PHY,"start turbo decode for CW 1 --> Kmimo %d \n", dlsch1->Kmimo); + + start_meas(&ue->dlsch_decoding_stats); + ret1 = dlsch_decoding(ue, + pdsch_vars->llr[1], + &ue->frame_parms, + dlsch1, + dlsch1->harq_processes[harq_pid], + frame_rx, + subframe_rx, + harq_pid, + pdsch==PDSCH?1:0, + dlsch1->harq_processes[harq_pid]->TBS>256?1:0); + stop_meas(&ue->dlsch_decoding_stats); + + printf(" --> Unscrambling for CW1 %5.3f\n", + (ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0)); + printf(" --> Turbo Decoding for CW1 %5.3f\n", + (ue->dlsch_decoding_stats.p_time)/(cpuf*1000.0)); + } } else { @@ -3492,12 +3585,13 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, #endif } + // Check CRC for CW 0 if (ret == (1+dlsch0->max_turbo_iterations)) { *dlsch_errors=*dlsch_errors+1; if(dlsch0->rnti != 0xffff) { - LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d DLSCH in error (rv %d,mcs %d,TBS %d)\n", + LOG_I(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d DLSCH CW0 in error (rv %d,mcs %d,TBS %d)\n", ue->Mod_id,dlsch0->rnti, harq_pid,frame_rx,subframe_rx, dlsch0->harq_processes[harq_pid]->rvidx, @@ -3509,7 +3603,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, } else { if(dlsch0->rnti != 0xffff) { - LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d: Received DLSCH (rv %d,mcs %d,TBS %d)\n", + LOG_I(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d: Received DLSCH CW0 (rv %d,mcs %d,TBS %d)\n", ue->Mod_id,dlsch0->rnti, harq_pid,frame_rx,subframe_rx, dlsch0->harq_processes[harq_pid]->rvidx, @@ -3574,6 +3668,49 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, dlsch0->harq_processes[dlsch0->current_harq_pid]->TBS; } + // Check CRC for CW 1 + if(is_cw1_active) + { + if (ret1 == (1+dlsch0->max_turbo_iterations)) { + LOG_I(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d DLSCH CW1 in error (rv %d,mcs %d,TBS %d)\n", + ue->Mod_id,dlsch0->rnti, + harq_pid,frame_rx,subframe_rx, + dlsch0->harq_processes[harq_pid]->rvidx, + dlsch0->harq_processes[harq_pid]->mcs, + dlsch0->harq_processes[harq_pid]->TBS); + + } else { + LOG_I(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d: Received DLSCH CW1 (rv %d,mcs %d,TBS %d)\n", + ue->Mod_id,dlsch0->rnti, + harq_pid,frame_rx,subframe_rx, + dlsch0->harq_processes[harq_pid]->rvidx, + dlsch0->harq_processes[harq_pid]->mcs, + dlsch0->harq_processes[harq_pid]->TBS); + + + if (ue->mac_enabled == 1) { + switch (pdsch) { + case PDSCH: + if(is_cw1_active) + mac_xface->ue_send_sdu(ue->Mod_id, + CC_id, + frame_rx, + subframe_rx, + dlsch1->harq_processes[dlsch1->current_harq_pid]->b, + dlsch1->harq_processes[dlsch1->current_harq_pid]->TBS>>3, + eNB_id); + break; + case SI_PDSCH: + case P_PDSCH: + case RA_PDSCH: + case PDSCH1: + case PMCH: + AssertFatal(0,"exiting"); + break; + } + } + } + } #ifdef DEBUG_PHY_PROC @@ -3622,16 +3759,18 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin T_BUFFER(&ue->common_vars.rxdata[0][subframe_rx*ue->frame_parms.samples_per_tti], ue->frame_parms.samples_per_tti * 4)); - start_meas(&ue->phy_proc_rx); + // start timers + start_meas(&ue->phy_proc_rx[subframe_rx&0x1]); + start_meas(&ue->generic_stat); pmch_flag = is_pmch_subframe(frame_rx,subframe_rx,&ue->frame_parms) ? 1 : 0; // deactivate reception until we scan pdcch - if (ue->dlsch[eNB_id][0]) - ue->dlsch[eNB_id][0]->active = 0; - if (ue->dlsch[eNB_id][1]) - ue->dlsch[eNB_id][1]->active = 0; + if (ue->dlsch[subframe_rx&0x1][eNB_id][0]) + ue->dlsch[subframe_rx&0x1][eNB_id][0]->active = 0; + if (ue->dlsch[subframe_rx&0x1][eNB_id][1]) + ue->dlsch[subframe_rx&0x1][eNB_id][1]->active = 0; if (ue->dlsch_SI[eNB_id]) ue->dlsch_SI[eNB_id]->active = 0; @@ -3717,15 +3856,18 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin 0); // first slot has been processed (FFTs + Channel Estimation, PCFICH/PHICH/PDCCH) - + stop_meas(&ue->generic_stat); + printf("[SFN %d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0)); + + start_meas(&ue->generic_stat); // do procedures for C-RNTI - if (ue->dlsch[eNB_id][0]->active == 1) { + if (ue->dlsch[subframe_rx&0x1][eNB_id][0]->active == 1) { VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN); ue_pdsch_procedures(ue, proc, eNB_id, PDSCH, - ue->dlsch[eNB_id][0], + ue->dlsch[subframe_rx&0x1][eNB_id][0], NULL, ue->pdcch_vars[eNB_id]->num_pdcch_symbols, ue->frame_parms.symbols_per_tti>>1, @@ -3809,35 +3951,48 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin } } // not an S-subframe + stop_meas(&ue->generic_stat); + printf("[SFN %d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0)); + // run pbch procedures if subframe is 0 if (subframe_rx == 0) ue_pbch_procedures(eNB_id,ue,proc,abstraction_flag); // do procedures for C-RNTI - if (ue->dlsch[eNB_id][0]->active == 1) { + if (ue->dlsch[subframe_rx&0x1][eNB_id][0]->active == 1) { VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN); + start_meas(&ue->pdsch_procedures_stat); ue_pdsch_procedures(ue, proc, eNB_id, PDSCH, - ue->dlsch[eNB_id][0], + ue->dlsch[subframe_rx&0x1][eNB_id][0], NULL, 1+(ue->frame_parms.symbols_per_tti>>1), ue->frame_parms.symbols_per_tti-1, abstraction_flag); + stop_meas(&ue->pdsch_procedures_stat); + + start_meas(&ue->dlsch_procedures_stat); ue_dlsch_procedures(ue, proc, eNB_id, PDSCH, - ue->dlsch[eNB_id][0], - NULL, + ue->dlsch[subframe_rx&0x1][eNB_id][0], + ue->dlsch[subframe_rx&0x1][eNB_id][1], &ue->dlsch_errors[eNB_id], mode, abstraction_flag); + stop_meas(&ue->dlsch_procedures_stat); + printf("[SFN %d] Slot1: Pdsch Proc %5.2f\n",subframe_rx,ue->pdsch_procedures_stat.p_time/(cpuf*1000.0)); + printf("[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",subframe_rx,ue->dlsch_procedures_stat.p_time/(cpuf*1000.0)); + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT); } + start_meas(&ue->generic_stat); + // do procedures for SI-RNTI if ((ue->dlsch_SI[eNB_id]) && (ue->dlsch_SI[eNB_id]->active == 1)) { ue_pdsch_procedures(ue, @@ -3932,7 +4087,8 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin } - + stop_meas(&ue->generic_stat); + //printf("after tubo until end of Rx %5.2f \n",ue->generic_stat.p_time/(cpuf*1000.0)); #ifdef EMOS phy_procedures_emos_UE_RX(ue,slot,eNB_id); @@ -3940,7 +4096,10 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT); - stop_meas(&ue->phy_proc_rx); + stop_meas(&ue->phy_proc_rx[subframe_rx&0x1]); + + printf("------FULL RX PROC [SFN %d]: %5.2f ------\n",subframe_rx,ue->phy_proc_rx[subframe_rx&0x1].p_time/(cpuf*1000.0)); + return (0); } diff --git a/openair1/SCHED/pucch_pc.c b/openair1/SCHED/pucch_pc.c index 5bc03bb58d..ae83123862 100644 --- a/openair1/SCHED/pucch_pc.c +++ b/openair1/SCHED/pucch_pc.c @@ -51,7 +51,7 @@ int16_t pucch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t subframe,u Po_PUCCH = get_PL(ue->Mod_id,ue->CC_id,eNB_id)+ ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH+ - ue->dlsch[eNB_id][0]->g_pucch; + ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->g_pucch; switch (pucch_fmt) { case pucch_format1: @@ -90,19 +90,19 @@ int16_t pucch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t subframe,u if (pucch_fmt!=pucch_format1) { LOG_D(PHY,"[UE %d][PDSCH %x] AbsSubframe %d.%d: Po_PUCCH %d dBm : Po_NOMINAL_PUCCH %d dBm, PL %d dB, g_pucch %d dB\n", ue->Mod_id, - ue->dlsch[eNB_id][0]->rnti,proc->frame_tx%1024,subframe, + ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->rnti,proc->frame_tx%1024,subframe, Po_PUCCH, ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH, get_PL(ue->Mod_id,ue->CC_id,eNB_id), - ue->dlsch[eNB_id][0]->g_pucch); + ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->g_pucch); } else { LOG_D(PHY,"[UE %d][SR %x] AbsSubframe %d.%d: Po_PUCCH %d dBm : Po_NOMINAL_PUCCH %d dBm, PL %d dB g_pucch %d dB\n", ue->Mod_id, - ue->dlsch[eNB_id][0]->rnti,proc->frame_tx%1024,subframe, + ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->rnti,proc->frame_tx%1024,subframe, Po_PUCCH, ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH, get_PL(ue->Mod_id,ue->CC_id,eNB_id), - ue->dlsch[eNB_id][0]->g_pucch); + ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->g_pucch); } return(Po_PUCCH); diff --git a/openair2/RRC/LITE/L2_interface.c b/openair2/RRC/LITE/L2_interface.c index fa5a4d6409..4d0ff134ba 100644 --- a/openair2/RRC/LITE/L2_interface.c +++ b/openair2/RRC/LITE/L2_interface.c @@ -199,7 +199,7 @@ mac_rrc_data_req( int sdu_size = sizeof(RRC_MAC_CCCH_DATA_REQ (message_p).sdu); if (ccch_size > sdu_size) { - LOG_E(RRC, "SDU larger than CCCH SDU buffer size (%d, %d)", ccch_size, sdu_size); + LOG_E(RRC, "SDU larger than CCCH SDU buffer size0 (%d, %d)", ccch_size, sdu_size); ccch_size = sdu_size; } @@ -297,7 +297,7 @@ mac_rrc_data_req( int sdu_size = sizeof(RRC_MAC_CCCH_DATA_REQ (message_p).sdu); if (ccch_size > sdu_size) { - LOG_E(RRC, "SDU larger than CCCH SDU buffer size (%d, %d)", ccch_size, sdu_size); + LOG_E(RRC, "SDU larger than CCCH SDU buffer size1 (%d, %d)", ccch_size, sdu_size); ccch_size = sdu_size; } @@ -403,7 +403,7 @@ mac_rrc_data_ind( int msg_sdu_size = CCCH_SDU_SIZE; if (sdu_lenP > msg_sdu_size) { - LOG_E(RRC, "SDU larger than CCCH SDU buffer size (%d, %d)", sdu_size, msg_sdu_size); + LOG_E(RRC, "SDU larger than CCCH SDU buffer size2 (%d, %d)", sdu_size, msg_sdu_size); sdu_size = msg_sdu_size; } else { sdu_size = sdu_lenP; @@ -471,7 +471,7 @@ mac_rrc_data_ind( int msg_sdu_size = sizeof(RRC_MAC_CCCH_DATA_IND (message_p).sdu); if (sdu_lenP > msg_sdu_size) { - LOG_E(RRC, "SDU larger than CCCH SDU buffer size (%d, %d)", sdu_lenP, msg_sdu_size); + LOG_E(RRC, "SDU larger than CCCH SDU buffer size3 (%d, %d)", sdu_lenP, msg_sdu_size); sdu_size = msg_sdu_size; } else { sdu_size = sdu_lenP; diff --git a/openair3/NAS/TOOLS/network.h b/openair3/NAS/TOOLS/network.h index 0d60359c57..d7044c8e51 100644 --- a/openair3/NAS/TOOLS/network.h +++ b/openair3/NAS/TOOLS/network.h @@ -61,7 +61,7 @@ Description Defines a list of PLMN network operators #define VDF5 11 -#define SELECTED_PLMN OAI_LTEBOX //SFR1 +#define SELECTED_PLMN TEST1 //SFR1 #define TEST_PLMN {0,0,0x0f,1,1,0} // 00101 #define SFR_PLMN_1 {0,2,0x0f,8,0,1} // 20810 diff --git a/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf b/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf index 84ec59a36b..05db6be4d1 100644 --- a/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf +++ b/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf @@ -86,14 +86,14 @@ UE0: }; SIM: { - MSIN="0100001111"; - USIM_API_K="fec86ba6eb707ed08905757b1bb44b8f"; + MSIN="000001234"; + USIM_API_K="000102030405060708090A0B0C0D0E0F"; OPC="C42449363BBAD02B66D16BC975D77CC1"; - MSISDN="33611123456"; + MSISDN="000000000000";//"33611123456"; }; # Home PLMN Selector with Access Technology - HPLMN= "20893"; + HPLMN= "00101"; # User controlled PLMN Selector with Access Technology UCPLMN_LIST = (); diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c index 3b6ea9e5c9..5603d86ade 100644 --- a/targets/RT/USER/lte-ue.c +++ b/targets/RT/USER/lte-ue.c @@ -56,6 +56,8 @@ #include "T.h" +extern double cpuf; + #define FRAME_PERIOD 100000000ULL #define DAQ_PERIOD 66667ULL #define FIFO_PRIORITY 40 @@ -538,6 +540,9 @@ static void *UE_thread_rxn_txnp4(void *arg) { } phy_procedures_UE_RX( UE, proc, 0, 0, UE->mode, no_relay, NULL ); } + + start_meas(&UE->generic_stat); + if (UE->mac_enabled==1) { ret = mac_xface->ue_scheduler(UE->Mod_id, @@ -567,6 +572,10 @@ static void *UE_thread_rxn_txnp4(void *arg) { UE->Mod_id, proc->frame_rx, proc->subframe_tx,txt ); } } + + stop_meas(&UE->generic_stat); + printf("mac_xface->ue_scheduler %5.2f \n",UE->generic_stat.p_time/(cpuf*1000.0)); + // Prepare the future Tx data if ((subframe_select( &UE->frame_parms, proc->subframe_tx) == SF_UL) || diff --git a/targets/SIMU/USER/init_lte.c b/targets/SIMU/USER/init_lte.c index 8ff274be14..a99ccf2c09 100644 --- a/targets/SIMU/USER/init_lte.c +++ b/targets/SIMU/USER/init_lte.c @@ -161,30 +161,32 @@ PHY_VARS_UE* init_lte_UE(LTE_DL_FRAME_PARMS *frame_parms, memcpy(&(PHY_vars_UE->frame_parms), frame_parms, sizeof(LTE_DL_FRAME_PARMS)); phy_init_lte_ue(PHY_vars_UE,1,abstraction_flag); - for (i=0; idlsch[i][j] = new_ue_dlsch(1,NUMBER_OF_HARQ_PID_MAX,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag); + for (int l=0; l<2; l++) { + for (i=0; idlsch[l][i][j] = new_ue_dlsch(1,NUMBER_OF_HARQ_PID_MAX,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag); - if (!PHY_vars_UE->dlsch[i][j]) { - LOG_E(PHY,"Can't get ue dlsch structures\n"); - exit(-1); - } else - LOG_D(PHY,"dlsch[%d][%d] => %p\n",UE_id,i,PHY_vars_UE->dlsch[i][j]); - } + if (!PHY_vars_UE->dlsch[l][i][j]) { + LOG_E(PHY,"Can't get ue dlsch structures\n"); + exit(-1); + } else + LOG_D(PHY,"dlsch[%d][%d] => %p\n",UE_id,i,PHY_vars_UE->dlsch[l][i][j]); + } - PHY_vars_UE->ulsch[i] = new_ue_ulsch(frame_parms->N_RB_UL, abstraction_flag); + PHY_vars_UE->ulsch[i] = new_ue_ulsch(frame_parms->N_RB_UL, abstraction_flag); - if (!PHY_vars_UE->ulsch[i]) { - LOG_E(PHY,"Can't get ue ulsch structures\n"); - exit(-1); - } + if (!PHY_vars_UE->ulsch[i]) { + LOG_E(PHY,"Can't get ue ulsch structures\n"); + exit(-1); + } - PHY_vars_UE->dlsch_SI[i] = new_ue_dlsch(1,1,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag); - PHY_vars_UE->dlsch_ra[i] = new_ue_dlsch(1,1,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag); + PHY_vars_UE->dlsch_SI[i] = new_ue_dlsch(1,1,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag); + PHY_vars_UE->dlsch_ra[i] = new_ue_dlsch(1,1,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag); - PHY_vars_UE->transmission_mode[i] = frame_parms->nb_antenna_ports_eNB==1 ? 1 : 2; + PHY_vars_UE->transmission_mode[i] = frame_parms->nb_antenna_ports_eNB==1 ? 1 : 2; + } } PHY_vars_UE->frame_parms.pucch_config_common.deltaPUCCH_Shift = 1; From ba55fcac27fb34dad97beea1bcd609a6dfa8a88d Mon Sep 17 00:00:00 2001 From: hbilel Date: Mon, 6 Mar 2017 12:13:20 +0100 Subject: [PATCH 06/47] [OAI-UE] Mimo LLR computation AVX2 + fix in TM3 deprecoding --- cmake_targets/CMakeLists.txt | 1 + .../PHY/LTE_TRANSPORT/dlsch_demodulation.c | 23 +++++++++------ .../PHY/LTE_TRANSPORT/dlsch_llr_computation.c | 29 +++++++++++++++++++ openair1/PHY/LTE_TRANSPORT/proto.h | 16 ++++++++++ openair1/PHY/Makefile.inc | 1 + openair3/NAS/UE/ESM/esm_ebr_context.c | 2 +- targets/RT/USER/lte-softmodem.c | 8 ++++- 7 files changed, 69 insertions(+), 11 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index e4d3acf4b1..0bf63cfb1a 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -1034,6 +1034,7 @@ set(PHY_SRC ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_modulation.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_demodulation.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_llr_computation.c + ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_llr_computation_avx2.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/power_control.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_decoding.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_scrambling.c diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c index 9ae212cd27..7b1fb3cd50 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c @@ -42,6 +42,7 @@ #define NOCYGWIN_STATIC #endif +extern int16_t dlsch_demod_shift; //#define DEBUG_HARQ //#undef LOG_D @@ -402,8 +403,8 @@ int rx_pdsch(PHY_VARS_UE *ue, LOG_D(PHY,"Channel Level TM34 avg_0 %d, avg_1 %d, rx_type %d, rx_standard %d, interf_unaw_shift %d \n", avg_0[0], avg_1[0], rx_type, rx_standard, interf_unaw_shift); if (rx_type>rx_standard) { - avg_0[0] = (log2_approx(avg_0[0])/2) - 5 + 2 ;//+ 2; - avg_1[0] = (log2_approx(avg_1[0])/2) - 5 + 2 ;//+ 2; + avg_0[0] = (log2_approx(avg_0[0])/2) + dlsch_demod_shift;// + 2 ;//+ 4; + avg_1[0] = (log2_approx(avg_1[0])/2) + dlsch_demod_shift;// + 2 ;//+ 4; pdsch_vars[eNB_id]->log2_maxh0 = cmax(avg_0[0],0); pdsch_vars[eNB_id]->log2_maxh1 = cmax(avg_1[0],0); //printf("TM4 I-A log2_maxh0 = %d\n", pdsch_vars[eNB_id]->log2_maxh0); @@ -1067,9 +1068,9 @@ int rx_pdsch(PHY_VARS_UE *ue, write_output("dl_ch_estimates_ext10.m", "dl_ch_estimates_ext10", &pdsch_vars[eNB_id]->dl_ch_estimates_ext[2][0],14*frame_parms->N_RB_DL*12,1,1); write_output("dl_ch_estimates_ext11.m", "dl_ch_estimates_ext11", &pdsch_vars[eNB_id]->dl_ch_estimates_ext[3][0],14*frame_parms->N_RB_DL*12,1,1); write_output("rxdataF_comp00.m","rxdataF_comp00", &pdsch_vars[eNB_id]->rxdataF_comp0[0][0],14*frame_parms->N_RB_DL*12,1,1); - write_output("rxdataF_comp01.m","rxdataF_comp01", &pdsch_vars[eNB_id]->rxdataF_comp0[0][0],14*frame_parms->N_RB_DL*12,1,1); - write_output("rxdataF_comp10.m","rxdataF_comp10", &pdsch_vars[eNB_id]->rxdataF_comp0[0][0],14*frame_parms->N_RB_DL*12,1,1); - write_output("rxdataF_comp11.m","rxdataF_comp11", &pdsch_vars[eNB_id]->rxdataF_comp0[0][0],14*frame_parms->N_RB_DL*12,1,1); + write_output("rxdataF_comp01.m","rxdataF_comp01", &pdsch_vars[eNB_id]->rxdataF_comp0[1][0],14*frame_parms->N_RB_DL*12,1,1); + write_output("rxdataF_comp10.m","rxdataF_comp10", &pdsch_vars[eNB_id]->rxdataF_comp1[harq_pid][round][0][0],14*frame_parms->N_RB_DL*12,1,1); + write_output("rxdataF_comp11.m","rxdataF_comp11", &pdsch_vars[eNB_id]->rxdataF_comp1[harq_pid][round][1][0],14*frame_parms->N_RB_DL*12,1,1); #endif write_output("llr0.m","llr0", &pdsch_vars[eNB_id]->llr[0][0],(14*nb_rb*12*dlsch1_harq->Qm) - 4*(nb_rb*4*dlsch1_harq->Qm),1,0); write_output("llr1.m","llr1", &pdsch_vars[eNB_id]->llr[1][0],(14*nb_rb*12*dlsch1_harq->Qm) - 4*(nb_rb*4*dlsch1_harq->Qm),1,0); @@ -1666,9 +1667,8 @@ void prec2A_TM3_128(__m128i *ch0,__m128i *ch1) { __m128i tmp0,tmp1; - // sqrt(2) is already taken into account in computation sqrt_rho_a, sqrt_rho_b, - //so divide by 2 is replaced by divide by sqrt(2). +//_mm_mulhi_epi16 // print_shorts("prec2A_TM3 ch0 (before):",ch0); // print_shorts("prec2A_TM3 ch1 (before):",ch1); @@ -1679,6 +1679,11 @@ void prec2A_TM3_128(__m128i *ch0,__m128i *ch1) { ch0[0] = _mm_adds_epi16(ch0[0],tmp1); ch1[0] = _mm_subs_epi16(tmp0,tmp1); + ch0[0] = _mm_mulhi_epi16(ch0[0],amp); + ch0[0] = _mm_slli_epi16(ch0[0],1); + + ch1[0] = _mm_mulhi_epi16(ch1[0],amp); + ch1[0] = _mm_slli_epi16(ch1[0],1); // print_shorts("prec2A_TM3 ch0 (mid):",&tmp0); // print_shorts("prec2A_TM3 ch1 (mid):",ch1); @@ -1688,8 +1693,8 @@ void prec2A_TM3_128(__m128i *ch0,__m128i *ch1) { ch1[0] = _mm_mulhi_epi16(ch1[0],amp); ch1[0] = _mm_slli_epi16(ch1[0],1); - // ch0[0] = _mm_srai_epi16(ch0[0],1); - // ch1[0] = _mm_srai_epi16(ch1[0],1); + //ch0[0] = _mm_srai_epi16(ch0[0],1); + //ch1[0] = _mm_srai_epi16(ch1[0],1); // print_shorts("prec2A_TM3 ch0 (after):",ch0); // print_shorts("prec2A_TM3 ch1 (after):",ch1); diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c index 0b73e2b023..c33dec87d3 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c @@ -8831,6 +8831,7 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, len = (nb_rb*12) - pbch_pss_sss_adjust; } +#if 0 qam64_qam64((short *)rxF, (short *)rxF_i, (short *)ch_mag, @@ -8838,7 +8839,35 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, (short *)llr16, (short *)rho, len); +#else + // Round length up to multiple of 16 words + uint32_t len256i = ((len+16)>>4)*16; + int32_t *rxF_256i = (int32_t*) malloc16_clear(len256i*4); + int32_t *rxF_i_256i = (int32_t*) malloc16_clear(len256i*4); + int32_t *ch_mag_256i = (int32_t*) malloc16_clear(len256i*4); + int32_t *ch_mag_i_256i = (int32_t*) malloc16_clear(len256i*4); + int32_t *rho_256i = (int32_t*) malloc16_clear(len256i*4); + memcpy(rxF_256i, rxF, len*4); + memcpy(rxF_i_256i, rxF_i, len*4); + memcpy(ch_mag_256i, ch_mag, len*4); + memcpy(ch_mag_i_256i, ch_mag_i, len*4); + memcpy(rho_256i, rho, len*4); + + qam64_qam64_avx2((int32_t *)rxF_256i, + (int32_t *)rxF_i_256i, + (int32_t *)ch_mag_256i, + (int32_t *)ch_mag_i_256i, + (int16_t *)llr16, + (int32_t *) rho_256i, + len); + + free16(rxF_256i, sizeof(rxF_256i)); + free16(rxF_i_256i, sizeof(rxF_i_256i)); + free16(ch_mag_256i, sizeof(ch_mag_256i)); + free16(ch_mag_i_256i, sizeof(ch_mag_i_256i)); + free16(rho_256i, sizeof(rho_256i)); +#endif llr16 += (6*len); *llr16p = (short *)llr16; return(0); diff --git a/openair1/PHY/LTE_TRANSPORT/proto.h b/openair1/PHY/LTE_TRANSPORT/proto.h index 5fc8dea986..a5aa145e17 100644 --- a/openair1/PHY/LTE_TRANSPORT/proto.h +++ b/openair1/PHY/LTE_TRANSPORT/proto.h @@ -746,6 +746,22 @@ void qam64_qam64(short *stream0_in, short *rho01, int length); +/** \brief This function computes the LLRs for ML (max-logsum approximation) dual-stream 64QAM/64QAM reception. + @param stream0_in Input from channel compensated (MR combined) stream 0 + @param stream1_in Input from channel compensated (MR combined) stream 1 + @param ch_mag Input from scaled channel magnitude square of h0'*g0 + @param ch_mag_i Input from scaled channel magnitude square of h0'*g1 + @param stream0_out Output from LLR unit for stream0 + @param rho01 Cross-correlation between channels (MR combined) + @param length in complex channel outputs*/ +void qam64_qam64_avx2(int32_t *stream0_in, + int32_t *stream1_in, + int32_t *ch_mag, + int32_t *ch_mag_i, + int16_t *stream0_out, + int32_t *rho01, + int length); + /** \brief This function perform LLR computation for dual-stream (64QAM/64QAM) transmission. @param frame_parms Frame descriptor structure @param rxdataF_comp Compensated channel output diff --git a/openair1/PHY/Makefile.inc b/openair1/PHY/Makefile.inc index 1586f353c0..90094b31f8 100644 --- a/openair1/PHY/Makefile.inc +++ b/openair1/PHY/Makefile.inc @@ -7,6 +7,7 @@ PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_coding.o PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_modulation.o PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_demodulation.o PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_llr_computation.o +PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_llr_computation_avx2.o PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/power_control.o PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_decoding.o PHY_OBJS += $(TOP_DIR)/PHY/LTE_TRANSPORT/dlsch_scrambling.o diff --git a/openair3/NAS/UE/ESM/esm_ebr_context.c b/openair3/NAS/UE/ESM/esm_ebr_context.c index bfa4a04cc8..31f215e359 100644 --- a/openair3/NAS/UE/ESM/esm_ebr_context.c +++ b/openair3/NAS/UE/ESM/esm_ebr_context.c @@ -286,7 +286,7 @@ int esm_ebr_context_create( LOG_TRACE(INFO, "ESM-PROC - executing %s ", command_line); - if (system(command_line)) ; /* TODO: what to do? */ + //if (system(command_line)) ; /* TODO: what to do? */ break; diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 8303d88218..5761577259 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -151,6 +151,8 @@ uint8_t usim_test = 0; uint8_t nb_antenna_tx = 1; uint8_t nb_antenna_rx = 1; +int16_t dlsch_demod_shift = 0; + char ref[128] = "internal"; char channels[128] = "0"; @@ -635,6 +637,7 @@ static void get_options (int argc, char **argv) { LONG_OPTION_THREADIQ, LONG_OPTION_THREADODDSUBFRAME, LONG_OPTION_THREADEVENSUBFRAME, + LONG_OPTION_DEMOD_SHIFT, #if T_TRACER LONG_OPTION_T_PORT, LONG_OPTION_T_NOWAIT, @@ -670,6 +673,7 @@ static void get_options (int argc, char **argv) { {"threadIQ", required_argument, NULL, LONG_OPTION_THREADIQ}, {"threadOddSubframe", required_argument, NULL, LONG_OPTION_THREADODDSUBFRAME}, {"threadEvenSubframe", required_argument, NULL, LONG_OPTION_THREADEVENSUBFRAME}, + {"dlsch-demod-shift", required_argument, NULL, LONG_OPTION_DEMOD_SHIFT}, #if T_TRACER {"T_port", required_argument, 0, LONG_OPTION_T_PORT}, {"T_nowait", no_argument, 0, LONG_OPTION_T_NOWAIT}, @@ -800,7 +804,9 @@ static void get_options (int argc, char **argv) { case LONG_OPTION_THREADEVENSUBFRAME: threads.even=atoi(optarg); break; - + case LONG_OPTION_DEMOD_SHIFT: + dlsch_demod_shift = atof(optarg); + break; #if T_TRACER case LONG_OPTION_T_PORT: { extern int T_port; From 42b834d64c19928caa9c6addf8ae35e47262236a Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Wed, 1 Mar 2017 18:01:39 +0100 Subject: [PATCH 07/47] Changes for 64qam_64qam for avx2 Conflicts: openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c --- .../PHY/LTE_TRANSPORT/dlsch_llr_computation.c | 38 +- .../dlsch_llr_computation_avx2.c | 4034 +++++++++++++++++ openair1/PHY/LTE_TRANSPORT/proto.h | 16 + 3 files changed, 4076 insertions(+), 12 deletions(-) create mode 100644 openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation_avx2.c diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c index c33dec87d3..240758eceb 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c @@ -8831,15 +8831,8 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, len = (nb_rb*12) - pbch_pss_sss_adjust; } -#if 0 - qam64_qam64((short *)rxF, - (short *)rxF_i, - (short *)ch_mag, - (short *)ch_mag_i, - (short *)llr16, - (short *)rho, - len); -#else +//#ifdef __AVX2__ + // Round length up to multiple of 16 words uint32_t len256i = ((len+16)>>4)*16; int32_t *rxF_256i = (int32_t*) malloc16_clear(len256i*4); @@ -8853,7 +8846,7 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, memcpy(ch_mag_256i, ch_mag, len*4); memcpy(ch_mag_i_256i, ch_mag_i, len*4); memcpy(rho_256i, rho, len*4); - + /* qam64_qam64_avx2((int32_t *)rxF_256i, (int32_t *)rxF_i_256i, (int32_t *)ch_mag_256i, @@ -8861,13 +8854,34 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, (int16_t *)llr16, (int32_t *) rho_256i, len); - + */ + qam64_qam16_avx2((short *)rxF_256i, + (short *)rxF_i_256i, + (short *)ch_mag_256i, + (short *)ch_mag_i_256i, + (short *)llr16, + (short *)rho_256i, + len); + free16(rxF_256i, sizeof(rxF_256i)); free16(rxF_i_256i, sizeof(rxF_i_256i)); free16(ch_mag_256i, sizeof(ch_mag_256i)); free16(ch_mag_i_256i, sizeof(ch_mag_i_256i)); free16(rho_256i, sizeof(rho_256i)); -#endif + +//#else +/* + qam64_qam64((short *)rxF, + (short *)rxF_i, + (short *)ch_mag, + (short *)ch_mag_i, + (short *)llr16, + (short *)rho, + len); +*/ + +//#endif + llr16 += (6*len); *llr16p = (short *)llr16; return(0); diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation_avx2.c b/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation_avx2.c new file mode 100644 index 0000000000..cda5ad0f55 --- /dev/null +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation_avx2.c @@ -0,0 +1,4034 @@ + /* + * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The OpenAirInterface Software Alliance licenses this file to You under + * the OAI Public License, Version 1.0 (the "License"); you may not use this file + * except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.openairinterface.org/?page_id=698 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *------------------------------------------------------------------------------- + * For more information about the OpenAirInterface (OAI) Software Alliance: + * contact@openairinterface.org + */ + +/*! \file PHY/LTE_TRANSPORT/dlsch_llr_computation.c + * \brief Top-level routines for LLR computation of the PDSCH physical channel from 36-211, V8.6 2009-03 + * \author R. Knopp, F. Kaltenberger,A. Bhamri, S. Aubert, S. Wagner, X Jiang + * \date 2011 + * \version 0.1 + * \company Eurecom + * \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr,ankit.bhamri@eurecom.fr,sebastien.aubert@eurecom.fr, sebastian.wagner@eurecom.fr + * \note + * \warning + */ + +#include "PHY/defs.h" +#include "PHY/TOOLS/defs.h" +#include "PHY/extern.h" +#include "defs.h" +#include "extern.h" +#include "PHY/sse_intrin.h" + +int16_t ones256[16] __attribute__ ((aligned(32))) = {0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff}; + +static __m256i rho_rpi __attribute__ ((aligned(32))); +static __m256i rho_rmi __attribute__ ((aligned(32))); +static __m256i rho_rpi_1_1 __attribute__ ((aligned(32))); +static __m256i rho_rpi_1_3 __attribute__ ((aligned(32))); +static __m256i rho_rpi_1_5 __attribute__ ((aligned(32))); +static __m256i rho_rpi_1_7 __attribute__ ((aligned(32))); +static __m256i rho_rpi_3_1 __attribute__ ((aligned(32))); +static __m256i rho_rpi_3_3 __attribute__ ((aligned(32))); +static __m256i rho_rpi_3_5 __attribute__ ((aligned(32))); +static __m256i rho_rpi_3_7 __attribute__ ((aligned(32))); +static __m256i rho_rpi_5_1 __attribute__ ((aligned(32))); +static __m256i rho_rpi_5_3 __attribute__ ((aligned(32))); +static __m256i rho_rpi_5_5 __attribute__ ((aligned(32))); +static __m256i rho_rpi_5_7 __attribute__ ((aligned(32))); +static __m256i rho_rpi_7_1 __attribute__ ((aligned(32))); +static __m256i rho_rpi_7_3 __attribute__ ((aligned(32))); +static __m256i rho_rpi_7_5 __attribute__ ((aligned(32))); +static __m256i rho_rpi_7_7 __attribute__ ((aligned(32))); +static __m256i rho_rmi_1_1 __attribute__ ((aligned(32))); +static __m256i rho_rmi_1_3 __attribute__ ((aligned(32))); +static __m256i rho_rmi_1_5 __attribute__ ((aligned(32))); +static __m256i rho_rmi_1_7 __attribute__ ((aligned(32))); +static __m256i rho_rmi_3_1 __attribute__ ((aligned(32))); +static __m256i rho_rmi_3_3 __attribute__ ((aligned(32))); +static __m256i rho_rmi_3_5 __attribute__ ((aligned(32))); +static __m256i rho_rmi_3_7 __attribute__ ((aligned(32))); +static __m256i rho_rmi_5_1 __attribute__ ((aligned(32))); +static __m256i rho_rmi_5_3 __attribute__ ((aligned(32))); +static __m256i rho_rmi_5_5 __attribute__ ((aligned(32))); +static __m256i rho_rmi_5_7 __attribute__ ((aligned(32))); +static __m256i rho_rmi_7_1 __attribute__ ((aligned(32))); +static __m256i rho_rmi_7_3 __attribute__ ((aligned(32))); +static __m256i rho_rmi_7_5 __attribute__ ((aligned(32))); +static __m256i rho_rmi_7_7 __attribute__ ((aligned(32))); + +static __m256i psi_r_m7_m7 __attribute__ ((aligned(32))); +static __m256i psi_r_m7_m5 __attribute__ ((aligned(32))); +static __m256i psi_r_m7_m3 __attribute__ ((aligned(32))); +static __m256i psi_r_m7_m1 __attribute__ ((aligned(32))); +static __m256i psi_r_m7_p1 __attribute__ ((aligned(32))); +static __m256i psi_r_m7_p3 __attribute__ ((aligned(32))); +static __m256i psi_r_m7_p5 __attribute__ ((aligned(32))); +static __m256i psi_r_m7_p7 __attribute__ ((aligned(32))); +static __m256i psi_r_m5_m7 __attribute__ ((aligned(32))); +static __m256i psi_r_m5_m5 __attribute__ ((aligned(32))); +static __m256i psi_r_m5_m3 __attribute__ ((aligned(32))); +static __m256i psi_r_m5_m1 __attribute__ ((aligned(32))); +static __m256i psi_r_m5_p1 __attribute__ ((aligned(32))); +static __m256i psi_r_m5_p3 __attribute__ ((aligned(32))); +static __m256i psi_r_m5_p5 __attribute__ ((aligned(32))); +static __m256i psi_r_m5_p7 __attribute__ ((aligned(32))); +static __m256i psi_r_m3_m7 __attribute__ ((aligned(32))); +static __m256i psi_r_m3_m5 __attribute__ ((aligned(32))); +static __m256i psi_r_m3_m3 __attribute__ ((aligned(32))); +static __m256i psi_r_m3_m1 __attribute__ ((aligned(32))); +static __m256i psi_r_m3_p1 __attribute__ ((aligned(32))); +static __m256i psi_r_m3_p3 __attribute__ ((aligned(32))); +static __m256i psi_r_m3_p5 __attribute__ ((aligned(32))); +static __m256i psi_r_m3_p7 __attribute__ ((aligned(32))); +static __m256i psi_r_m1_m7 __attribute__ ((aligned(32))); +static __m256i psi_r_m1_m5 __attribute__ ((aligned(32))); +static __m256i psi_r_m1_m3 __attribute__ ((aligned(32))); +static __m256i psi_r_m1_m1 __attribute__ ((aligned(32))); +static __m256i psi_r_m1_p1 __attribute__ ((aligned(32))); +static __m256i psi_r_m1_p3 __attribute__ ((aligned(32))); +static __m256i psi_r_m1_p5 __attribute__ ((aligned(32))); +static __m256i psi_r_m1_p7 __attribute__ ((aligned(32))); +static __m256i psi_r_p1_m7 __attribute__ ((aligned(32))); +static __m256i psi_r_p1_m5 __attribute__ ((aligned(32))); +static __m256i psi_r_p1_m3 __attribute__ ((aligned(32))); +static __m256i psi_r_p1_m1 __attribute__ ((aligned(32))); +static __m256i psi_r_p1_p1 __attribute__ ((aligned(32))); +static __m256i psi_r_p1_p3 __attribute__ ((aligned(32))); +static __m256i psi_r_p1_p5 __attribute__ ((aligned(32))); +static __m256i psi_r_p1_p7 __attribute__ ((aligned(32))); +static __m256i psi_r_p3_m7 __attribute__ ((aligned(32))); +static __m256i psi_r_p3_m5 __attribute__ ((aligned(32))); +static __m256i psi_r_p3_m3 __attribute__ ((aligned(32))); +static __m256i psi_r_p3_m1 __attribute__ ((aligned(32))); +static __m256i psi_r_p3_p1 __attribute__ ((aligned(32))); +static __m256i psi_r_p3_p3 __attribute__ ((aligned(32))); +static __m256i psi_r_p3_p5 __attribute__ ((aligned(32))); +static __m256i psi_r_p3_p7 __attribute__ ((aligned(32))); +static __m256i psi_r_p5_m7 __attribute__ ((aligned(32))); +static __m256i psi_r_p5_m5 __attribute__ ((aligned(32))); +static __m256i psi_r_p5_m3 __attribute__ ((aligned(32))); +static __m256i psi_r_p5_m1 __attribute__ ((aligned(32))); +static __m256i psi_r_p5_p1 __attribute__ ((aligned(32))); +static __m256i psi_r_p5_p3 __attribute__ ((aligned(32))); +static __m256i psi_r_p5_p5 __attribute__ ((aligned(32))); +static __m256i psi_r_p5_p7 __attribute__ ((aligned(32))); +static __m256i psi_r_p7_m7 __attribute__ ((aligned(32))); +static __m256i psi_r_p7_m5 __attribute__ ((aligned(32))); +static __m256i psi_r_p7_m3 __attribute__ ((aligned(32))); +static __m256i psi_r_p7_m1 __attribute__ ((aligned(32))); +static __m256i psi_r_p7_p1 __attribute__ ((aligned(32))); +static __m256i psi_r_p7_p3 __attribute__ ((aligned(32))); +static __m256i psi_r_p7_p5 __attribute__ ((aligned(32))); +static __m256i psi_r_p7_p7 __attribute__ ((aligned(32))); + +static __m256i psi_i_m7_m7 __attribute__ ((aligned(32))); +static __m256i psi_i_m7_m5 __attribute__ ((aligned(32))); +static __m256i psi_i_m7_m3 __attribute__ ((aligned(32))); +static __m256i psi_i_m7_m1 __attribute__ ((aligned(32))); +static __m256i psi_i_m7_p1 __attribute__ ((aligned(32))); +static __m256i psi_i_m7_p3 __attribute__ ((aligned(32))); +static __m256i psi_i_m7_p5 __attribute__ ((aligned(32))); +static __m256i psi_i_m7_p7 __attribute__ ((aligned(32))); +static __m256i psi_i_m5_m7 __attribute__ ((aligned(32))); +static __m256i psi_i_m5_m5 __attribute__ ((aligned(32))); +static __m256i psi_i_m5_m3 __attribute__ ((aligned(32))); +static __m256i psi_i_m5_m1 __attribute__ ((aligned(32))); +static __m256i psi_i_m5_p1 __attribute__ ((aligned(32))); +static __m256i psi_i_m5_p3 __attribute__ ((aligned(32))); +static __m256i psi_i_m5_p5 __attribute__ ((aligned(32))); +static __m256i psi_i_m5_p7 __attribute__ ((aligned(32))); +static __m256i psi_i_m3_m7 __attribute__ ((aligned(32))); +static __m256i psi_i_m3_m5 __attribute__ ((aligned(32))); +static __m256i psi_i_m3_m3 __attribute__ ((aligned(32))); +static __m256i psi_i_m3_m1 __attribute__ ((aligned(32))); +static __m256i psi_i_m3_p1 __attribute__ ((aligned(32))); +static __m256i psi_i_m3_p3 __attribute__ ((aligned(32))); +static __m256i psi_i_m3_p5 __attribute__ ((aligned(32))); +static __m256i psi_i_m3_p7 __attribute__ ((aligned(32))); +static __m256i psi_i_m1_m7 __attribute__ ((aligned(32))); +static __m256i psi_i_m1_m5 __attribute__ ((aligned(32))); +static __m256i psi_i_m1_m3 __attribute__ ((aligned(32))); +static __m256i psi_i_m1_m1 __attribute__ ((aligned(32))); +static __m256i psi_i_m1_p1 __attribute__ ((aligned(32))); +static __m256i psi_i_m1_p3 __attribute__ ((aligned(32))); +static __m256i psi_i_m1_p5 __attribute__ ((aligned(32))); +static __m256i psi_i_m1_p7 __attribute__ ((aligned(32))); +static __m256i psi_i_p1_m7 __attribute__ ((aligned(32))); +static __m256i psi_i_p1_m5 __attribute__ ((aligned(32))); +static __m256i psi_i_p1_m3 __attribute__ ((aligned(32))); +static __m256i psi_i_p1_m1 __attribute__ ((aligned(32))); +static __m256i psi_i_p1_p1 __attribute__ ((aligned(32))); +static __m256i psi_i_p1_p3 __attribute__ ((aligned(32))); +static __m256i psi_i_p1_p5 __attribute__ ((aligned(32))); +static __m256i psi_i_p1_p7 __attribute__ ((aligned(32))); +static __m256i psi_i_p3_m7 __attribute__ ((aligned(32))); +static __m256i psi_i_p3_m5 __attribute__ ((aligned(32))); +static __m256i psi_i_p3_m3 __attribute__ ((aligned(32))); +static __m256i psi_i_p3_m1 __attribute__ ((aligned(32))); +static __m256i psi_i_p3_p1 __attribute__ ((aligned(32))); +static __m256i psi_i_p3_p3 __attribute__ ((aligned(32))); +static __m256i psi_i_p3_p5 __attribute__ ((aligned(32))); +static __m256i psi_i_p3_p7 __attribute__ ((aligned(32))); +static __m256i psi_i_p5_m7 __attribute__ ((aligned(32))); +static __m256i psi_i_p5_m5 __attribute__ ((aligned(32))); +static __m256i psi_i_p5_m3 __attribute__ ((aligned(32))); +static __m256i psi_i_p5_m1 __attribute__ ((aligned(32))); +static __m256i psi_i_p5_p1 __attribute__ ((aligned(32))); +static __m256i psi_i_p5_p3 __attribute__ ((aligned(32))); +static __m256i psi_i_p5_p5 __attribute__ ((aligned(32))); +static __m256i psi_i_p5_p7 __attribute__ ((aligned(32))); +static __m256i psi_i_p7_m7 __attribute__ ((aligned(32))); +static __m256i psi_i_p7_m5 __attribute__ ((aligned(32))); +static __m256i psi_i_p7_m3 __attribute__ ((aligned(32))); +static __m256i psi_i_p7_m1 __attribute__ ((aligned(32))); +static __m256i psi_i_p7_p1 __attribute__ ((aligned(32))); +static __m256i psi_i_p7_p3 __attribute__ ((aligned(32))); +static __m256i psi_i_p7_p5 __attribute__ ((aligned(32))); +static __m256i psi_i_p7_p7 __attribute__ ((aligned(32))); + +static __m256i a_r_m7_m7 __attribute__ ((aligned(32))); +static __m256i a_r_m7_m5 __attribute__ ((aligned(32))); +static __m256i a_r_m7_m3 __attribute__ ((aligned(32))); +static __m256i a_r_m7_m1 __attribute__ ((aligned(32))); +static __m256i a_r_m7_p1 __attribute__ ((aligned(32))); +static __m256i a_r_m7_p3 __attribute__ ((aligned(32))); +static __m256i a_r_m7_p5 __attribute__ ((aligned(32))); +static __m256i a_r_m7_p7 __attribute__ ((aligned(32))); +static __m256i a_r_m5_m7 __attribute__ ((aligned(32))); +static __m256i a_r_m5_m5 __attribute__ ((aligned(32))); +static __m256i a_r_m5_m3 __attribute__ ((aligned(32))); +static __m256i a_r_m5_m1 __attribute__ ((aligned(32))); +static __m256i a_r_m5_p1 __attribute__ ((aligned(32))); +static __m256i a_r_m5_p3 __attribute__ ((aligned(32))); +static __m256i a_r_m5_p5 __attribute__ ((aligned(32))); +static __m256i a_r_m5_p7 __attribute__ ((aligned(32))); +static __m256i a_r_m3_m7 __attribute__ ((aligned(32))); +static __m256i a_r_m3_m5 __attribute__ ((aligned(32))); +static __m256i a_r_m3_m3 __attribute__ ((aligned(32))); +static __m256i a_r_m3_m1 __attribute__ ((aligned(32))); +static __m256i a_r_m3_p1 __attribute__ ((aligned(32))); +static __m256i a_r_m3_p3 __attribute__ ((aligned(32))); +static __m256i a_r_m3_p5 __attribute__ ((aligned(32))); +static __m256i a_r_m3_p7 __attribute__ ((aligned(32))); +static __m256i a_r_m1_m7 __attribute__ ((aligned(32))); +static __m256i a_r_m1_m5 __attribute__ ((aligned(32))); +static __m256i a_r_m1_m3 __attribute__ ((aligned(32))); +static __m256i a_r_m1_m1 __attribute__ ((aligned(32))); +static __m256i a_r_m1_p1 __attribute__ ((aligned(32))); +static __m256i a_r_m1_p3 __attribute__ ((aligned(32))); +static __m256i a_r_m1_p5 __attribute__ ((aligned(32))); +static __m256i a_r_m1_p7 __attribute__ ((aligned(32))); +static __m256i a_r_p1_m7 __attribute__ ((aligned(32))); +static __m256i a_r_p1_m5 __attribute__ ((aligned(32))); +static __m256i a_r_p1_m3 __attribute__ ((aligned(32))); +static __m256i a_r_p1_m1 __attribute__ ((aligned(32))); +static __m256i a_r_p1_p1 __attribute__ ((aligned(32))); +static __m256i a_r_p1_p3 __attribute__ ((aligned(32))); +static __m256i a_r_p1_p5 __attribute__ ((aligned(32))); +static __m256i a_r_p1_p7 __attribute__ ((aligned(32))); +static __m256i a_r_p3_m7 __attribute__ ((aligned(32))); +static __m256i a_r_p3_m5 __attribute__ ((aligned(32))); +static __m256i a_r_p3_m3 __attribute__ ((aligned(32))); +static __m256i a_r_p3_m1 __attribute__ ((aligned(32))); +static __m256i a_r_p3_p1 __attribute__ ((aligned(32))); +static __m256i a_r_p3_p3 __attribute__ ((aligned(32))); +static __m256i a_r_p3_p5 __attribute__ ((aligned(32))); +static __m256i a_r_p3_p7 __attribute__ ((aligned(32))); +static __m256i a_r_p5_m7 __attribute__ ((aligned(32))); +static __m256i a_r_p5_m5 __attribute__ ((aligned(32))); +static __m256i a_r_p5_m3 __attribute__ ((aligned(32))); +static __m256i a_r_p5_m1 __attribute__ ((aligned(32))); +static __m256i a_r_p5_p1 __attribute__ ((aligned(32))); +static __m256i a_r_p5_p3 __attribute__ ((aligned(32))); +static __m256i a_r_p5_p5 __attribute__ ((aligned(32))); +static __m256i a_r_p5_p7 __attribute__ ((aligned(32))); +static __m256i a_r_p7_m7 __attribute__ ((aligned(32))); +static __m256i a_r_p7_m5 __attribute__ ((aligned(32))); +static __m256i a_r_p7_m3 __attribute__ ((aligned(32))); +static __m256i a_r_p7_m1 __attribute__ ((aligned(32))); +static __m256i a_r_p7_p1 __attribute__ ((aligned(32))); +static __m256i a_r_p7_p3 __attribute__ ((aligned(32))); +static __m256i a_r_p7_p5 __attribute__ ((aligned(32))); +static __m256i a_r_p7_p7 __attribute__ ((aligned(32))); + +static __m256i a_i_m7_m7 __attribute__ ((aligned(32))); +static __m256i a_i_m7_m5 __attribute__ ((aligned(32))); +static __m256i a_i_m7_m3 __attribute__ ((aligned(32))); +static __m256i a_i_m7_m1 __attribute__ ((aligned(32))); +static __m256i a_i_m7_p1 __attribute__ ((aligned(32))); +static __m256i a_i_m7_p3 __attribute__ ((aligned(32))); +static __m256i a_i_m7_p5 __attribute__ ((aligned(32))); +static __m256i a_i_m7_p7 __attribute__ ((aligned(32))); +static __m256i a_i_m5_m7 __attribute__ ((aligned(32))); +static __m256i a_i_m5_m5 __attribute__ ((aligned(32))); +static __m256i a_i_m5_m3 __attribute__ ((aligned(32))); +static __m256i a_i_m5_m1 __attribute__ ((aligned(32))); +static __m256i a_i_m5_p1 __attribute__ ((aligned(32))); +static __m256i a_i_m5_p3 __attribute__ ((aligned(32))); +static __m256i a_i_m5_p5 __attribute__ ((aligned(32))); +static __m256i a_i_m5_p7 __attribute__ ((aligned(32))); +static __m256i a_i_m3_m7 __attribute__ ((aligned(32))); +static __m256i a_i_m3_m5 __attribute__ ((aligned(32))); +static __m256i a_i_m3_m3 __attribute__ ((aligned(32))); +static __m256i a_i_m3_m1 __attribute__ ((aligned(32))); +static __m256i a_i_m3_p1 __attribute__ ((aligned(32))); +static __m256i a_i_m3_p3 __attribute__ ((aligned(32))); +static __m256i a_i_m3_p5 __attribute__ ((aligned(32))); +static __m256i a_i_m3_p7 __attribute__ ((aligned(32))); +static __m256i a_i_m1_m7 __attribute__ ((aligned(32))); +static __m256i a_i_m1_m5 __attribute__ ((aligned(32))); +static __m256i a_i_m1_m3 __attribute__ ((aligned(32))); +static __m256i a_i_m1_m1 __attribute__ ((aligned(32))); +static __m256i a_i_m1_p1 __attribute__ ((aligned(32))); +static __m256i a_i_m1_p3 __attribute__ ((aligned(32))); +static __m256i a_i_m1_p5 __attribute__ ((aligned(32))); +static __m256i a_i_m1_p7 __attribute__ ((aligned(32))); +static __m256i a_i_p1_m7 __attribute__ ((aligned(32))); +static __m256i a_i_p1_m5 __attribute__ ((aligned(32))); +static __m256i a_i_p1_m3 __attribute__ ((aligned(32))); +static __m256i a_i_p1_m1 __attribute__ ((aligned(32))); +static __m256i a_i_p1_p1 __attribute__ ((aligned(32))); +static __m256i a_i_p1_p3 __attribute__ ((aligned(32))); +static __m256i a_i_p1_p5 __attribute__ ((aligned(32))); +static __m256i a_i_p1_p7 __attribute__ ((aligned(32))); +static __m256i a_i_p3_m7 __attribute__ ((aligned(32))); +static __m256i a_i_p3_m5 __attribute__ ((aligned(32))); +static __m256i a_i_p3_m3 __attribute__ ((aligned(32))); +static __m256i a_i_p3_m1 __attribute__ ((aligned(32))); +static __m256i a_i_p3_p1 __attribute__ ((aligned(32))); +static __m256i a_i_p3_p3 __attribute__ ((aligned(32))); +static __m256i a_i_p3_p5 __attribute__ ((aligned(32))); +static __m256i a_i_p3_p7 __attribute__ ((aligned(32))); +static __m256i a_i_p5_m7 __attribute__ ((aligned(32))); +static __m256i a_i_p5_m5 __attribute__ ((aligned(32))); +static __m256i a_i_p5_m3 __attribute__ ((aligned(32))); +static __m256i a_i_p5_m1 __attribute__ ((aligned(32))); +static __m256i a_i_p5_p1 __attribute__ ((aligned(32))); +static __m256i a_i_p5_p3 __attribute__ ((aligned(32))); +static __m256i a_i_p5_p5 __attribute__ ((aligned(32))); +static __m256i a_i_p5_p7 __attribute__ ((aligned(32))); +static __m256i a_i_p7_m7 __attribute__ ((aligned(32))); +static __m256i a_i_p7_m5 __attribute__ ((aligned(32))); +static __m256i a_i_p7_m3 __attribute__ ((aligned(32))); +static __m256i a_i_p7_m1 __attribute__ ((aligned(32))); +static __m256i a_i_p7_p1 __attribute__ ((aligned(32))); +static __m256i a_i_p7_p3 __attribute__ ((aligned(32))); +static __m256i a_i_p7_p5 __attribute__ ((aligned(32))); +static __m256i a_i_p7_p7 __attribute__ ((aligned(32))); + +static __m256i psi_a_m7_m7 __attribute__ ((aligned(32))); +static __m256i psi_a_m7_m5 __attribute__ ((aligned(32))); +static __m256i psi_a_m7_m3 __attribute__ ((aligned(32))); +static __m256i psi_a_m7_m1 __attribute__ ((aligned(32))); +static __m256i psi_a_m7_p1 __attribute__ ((aligned(32))); +static __m256i psi_a_m7_p3 __attribute__ ((aligned(32))); +static __m256i psi_a_m7_p5 __attribute__ ((aligned(32))); +static __m256i psi_a_m7_p7 __attribute__ ((aligned(32))); +static __m256i psi_a_m5_m7 __attribute__ ((aligned(32))); +static __m256i psi_a_m5_m5 __attribute__ ((aligned(32))); +static __m256i psi_a_m5_m3 __attribute__ ((aligned(32))); +static __m256i psi_a_m5_m1 __attribute__ ((aligned(32))); +static __m256i psi_a_m5_p1 __attribute__ ((aligned(32))); +static __m256i psi_a_m5_p3 __attribute__ ((aligned(32))); +static __m256i psi_a_m5_p5 __attribute__ ((aligned(32))); +static __m256i psi_a_m5_p7 __attribute__ ((aligned(32))); +static __m256i psi_a_m3_m7 __attribute__ ((aligned(32))); +static __m256i psi_a_m3_m5 __attribute__ ((aligned(32))); +static __m256i psi_a_m3_m3 __attribute__ ((aligned(32))); +static __m256i psi_a_m3_m1 __attribute__ ((aligned(32))); +static __m256i psi_a_m3_p1 __attribute__ ((aligned(32))); +static __m256i psi_a_m3_p3 __attribute__ ((aligned(32))); +static __m256i psi_a_m3_p5 __attribute__ ((aligned(32))); +static __m256i psi_a_m3_p7 __attribute__ ((aligned(32))); +static __m256i psi_a_m1_m7 __attribute__ ((aligned(32))); +static __m256i psi_a_m1_m5 __attribute__ ((aligned(32))); +static __m256i psi_a_m1_m3 __attribute__ ((aligned(32))); +static __m256i psi_a_m1_m1 __attribute__ ((aligned(32))); +static __m256i psi_a_m1_p1 __attribute__ ((aligned(32))); +static __m256i psi_a_m1_p3 __attribute__ ((aligned(32))); +static __m256i psi_a_m1_p5 __attribute__ ((aligned(32))); +static __m256i psi_a_m1_p7 __attribute__ ((aligned(32))); +static __m256i psi_a_p1_m7 __attribute__ ((aligned(32))); +static __m256i psi_a_p1_m5 __attribute__ ((aligned(32))); +static __m256i psi_a_p1_m3 __attribute__ ((aligned(32))); +static __m256i psi_a_p1_m1 __attribute__ ((aligned(32))); +static __m256i psi_a_p1_p1 __attribute__ ((aligned(32))); +static __m256i psi_a_p1_p3 __attribute__ ((aligned(32))); +static __m256i psi_a_p1_p5 __attribute__ ((aligned(32))); +static __m256i psi_a_p1_p7 __attribute__ ((aligned(32))); +static __m256i psi_a_p3_m7 __attribute__ ((aligned(32))); +static __m256i psi_a_p3_m5 __attribute__ ((aligned(32))); +static __m256i psi_a_p3_m3 __attribute__ ((aligned(32))); +static __m256i psi_a_p3_m1 __attribute__ ((aligned(32))); +static __m256i psi_a_p3_p1 __attribute__ ((aligned(32))); +static __m256i psi_a_p3_p3 __attribute__ ((aligned(32))); +static __m256i psi_a_p3_p5 __attribute__ ((aligned(32))); +static __m256i psi_a_p3_p7 __attribute__ ((aligned(32))); +static __m256i psi_a_p5_m7 __attribute__ ((aligned(32))); +static __m256i psi_a_p5_m5 __attribute__ ((aligned(32))); +static __m256i psi_a_p5_m3 __attribute__ ((aligned(32))); +static __m256i psi_a_p5_m1 __attribute__ ((aligned(32))); +static __m256i psi_a_p5_p1 __attribute__ ((aligned(32))); +static __m256i psi_a_p5_p3 __attribute__ ((aligned(32))); +static __m256i psi_a_p5_p5 __attribute__ ((aligned(32))); +static __m256i psi_a_p5_p7 __attribute__ ((aligned(32))); +static __m256i psi_a_p7_m7 __attribute__ ((aligned(32))); +static __m256i psi_a_p7_m5 __attribute__ ((aligned(32))); +static __m256i psi_a_p7_m3 __attribute__ ((aligned(32))); +static __m256i psi_a_p7_m1 __attribute__ ((aligned(32))); +static __m256i psi_a_p7_p1 __attribute__ ((aligned(32))); +static __m256i psi_a_p7_p3 __attribute__ ((aligned(32))); +static __m256i psi_a_p7_p5 __attribute__ ((aligned(32))); +static __m256i psi_a_p7_p7 __attribute__ ((aligned(32))); + +static __m256i a_sq_m7_m7 __attribute__ ((aligned(32))); +static __m256i a_sq_m7_m5 __attribute__ ((aligned(32))); +static __m256i a_sq_m7_m3 __attribute__ ((aligned(32))); +static __m256i a_sq_m7_m1 __attribute__ ((aligned(32))); +static __m256i a_sq_m7_p1 __attribute__ ((aligned(32))); +static __m256i a_sq_m7_p3 __attribute__ ((aligned(32))); +static __m256i a_sq_m7_p5 __attribute__ ((aligned(32))); +static __m256i a_sq_m7_p7 __attribute__ ((aligned(32))); +static __m256i a_sq_m5_m7 __attribute__ ((aligned(32))); +static __m256i a_sq_m5_m5 __attribute__ ((aligned(32))); +static __m256i a_sq_m5_m3 __attribute__ ((aligned(32))); +static __m256i a_sq_m5_m1 __attribute__ ((aligned(32))); +static __m256i a_sq_m5_p1 __attribute__ ((aligned(32))); +static __m256i a_sq_m5_p3 __attribute__ ((aligned(32))); +static __m256i a_sq_m5_p5 __attribute__ ((aligned(32))); +static __m256i a_sq_m5_p7 __attribute__ ((aligned(32))); +static __m256i a_sq_m3_m7 __attribute__ ((aligned(32))); +static __m256i a_sq_m3_m5 __attribute__ ((aligned(32))); +static __m256i a_sq_m3_m3 __attribute__ ((aligned(32))); +static __m256i a_sq_m3_m1 __attribute__ ((aligned(32))); +static __m256i a_sq_m3_p1 __attribute__ ((aligned(32))); +static __m256i a_sq_m3_p3 __attribute__ ((aligned(32))); +static __m256i a_sq_m3_p5 __attribute__ ((aligned(32))); +static __m256i a_sq_m3_p7 __attribute__ ((aligned(32))); +static __m256i a_sq_m1_m7 __attribute__ ((aligned(32))); +static __m256i a_sq_m1_m5 __attribute__ ((aligned(32))); +static __m256i a_sq_m1_m3 __attribute__ ((aligned(32))); +static __m256i a_sq_m1_m1 __attribute__ ((aligned(32))); +static __m256i a_sq_m1_p1 __attribute__ ((aligned(32))); +static __m256i a_sq_m1_p3 __attribute__ ((aligned(32))); +static __m256i a_sq_m1_p5 __attribute__ ((aligned(32))); +static __m256i a_sq_m1_p7 __attribute__ ((aligned(32))); +static __m256i a_sq_p1_m7 __attribute__ ((aligned(32))); +static __m256i a_sq_p1_m5 __attribute__ ((aligned(32))); +static __m256i a_sq_p1_m3 __attribute__ ((aligned(32))); +static __m256i a_sq_p1_m1 __attribute__ ((aligned(32))); +static __m256i a_sq_p1_p1 __attribute__ ((aligned(32))); +static __m256i a_sq_p1_p3 __attribute__ ((aligned(32))); +static __m256i a_sq_p1_p5 __attribute__ ((aligned(32))); +static __m256i a_sq_p1_p7 __attribute__ ((aligned(32))); +static __m256i a_sq_p3_m7 __attribute__ ((aligned(32))); +static __m256i a_sq_p3_m5 __attribute__ ((aligned(32))); +static __m256i a_sq_p3_m3 __attribute__ ((aligned(32))); +static __m256i a_sq_p3_m1 __attribute__ ((aligned(32))); +static __m256i a_sq_p3_p1 __attribute__ ((aligned(32))); +static __m256i a_sq_p3_p3 __attribute__ ((aligned(32))); +static __m256i a_sq_p3_p5 __attribute__ ((aligned(32))); +static __m256i a_sq_p3_p7 __attribute__ ((aligned(32))); +static __m256i a_sq_p5_m7 __attribute__ ((aligned(32))); +static __m256i a_sq_p5_m5 __attribute__ ((aligned(32))); +static __m256i a_sq_p5_m3 __attribute__ ((aligned(32))); +static __m256i a_sq_p5_m1 __attribute__ ((aligned(32))); +static __m256i a_sq_p5_p1 __attribute__ ((aligned(32))); +static __m256i a_sq_p5_p3 __attribute__ ((aligned(32))); +static __m256i a_sq_p5_p5 __attribute__ ((aligned(32))); +static __m256i a_sq_p5_p7 __attribute__ ((aligned(32))); +static __m256i a_sq_p7_m7 __attribute__ ((aligned(32))); +static __m256i a_sq_p7_m5 __attribute__ ((aligned(32))); +static __m256i a_sq_p7_m3 __attribute__ ((aligned(32))); +static __m256i a_sq_p7_m1 __attribute__ ((aligned(32))); +static __m256i a_sq_p7_p1 __attribute__ ((aligned(32))); +static __m256i a_sq_p7_p3 __attribute__ ((aligned(32))); +static __m256i a_sq_p7_p5 __attribute__ ((aligned(32))); +static __m256i a_sq_p7_p7 __attribute__ ((aligned(32))); + +static __m256i bit_met_m7_m7 __attribute__ ((aligned(32))); +static __m256i bit_met_m7_m5 __attribute__ ((aligned(32))); +static __m256i bit_met_m7_m3 __attribute__ ((aligned(32))); +static __m256i bit_met_m7_m1 __attribute__ ((aligned(32))); +static __m256i bit_met_m7_p1 __attribute__ ((aligned(32))); +static __m256i bit_met_m7_p3 __attribute__ ((aligned(32))); +static __m256i bit_met_m7_p5 __attribute__ ((aligned(32))); +static __m256i bit_met_m7_p7 __attribute__ ((aligned(32))); +static __m256i bit_met_m5_m7 __attribute__ ((aligned(32))); +static __m256i bit_met_m5_m5 __attribute__ ((aligned(32))); +static __m256i bit_met_m5_m3 __attribute__ ((aligned(32))); +static __m256i bit_met_m5_m1 __attribute__ ((aligned(32))); +static __m256i bit_met_m5_p1 __attribute__ ((aligned(32))); +static __m256i bit_met_m5_p3 __attribute__ ((aligned(32))); +static __m256i bit_met_m5_p5 __attribute__ ((aligned(32))); +static __m256i bit_met_m5_p7 __attribute__ ((aligned(32))); +static __m256i bit_met_m3_m7 __attribute__ ((aligned(32))); +static __m256i bit_met_m3_m5 __attribute__ ((aligned(32))); +static __m256i bit_met_m3_m3 __attribute__ ((aligned(32))); +static __m256i bit_met_m3_m1 __attribute__ ((aligned(32))); +static __m256i bit_met_m3_p1 __attribute__ ((aligned(32))); +static __m256i bit_met_m3_p3 __attribute__ ((aligned(32))); +static __m256i bit_met_m3_p5 __attribute__ ((aligned(32))); +static __m256i bit_met_m3_p7 __attribute__ ((aligned(32))); +static __m256i bit_met_m1_m7 __attribute__ ((aligned(32))); +static __m256i bit_met_m1_m5 __attribute__ ((aligned(32))); +static __m256i bit_met_m1_m3 __attribute__ ((aligned(32))); +static __m256i bit_met_m1_m1 __attribute__ ((aligned(32))); +static __m256i bit_met_m1_p1 __attribute__ ((aligned(32))); +static __m256i bit_met_m1_p3 __attribute__ ((aligned(32))); +static __m256i bit_met_m1_p5 __attribute__ ((aligned(32))); +static __m256i bit_met_m1_p7 __attribute__ ((aligned(32))); +static __m256i bit_met_p1_m7 __attribute__ ((aligned(32))); +static __m256i bit_met_p1_m5 __attribute__ ((aligned(32))); +static __m256i bit_met_p1_m3 __attribute__ ((aligned(32))); +static __m256i bit_met_p1_m1 __attribute__ ((aligned(32))); +static __m256i bit_met_p1_p1 __attribute__ ((aligned(32))); +static __m256i bit_met_p1_p3 __attribute__ ((aligned(32))); +static __m256i bit_met_p1_p5 __attribute__ ((aligned(32))); +static __m256i bit_met_p1_p7 __attribute__ ((aligned(32))); +static __m256i bit_met_p3_m7 __attribute__ ((aligned(32))); +static __m256i bit_met_p3_m5 __attribute__ ((aligned(32))); +static __m256i bit_met_p3_m3 __attribute__ ((aligned(32))); +static __m256i bit_met_p3_m1 __attribute__ ((aligned(32))); +static __m256i bit_met_p3_p1 __attribute__ ((aligned(32))); +static __m256i bit_met_p3_p3 __attribute__ ((aligned(32))); +static __m256i bit_met_p3_p5 __attribute__ ((aligned(32))); +static __m256i bit_met_p3_p7 __attribute__ ((aligned(32))); +static __m256i bit_met_p5_m7 __attribute__ ((aligned(32))); +static __m256i bit_met_p5_m5 __attribute__ ((aligned(32))); +static __m256i bit_met_p5_m3 __attribute__ ((aligned(32))); +static __m256i bit_met_p5_m1 __attribute__ ((aligned(32))); +static __m256i bit_met_p5_p1 __attribute__ ((aligned(32))); +static __m256i bit_met_p5_p3 __attribute__ ((aligned(32))); +static __m256i bit_met_p5_p5 __attribute__ ((aligned(32))); +static __m256i bit_met_p5_p7 __attribute__ ((aligned(32))); +static __m256i bit_met_p7_m7 __attribute__ ((aligned(32))); +static __m256i bit_met_p7_m5 __attribute__ ((aligned(32))); +static __m256i bit_met_p7_m3 __attribute__ ((aligned(32))); +static __m256i bit_met_p7_m1 __attribute__ ((aligned(32))); +static __m256i bit_met_p7_p1 __attribute__ ((aligned(32))); +static __m256i bit_met_p7_p3 __attribute__ ((aligned(32))); +static __m256i bit_met_p7_p5 __attribute__ ((aligned(32))); +static __m256i bit_met_p7_p7 __attribute__ ((aligned(32))); + +static __m256i y0_p_1_1 __attribute__ ((aligned(32))); +static __m256i y0_p_1_3 __attribute__ ((aligned(32))); +static __m256i y0_p_1_5 __attribute__ ((aligned(32))); +static __m256i y0_p_1_7 __attribute__ ((aligned(32))); +static __m256i y0_p_3_1 __attribute__ ((aligned(32))); +static __m256i y0_p_3_3 __attribute__ ((aligned(32))); +static __m256i y0_p_3_5 __attribute__ ((aligned(32))); +static __m256i y0_p_3_7 __attribute__ ((aligned(32))); +static __m256i y0_p_5_1 __attribute__ ((aligned(32))); +static __m256i y0_p_5_3 __attribute__ ((aligned(32))); +static __m256i y0_p_5_5 __attribute__ ((aligned(32))); +static __m256i y0_p_5_7 __attribute__ ((aligned(32))); +static __m256i y0_p_7_1 __attribute__ ((aligned(32))); +static __m256i y0_p_7_3 __attribute__ ((aligned(32))); +static __m256i y0_p_7_5 __attribute__ ((aligned(32))); +static __m256i y0_p_7_7 __attribute__ ((aligned(32))); +static __m256i y0_m_1_1 __attribute__ ((aligned(32))); +static __m256i y0_m_1_3 __attribute__ ((aligned(32))); +static __m256i y0_m_1_5 __attribute__ ((aligned(32))); +static __m256i y0_m_1_7 __attribute__ ((aligned(32))); +static __m256i y0_m_3_1 __attribute__ ((aligned(32))); +static __m256i y0_m_3_3 __attribute__ ((aligned(32))); +static __m256i y0_m_3_5 __attribute__ ((aligned(32))); +static __m256i y0_m_3_7 __attribute__ ((aligned(32))); +static __m256i y0_m_5_1 __attribute__ ((aligned(32))); +static __m256i y0_m_5_3 __attribute__ ((aligned(32))); +static __m256i y0_m_5_5 __attribute__ ((aligned(32))); +static __m256i y0_m_5_7 __attribute__ ((aligned(32))); +static __m256i y0_m_7_1 __attribute__ ((aligned(32))); +static __m256i y0_m_7_3 __attribute__ ((aligned(32))); +static __m256i y0_m_7_5 __attribute__ ((aligned(32))); +static __m256i y0_m_7_7 __attribute__ ((aligned(32))); + +static __m256i xmm0 __attribute__ ((aligned(32))); +static __m256i xmm1 __attribute__ ((aligned(32))); +static __m256i xmm2 __attribute__ ((aligned(32))); +static __m256i xmm3 __attribute__ ((aligned(32))); +static __m256i xmm4 __attribute__ ((aligned(32))); +static __m256i xmm5 __attribute__ ((aligned(32))); +static __m256i xmm6 __attribute__ ((aligned(32))); +static __m256i xmm7 __attribute__ ((aligned(32))); +static __m256i xmm8 __attribute__ ((aligned(32))); + +static __m256i y0r __attribute__ ((aligned(32))); +static __m256i y0i __attribute__ ((aligned(32))); +static __m256i y1r __attribute__ ((aligned(32))); +static __m256i y1i __attribute__ ((aligned(32))); +static __m256i y2r __attribute__ ((aligned(32))); +static __m256i y2i __attribute__ ((aligned(32))); + +static __m256i logmax_num_re0 __attribute__ ((aligned(32))); +static __m256i logmax_den_re0 __attribute__ ((aligned(32))); + +static __m256i tmp_result __attribute__ ((aligned(32))); +static __m256i tmp_result2 __attribute__ ((aligned(32))); +static __m256i tmp_result3 __attribute__ ((aligned(32))); +static __m256i tmp_result4 __attribute__ ((aligned(32))); + +//============================================================================================== +// Auxiliary Makros + +// calculate interference magnitude +#define interference_abs_epi16(psi,int_ch_mag,int_mag,c1,c2) tmp_result = _mm256_cmpgt_epi16(int_ch_mag,psi); tmp_result2 = _mm256_xor_si256(tmp_result,(*(__m256i*)&ones256[0])); tmp_result = _mm256_and_si256(tmp_result,c1); tmp_result2 = _mm256_and_si256(tmp_result2,c2); int_mag = _mm256_or_si256(tmp_result,tmp_result2); + +// calculate interference magnitude +// tmp_result = ones in shorts corr. to interval 2<=x<=4, tmp_result2 interval < 2, tmp_result3 interval 46 +#define interference_abs_64qam_epi16(psi,int_ch_mag,int_two_ch_mag,int_three_ch_mag,a,c1,c3,c5,c7) tmp_result = _mm256_cmpgt_epi16(int_two_ch_mag,psi); tmp_result3 = _mm256_xor_si256(tmp_result,(*(__m256i*)&ones256[0])); tmp_result2 = _mm256_cmpgt_epi16(int_ch_mag,psi); tmp_result = _mm256_xor_si256(tmp_result,tmp_result2); tmp_result4 = _mm256_cmpgt_epi16(psi,int_three_ch_mag); tmp_result3 = _mm256_xor_si256(tmp_result3,tmp_result4); tmp_result = _mm256_and_si256(tmp_result,c3); tmp_result2 = _mm256_and_si256(tmp_result2,c1); tmp_result3 = _mm256_and_si256(tmp_result3,c5); tmp_result4 = _mm256_and_si256(tmp_result4,c7); tmp_result = _mm256_or_si256(tmp_result,tmp_result2); tmp_result3 = _mm256_or_si256(tmp_result3,tmp_result4); a = _mm256_or_si256(tmp_result,tmp_result3); + +// calculates psi_a = psi_r*a_r + psi_i*a_i +#define prodsum_psi_a_epi16(psi_r,a_r,psi_i,a_i,psi_a) tmp_result = _mm256_mulhi_epi16(psi_r,a_r); tmp_result = _mm256_slli_epi16(tmp_result,1); tmp_result2 = _mm256_mulhi_epi16(psi_i,a_i); tmp_result2 = _mm256_slli_epi16(tmp_result2,1); psi_a = _mm256_adds_epi16(tmp_result,tmp_result2); + +// calculates a_sq = int_ch_mag*(a_r^2 + a_i^2)*scale_factor +#define square_a_epi16(a_r,a_i,int_ch_mag,scale_factor,a_sq) tmp_result = _mm256_mulhi_epi16(a_r,a_r); tmp_result = _mm256_slli_epi16(tmp_result,1); tmp_result = _mm256_mulhi_epi16(tmp_result,scale_factor); tmp_result = _mm256_slli_epi16(tmp_result,1); tmp_result = _mm256_mulhi_epi16(tmp_result,int_ch_mag); tmp_result = _mm256_slli_epi16(tmp_result,1); tmp_result2 = _mm256_mulhi_epi16(a_i,a_i); tmp_result2 = _mm256_slli_epi16(tmp_result2,1); tmp_result2 = _mm256_mulhi_epi16(tmp_result2,scale_factor); tmp_result2 = _mm256_slli_epi16(tmp_result2,1); tmp_result2 = _mm256_mulhi_epi16(tmp_result2,int_ch_mag); tmp_result2 = _mm256_slli_epi16(tmp_result2,1); a_sq = _mm256_adds_epi16(tmp_result,tmp_result2); + +// calculates a_sq = int_ch_mag*(a_r^2 + a_i^2)*scale_factor for 64-QAM +#define square_a_64qam_epi16(a_r,a_i,int_ch_mag,scale_factor,a_sq) tmp_result = _mm256_mulhi_epi16(a_r,a_r); tmp_result = _mm256_slli_epi16(tmp_result,1); tmp_result = _mm256_mulhi_epi16(tmp_result,scale_factor); tmp_result = _mm256_slli_epi16(tmp_result,3); tmp_result = _mm256_mulhi_epi16(tmp_result,int_ch_mag); tmp_result = _mm256_slli_epi16(tmp_result,1); tmp_result2 = _mm256_mulhi_epi16(a_i,a_i); tmp_result2 = _mm256_slli_epi16(tmp_result2,1); tmp_result2 = _mm256_mulhi_epi16(tmp_result2,scale_factor); tmp_result2 = _mm256_slli_epi16(tmp_result2,3); tmp_result2 = _mm256_mulhi_epi16(tmp_result2,int_ch_mag); tmp_result2 = _mm256_slli_epi16(tmp_result2,1); a_sq = _mm256_adds_epi16(tmp_result,tmp_result2); + +void seperate_real_imag_parts(__m256i *out_re, + __m256i *out_im, + __m256i in0, + __m256i in1) +{ + __m256i tmp0; + __m256i tmp1; + + in0 = _mm256_shufflelo_epi16(in0,0xd8); //_MM_SHUFFLE(0,2,1,3)); + in0 = _mm256_shufflehi_epi16(in0,0xd8); //_MM_SHUFFLE(0,2,1,3)); + in0 = _mm256_shuffle_epi32(in0,0xd8); //_MM_SHUFFLE(0,2,1,3)); + + in1 = _mm256_shufflelo_epi16(in1,0xd8); //_MM_SHUFFLE(0,2,1,3)); + in1 = _mm256_shufflehi_epi16(in1,0xd8); //_MM_SHUFFLE(0,2,1,3)); + in1 = _mm256_shuffle_epi32(in1,0xd8); //_MM_SHUFFLE(0,2,1,3)); + + //in0 = [Re(0,1,2,3) Im(0,1,2,3) Re(4,5,6,7) Im(4,5,6,7)] + //in0 = [Re(8,9,10,11) Im(8,9,10,11) Re(12,13,14,15) Im(12,13,14,15)] + + tmp0 = _mm256_unpacklo_epi64(in0, in1); + //axmm2 = [Re(0,1,2,3) Re(8,9,10,11) Re(4,5,6,7) Re(12,13,14,15)] + tmp0 = _mm256_permute4x64_epi64(tmp0,0xd8); // Re(rho) + + tmp1 = _mm256_unpackhi_epi64(in0, in1); + //axmm3 = [Im(0,1,2,3) Im(8,9,10,11) Im(4,5,6,7) Im(12,13,14,15)] + tmp1 = _mm256_permute4x64_epi64(tmp1,0xd8); // Im(rho) + + *out_re = tmp0; + *out_im = tmp1; +} + +void qam64_qam16_avx2(short *stream0_in, + short *stream1_in, + short *ch_mag, + short *ch_mag_i, + short *stream0_out, + short *rho01, + int length + ) +{ + + /* + Author: S. Wagner + Date: 31-07-12 + + Input: + stream0_in: MF filter for 1st stream, i.e., y0=h0'*y + stream1_in: MF filter for 2nd stream, i.e., y1=h1'*y + ch_mag: 4*h0/sqrt(42), [Re0 Im0 Re1 Im1] s.t. Im0=Re0, Im1=Re1, etc + ch_mag_i: 4*h1/sqrt(42), [Re0 Im0 Re1 Im1] s.t. Im0=Re0, Im1=Re1, etc + rho01: Channel cross correlation, i.e., h1'*h0 + + Output: + stream0_out: output LLRs for 1st stream + */ + +#if defined(__x86_64__) || defined(__i386__) + + __m256i *rho01_256i = (__m256i *)rho01; + __m256i *stream0_256i_in = (__m256i *)stream0_in; + __m256i *stream1_256i_in = (__m256i *)stream1_in; + __m256i *ch_mag_256i = (__m256i *)ch_mag; + __m256i *ch_mag_256i_i = (__m256i *)ch_mag_i; + + __m256i ONE_OVER_SQRT_42 = _mm256_broadcastw_epi16(_mm_set1_epi16(10112)); // round(1/sqrt(42)*2^16) + __m256i THREE_OVER_SQRT_42 = _mm256_broadcastw_epi16(_mm_set1_epi16(30337)); // round(3/sqrt(42)*2^16) + __m256i FIVE_OVER_SQRT_42 = _mm256_broadcastw_epi16(_mm_set1_epi16(25281)); // round(5/sqrt(42)*2^15) + __m256i SEVEN_OVER_SQRT_42 = _mm256_broadcastw_epi16(_mm_set1_epi16(17697)); // round(5/sqrt(42)*2^15) + __m256i FORTYNINE_OVER_FOUR_SQRT_42 = _mm256_broadcastw_epi16(_mm_set1_epi16(30969)); // round(49/(4*sqrt(42))*2^14), Q2.14 + __m256i THIRTYSEVEN_OVER_FOUR_SQRT_42 = _mm256_broadcastw_epi16(_mm_set1_epi16(23385)); // round(37/(4*sqrt(42))*2^14), Q2.14 + __m256i TWENTYFIVE_OVER_FOUR_SQRT_42 = _mm256_broadcastw_epi16(_mm_set1_epi16(31601)); // round(25/(4*sqrt(42))*2^15) + __m256i TWENTYNINE_OVER_FOUR_SQRT_42 = _mm256_broadcastw_epi16(_mm_set1_epi16(18329)); // round(29/(4*sqrt(42))*2^15), Q2.14 + __m256i SEVENTEEN_OVER_FOUR_SQRT_42 = _mm256_broadcastw_epi16(_mm_set1_epi16(21489)); // round(17/(4*sqrt(42))*2^15) + __m256i NINE_OVER_FOUR_SQRT_42 = _mm256_broadcastw_epi16(_mm_set1_epi16(11376)); // round(9/(4*sqrt(42))*2^15) + __m256i THIRTEEN_OVER_FOUR_SQRT_42 = _mm256_broadcastw_epi16(_mm_set1_epi16(16433)); // round(13/(4*sqrt(42))*2^15) + __m256i FIVE_OVER_FOUR_SQRT_42 = _mm256_broadcastw_epi16(_mm_set1_epi16(6320)); // round(5/(4*sqrt(42))*2^15) + __m256i ONE_OVER_FOUR_SQRT_42 = _mm256_broadcastw_epi16(_mm_set1_epi16(1264)); // round(1/(4*sqrt(42))*2^15) + __m256i ONE_OVER_SQRT_10_Q15 = _mm256_broadcastw_epi16(_mm_set1_epi16(10362)); // round(1/sqrt(10)*2^15) + __m256i THREE_OVER_SQRT_10 = _mm256_broadcastw_epi16(_mm_set1_epi16(31086)); // round(3/sqrt(10)*2^15) + __m256i SQRT_10_OVER_FOUR = _mm256_broadcastw_epi16(_mm_set1_epi16(25905)); // round(sqrt(10)/4*2^15) + + + __m256i ch_mag_int; + __m256i ch_mag_des; + __m256i ch_mag_98_over_42_with_sigma2; + __m256i ch_mag_74_over_42_with_sigma2; + __m256i ch_mag_58_over_42_with_sigma2; + __m256i ch_mag_50_over_42_with_sigma2; + __m256i ch_mag_34_over_42_with_sigma2; + __m256i ch_mag_18_over_42_with_sigma2; + __m256i ch_mag_26_over_42_with_sigma2; + __m256i ch_mag_10_over_42_with_sigma2; + __m256i ch_mag_2_over_42_with_sigma2; + __m256i y0r_one_over_sqrt_21; + __m256i y0r_three_over_sqrt_21; + __m256i y0r_five_over_sqrt_21; + __m256i y0r_seven_over_sqrt_21; + __m256i y0i_one_over_sqrt_21; + __m256i y0i_three_over_sqrt_21; + __m256i y0i_five_over_sqrt_21; + __m256i y0i_seven_over_sqrt_21; + +#elif defined(__arm__) + +#endif + int i,j; + uint32_t len256 = (length)>>3; + + for (i=0; i>3; + + for (i=0; i Date: Wed, 8 Mar 2017 10:55:06 +0100 Subject: [PATCH 08/47] [OAI-UE] MIMO fixes + disabling MIB/SIB decoding on connected mode --- openair1/PHY/INIT/lte_init.c | 9 +++ openair1/PHY/LTE_TRANSPORT/dci.c | 48 ++++++------ openair1/PHY/LTE_TRANSPORT/dci_tools.c | 75 ++++++++++++------- .../PHY/LTE_TRANSPORT/dlsch_demodulation.c | 8 +- .../PHY/LTE_TRANSPORT/dlsch_llr_computation.c | 8 +- openair1/PHY/defs.h | 2 + openair1/SCHED/phy_procedures_lte_ue.c | 34 +++++---- 7 files changed, 114 insertions(+), 70 deletions(-) diff --git a/openair1/PHY/INIT/lte_init.c b/openair1/PHY/INIT/lte_init.c index d0556a0235..de83506bb3 100755 --- a/openair1/PHY/INIT/lte_init.c +++ b/openair1/PHY/INIT/lte_init.c @@ -948,6 +948,11 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id, // fill cqi parameters for periodic CQI reporting get_cqipmiri_params(phy_vars_ue,eNB_id); + // disable MIB SIB decoding once we are on connected mode + LOG_I(PHY,"Disabling SIB MIB decoding \n"); + phy_vars_ue->decode_SIB = 0; + phy_vars_ue->decode_MIB = 0; + } void phy_config_cba_rnti (module_id_t Mod_id,int CC_id,eNB_flag_t eNB_flag, uint8_t index, rnti_t cba_rnti, uint8_t cba_group_id, uint8_t num_active_cba_groups) @@ -1306,6 +1311,10 @@ int phy_init_lte_ue(PHY_VARS_UE *ue, ue->high_speed_flag = 1; ue->ch_est_alpha = 24576; + // enable MIB/SIB decoding by default + ue->decode_MIB = 1; + ue->decode_SIB = 1; + init_prach_tables(839); diff --git a/openair1/PHY/LTE_TRANSPORT/dci.c b/openair1/PHY/LTE_TRANSPORT/dci.c index 44cc3fffbf..af25e33ff7 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci.c +++ b/openair1/PHY/LTE_TRANSPORT/dci.c @@ -3149,7 +3149,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0) , ra_rnti, P_RNTI, 2, @@ -3177,7 +3177,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), ra_rnti, P_RNTI, 2, @@ -3209,7 +3209,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), P_RNTI, ra_rnti, 3, @@ -3237,7 +3237,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), ra_rnti, P_RNTI, 3, @@ -3271,7 +3271,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), ra_rnti, P_RNTI, 0, @@ -3300,7 +3300,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), ra_rnti, P_RNTI, 1, @@ -3333,7 +3333,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), ra_rnti, P_RNTI, 2, @@ -3362,7 +3362,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), ra_rnti, P_RNTI, 3, @@ -3395,7 +3395,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), ra_rnti, P_RNTI, 0, @@ -3426,7 +3426,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), ra_rnti, P_RNTI, 1, @@ -3458,7 +3458,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), ra_rnti, P_RNTI, 2, @@ -3490,7 +3490,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), ra_rnti, P_RNTI, 3, @@ -3527,7 +3527,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), ra_rnti, P_RNTI, 0, @@ -3562,7 +3562,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), ra_rnti, P_RNTI, 1, @@ -3596,7 +3596,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), ra_rnti, P_RNTI, 2, @@ -3631,7 +3631,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), ra_rnti, P_RNTI, 3, @@ -3665,7 +3665,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), ra_rnti, P_RNTI, 0, @@ -3697,7 +3697,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), ra_rnti, P_RNTI, 1, @@ -3729,7 +3729,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), ra_rnti, P_RNTI, 2, @@ -3762,7 +3762,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), ra_rnti, P_RNTI, 3, @@ -3792,7 +3792,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), ra_rnti, P_RNTI, 0, @@ -3825,7 +3825,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), ra_rnti, P_RNTI, 1, @@ -3857,7 +3857,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), ra_rnti, P_RNTI, 2, @@ -3891,7 +3891,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, eNB_id, frame_parms, mi, - SI_RNTI, + ((ue->decode_SIB == 1) ? SI_RNTI : 0), ra_rnti, P_RNTI, 3, diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c index b9b1f6c0ad..1fb842b837 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c @@ -4763,6 +4763,8 @@ int check_dci_format1_1a_coherency(DCI_format_t dci_format, uint16_t si_rnti, uint16_t ra_rnti, uint16_t p_rnti, + uint32_t frame, + uint8_t subframe, DCI_INFO_EXTRACTED_t *pdci_info_extarcted, LTE_DL_UE_HARQ_t *pdlsch0_harq) { @@ -4779,17 +4781,17 @@ int check_dci_format1_1a_coherency(DCI_format_t dci_format, uint8_t NPRB = 0; long long int RIV_max = 0; -#ifdef DEBUG_DCI - LOG_I(PHY,"[DCI-FORMAT-1-1A] dci_format %d\n", dci_format); +//#ifdef DEBUG_DCI + LOG_I(PHY,"[DCI-FORMAT-1-1A] AbsSubframe %d.%d dci_format %d\n", frame, subframe, dci_format); LOG_I(PHY,"[DCI-FORMAT-1-1A] rnti %x\n", rnti); LOG_I(PHY,"[DCI-FORMAT-1-1A] harq_pid %d\n", harq_pid); - LOG_I(PHY,"[DCI-FORMAT-1-1A] rah %d\n", rah); - LOG_I(PHY,"[DCI-FORMAT-1-1A] rballoc %x\n", rballoc); - LOG_I(PHY,"[DCI-FORMAT-1-1A] mcs1 %d\n", mcs1); - LOG_I(PHY,"[DCI-FORMAT-1-1A] rv1 %d\n", rv1); - LOG_I(PHY,"[DCI-FORMAT-1-1A] ndi1 %d\n", ndi1); - LOG_I(PHY,"[DCI-FORMAT-1-1A] TPC %d\n", TPC); -#endif + // LOG_I(PHY,"[DCI-FORMAT-1-1A] rah %d\n", rah); + // LOG_I(PHY,"[DCI-FORMAT-1-1A] rballoc %x\n", rballoc); + // LOG_I(PHY,"[DCI-FORMAT-1-1A] mcs1 %d\n", mcs1); + // LOG_I(PHY,"[DCI-FORMAT-1-1A] rv1 %d\n", rv1); + // LOG_I(PHY,"[DCI-FORMAT-1-1A] ndi1 %d\n", ndi1); + // LOG_I(PHY,"[DCI-FORMAT-1-1A] TPC %d\n", TPC); +//#endif // I- check dci content minimum coherency if( ((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti)) && harq_pid > 0) @@ -5002,10 +5004,10 @@ int check_dci_format2_2a_coherency(DCI_format_t dci_format, LOG_I(PHY, "extarcted dci - mcs2 %d \n", mcs2); LOG_I(PHY, "extarcted dci - rv1 %d \n", rv1); LOG_I(PHY, "extarcted dci - rv2 %d \n", rv2); - LOG_I(PHY, "extarcted dci - ndi1 %d \n", ndi1); - LOG_I(PHY, "extarcted dci - ndi2 %d \n", ndi2); + //LOG_I(PHY, "extarcted dci - ndi1 %d \n", ndi1); + //LOG_I(PHY, "extarcted dci - ndi2 %d \n", ndi2); LOG_I(PHY, "extarcted dci - rballoc %x \n", rballoc); - LOG_I(PHY, "extarcted dci - harq pif %d \n", harq_pid); + LOG_I(PHY, "extarcted dci - harq pid %d \n", harq_pid); LOG_I(PHY, "extarcted dci - round0 %d \n", pdlsch0_harq->round); LOG_I(PHY, "extarcted dci - round1 %d \n", pdlsch1_harq->round); #endif @@ -5818,12 +5820,24 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format, } } - dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][dlsch0_harq->nb_rb-1]; - //if(dlsch0_harq->Nl == 2) - //dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][(dlsch0_harq->nb_rb<<1)-1]; - if (mcs1 <= 28) + // if Imcs in [29..31] TBS is assumed to be as determined from DCI transported in the latest + // PDCCH for the same trasport block using Imcs in [0 .. 28] + if(dlsch0_harq->mcs <= 28) + { + dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][dlsch0_harq->nb_rb-1]; + LOG_D(PHY,"[UE] DLSCH: New TBS CW0 subframe %d (pid %d, round %d) TBS %d \n", + subframe,harq_pid,dlsch0_harq->round, dlsch0_harq->TBS); + } + else + { + LOG_D(PHY,"[UE] DLSCH: Keep the same TBS CW0 subframe %d (pid %d, round %d) TBS %d \n", + subframe,harq_pid,dlsch0_harq->round, dlsch0_harq->TBS); + } + //if(dlsch0_harq->Nl == 2) + //dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][(dlsch0_harq->nb_rb<<1)-1]; + if (mcs1 <= 28) dlsch0_harq->Qm = get_Qm(mcs1); - else if (mcs1<=31) + else if (mcs1<=31) dlsch0_harq->Qm = (mcs1-28)<<1; } @@ -5849,13 +5863,22 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format, #endif } - dlsch1_harq->TBS = TBStable[get_I_TBS(dlsch1_harq->mcs)][dlsch1_harq->nb_rb-1]; - //if(dlsch0_harq->Nl == 2) - //dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][(dlsch0_harq->nb_rb<<1)-1]; - - if (mcs2 <= 28) + // if Imcs in [29..31] TBS is assumed to be as determined from DCI transported in the latest + // PDCCH for the same trasport block using Imcs in [0 .. 28] + if(dlsch1_harq->mcs <= 28) + { + dlsch1_harq->TBS = TBStable[get_I_TBS(dlsch1_harq->mcs)][dlsch1_harq->nb_rb-1]; + LOG_D(PHY,"[UE] DLSCH: New TBS CW1 subframe %d (pid %d, round %d) TBS %d \n", + subframe,harq_pid,dlsch1_harq->round, dlsch1_harq->TBS); + } + else + { + LOG_D(PHY,"[UE] DLSCH: Keep the same TBS CW1 subframe %d (pid %d, round %d) TBS %d \n", + subframe,harq_pid,dlsch1_harq->round, dlsch1_harq->TBS); + } + if (mcs2 <= 28) dlsch1_harq->Qm = get_Qm(mcs2); - else if (mcs1<=31) + else if (mcs1<=31) dlsch1_harq->Qm = (mcs2-28)<<1; } @@ -5953,7 +5976,7 @@ int generate_ue_dlsch_params_from_dci(int frame, tc_rnti, si_rnti, ra_rnti, - p_rnti, + p_rnti,frame,subframe, &dci_info_extarcted, dlsch0_harq); if(status == 0) @@ -6053,7 +6076,7 @@ int generate_ue_dlsch_params_from_dci(int frame, tc_rnti, si_rnti, ra_rnti, - p_rnti, + p_rnti,frame,subframe, &dci_info_extarcted, dlsch0_harq); if(status == 0) @@ -6133,7 +6156,7 @@ int generate_ue_dlsch_params_from_dci(int frame, case format2A: { // extract dci infomation - //LOG_I(PHY,"[DCI-format2] AbsSubframe %d.%d extract dci infomation \n", frame%1024, subframe); + //LOG_I(PHY,"[DCI-format2] AbsSubframe %d.%d extract dci infomation \n", frame%1024, subframe); extract_dci2A_info(frame_parms->N_RB_DL, frame_type, frame_parms->nb_antenna_ports_eNB, diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c index 7b1fb3cd50..dbe938e3ae 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c @@ -364,12 +364,18 @@ int rx_pdsch(PHY_VARS_UE *ue, symbol, nb_rb); - if ((dlsch0_harq->mimo_moden_connected_eNB) && (dlsch0_harq->dl_power_off==0)) // TM5 two-user + if ((dlsch0_harq->mimo_moden_connected_eNB) && + (dlsch0_harq->dl_power_off==0) + ) // TM5 two-user + { dlsch_scale_channel(pdsch_vars[eNB_id_i]->dl_ch_estimates_ext, frame_parms, dlsch, symbol, nb_rb); + } if (first_symbol_flag==1) { if (beamforming_mode==0){ diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c index 240758eceb..7497f2e119 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c @@ -8846,7 +8846,8 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, memcpy(ch_mag_256i, ch_mag, len*4); memcpy(ch_mag_i_256i, ch_mag_i, len*4); memcpy(rho_256i, rho, len*4); - /* + + qam64_qam64_avx2((int32_t *)rxF_256i, (int32_t *)rxF_i_256i, (int32_t *)ch_mag_256i, @@ -8854,7 +8855,8 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, (int16_t *)llr16, (int32_t *) rho_256i, len); - */ + + /* qam64_qam16_avx2((short *)rxF_256i, (short *)rxF_i_256i, (short *)ch_mag_256i, @@ -8862,7 +8864,7 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, (short *)llr16, (short *)rho_256i, len); - +*/ free16(rxF_256i, sizeof(rxF_256i)); free16(rxF_i_256i, sizeof(rxF_i_256i)); free16(ch_mag_256i, sizeof(ch_mag_256i)); diff --git a/openair1/PHY/defs.h b/openair1/PHY/defs.h index 024e8ddf59..5c1b1158ba 100644 --- a/openair1/PHY/defs.h +++ b/openair1/PHY/defs.h @@ -802,6 +802,8 @@ typedef struct { uint8_t prach_cnt; uint8_t prach_PreambleIndex; // uint8_t prach_timer; + uint8_t decode_SIB; + uint8_t decode_MIB; int rx_offset; /// Timing offset int rx_offset_diff; /// Timing adjustment for ofdm symbol0 on HW USRP int timing_advance; ///timing advance signalled from eNB diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c index 42c75bdc7c..c4938f3f76 100644 --- a/openair1/SCHED/phy_procedures_lte_ue.c +++ b/openair1/SCHED/phy_procedures_lte_ue.c @@ -2082,7 +2082,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin T_INT(tx_amp),T_INT(ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->g_pucch),T_INT(get_PL(ue->Mod_id,ue->CC_id,eNB_id))); #endif - LOG_I(PHY,"[UE %d][RNTI %x] AbsSubFrame %d.%d Generating PUCCH 2 (RI or CQI), n2_pucch %d, Po_PUCCH %d, isShortenPucch %d, amp %d\n", + LOG_D(PHY,"[UE %d][RNTI %x] AbsSubFrame %d.%d Generating PUCCH 2 (RI or CQI), n2_pucch %d, Po_PUCCH %d, isShortenPucch %d, amp %d\n", Mod_id, ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->rnti, frame_tx%1024, subframe_tx, @@ -3520,10 +3520,10 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, dlsch0->harq_processes[harq_pid]->TBS>256?1:0); stop_meas(&ue->dlsch_decoding_stats); - printf(" --> Unscrambling for CW0 %5.3f\n", - (ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0)); - printf(" --> Turbo Decoding for CW0 %5.3f\n", - (ue->dlsch_decoding_stats.p_time)/(cpuf*1000.0)); + //printf(" --> Unscrambling for CW0 %5.3f\n", + // (ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0)); + //printf(" --> Turbo Decoding for CW0 %5.3f\n", + // (ue->dlsch_decoding_stats.p_time)/(cpuf*1000.0)); if(is_cw1_active) { @@ -3568,10 +3568,10 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, dlsch1->harq_processes[harq_pid]->TBS>256?1:0); stop_meas(&ue->dlsch_decoding_stats); - printf(" --> Unscrambling for CW1 %5.3f\n", - (ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0)); - printf(" --> Turbo Decoding for CW1 %5.3f\n", - (ue->dlsch_decoding_stats.p_time)/(cpuf*1000.0)); + //printf(" --> Unscrambling for CW1 %5.3f\n", + // (ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0)); + //printf(" --> Turbo Decoding for CW1 %5.3f\n", + // (ue->dlsch_decoding_stats.p_time)/(cpuf*1000.0)); } } @@ -3591,7 +3591,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, if(dlsch0->rnti != 0xffff) { - LOG_I(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d DLSCH CW0 in error (rv %d,mcs %d,TBS %d)\n", + LOG_I(PHY,"[UE %d][PDSCH %x/%d] AbsSubframe %d.%d : DLSCH CW0 in error (rv %d,mcs %d,TBS %d)\n", ue->Mod_id,dlsch0->rnti, harq_pid,frame_rx,subframe_rx, dlsch0->harq_processes[harq_pid]->rvidx, @@ -3603,7 +3603,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, } else { if(dlsch0->rnti != 0xffff) { - LOG_I(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d: Received DLSCH CW0 (rv %d,mcs %d,TBS %d)\n", + LOG_I(PHY,"[UE %d][PDSCH %x/%d] AbsSubframe %d.%d : Received DLSCH CW0 (rv %d,mcs %d,TBS %d)\n", ue->Mod_id,dlsch0->rnti, harq_pid,frame_rx,subframe_rx, dlsch0->harq_processes[harq_pid]->rvidx, @@ -3857,7 +3857,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin // first slot has been processed (FFTs + Channel Estimation, PCFICH/PHICH/PDCCH) stop_meas(&ue->generic_stat); - printf("[SFN %d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0)); + //printf("[SFN %d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0)); start_meas(&ue->generic_stat); // do procedures for C-RNTI @@ -3952,11 +3952,13 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin } // not an S-subframe stop_meas(&ue->generic_stat); - printf("[SFN %d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0)); + //printf("[SFN %d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0)); // run pbch procedures if subframe is 0 - if (subframe_rx == 0) + if ( (subframe_rx == 0) && (ue->decode_MIB == 1)) + { ue_pbch_procedures(eNB_id,ue,proc,abstraction_flag); + } // do procedures for C-RNTI if (ue->dlsch[subframe_rx&0x1][eNB_id][0]->active == 1) { @@ -3984,8 +3986,8 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin mode, abstraction_flag); stop_meas(&ue->dlsch_procedures_stat); - printf("[SFN %d] Slot1: Pdsch Proc %5.2f\n",subframe_rx,ue->pdsch_procedures_stat.p_time/(cpuf*1000.0)); - printf("[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",subframe_rx,ue->dlsch_procedures_stat.p_time/(cpuf*1000.0)); + //printf("[SFN %d] Slot1: Pdsch Proc %5.2f\n",subframe_rx,ue->pdsch_procedures_stat.p_time/(cpuf*1000.0)); + //printf("[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",subframe_rx,ue->dlsch_procedures_stat.p_time/(cpuf*1000.0)); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT); From bb8c6b2c5270e61539b2c18cd1fa7cd988f72c0c Mon Sep 17 00:00:00 2001 From: hbilel Date: Wed, 8 Mar 2017 11:10:12 +0100 Subject: [PATCH 09/47] [OAI-UE] code clean up for merge --- openair1/PHY/LTE_TRANSPORT/dci_tools.c | 16 ++++++++-------- openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c | 4 ++-- openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c | 14 +------------- openair1/PHY/MODULATION/slot_fep.c | 2 +- openair1/PHY/TOOLS/lte_phy_scope.c | 2 +- openair1/SCHED/phy_procedures_lte_ue.c | 2 +- openair2/RRC/LITE/L2_interface.c | 8 ++++---- 7 files changed, 18 insertions(+), 30 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c index 1fb842b837..0812e9c6dd 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c @@ -4781,17 +4781,17 @@ int check_dci_format1_1a_coherency(DCI_format_t dci_format, uint8_t NPRB = 0; long long int RIV_max = 0; -//#ifdef DEBUG_DCI +#ifdef DEBUG_DCI LOG_I(PHY,"[DCI-FORMAT-1-1A] AbsSubframe %d.%d dci_format %d\n", frame, subframe, dci_format); LOG_I(PHY,"[DCI-FORMAT-1-1A] rnti %x\n", rnti); LOG_I(PHY,"[DCI-FORMAT-1-1A] harq_pid %d\n", harq_pid); - // LOG_I(PHY,"[DCI-FORMAT-1-1A] rah %d\n", rah); - // LOG_I(PHY,"[DCI-FORMAT-1-1A] rballoc %x\n", rballoc); - // LOG_I(PHY,"[DCI-FORMAT-1-1A] mcs1 %d\n", mcs1); - // LOG_I(PHY,"[DCI-FORMAT-1-1A] rv1 %d\n", rv1); - // LOG_I(PHY,"[DCI-FORMAT-1-1A] ndi1 %d\n", ndi1); - // LOG_I(PHY,"[DCI-FORMAT-1-1A] TPC %d\n", TPC); -//#endif + LOG_I(PHY,"[DCI-FORMAT-1-1A] rah %d\n", rah); + LOG_I(PHY,"[DCI-FORMAT-1-1A] rballoc %x\n", rballoc); + LOG_I(PHY,"[DCI-FORMAT-1-1A] mcs1 %d\n", mcs1); + LOG_I(PHY,"[DCI-FORMAT-1-1A] rv1 %d\n", rv1); + LOG_I(PHY,"[DCI-FORMAT-1-1A] ndi1 %d\n", ndi1); + LOG_I(PHY,"[DCI-FORMAT-1-1A] TPC %d\n", TPC); +#endif // I- check dci content minimum coherency if( ((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti)) && harq_pid > 0) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c index 48d6bb86be..d683decc9f 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c @@ -612,12 +612,12 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, &phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1); stop_meas(dlsch_turbo_decoding_stats); - printf("Segmentation: C %d r %d, dlsch_rate_unmatching_stats %5.3f dlsch_deinterleaving_stats %5.3f dlsch_turbo_decoding_stats %5.3f \n", + /*printf("Segmentation: C %d r %d, dlsch_rate_unmatching_stats %5.3f dlsch_deinterleaving_stats %5.3f dlsch_turbo_decoding_stats %5.3f \n", harq_process->C, r, dlsch_rate_unmatching_stats->p_time/(cpuf*1000.0), dlsch_deinterleaving_stats->p_time/(cpuf*1000.0), - dlsch_turbo_decoding_stats->p_time/(cpuf*1000.0)); + dlsch_turbo_decoding_stats->p_time/(cpuf*1000.0));*/ } } diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c index dbe938e3ae..c407a535b5 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c @@ -122,7 +122,6 @@ int rx_pdsch(PHY_VARS_UE *ue, - switch (type) { case SI_PDSCH: pdsch_vars = &ue->pdsch_vars_SI[eNB_id]; @@ -234,9 +233,6 @@ int rx_pdsch(PHY_VARS_UE *ue, } } - //LOG_I(PHY,"[rx_pdsch %d] AbsSubframe %d.%d symbol %d rxType %d beamformingMode %d, antennaPorts %d, eNB_id_i %d, n_connected_eNB %d\n", - // harq_pid, frame,subframe, symbol,rx_type, beamforming_mode, frame_parms->nb_antenna_ports_eNB,eNB_id_i,ue->n_connected_eNB); - if (frame_parms->nb_antenna_ports_eNB>1 && beamforming_mode==0) { #ifdef DEBUG_DLSCH_MOD LOG_I(PHY,"dlsch: using pmi %x (%p), rb_alloc %x\n",pmi2hex_2Ar1(dlsch0_harq->pmi_alloc),dlsch[0],dlsch0_harq->rb_alloc_even[0]); @@ -396,7 +392,6 @@ int rx_pdsch(PHY_VARS_UE *ue, ((dlsch0_harq->mimo_mode >=DUALSTREAM_UNIFORM_PRECODING1) && (dlsch0_harq->mimo_mode <=DUALSTREAM_PUSCH_PRECODING))) { - //LOG_I(PHY,"Channel Level TM34 !!!!!!!! \n"); dlsch_channel_level_TM34(pdsch_vars[eNB_id]->dl_ch_estimates_ext, frame_parms, pdsch_vars[eNB_id]->pmi_ext, @@ -530,7 +525,6 @@ int rx_pdsch(PHY_VARS_UE *ue, } } else if ((dlsch0_harq->mimo_mode == LARGE_CDD) || ((dlsch0_harq->mimo_mode >=DUALSTREAM_UNIFORM_PRECODING1) && (dlsch0_harq->mimo_mode <=DUALSTREAM_PUSCH_PRECODING))){ - //LOG_I(PHY,"channel compensation TM34 !!!!!!!!!!!!!!!!!\n"); dlsch_channel_compensation_TM34(frame_parms, pdsch_vars[eNB_id], measurements, @@ -683,7 +677,6 @@ int rx_pdsch(PHY_VARS_UE *ue, ((dlsch0_harq->mimo_mode >=DUALSTREAM_UNIFORM_PRECODING1) && (dlsch0_harq->mimo_mode <=DUALSTREAM_PUSCH_PRECODING))){ // TM3 or TM4 if (frame_parms->nb_antenna_ports_eNB == 2) { - //LOG_I(PHY,"MRC Detection TM34 !!!!!!!!!\n"); dlsch_detection_mrc_TM34(frame_parms, pdsch_vars[eNB_id], harq_pid, @@ -745,10 +738,6 @@ int rx_pdsch(PHY_VARS_UE *ue, //i_mod should have been passed as a parameter } - //LOG_I(PHY,"compute LLRs rx_type dual ? %d rx_standard %d codeword_TB0 %d codeword_TB1 %d\n", rx_type==rx_IC_dual_stream, rx_standard, codeword_TB0, codeword_TB1); - //if (rx_type >= rx_IC_single_stream) - //LOG_I(PHY,"LLR0 Qm ? %d LLR1 Qm \n", dlsch0_harq->Qm, dlsch1_harq->Qm); - switch (dlsch0_harq->Qm) { case 2 : if ((rx_type==rx_standard) || (codeword_TB0 == -1) || (codeword_TB1 == -1)) { @@ -830,7 +819,6 @@ int rx_pdsch(PHY_VARS_UE *ue, } break; case 4 : - if ((rx_type==rx_standard ) || (codeword_TB0 == -1) || (codeword_TB1 == -1)) { dlsch_16qam_llr(frame_parms, pdsch_vars[eNB_id]->rxdataF_comp0, @@ -1004,7 +992,6 @@ int rx_pdsch(PHY_VARS_UE *ue, return(-1); break; } - if (dlsch1_harq) { switch (get_Qm(dlsch1_harq->mcs)) { case 2 : @@ -1050,6 +1037,7 @@ int rx_pdsch(PHY_VARS_UE *ue, } } +// Please keep it: useful for debugging #if 0 if( (symbol == 13) && (dlsch0_harq->mimo_mode == 2) ) { diff --git a/openair1/PHY/MODULATION/slot_fep.c b/openair1/PHY/MODULATION/slot_fep.c index 4b663776df..3a3b3b4c0d 100644 --- a/openair1/PHY/MODULATION/slot_fep.c +++ b/openair1/PHY/MODULATION/slot_fep.c @@ -48,7 +48,7 @@ int slot_fep(PHY_VARS_UE *ue, unsigned int rx_offset; /*LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch_ue[eNB_id]; - unsigned char harq_pid = dlsch_ue[0]->current_harq_pid; + unsigned char harq_pid = dlsch_ue[0]->current_harq_pid; LTE_DL_UE_HARQ_t *dlsch0_harq = dlsch_ue[0]->harq_processes[harq_pid]; int uespec_pilot[9][1200];*/ diff --git a/openair1/PHY/TOOLS/lte_phy_scope.c b/openair1/PHY/TOOLS/lte_phy_scope.c index 681ee0b51c..7a53346453 100644 --- a/openair1/PHY/TOOLS/lte_phy_scope.c +++ b/openair1/PHY/TOOLS/lte_phy_scope.c @@ -768,4 +768,4 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, } free(chest_t_abs); -} +} \ No newline at end of file diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c index c4938f3f76..8fd0048f45 100644 --- a/openair1/SCHED/phy_procedures_lte_ue.c +++ b/openair1/SCHED/phy_procedures_lte_ue.c @@ -368,7 +368,7 @@ void process_timing_advance(uint8_t Mod_id,uint8_t CC_id,int16_t timing_advance) PHY_vars_UE_g[Mod_id][CC_id]->timing_advance = PHY_vars_UE_g[Mod_id][CC_id]->timing_advance+timing_advance*4; //this is for 25RB only!!! - LOG_I(PHY,"[UE %d] Got timing advance %d from MAC, new value %d\n",Mod_id, timing_advance, PHY_vars_UE_g[Mod_id][CC_id]->timing_advance); + LOG_D(PHY,"[UE %d] Got timing advance %d from MAC, new value %d\n",Mod_id, timing_advance, PHY_vars_UE_g[Mod_id][CC_id]->timing_advance); } diff --git a/openair2/RRC/LITE/L2_interface.c b/openair2/RRC/LITE/L2_interface.c index 4d0ff134ba..fa5a4d6409 100644 --- a/openair2/RRC/LITE/L2_interface.c +++ b/openair2/RRC/LITE/L2_interface.c @@ -199,7 +199,7 @@ mac_rrc_data_req( int sdu_size = sizeof(RRC_MAC_CCCH_DATA_REQ (message_p).sdu); if (ccch_size > sdu_size) { - LOG_E(RRC, "SDU larger than CCCH SDU buffer size0 (%d, %d)", ccch_size, sdu_size); + LOG_E(RRC, "SDU larger than CCCH SDU buffer size (%d, %d)", ccch_size, sdu_size); ccch_size = sdu_size; } @@ -297,7 +297,7 @@ mac_rrc_data_req( int sdu_size = sizeof(RRC_MAC_CCCH_DATA_REQ (message_p).sdu); if (ccch_size > sdu_size) { - LOG_E(RRC, "SDU larger than CCCH SDU buffer size1 (%d, %d)", ccch_size, sdu_size); + LOG_E(RRC, "SDU larger than CCCH SDU buffer size (%d, %d)", ccch_size, sdu_size); ccch_size = sdu_size; } @@ -403,7 +403,7 @@ mac_rrc_data_ind( int msg_sdu_size = CCCH_SDU_SIZE; if (sdu_lenP > msg_sdu_size) { - LOG_E(RRC, "SDU larger than CCCH SDU buffer size2 (%d, %d)", sdu_size, msg_sdu_size); + LOG_E(RRC, "SDU larger than CCCH SDU buffer size (%d, %d)", sdu_size, msg_sdu_size); sdu_size = msg_sdu_size; } else { sdu_size = sdu_lenP; @@ -471,7 +471,7 @@ mac_rrc_data_ind( int msg_sdu_size = sizeof(RRC_MAC_CCCH_DATA_IND (message_p).sdu); if (sdu_lenP > msg_sdu_size) { - LOG_E(RRC, "SDU larger than CCCH SDU buffer size3 (%d, %d)", sdu_lenP, msg_sdu_size); + LOG_E(RRC, "SDU larger than CCCH SDU buffer size (%d, %d)", sdu_lenP, msg_sdu_size); sdu_size = msg_sdu_size; } else { sdu_size = sdu_lenP; From 3d1e01e283ada734e5de62a387f4b6c6e307ee57 Mon Sep 17 00:00:00 2001 From: hbilel Date: Wed, 8 Mar 2017 11:25:41 +0100 Subject: [PATCH 10/47] [OAI-UE] llr computation clean up --- .../PHY/LTE_TRANSPORT/dlsch_llr_computation.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c index 7497f2e119..b08836762c 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c @@ -8831,7 +8831,7 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, len = (nb_rb*12) - pbch_pss_sss_adjust; } -//#ifdef __AVX2__ +#ifdef __AVX2__ // Round length up to multiple of 16 words uint32_t len256i = ((len+16)>>4)*16; @@ -8847,7 +8847,6 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, memcpy(ch_mag_i_256i, ch_mag_i, len*4); memcpy(rho_256i, rho, len*4); - qam64_qam64_avx2((int32_t *)rxF_256i, (int32_t *)rxF_i_256i, (int32_t *)ch_mag_256i, @@ -8856,23 +8855,13 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, (int32_t *) rho_256i, len); - /* - qam64_qam16_avx2((short *)rxF_256i, - (short *)rxF_i_256i, - (short *)ch_mag_256i, - (short *)ch_mag_i_256i, - (short *)llr16, - (short *)rho_256i, - len); -*/ free16(rxF_256i, sizeof(rxF_256i)); free16(rxF_i_256i, sizeof(rxF_i_256i)); free16(ch_mag_256i, sizeof(ch_mag_256i)); free16(ch_mag_i_256i, sizeof(ch_mag_i_256i)); free16(rho_256i, sizeof(rho_256i)); -//#else -/* +#else qam64_qam64((short *)rxF, (short *)rxF_i, (short *)ch_mag, @@ -8880,9 +8869,7 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, (short *)llr16, (short *)rho, len); -*/ - -//#endif +#endif llr16 += (6*len); *llr16p = (short *)llr16; From 05fe029a6228ddf86403d6bddfc4d6a7cb39977b Mon Sep 17 00:00:00 2001 From: hbilel Date: Wed, 8 Mar 2017 13:59:49 +0100 Subject: [PATCH 11/47] [OAI-UE] fix in de-precoding for tm3/4 --- openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c index c407a535b5..65fc807aa8 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c @@ -1682,10 +1682,10 @@ void prec2A_TM3_128(__m128i *ch0,__m128i *ch1) { // print_shorts("prec2A_TM3 ch0 (mid):",&tmp0); // print_shorts("prec2A_TM3 ch1 (mid):",ch1); - ch0[0] = _mm_mulhi_epi16(ch0[0],amp); - ch0[0] = _mm_slli_epi16(ch0[0],1); - ch1[0] = _mm_mulhi_epi16(ch1[0],amp); - ch1[0] = _mm_slli_epi16(ch1[0],1); + //ch0[0] = _mm_mulhi_epi16(ch0[0],amp); + //ch0[0] = _mm_slli_epi16(ch0[0],1); + //ch1[0] = _mm_mulhi_epi16(ch1[0],amp); + //ch1[0] = _mm_slli_epi16(ch1[0],1); //ch0[0] = _mm_srai_epi16(ch0[0],1); //ch1[0] = _mm_srai_epi16(ch1[0],1); From 9dd65f28016e595d878d36ff61794c3dd138ff63 Mon Sep 17 00:00:00 2001 From: hbilel Date: Wed, 8 Mar 2017 14:21:14 +0100 Subject: [PATCH 12/47] [OAI-UE] remove unused debug-printf --- openair1/SCHED/phy_procedures_lte_ue.c | 12 +-- openair3/NAS/TOOLS/ue_tcl_test.conf | 114 +++++++++++++++++++++++++ targets/RT/USER/lte-ue.c | 2 +- 3 files changed, 121 insertions(+), 7 deletions(-) create mode 100644 openair3/NAS/TOOLS/ue_tcl_test.conf diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c index 8fd0048f45..4a75d5d9e7 100644 --- a/openair1/SCHED/phy_procedures_lte_ue.c +++ b/openair1/SCHED/phy_procedures_lte_ue.c @@ -1537,7 +1537,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB mac_xface->macphy_exit("Error in ulsch_coding"); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX, VCD_FUNCTION_OUT); stop_meas(&ue->phy_proc_tx); - printf("------FULL TX PROC : %5.2f ------\n",ue->phy_proc_tx.p_time/(cpuf*1000.0)); + //printf("------FULL TX PROC : %5.2f ------\n",ue->phy_proc_tx.p_time/(cpuf*1000.0)); return; } } @@ -3591,7 +3591,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, if(dlsch0->rnti != 0xffff) { - LOG_I(PHY,"[UE %d][PDSCH %x/%d] AbsSubframe %d.%d : DLSCH CW0 in error (rv %d,mcs %d,TBS %d)\n", + LOG_D(PHY,"[UE %d][PDSCH %x/%d] AbsSubframe %d.%d : DLSCH CW0 in error (rv %d,mcs %d,TBS %d)\n", ue->Mod_id,dlsch0->rnti, harq_pid,frame_rx,subframe_rx, dlsch0->harq_processes[harq_pid]->rvidx, @@ -3603,7 +3603,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, } else { if(dlsch0->rnti != 0xffff) { - LOG_I(PHY,"[UE %d][PDSCH %x/%d] AbsSubframe %d.%d : Received DLSCH CW0 (rv %d,mcs %d,TBS %d)\n", + LOG_D(PHY,"[UE %d][PDSCH %x/%d] AbsSubframe %d.%d : Received DLSCH CW0 (rv %d,mcs %d,TBS %d)\n", ue->Mod_id,dlsch0->rnti, harq_pid,frame_rx,subframe_rx, dlsch0->harq_processes[harq_pid]->rvidx, @@ -3672,7 +3672,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, if(is_cw1_active) { if (ret1 == (1+dlsch0->max_turbo_iterations)) { - LOG_I(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d DLSCH CW1 in error (rv %d,mcs %d,TBS %d)\n", + LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d DLSCH CW1 in error (rv %d,mcs %d,TBS %d)\n", ue->Mod_id,dlsch0->rnti, harq_pid,frame_rx,subframe_rx, dlsch0->harq_processes[harq_pid]->rvidx, @@ -3680,7 +3680,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, dlsch0->harq_processes[harq_pid]->TBS); } else { - LOG_I(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d: Received DLSCH CW1 (rv %d,mcs %d,TBS %d)\n", + LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d: Received DLSCH CW1 (rv %d,mcs %d,TBS %d)\n", ue->Mod_id,dlsch0->rnti, harq_pid,frame_rx,subframe_rx, dlsch0->harq_processes[harq_pid]->rvidx, @@ -4100,7 +4100,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT); stop_meas(&ue->phy_proc_rx[subframe_rx&0x1]); - printf("------FULL RX PROC [SFN %d]: %5.2f ------\n",subframe_rx,ue->phy_proc_rx[subframe_rx&0x1].p_time/(cpuf*1000.0)); + //printf("------FULL RX PROC [SFN %d]: %5.2f ------\n",subframe_rx,ue->phy_proc_rx[subframe_rx&0x1].p_time/(cpuf*1000.0)); return (0); } diff --git a/openair3/NAS/TOOLS/ue_tcl_test.conf b/openair3/NAS/TOOLS/ue_tcl_test.conf new file mode 100644 index 0000000000..05db6be4d1 --- /dev/null +++ b/openair3/NAS/TOOLS/ue_tcl_test.conf @@ -0,0 +1,114 @@ +# List of known PLMNS +PLMN: { + PLMN0: { + FULLNAME="Test network"; + SHORTNAME="OAI4G"; + MNC="01"; + MCC="001"; + + }; + PLMN1: { + FULLNAME="SFR France"; + SHORTNAME="SFR"; + MNC="10"; + MCC="208"; + + }; + PLMN2: { + FULLNAME="SFR France"; + SHORTNAME="SFR"; + MNC="11"; + MCC="208"; + }; + PLMN3: { + FULLNAME="SFR France"; + SHORTNAME="SFR"; + MNC="13"; + MCC="208"; + }; + PLMN4: { + FULLNAME="OAI LTEBOX"; + SHORTNAME="OAIALU"; + MNC="93"; + MCC="208"; + }; + PLMN5: { + FULLNAME="T-Mobile USA"; + SHORTNAME="T-Mobile"; + MNC="280"; + MCC="310"; + }; + PLMN6: { + FULLNAME="FICTITIOUS USA"; + SHORTNAME="FICTITIO"; + MNC="028"; + MCC="310"; + }; + PLMN7: { + FULLNAME="Vodafone Italia"; + SHORTNAME="VODAFONE"; + MNC="10"; + MCC="222"; + }; + PLMN8: { + FULLNAME="Vodafone Spain"; + SHORTNAME="VODAFONE"; + MNC="01"; + MCC="214"; + }; + PLMN9: { + FULLNAME="Vodafone Spain"; + SHORTNAME="VODAFONE"; + MNC="06"; + MCC="214"; + }; + PLMN10: { + FULLNAME="Vodafone Germ"; + SHORTNAME="VODAFONE"; + MNC="02"; + MCC="262"; + }; + PLMN11: { + FULLNAME="Vodafone Germ"; + SHORTNAME="VODAFONE"; + MNC="04"; + MCC="262"; + }; +}; + +UE0: +{ + USER: { + IMEI="356113022094149"; + MANUFACTURER="EURECOM"; + MODEL="LTE Android PC"; + PIN="0000"; + }; + + SIM: { + MSIN="000001234"; + USIM_API_K="000102030405060708090A0B0C0D0E0F"; + OPC="C42449363BBAD02B66D16BC975D77CC1"; + MSISDN="000000000000";//"33611123456"; + }; + + # Home PLMN Selector with Access Technology + HPLMN= "00101"; + + # User controlled PLMN Selector with Access Technology + UCPLMN_LIST = (); + + # Operator PLMN List + OPLMN_LIST = ("00101", "20810", "20811", "20813", "20893", "310280", "310028"); + + # Operator controlled PLMN Selector with Access Technology + OCPLMN_LIST = ("22210", "21401", "21406", "26202", "26204"); + + # Forbidden plmns + FPLMN_LIST = (); + + # List of Equivalent HPLMNs +#TODO: UE does not connect if set, to be fixed in the UE +# EHPLMN_LIST= ("20811", "20813"); + EHPLMN_LIST= (); +}; diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c index 5603d86ade..1ddc06f33b 100644 --- a/targets/RT/USER/lte-ue.c +++ b/targets/RT/USER/lte-ue.c @@ -574,7 +574,7 @@ static void *UE_thread_rxn_txnp4(void *arg) { } stop_meas(&UE->generic_stat); - printf("mac_xface->ue_scheduler %5.2f \n",UE->generic_stat.p_time/(cpuf*1000.0)); + //printf("mac_xface->ue_scheduler %5.2f \n",UE->generic_stat.p_time/(cpuf*1000.0)); // Prepare the future Tx data From 305ebf5c4b8904081a226e7a2fb85a3253d6f14c Mon Sep 17 00:00:00 2001 From: hbilel Date: Wed, 8 Mar 2017 14:57:30 +0100 Subject: [PATCH 13/47] rebase branch to develop 2017.w09 --- openair1/PHY/LTE_TRANSPORT/dci_tools.c | 4 ++-- openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c | 3 +-- openair3/NAS/TOOLS/network.h | 2 +- openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf | 8 ++++---- openair3/NAS/UE/ESM/esm_ebr_context.c | 2 +- targets/RT/USER/lte-ue.c | 1 - 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c index 0812e9c6dd..c4e379b45a 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c @@ -5710,9 +5710,9 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format, if (TB0_active==0) { dlsch0_harq->status = SCH_IDLE; pdlsch0->active = 0; -#ifdef DEBUG_HARQ + #ifdef DEBUG_HARQ printf("[DCI UE]: TB0 is deactivated, retransmit TB1 transmit in TM6\n"); -#endif + #endif } if (TB1_active==0) { diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c index 65fc807aa8..72b486c042 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c @@ -1661,8 +1661,7 @@ void prec2A_TM3_128(__m128i *ch0,__m128i *ch1) { __m128i tmp0,tmp1; - -//_mm_mulhi_epi16 + //_mm_mulhi_epi16 // print_shorts("prec2A_TM3 ch0 (before):",ch0); // print_shorts("prec2A_TM3 ch1 (before):",ch1); diff --git a/openair3/NAS/TOOLS/network.h b/openair3/NAS/TOOLS/network.h index d7044c8e51..0d60359c57 100644 --- a/openair3/NAS/TOOLS/network.h +++ b/openair3/NAS/TOOLS/network.h @@ -61,7 +61,7 @@ Description Defines a list of PLMN network operators #define VDF5 11 -#define SELECTED_PLMN TEST1 //SFR1 +#define SELECTED_PLMN OAI_LTEBOX //SFR1 #define TEST_PLMN {0,0,0x0f,1,1,0} // 00101 #define SFR_PLMN_1 {0,2,0x0f,8,0,1} // 20810 diff --git a/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf b/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf index 05db6be4d1..84ec59a36b 100644 --- a/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf +++ b/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf @@ -86,14 +86,14 @@ UE0: }; SIM: { - MSIN="000001234"; - USIM_API_K="000102030405060708090A0B0C0D0E0F"; + MSIN="0100001111"; + USIM_API_K="fec86ba6eb707ed08905757b1bb44b8f"; OPC="C42449363BBAD02B66D16BC975D77CC1"; - MSISDN="000000000000";//"33611123456"; + MSISDN="33611123456"; }; # Home PLMN Selector with Access Technology - HPLMN= "00101"; + HPLMN= "20893"; # User controlled PLMN Selector with Access Technology UCPLMN_LIST = (); diff --git a/openair3/NAS/UE/ESM/esm_ebr_context.c b/openair3/NAS/UE/ESM/esm_ebr_context.c index 31f215e359..bfa4a04cc8 100644 --- a/openair3/NAS/UE/ESM/esm_ebr_context.c +++ b/openair3/NAS/UE/ESM/esm_ebr_context.c @@ -286,7 +286,7 @@ int esm_ebr_context_create( LOG_TRACE(INFO, "ESM-PROC - executing %s ", command_line); - //if (system(command_line)) ; /* TODO: what to do? */ + if (system(command_line)) ; /* TODO: what to do? */ break; diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c index 1ddc06f33b..49093ed2de 100644 --- a/targets/RT/USER/lte-ue.c +++ b/targets/RT/USER/lte-ue.c @@ -574,7 +574,6 @@ static void *UE_thread_rxn_txnp4(void *arg) { } stop_meas(&UE->generic_stat); - //printf("mac_xface->ue_scheduler %5.2f \n",UE->generic_stat.p_time/(cpuf*1000.0)); // Prepare the future Tx data From 4342595ea8379630bc48a78c1ae678fbd7e1f8b9 Mon Sep 17 00:00:00 2001 From: "Raymond.Knopp" Date: Thu, 9 Mar 2017 02:43:31 +0100 Subject: [PATCH 14/47] calibration (RX) for LimeSDR. Use of new API for RF gains. --- targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp | 28 +++++++++---------- .../CONF/enb.band13.tm1.50PRB.lmssdr.conf | 12 ++++---- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp b/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp index 1e3e1a8cbf..4d020aa319 100644 --- a/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp +++ b/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp @@ -134,15 +134,15 @@ int trx_lms_set_gains(openair0_device* device, openair0_config_t *openair0_cfg) int ret=0; - double rxg_ratio = openair0_cfg[0].rx_gain[0]/openair0_cfg[0].rx_gain_offset[0]; - if (rxg_ratio > 1) { - printf("[LMS] Reduce RX Gain 0 by %f dB\n",openair0_cfg[0].rx_gain[0]-openair0_cfg[0].rx_gain_offset[0]); + // double rxg_ratio = openair0_cfg[0].rx_gain[0]/openair0_cfg[0].rx_gain_offset[0]; + if (openair0_cfg->rx_gain[0] > 70+openair0_cfg->rx_gain_offset[0]) { + printf("[LMS] Reduce RX Gain 0 by %f dB\n",openair0_cfg->rx_gain[0]-openair0_cfg->rx_gain_offset[0]-70); ret = -1; - rxg_ratio = 1; + // rxg_ratio = 1; } - LMS_SetNormalizedGain(lms_device, LMS_CH_TX, 0, openair0_cfg[0].tx_gain[0]/100.0); - LMS_SetNormalizedGain(lms_device, LMS_CH_RX, 0, .8*rxg_ratio); + LMS_SetGaindB(lms_device, LMS_CH_TX, 0, openair0_cfg->tx_gain[0]); + LMS_SetGaindB(lms_device, LMS_CH_RX, 0, openair0_cfg->rx_gain[0]-openair0_cfg->rx_gain_offset[0]); /* // RX gains, use low-level setting double gv = openair0_cfg[0].rx_gain[0] - openair0_cfg[0].rx_gain_offset[0]; @@ -309,18 +309,18 @@ int trx_lms_set_freq(openair0_device* device, openair0_config_t *openair0_cfg,in // V1.2 board rx_gain_calib_table_t calib_table_lmssdr_1v2[] = { {3500000000.0,44.0}, // on L PAD - {2660000000.0,62.0}, // on L PAD - {2300000000.0,62.0}, // on L PAD - {1880000000.0,64.0}, // on L PAD + {2660000000.0,55.0}, // on L PAD + {2300000000.0,54.0}, // on L PAD + {1880000000.0,54.0}, // on L PAD {816000000.0,79.0}, // on W PAD {-1,0}}; // V1.4 board rx_gain_calib_table_t calib_table_lmssdr[] = { - {3500000000.0,97.0}, // on H PAD - {2660000000.0,110.0}, // on H PAD - {2300000000.0,106.0}, // on H PAD - {1880000000.0,106.0}, // on H PAD - {816000000.0,116.0}, // on W PAD + {3500000000.0,44.0}, // on H PAD + {2660000000.0,55.0}, // on H PAD + {2300000000.0,54.0}, // on H PAD + {1880000000.0,54.0}, // on H PAD + {816000000.0,79.0}, // on L PAD {-1,0}}; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.50PRB.lmssdr.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.50PRB.lmssdr.conf index 3eea96059b..1083aa382a 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.50PRB.lmssdr.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.50PRB.lmssdr.conf @@ -40,7 +40,7 @@ eNBs = nb_antennas_tx = 1; nb_antennas_rx = 1; tx_gain = 20; - rx_gain = 116; + rx_gain = 100; prach_root = 0; prach_config_index = 0; prach_high_speed = "DISABLE"; @@ -136,7 +136,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.70"; + mme_ip_address = ( { ipv4 = "127.0.0.3"; ipv6 = "192:168:30::17"; active = "yes"; preference = "ipv4"; @@ -145,11 +145,11 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.150/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.150/24"; + ENB_INTERFACE_NAME_FOR_S1U = "lo"; + ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.5/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 }; From 28c009a0727cc25e43fd9daf8154912e1bc421d4 Mon Sep 17 00:00:00 2001 From: gabrielC Date: Thu, 9 Mar 2017 10:20:52 +0100 Subject: [PATCH 15/47] Chenge LOG_I to LOG_D --- openair1/SCHED/phy_procedures_lte_ue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c index 4a75d5d9e7..4affba6814 100644 --- a/openair1/SCHED/phy_procedures_lte_ue.c +++ b/openair1/SCHED/phy_procedures_lte_ue.c @@ -1477,7 +1477,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB } #endif - LOG_I(PHY,"[UE %d][PDSCH %x] AbsSubFrame %d.%d Generating ACK (%d,%d) for %d bits on PUSCH\n", + LOG_D(PHY,"[UE %d][PDSCH %x] AbsSubFrame %d.%d Generating ACK (%d,%d) for %d bits on PUSCH\n", Mod_id, ue->ulsch[eNB_id]->rnti, frame_tx,subframe_tx, From 4abc1d21e345eaabf74bb03a1c6342ffa7a11cc3 Mon Sep 17 00:00:00 2001 From: gabrielC Date: Thu, 9 Mar 2017 16:33:07 +0100 Subject: [PATCH 16/47] 20 MHz UE fix --- .../PHY/LTE_TRANSPORT/dlsch_demodulation.c | 23 ++++++++++++------- openair1/SCHED/phy_procedures_lte_ue.c | 23 +++++++++++-------- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c index 72b486c042..9ed40ce162 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c @@ -3356,7 +3356,7 @@ ch_amp = ((pilots) ? (dlsch_ue[0]->sqrt_rho_b) : (dlsch_ue[0]->sqrt_rho_a)); //compute average channel_level on each (TX,RX) antenna pair void dlsch_channel_level(int **dl_ch_estimates_ext, LTE_DL_FRAME_PARMS *frame_parms, - int *avg, + int32_t *avg, uint8_t symbol, unsigned short nb_rb) { @@ -3365,10 +3365,16 @@ void dlsch_channel_level(int **dl_ch_estimates_ext, short rb; unsigned char aatx,aarx,nre=12,symbol_mod; - __m128i *dl_ch128, avg128D; + __m128i *dl_ch128, avg128D, coeff128; symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol; + float one_over_nb_re = 0; + one_over_nb_re = 1/(nb_rb *12); + int16_t one_over_nb_re_q1_15 = (int16_t)(one_over_nb_re * (float)(1<<15) ); + coeff128 = _mm_set_epi16(one_over_nb_re_q1_15,one_over_nb_re_q1_15,one_over_nb_re_q1_15,one_over_nb_re_q1_15, + one_over_nb_re_q1_15,one_over_nb_re_q1_15,one_over_nb_re_q1_15,one_over_nb_re_q1_15); + for (aatx=0; aatxnb_antenna_ports_eNB; aatx++) for (aarx=0; aarxnb_antennas_rx; aarx++) { //clear average level @@ -3380,8 +3386,9 @@ void dlsch_channel_level(int **dl_ch_estimates_ext, for (rb=0;rbNcp-1)))&&(frame_parms->mode1_flag==0)) { dl_ch128+=2; } @@ -3405,10 +3412,10 @@ void dlsch_channel_level(int **dl_ch_estimates_ext, else nre=12; - avg[(aatx<<1)+aarx] = (((int*)&avg128D)[0] + - ((int*)&avg128D)[1] + - ((int*)&avg128D)[2] + - ((int*)&avg128D)[3])/(nb_rb*nre); + avg[(aatx<<1)+aarx] =(((int32_t*)&avg128D)[0] + + ((int32_t*)&avg128D)[1] + + ((int32_t*)&avg128D)[2] + + ((int32_t*)&avg128D)[3]); // printf("Channel level : %d\n",avg[(aatx<<1)+aarx]); } diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c index 4affba6814..96082340b9 100644 --- a/openair1/SCHED/phy_procedures_lte_ue.c +++ b/openair1/SCHED/phy_procedures_lte_ue.c @@ -1048,7 +1048,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) int overflow=0; int k,l; - int dummy_tx_buffer[3840*4] __attribute__((aligned(16))); + int dummy_tx_buffer[frame_parms->samples_per_tti] __attribute__((aligned(16))); #endif VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_ULSCH_COMMON,VCD_FUNCTION_IN); @@ -1081,11 +1081,15 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt overflow = ulsch_start - 9*frame_parms->samples_per_tti; for (aa=0; aanb_antennas_tx; aa++) { - memset(&ue->common_vars.txdata[aa][ulsch_start],0, - 4*cmin(frame_parms->samples_per_tti-overflow,frame_parms->samples_per_tti)); - - if (overflow> 0) + if (overflow > 0) + { + memset(&ue->common_vars.txdata[aa][ulsch_start],0,4*(frame_parms->samples_per_tti-overflow)); memset(&ue->common_vars.txdata[aa][0],0,4*overflow); + } + else + { + memset(&ue->common_vars.txdata[aa][ulsch_start],0,4*frame_parms->samples_per_tti); + } } /*#else overflow = ulsch_start - 9*frame_parms->samples_per_tti; @@ -1480,7 +1484,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB LOG_D(PHY,"[UE %d][PDSCH %x] AbsSubFrame %d.%d Generating ACK (%d,%d) for %d bits on PUSCH\n", Mod_id, ue->ulsch[eNB_id]->rnti, - frame_tx,subframe_tx, + frame_tx%1024,subframe_tx, ue->ulsch[eNB_id]->o_ACK[0],ue->ulsch[eNB_id]->o_ACK[1], ue->ulsch[eNB_id]->harq_processes[harq_pid]->O_ACK); } @@ -1644,8 +1648,8 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB T(T_UE_PHY_PUSCH_TX_POWER, T_INT(eNB_id),T_INT(Mod_id), T_INT(frame_tx%1024), T_INT(subframe_tx),T_INT(ue->tx_power_dBm[subframe_tx]), T_INT(tx_amp),T_INT(ue->ulsch[eNB_id]->f_pusch),T_INT(get_PL(Mod_id,0,eNB_id)),T_INT(nb_rb)); #endif - LOG_D(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d, generating PUSCH, Po_PUSCH: %d dBm (max %d dBm), amp %d\n", - Mod_id,harq_pid,frame_tx,subframe_tx,ue->tx_power_dBm[subframe_tx],ue->tx_power_max_dBm, tx_amp); + LOG_D(PHY,"[UE %d][PUSCH %d] AbsSubFrame %d.%d, generating PUSCH, Po_PUSCH: %d dBm (max %d dBm), amp %d\n", + Mod_id,harq_pid,frame_tx%1024,subframe_tx,ue->tx_power_dBm[subframe_tx],ue->tx_power_max_dBm, tx_amp); start_meas(&ue->ulsch_modulation_stats); ulsch_modulation(ue->common_vars.txdataF, tx_amp, @@ -1943,7 +1947,8 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin (uint8_t *)&pucch_payload, &len); - LOG_D(PHY,"PUCCH feedback AbsSubframe %d.%d SR %d NbCW %d AckNack %d.%d CQI %d RI %d format %d pucch_resource %d pucch_payload %d %d \n", frame_tx, subframe_tx, SR_payload, nb_cw, pucch_ack_payload[0], pucch_ack_payload[1], cqi_status, ri_status, format, pucch_resource,pucch_payload[0],pucch_payload[1]); + LOG_D(PHY,"PUCCH feedback AbsSubframe %d.%d SR %d NbCW %d AckNack %d.%d CQI %d RI %d format %d pucch_resource %d pucch_payload %d %d \n", + frame_tx%1024, subframe_tx, SR_payload, nb_cw, pucch_ack_payload[0], pucch_ack_payload[1], cqi_status, ri_status, format, pucch_resource,pucch_payload[0],pucch_payload[1]); // Part - IV From e6cd9873cdc0e3e5c9cf32f735bd8868f36e30da Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 10 Mar 2017 12:19:29 +0100 Subject: [PATCH 17/47] cleanup test setup README file --- cmake_targets/autotests/README.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake_targets/autotests/README.txt b/cmake_targets/autotests/README.txt index 8156e31bee..ca53680f36 100644 --- a/cmake_targets/autotests/README.txt +++ b/cmake_targets/autotests/README.txt @@ -213,7 +213,7 @@ Obj.# Case# Test# Description 01 63 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX 01 63 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX -01 65 00 lte-softmodem tests with BladeRF RF as eNB and ALU EPC w/ Bandrich COTS UE for 1TX/1RX +01 65 lte-softmodem tests with BladeRF RF as eNB and ALU EPC w/ Bandrich COTS UE for 1TX/1RX 01 65 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX 01 65 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX 01 65 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX @@ -222,7 +222,7 @@ Obj.# Case# Test# Description 01 65 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX -01 70 00 lte-softmodem tests with SoDeRa RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX +01 70 lte-softmodem tests with SoDeRa RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX 01 70 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX 01 70 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX 01 70 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX @@ -231,7 +231,7 @@ Obj.# Case# Test# Description 01 70 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX -01 75 00 lte-softmodem + RRU (NGFI IF4P5, RAW) tests with B210 RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX +01 75 lte-softmodem + RRU (NGFI IF4P5, RAW) tests with B210 RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX 01 75 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX 01 75 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX 01 75 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX @@ -239,7 +239,7 @@ Obj.# Case# Test# Description 01 75 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX 01 75 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX -01 80 00 lte-softmodem + RRU (NGFI) tests with BladeRF RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX +01 80 lte-softmodem + RRU (NGFI) tests with BladeRF RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX 01 80 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX 01 80 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX 01 80 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX @@ -247,7 +247,7 @@ Obj.# Case# Test# Description 01 80 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX 01 80 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX -01 85 00 lte-softmodem + RRU (NGFI) tests with USRP X310 RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX +01 85 lte-softmodem + RRU (NGFI) tests with USRP X310 RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX 01 85 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX 01 85 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX 01 85 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX From a587e35a9dbf177bb56e238a5389fe0caac81380 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Fri, 10 Mar 2017 15:37:26 +0100 Subject: [PATCH 18/47] removal and renaming of LimeSDR configuration files --- ....conf => enb.band13.tm1.25PRB.lmssdr.conf} | 2 +- .../CONF/enb.band7.tm1.25PRB.lmssdr.conf | 174 ++++++++++++++++ .../CONF/enb.band7.tm1.50PRB.rrh.lmssdr.conf | 192 ------------------ .../CONF/enb.band7.tm1.lmssdr.conf | 176 ---------------- .../CONF/enb.band7.tm1.rrh.lmssdr.conf | 192 ------------------ 5 files changed, 175 insertions(+), 561 deletions(-) rename targets/PROJECTS/GENERIC-LTE-EPC/CONF/{enb.band13.tm1.lmssdr.conf => enb.band13.tm1.25PRB.lmssdr.conf} (99%) create mode 100644 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.lmssdr.conf delete mode 100644 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.rrh.lmssdr.conf delete mode 100644 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf delete mode 100644 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.rrh.lmssdr.conf diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.lmssdr.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.25PRB.lmssdr.conf similarity index 99% rename from targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.lmssdr.conf rename to targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.25PRB.lmssdr.conf index 02ff6b3e0b..3315b953da 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.lmssdr.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band13.tm1.25PRB.lmssdr.conf @@ -31,7 +31,7 @@ eNBs = downlink_frequency = 751000000L; uplink_frequency_offset = 31000000; Nid_cell = 0; - N_RB_DL = 50; + N_RB_DL = 25; Nid_cell_mbsfn = 0; nb_antennas_tx = 1; nb_antennas_rx = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.lmssdr.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.lmssdr.conf new file mode 100644 index 0000000000..5aa544cd85 --- /dev/null +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.lmssdr.conf @@ -0,0 +1,174 @@ +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 = "92"; + + ////////// 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; + prefix_type = "NORMAL"; + eutra_band = 7; + downlink_frequency = 2680000000L; + uplink_frequency_offset = -120000000; + 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 = 20; + rx_gain = 116; + 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 = -30; + 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 = -104; + 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 = "192.168.12.70"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.150/24"; + + ENB_INTERFACE_NAME_FOR_S1U = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.150/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"; + }; + } +); diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.rrh.lmssdr.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.rrh.lmssdr.conf deleted file mode 100644 index 4cd761645b..0000000000 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.rrh.lmssdr.conf +++ /dev/null @@ -1,192 +0,0 @@ -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 = "93"; - - ////////// Physical parameters: - - component_carriers = ( - { - frame_type = "FDD"; - tdd_config = 3; - tdd_config_s = 0; - prefix_type = "NORMAL"; - eutra_band = 7; - downlink_frequency = 2660000000L; - uplink_frequency_offset = -120000000; - Nid_cell = 0; - N_RB_DL = 50; - Nid_cell_mbsfn = 0; - nb_antennas_tx = 1; - nb_antennas_rx = 1; - tx_gain = 60; - rx_gain = 111; - 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 = -29; - 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 = -85; - pusch_alpha = "AL1"; - pucch_p0_Nominal = -96; - 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 = -100; - 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; - - } - ); - - - 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.12.170"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); - -rrh_gw_config = ( - { - local_if_name = "eth0"; - #remote_address = "169.254.10.158"; - #local_address = "169.254.8.15"; - remote_address = "74:d4:35:cc:88:45"; - local_address = "d4:be:d9:22:0a:ac"; - local_port = 50000; #for raw option local port must be the same to remote - remote_port = 50000; - rrh_gw_active = "yes"; - tr_preference = "raw"; - rf_preference = "lmssdr"; - iq_txshift = 0; - tx_sample_advance = 45; - tx_scheduling_advance = 8; - -} -); - - NETWORK_INTERFACES : - { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth6"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.118/24"; - - ENB_INTERFACE_NAME_FOR_S1U = "eth6"; - - - ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.118/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"; - }; - } -); diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf deleted file mode 100644 index d912b1a102..0000000000 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf +++ /dev/null @@ -1,176 +0,0 @@ -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 = "92"; - - ////////// 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; - prefix_type = "NORMAL"; - eutra_band = 7; - downlink_frequency = 2660000000L; - uplink_frequency_offset = -120000000; - Nid_cell = 0; - N_RB_DL = 25; - Nid_cell_mbsfn = 0; - nb_antennas_ports = 1; - nb_antennas_tx = 1; - nb_antennas_rx = 1; - tx_gain = 100; - rx_gain = 111; - 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 = -29; - 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 = -85; - pusch_alpha = "AL1"; - pucch_p0_Nominal = -96; - 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 = -100; - 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.12.170"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); - - NETWORK_INTERFACES : - { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth4"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.242/24"; - - ENB_INTERFACE_NAME_FOR_S1U = "eth4"; - ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.242/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"; - }; - - } -); diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.rrh.lmssdr.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.rrh.lmssdr.conf deleted file mode 100644 index 9b052bf7ba..0000000000 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.rrh.lmssdr.conf +++ /dev/null @@ -1,192 +0,0 @@ -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 = "92"; - - ////////// Physical parameters: - - component_carriers = ( - { - frame_type = "FDD"; - tdd_config = 3; - tdd_config_s = 0; - prefix_type = "NORMAL"; - eutra_band = 7; - downlink_frequency = 2660000000L; - uplink_frequency_offset = -120000000; - Nid_cell = 0; - N_RB_DL = 25; - Nid_cell_mbsfn = 0; - nb_antennas_tx = 1; - nb_antennas_rx = 1; - tx_gain = 60; - rx_gain = 111; - 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 = -29; - 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 = -85; - pusch_alpha = "AL1"; - pucch_p0_Nominal = -96; - 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 = -100; - 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; - - } - ); - - - 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.12.170"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); - -rrh_gw_config = ( - { - local_if_name = "eth0"; - #remote_address = "169.254.10.158"; - #local_address = "169.254.8.15"; - remote_address = "74:d4:35:cc:88:45"; - local_address = "d4:be:d9:22:0a:ac"; - local_port = 50000; #for raw option local port must be the same to remote - remote_port = 50000; - rrh_gw_active = "yes"; - tr_preference = "raw"; - rf_preference = "lmssdr"; - iq_txshift = 0; - tx_sample_advance = 70; - tx_scheduling_advance = 8; - -} -); - - NETWORK_INTERFACES : - { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth6"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.118/24"; - - ENB_INTERFACE_NAME_FOR_S1U = "eth6"; - - - ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.118/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"; - }; - } -); From 8e8fec1e1996ad800950292255f8829ceb2e846a Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 10 Mar 2017 20:18:36 +0100 Subject: [PATCH 19/47] test setup v2: add TDD tests New tests: 0186xx for TDD with the huawei 3276 dongle. All necessary files to configure and use it have been added. Existing code has been adapted for the TDD tests. Only the test setup v2 has been adapted. The file test_case_list.xml has been changed to add tests 0186xx, but only to work with test setup v2. It won't work with test setup v1. To be completed if needed. The tests are similar to FDD tests. Throughputs for TDD have to be adjusted, the throughputs of FDD are used for the moment. --- cmake_targets/autotests/README.txt | 26 +++ cmake_targets/autotests/test_case_list.xml | 24 +++ .../autotests/v2/actions/start_3276.bash | 11 ++ .../autotests/v2/actions/start_3276.py | 59 ++++++ .../autotests/v2/actions/stop_3276.py | 29 +++ .../autotests/v2/actions/wvdial.3276.conf | 27 +++ cmake_targets/autotests/v2/alu_test.py | 165 ++++++++++------- .../enb.band38.tm1.usrpb210.tdd.10MHz.conf | 175 ++++++++++++++++++ .../enb.band38.tm1.usrpb210.tdd.20MHz.conf | 175 ++++++++++++++++++ .../enb.band38.tm1.usrpb210.tdd.5MHz.conf | 175 ++++++++++++++++++ ... => enb.band7.tm1.usrpb210.fdd.10MHz.conf} | 0 ... => enb.band7.tm1.usrpb210.fdd.20MHz.conf} | 0 ...f => enb.band7.tm1.usrpb210.fdd.5MHz.conf} | 0 cmake_targets/autotests/v2/main.py | 105 +++++++---- 14 files changed, 867 insertions(+), 104 deletions(-) create mode 100644 cmake_targets/autotests/v2/actions/start_3276.bash create mode 100644 cmake_targets/autotests/v2/actions/start_3276.py create mode 100644 cmake_targets/autotests/v2/actions/stop_3276.py create mode 100644 cmake_targets/autotests/v2/actions/wvdial.3276.conf create mode 100644 cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.10MHz.conf create mode 100644 cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.20MHz.conf create mode 100644 cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.5MHz.conf rename cmake_targets/autotests/v2/config/{enb.band7.tm1.usrpb210.10MHz.conf => enb.band7.tm1.usrpb210.fdd.10MHz.conf} (100%) rename cmake_targets/autotests/v2/config/{enb.band7.tm1.usrpb210.20MHz.conf => enb.band7.tm1.usrpb210.fdd.20MHz.conf} (100%) rename cmake_targets/autotests/v2/config/{enb.band7.tm1.usrpb210.5MHz.conf => enb.band7.tm1.usrpb210.fdd.5MHz.conf} (100%) diff --git a/cmake_targets/autotests/README.txt b/cmake_targets/autotests/README.txt index ca53680f36..6cd0307b48 100644 --- a/cmake_targets/autotests/README.txt +++ b/cmake_targets/autotests/README.txt @@ -255,6 +255,32 @@ Obj.# Case# Test# Description 01 85 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX 01 85 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX +01 86 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Huawei e3276 COTS UE for 1TX/1RX (TM1), 2TX/2RX (TM2) +01 86 00 Band 38 TDD 5MHz UL Throughput (UDP) for 300 sec for 1TX/1RX +01 86 01 Band 38 TDD 10MHz UL Throughput (UDP) for 300 sec for 1TX/1RX +01 86 02 Band 38 TDD 20MHz UL Throughput (UDP) for 300 sec for 1TX/1RX +01 86 03 Band 38 TDD 5MHz DL Throughput (UDP) for 300 sec for 1TX/1RX +01 86 04 Band 38 TDD 10MHz DL Throughput (UDP) for 300 sec for 1TX/1RX +01 86 05 Band 38 TDD 20MHz DL Throughput (UDP) for 300 sec for 1TX/1RX +01 86 06 Band 38 TDD 5MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2) +01 86 07 Band 38 TDD 10MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2) +01 86 08 Band 38 TDD 20MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2) +01 86 09 Band 38 TDD 5MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2) +01 86 10 Band 38 TDD 10MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2) +01 86 11 Band 38 TDD 20MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2) +01 86 12 Band 38 TDD 5MHz UL Throughput (TCP) for 300 sec for 1TX/1RX +01 86 13 Band 38 TDD 10MHz UL Throughput (TCP) for 300 sec for 1TX/1RX +01 86 14 Band 38 TDD 20MHz UL Throughput (TCP) for 300 sec for 1TX/1RX +01 86 15 Band 38 TDD 5MHz DL Throughput (TCP) for 300 sec for 1TX/1RX +01 86 16 Band 38 TDD 10MHz DL Throughput (TCP) for 300 sec for 1TX/1RX +01 86 17 Band 38 TDD 20MHz DL Throughput (TCP) for 300 sec for 1TX/1RX +01 86 18 Band 38 TDD 5MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2) +01 86 19 Band 38 TDD 10MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2) +01 86 20 Band 38 TDD 20MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2) +01 86 21 Band 38 TDD 5MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2) +01 86 22 Band 38 TDD 10MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2) +01 86 23 Band 38 TDD 20MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2) + 02 55 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Sony Experia M4 COTS UE for 1TX/1RX and 2TX/2RX (TM2) 02 55 00 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 1TX/1RX 02 55 01 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 1TX/1RX diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index f37c265462..c55a29c975 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -8664,6 +8664,30 @@ c 10 + + + + + + + + + + + + + + + + + + + + + + + + lte-softmodem diff --git a/cmake_targets/autotests/v2/actions/start_3276.bash b/cmake_targets/autotests/v2/actions/start_3276.bash new file mode 100644 index 0000000000..c6fbdcedd9 --- /dev/null +++ b/cmake_targets/autotests/v2/actions/start_3276.bash @@ -0,0 +1,11 @@ +#enable control+C reception (to be refined if it does not work) +stty isig intr ^C + +cd /tmp/oai_test_setup/oai +source oaienv +cd cmake_targets/autotests/v2/actions +sudo python start_3276.py + +sudo wvdial -C wvdial.3276.conf || true + +sudo python stop_3276.py diff --git a/cmake_targets/autotests/v2/actions/start_3276.py b/cmake_targets/autotests/v2/actions/start_3276.py new file mode 100644 index 0000000000..cf0629213a --- /dev/null +++ b/cmake_targets/autotests/v2/actions/start_3276.py @@ -0,0 +1,59 @@ +import time + +from modem import quit, Modem + +try: + modem = Modem("/dev/ttyUSB0") + + #test that modem is there + print "INFO: check modem's presence" + modem.send('AT') + if modem.wait().ret != True: + print "ERROR: no modem?" + quit(1) + + #first deactivate + print "INFO: deactivate the modem" + modem.send('AT+CFUN=0') + if modem.wait().ret != True: + print "ERROR: failed deactivating the modem" + quit(1) + + #activate the modem + print "INFO: activate the modem" + modem.send('AT+CFUN=1') + if modem.wait().ret != True: + print "ERROR: failed asking modem for activation" + quit(1) + + #wait for modem to be connected + #timeout after one minute + print "INFO: wait for modem to be connected (timeout: one minute)" + start_time = time.time() + while True: + modem.send('AT+CGATT?') + r = modem.wait() + if r.ret != True: + print "ERROR: failed checking attachment status of modem" + quit(1) + if "+CGATT: 1" in r.data: + break + if not "CGATT: 0" in r.data: + print "ERROR: bad data when checking attachment status of modem" + quit(1) + time.sleep(0.1) + if time.time() > start_time + 60: + print "ERROR: modem not connected after one minute, close modem" + modem.send('AT+CFUN=0') + r = modem.wait() + if r.ret != True: + print "ERROR: closing modem failed" + quit(1) + + print "INFO: modem is connected" + +except BaseException, e: + print "ERROR: " + str(e) + quit(1) + +quit(0) diff --git a/cmake_targets/autotests/v2/actions/stop_3276.py b/cmake_targets/autotests/v2/actions/stop_3276.py new file mode 100644 index 0000000000..3eb7e889c6 --- /dev/null +++ b/cmake_targets/autotests/v2/actions/stop_3276.py @@ -0,0 +1,29 @@ +import time + +from modem import quit, Modem + +try: + modem = Modem("/dev/ttyUSB0") + + #test that modem is there + print "INFO: check modem's presence" + modem.send('AT') + r = modem.wait() + if r.ret != True and "NO CARRIER" not in r.data: + print "ERROR: no modem?" + quit(1) + if "NO CARRIER" in r.data: + print "WARNING: 'NO CARRIER' detected, not sure if handled correctly" + + #deactivate the modem + print "INFO: deactivate the modem" + modem.send('AT+CFUN=0') + if modem.wait().ret != True: + print "ERROR: failed asking modem for deactivation" + quit(1) + +except BaseException, e: + print "ERROR: " + str(e) + quit(1) + +quit(0) diff --git a/cmake_targets/autotests/v2/actions/wvdial.3276.conf b/cmake_targets/autotests/v2/actions/wvdial.3276.conf new file mode 100644 index 0000000000..81fedc8df2 --- /dev/null +++ b/cmake_targets/autotests/v2/actions/wvdial.3276.conf @@ -0,0 +1,27 @@ +[Dialer Defaults] +Modem = /dev/ttyUSB0 +ISDN = off +Modem Type = Analog Modem +Baud = 9600 +Init1 = ATZ +Init2 = AT&F &D2 &C1 +Init3 = AT+CGDCONT=1,"IP","oai.ipv4" +Phone = *99# +Phone1 = +Phone2 = +Phone3 = +Phone4 = +Ask Password = off +Password = '' +Username = ImaginLab +Auto Reconnect = off +Abort on Busy = off +Carrier Check = on +Check Def Route = on +Abort on No Dialtone = on +Stupid Mode = on +Idle Seconds = 0 +Auto DNS = on +;Minimize = off +;Dock = off +;Do NOT edit this file by hand! diff --git a/cmake_targets/autotests/v2/alu_test.py b/cmake_targets/autotests/v2/alu_test.py index 7992ce7f3c..8ba6ab857a 100644 --- a/cmake_targets/autotests/v2/alu_test.py +++ b/cmake_targets/autotests/v2/alu_test.py @@ -102,7 +102,7 @@ class alu_test: # compile_enb ########################################################################## def compile_enb(self, build_arguments): - log("INFO: ALU test: compile softmodem") + log("INFO: ALU test: compile softmodem on " + self.enb_machine) envcomp = list(self.env) envcomp.append('BUILD_ARGUMENTS="' + build_arguments + '"') #we don't care about BUILD_OUTPUT but required (TODO: change that) @@ -163,24 +163,24 @@ class alu_test: #os._exit(1) ########################################################################## - # start_bandrich_ue + # start_ue ########################################################################## - def start_bandrich_ue(self): - log("INFO: ALU test: start bandrich UE") - self.task_ue = Task("actions/start_bandrich.bash", - "start_bandrich", + def start_ue(self, ue): + log("INFO: ALU test: start " + ue + " UE") + self.task_ue = Task("actions/start_" + ue + ".bash", + "start_" + ue, self.ue_machine, self.oai_user, self.oai_password, self.env, - self.logdir + "/start_bandrich." + self.ue_machine, + self.logdir + "/start_" + ue + "." + self.ue_machine, event=self.event) self.task_ue.waitlog("local IP address", event=self.event) self.event.wait() #at this point one task has died or we have the line in the log if self.task_ue.waitlog_state != WAITLOG_SUCCESS: - log("ERROR: ALU test: bandrich UE did not connect") + log("ERROR: ALU test: " + ue + " UE did not connect") raise TestFailed() self.event.clear() @@ -191,21 +191,21 @@ class alu_test: log("ERROR: ALU test: eNB, HSS or UE task died") raise TestFailed() - #get bandrich UE IP + #get UE IP l = open(self.task_ue.logfile, "r").read() - self.bandrich_ue_ip = re.search("local IP address (.*)\n", l) \ - .groups()[0] - log("INFO: ALU test: bandrich UE IP address: " + self.bandrich_ue_ip) + self.ue_ip = re.search("local IP address (.*)\n", l) \ + .groups()[0] + log("INFO: ALU test: " + ue + " UE IP address: " + self.ue_ip) ########################################################################## - # stop_bandrich_ue + # stop_ue ########################################################################## - def stop_bandrich_ue(self): - log("INFO: ALU test: stop bandrich UE") + def stop_ue(self, ue): + log("INFO: ALU test: stop " + ue + " UE") self.task_ue.sendnow("%c" % 3) ret = self.task_ue.wait() if ret != 0: - log("ERROR: ALU test: task bandrich UE failed") + log("ERROR: ALU test: task " + ue + " UE failed") #not sure if we have to quit here or not #os._exit(1) @@ -286,47 +286,47 @@ class alu_test: ########################################################################## # dl_tcp ########################################################################## - def dl_tcp(self): - self._do_traffic("bandrich downlink TCP", - "server_tcp", self.ue_machine, self.bandrich_ue_ip, + def dl_tcp(self, ue): + self._do_traffic(ue + " downlink TCP", + "server_tcp", self.ue_machine, self.ue_ip, "client_tcp", self.epc_machine, "Server listening on TCP port 5001", - "bandrich_downlink_tcp_server", - "bandrich_downlink_tcp_client") + ue + "_downlink_tcp_server", + ue + "_downlink_tcp_client") ########################################################################## # ul_tcp ########################################################################## - def ul_tcp(self): - self._do_traffic("bandrich uplink TCP", + def ul_tcp(self, ue): + self._do_traffic(ue + " uplink TCP", "server_tcp", self.epc_machine, "192.172.0.1", "client_tcp", self.ue_machine, "Server listening on TCP port 5001", - "bandrich_uplink_tcp_server", - "bandrich_uplink_tcp_client") + ue + "_uplink_tcp_server", + ue + "_uplink_tcp_client") ########################################################################## # dl_udp ########################################################################## - def dl_udp(self, bandwidth): - self._do_traffic("bandrich downlink UDP", - "server_udp", self.ue_machine, self.bandrich_ue_ip, + def dl_udp(self, ue, bandwidth): + self._do_traffic(ue + " downlink UDP", + "server_udp", self.ue_machine, self.ue_ip, "client_udp", self.epc_machine, "Server listening on UDP port 5001", - "bandrich_downlink_udp_server", - "bandrich_downlink_udp_client", + ue + "_downlink_udp_server", + ue + "_downlink_udp_client", udp_bandwidth=bandwidth) ########################################################################## # ul_udp ########################################################################## - def ul_udp(self, bandwidth): - self._do_traffic("bandrich uplink UDP", + def ul_udp(self, ue, bandwidth): + self._do_traffic(ue + " uplink UDP", "server_udp", self.epc_machine, "192.172.0.1", "client_udp", self.ue_machine, "Server listening on UDP port 5001", - "bandrich_uplink_udp_server", - "bandrich_uplink_udp_client", + ue + "_uplink_udp_server", + ue + "_uplink_udp_client", udp_bandwidth=bandwidth) ############################################################################## @@ -337,19 +337,33 @@ def run_b210_alu(tests, openair_dir, oai_user, oai_password, env): if not do_tests(tests['b210']['alu']): return - #compile eNB + #compile eNB (two cases: one for FDD and one for TDD) - alu = alu_test(epc='amerique', enb='hutch', ue='stevens', - openair=openair_dir, - user=oai_user, password=oai_password, - log_subdir='enb_tests/b210_alu/compile_enb', - env=env) + if do_tests(tests['b210']['alu']['fdd']): + alu = alu_test(epc='amerique', enb='hutch', ue='stevens', + openair=openair_dir, + user=oai_user, password=oai_password, + log_subdir='enb_tests/b210_alu/compile_enb_fdd', + env=env) - try: - alu.compile_enb("--eNB -w USRP -x -c --disable-cpu-affinity") - except BaseException, e: - log("ERROR: ALU test failed: eNB compilation failed: " + str(e)) - return + try: + alu.compile_enb("--eNB -w USRP -x -c --disable-cpu-affinity") + except BaseException, e: + log("ERROR: ALU test failed: eNB compilation failed: " + str(e)) + return + + if do_tests(tests['b210']['alu']['tdd']): + alu = alu_test(epc='amerique', enb='calisson', ue='mozart', + openair=openair_dir, + user=oai_user, password=oai_password, + log_subdir='enb_tests/b210_alu/compile_enb_tdd', + env=env) + + try: + alu.compile_enb("--eNB -w USRP -x -c --disable-cpu-affinity") + except BaseException, e: + log("ERROR: ALU test failed: eNB compilation failed: " + str(e)) + return #run tests @@ -361,29 +375,38 @@ def run_b210_alu(tests, openair_dir, oai_user, oai_password, env): "10" : "15M", "20" : "15M" } - for bw in ('5', '10', '20'): - if do_tests(tests['b210']['alu'][bw]): - log("INFO: ALU test: run tests for bandwidth " + bw + " MHz") - ctest = tests['b210']['alu'][bw] - alu = alu_test(epc='amerique', enb='hutch', ue='stevens', - openair=openair_dir, - user=oai_user, password=oai_password, - log_subdir='enb_tests/b210_alu/' + bw, - env=env) - try: - alu.start_epc() - alu.start_enb("enb.band7.tm1.usrpb210." + bw + "MHz.conf") - if do_tests(ctest['bandrich']): - alu.start_bandrich_ue() - if do_tests(ctest['bandrich']['tcp']['dl']): alu.dl_tcp() - if do_tests(ctest['bandrich']['tcp']['ul']): alu.ul_tcp() - if do_tests(ctest['bandrich']['udp']['dl']): - alu.dl_udp(udp_dl_bandwidth[bw]) - if do_tests(ctest['bandrich']['udp']['ul']): - alu.ul_udp(udp_ul_bandwidth[bw]) - alu.stop_bandrich_ue() - alu.stop_enb() - alu.stop_epc() - except BaseException, e: - log("ERROR: ALU test failed: " + str(e)) - alu.finish() + ue_machine = { "fdd" : "stevens", + "tdd" : "mozart" } + + enb_machine = { "fdd" : "hutch", + "tdd" : "calisson" } + + band = { "fdd" : "7", + "tdd" : "38" } + + for mode in ('fdd', 'tdd'): + for bw in ('5', '10', '20'): + if do_tests(tests['b210']['alu'][mode][bw]): + log("INFO: ALU test: run tests for bandwidth " + bw + " MHz") + ctest = tests['b210']['alu'][mode][bw] + alu = alu_test(epc='amerique', enb=enb_machine[mode], ue=ue_machine[mode], + openair=openair_dir, + user=oai_user, password=oai_password, + log_subdir='enb_tests/b210_alu/' + mode + "/" + bw, + env=env) + try: + alu.start_epc() + alu.start_enb("enb.band" + band[mode] + ".tm1.usrpb210." + mode + "." + bw + "MHz.conf") + for ue in ('bandrich', '3276'): + if ue in ctest and do_tests(ctest[ue]): + alu.start_ue(ue) + if do_tests(ctest[ue]['tcp']['dl']): alu.dl_tcp(ue) + if do_tests(ctest[ue]['tcp']['ul']): alu.ul_tcp(ue) + if do_tests(ctest[ue]['udp']['dl']): alu.dl_udp(ue, udp_dl_bandwidth[bw]) + if do_tests(ctest[ue]['udp']['ul']): alu.ul_udp(ue, udp_ul_bandwidth[bw]) + alu.stop_ue(ue) + alu.stop_enb() + alu.stop_epc() + except BaseException, e: + log("ERROR: ALU test failed: " + str(e)) + alu.finish() diff --git a/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.10MHz.conf b/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.10MHz.conf new file mode 100644 index 0000000000..c25b954e1a --- /dev/null +++ b/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.10MHz.conf @@ -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 = "92"; + + ////////// 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; + prefix_type = "NORMAL"; + eutra_band = 38; + downlink_frequency = 2580000000L; + uplink_frequency_offset = 0; + Nid_cell = 0; + N_RB_DL = 50; + 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 = -90; + pusch_alpha = "AL1"; + pucch_p0_Nominal = -96; + 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 = "192.168.12.26"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + + ENB_INTERFACE_NAME_FOR_S1_MME = "eth6"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.82/24"; + ENB_INTERFACE_NAME_FOR_S1U = "eth6"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.82/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"; + }; + } +); diff --git a/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.20MHz.conf b/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.20MHz.conf new file mode 100644 index 0000000000..0773f9c267 --- /dev/null +++ b/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.20MHz.conf @@ -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 = "92"; + + ////////// 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; + prefix_type = "NORMAL"; + eutra_band = 38; + downlink_frequency = 2580000000L; + 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 = 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 = -90; + pusch_alpha = "AL1"; + pucch_p0_Nominal = -96; + 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 = "192.168.12.26"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + + ENB_INTERFACE_NAME_FOR_S1_MME = "eth6"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.82/24"; + ENB_INTERFACE_NAME_FOR_S1U = "eth6"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.82/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"; + }; + } +); diff --git a/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.5MHz.conf b/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.5MHz.conf new file mode 100644 index 0000000000..024be3b775 --- /dev/null +++ b/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.5MHz.conf @@ -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 = "92"; + + ////////// 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; + prefix_type = "NORMAL"; + eutra_band = 38; + downlink_frequency = 2580000000L; + 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 = -90; + pusch_alpha = "AL1"; + pucch_p0_Nominal = -96; + 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 = "192.168.12.26"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + + ENB_INTERFACE_NAME_FOR_S1_MME = "eth6"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.82/24"; + ENB_INTERFACE_NAME_FOR_S1U = "eth6"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.82/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"; + }; + } +); diff --git a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.10MHz.conf b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.10MHz.conf similarity index 100% rename from cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.10MHz.conf rename to cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.10MHz.conf diff --git a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.20MHz.conf b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.20MHz.conf similarity index 100% rename from cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.20MHz.conf rename to cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.20MHz.conf diff --git a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.5MHz.conf b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.5MHz.conf similarity index 100% rename from cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.5MHz.conf rename to cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.5MHz.conf diff --git a/cmake_targets/autotests/v2/main.py b/cmake_targets/autotests/v2/main.py index 6cf3b97c36..14e5442720 100644 --- a/cmake_targets/autotests/v2/main.py +++ b/cmake_targets/autotests/v2/main.py @@ -283,27 +283,41 @@ machine_list.wait_all_free() tests = { 'b210' : { 'alu' : { - '5' : { - 'bandrich' : { - 'tcp' : { 'ul': False, 'dl' : False }, - 'udp' : { 'ul': False, 'dl' : False }}, - 'sony' : { - 'tcp' : { 'ul': False, 'dl' : False }, - 'udp' : { 'ul': False, 'dl' : False }}}, - '10' : { - 'bandrich' : { - 'tcp' : { 'ul': False, 'dl' : False }, - 'udp' : { 'ul': False, 'dl' : False }}, - 'sony' : { - 'tcp' : { 'ul': False, 'dl' : False }, - 'udp' : { 'ul': False, 'dl' : False }}}, - '20' : { - 'bandrich' : { - 'tcp' : { 'ul': False, 'dl' : False }, - 'udp' : { 'ul': False, 'dl' : False }}, - 'sony' : { - 'tcp' : { 'ul': False, 'dl' : False }, - 'udp' : { 'ul': False, 'dl' : False }}}}, + 'fdd' : { + '5' : { + 'bandrich' : { + 'tcp' : { 'ul': False, 'dl' : False }, + 'udp' : { 'ul': False, 'dl' : False }}, + 'sony' : { + 'tcp' : { 'ul': False, 'dl' : False }, + 'udp' : { 'ul': False, 'dl' : False }}}, + '10' : { + 'bandrich' : { + 'tcp' : { 'ul': False, 'dl' : False }, + 'udp' : { 'ul': False, 'dl' : False }}, + 'sony' : { + 'tcp' : { 'ul': False, 'dl' : False }, + 'udp' : { 'ul': False, 'dl' : False }}}, + '20' : { + 'bandrich' : { + 'tcp' : { 'ul': False, 'dl' : False }, + 'udp' : { 'ul': False, 'dl' : False }}, + 'sony' : { + 'tcp' : { 'ul': False, 'dl' : False }, + 'udp' : { 'ul': False, 'dl' : False }}}}, + 'tdd' : { + '5' : { + '3276' : { + 'tcp' : { 'ul': False, 'dl' : False }, + 'udp' : { 'ul': False, 'dl' : False }}}, + '10' : { + '3276' : { + 'tcp' : { 'ul': False, 'dl' : False }, + 'udp' : { 'ul': False, 'dl' : False }}}, + '20' : { + '3276' : { + 'tcp' : { 'ul': False, 'dl' : False }, + 'udp' : { 'ul': False, 'dl' : False }}}}}, 'openair-cn' : {} }, 'x310' : { @@ -321,24 +335,24 @@ for test in todo_tests: todo_tests_ids.append(test.get('id')) for test in todo_tests_ids: - if test=='015500':tests['b210']['alu'][ '5']['bandrich']['udp']['ul']=True - if test=='015501':tests['b210']['alu']['10']['bandrich']['udp']['ul']=True - if test=='015502':tests['b210']['alu']['20']['bandrich']['udp']['ul']=True - if test=='015503':tests['b210']['alu'][ '5']['bandrich']['udp']['dl']=True - if test=='015504':tests['b210']['alu']['10']['bandrich']['udp']['dl']=True - if test=='015505':tests['b210']['alu']['20']['bandrich']['udp']['dl']=True + if test=='015500':tests['b210']['alu']['fdd'][ '5']['bandrich']['udp']['ul']=True + if test=='015501':tests['b210']['alu']['fdd']['10']['bandrich']['udp']['ul']=True + if test=='015502':tests['b210']['alu']['fdd']['20']['bandrich']['udp']['ul']=True + if test=='015503':tests['b210']['alu']['fdd'][ '5']['bandrich']['udp']['dl']=True + if test=='015504':tests['b210']['alu']['fdd']['10']['bandrich']['udp']['dl']=True + if test=='015505':tests['b210']['alu']['fdd']['20']['bandrich']['udp']['dl']=True if test=='015506':log('WARNING: skip test ' + test) #TODO if test=='015507':log('WARNING: skip test ' + test) #TODO if test=='015508':log('WARNING: skip test ' + test) #TODO if test=='015509':log('WARNING: skip test ' + test) #TODO if test=='015510':log('WARNING: skip test ' + test) #TODO if test=='015511':log('WARNING: skip test ' + test) #TODO - if test=='015512':tests['b210']['alu'][ '5']['bandrich']['tcp']['ul']=True - if test=='015513':tests['b210']['alu']['10']['bandrich']['tcp']['ul']=True - if test=='015514':tests['b210']['alu']['20']['bandrich']['tcp']['ul']=True - if test=='015515':tests['b210']['alu'][ '5']['bandrich']['tcp']['dl']=True - if test=='015516':tests['b210']['alu']['10']['bandrich']['tcp']['dl']=True - if test=='015517':tests['b210']['alu']['20']['bandrich']['tcp']['dl']=True + if test=='015512':tests['b210']['alu']['fdd'][ '5']['bandrich']['tcp']['ul']=True + if test=='015513':tests['b210']['alu']['fdd']['10']['bandrich']['tcp']['ul']=True + if test=='015514':tests['b210']['alu']['fdd']['20']['bandrich']['tcp']['ul']=True + if test=='015515':tests['b210']['alu']['fdd'][ '5']['bandrich']['tcp']['dl']=True + if test=='015516':tests['b210']['alu']['fdd']['10']['bandrich']['tcp']['dl']=True + if test=='015517':tests['b210']['alu']['fdd']['20']['bandrich']['tcp']['dl']=True if test=='015518':log('WARNING: skip test ' + test) #TODO if test=='015519':log('WARNING: skip test ' + test) #TODO if test=='015520':log('WARNING: skip test ' + test) #TODO @@ -441,6 +455,31 @@ for test in todo_tests_ids: if test=='018504':log('WARNING: skip test ' + test) #TODO if test=='018505':log('WARNING: skip test ' + test) #TODO + if test=='018600':tests['b210']['alu']['tdd'][ '5']['3276']['udp']['ul']=True + if test=='018601':tests['b210']['alu']['tdd']['10']['3276']['udp']['ul']=True + if test=='018602':tests['b210']['alu']['tdd']['20']['3276']['udp']['ul']=True + if test=='018603':tests['b210']['alu']['tdd'][ '5']['3276']['udp']['dl']=True + if test=='018604':tests['b210']['alu']['tdd']['10']['3276']['udp']['dl']=True + if test=='018605':tests['b210']['alu']['tdd']['20']['3276']['udp']['dl']=True + if test=='018606':log('WARNING: skip test ' + test) #TODO + if test=='018607':log('WARNING: skip test ' + test) #TODO + if test=='018608':log('WARNING: skip test ' + test) #TODO + if test=='018609':log('WARNING: skip test ' + test) #TODO + if test=='018610':log('WARNING: skip test ' + test) #TODO + if test=='018611':log('WARNING: skip test ' + test) #TODO + if test=='018612':tests['b210']['alu']['tdd'][ '5']['3276']['tcp']['ul']=True + if test=='018613':tests['b210']['alu']['tdd']['10']['3276']['tcp']['ul']=True + if test=='018614':tests['b210']['alu']['tdd']['20']['3276']['tcp']['ul']=True + if test=='018615':tests['b210']['alu']['tdd'][ '5']['3276']['tcp']['dl']=True + if test=='018616':tests['b210']['alu']['tdd']['10']['3276']['tcp']['dl']=True + if test=='018617':tests['b210']['alu']['tdd']['20']['3276']['tcp']['dl']=True + if test=='018618':log('WARNING: skip test ' + test) #TODO + if test=='018619':log('WARNING: skip test ' + test) #TODO + if test=='018620':log('WARNING: skip test ' + test) #TODO + if test=='018621':log('WARNING: skip test ' + test) #TODO + if test=='018622':log('WARNING: skip test ' + test) #TODO + if test=='018623':log('WARNING: skip test ' + test) #TODO + if test=='025500':log('WARNING: skip test ' + test) #TODO if test=='025501':log('WARNING: skip test ' + test) #TODO if test=='025502':log('WARNING: skip test ' + test) #TODO From 947e50f33d6a9e78ae6d525e5f002e5c7df121e2 Mon Sep 17 00:00:00 2001 From: hbilel Date: Mon, 13 Mar 2017 09:49:56 +0100 Subject: [PATCH 20/47] integration fix optional compilation of avx2 --- cmake_targets/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 0bf63cfb1a..3687b08a1a 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -130,6 +130,9 @@ else (CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l") file(STRINGS "/proc/cpuinfo" CPUINFO REGEX flags LIMIT_COUNT 1) if (CPUINFO MATCHES "avx2") set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -mavx2") + set(COMPILATION_AVX2 "True") + else() + set(COMPILATION_AVX2 "False") endif() if (CPUINFO MATCHES "sse4_1") set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -msse4.1") @@ -1034,7 +1037,6 @@ set(PHY_SRC ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_modulation.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_demodulation.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_llr_computation.c - ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_llr_computation_avx2.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/power_control.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_decoding.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_scrambling.c @@ -1117,6 +1119,11 @@ set(PHY_SRC if (${SMBV}) set(PHY_SRC "${PHY_SRC} ${OPENAIR1_DIR}/PHY/TOOLS/smbv.c") endif (${SMBV}) + +if (${COMPILATION_AVX2} STREQUAL "True") + set(PHY_SRC ${PHY_SRC} ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_llr_computation_avx2.c) +endif () + add_library(PHY ${PHY_SRC}) #Layer 2 library From a194009e00a59d3d60c44421015da846a57e6633 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 13 Mar 2017 10:06:26 +0100 Subject: [PATCH 21/47] integration fix: put dlsch_demod_shift into dlsch_demodulation --- openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c | 7 ++++++- targets/RT/USER/lte-softmodem.c | 7 ++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c index 9ed40ce162..a842a8a9dc 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c @@ -42,7 +42,12 @@ #define NOCYGWIN_STATIC #endif -extern int16_t dlsch_demod_shift; +/* dynamic shift for LLR computation for TM3/4 + * set as command line argument, see lte-softmodem.c + * default value: 0 + */ +int16_t dlsch_demod_shift = 0; + //#define DEBUG_HARQ //#undef LOG_D diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 5761577259..65f578fd25 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -151,8 +151,6 @@ uint8_t usim_test = 0; uint8_t nb_antenna_tx = 1; uint8_t nb_antenna_rx = 1; -int16_t dlsch_demod_shift = 0; - char ref[128] = "internal"; char channels[128] = "0"; @@ -323,6 +321,7 @@ void help (void) { printf(" --ue-txgain set UE TX gain\n"); printf(" --ue-nb-ant-rx set UE number of rx antennas "); printf(" --ue-scan_carrier set UE to scan around carrier\n"); + printf(" --dlsch-demod-shift dynamic shift for LLR compuation for TM3/4 (default 0)\n"); printf(" --loop-memory get softmodem (UE) to loop through memory instead of acquiring from HW\n"); printf(" --mmapped-dma sets flag for improved EXMIMO UE performance\n"); printf(" --external-clock tells hardware to use an external clock reference\n"); @@ -804,9 +803,11 @@ static void get_options (int argc, char **argv) { case LONG_OPTION_THREADEVENSUBFRAME: threads.even=atoi(optarg); break; - case LONG_OPTION_DEMOD_SHIFT: + case LONG_OPTION_DEMOD_SHIFT: { + extern int16_t dlsch_demod_shift; dlsch_demod_shift = atof(optarg); break; + } #if T_TRACER case LONG_OPTION_T_PORT: { extern int T_port; From b82b7781eed6a021bc546018b5cbe816e04ed1d4 Mon Sep 17 00:00:00 2001 From: hbilel Date: Mon, 13 Mar 2017 10:13:23 +0100 Subject: [PATCH 22/47] integration fix clear tx-buffer of ue in case of empty subframe for all processing including oaisim --- openair1/SCHED/phy_procedures_lte_ue.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c index 96082340b9..386dd8b52c 100644 --- a/openair1/SCHED/phy_procedures_lte_ue.c +++ b/openair1/SCHED/phy_procedures_lte_ue.c @@ -1045,8 +1045,8 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt int subframe_tx = proc->subframe_tx; int frame_tx = proc->frame_tx; int ulsch_start; -#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) int overflow=0; +#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) int k,l; int dummy_tx_buffer[frame_parms->samples_per_tti] __attribute__((aligned(16))); #endif @@ -1074,7 +1074,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt ulsch_start = (frame_parms->samples_per_tti*subframe_tx)-ue->N_TA_offset; //-ue->timing_advance; #endif //else EXMIMO -#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) +//#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) if (empty_subframe) { //#if 1 @@ -1082,14 +1082,14 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt for (aa=0; aanb_antennas_tx; aa++) { if (overflow > 0) - { - memset(&ue->common_vars.txdata[aa][ulsch_start],0,4*(frame_parms->samples_per_tti-overflow)); - memset(&ue->common_vars.txdata[aa][0],0,4*overflow); - } - else - { - memset(&ue->common_vars.txdata[aa][ulsch_start],0,4*frame_parms->samples_per_tti); - } + { + memset(&ue->common_vars.txdata[aa][ulsch_start],0,4*(frame_parms->samples_per_tti-overflow)); + memset(&ue->common_vars.txdata[aa][0],0,4*overflow); + } + else + { + memset(&ue->common_vars.txdata[aa][ulsch_start],0,4*frame_parms->samples_per_tti); + } } /*#else overflow = ulsch_start - 9*frame_parms->samples_per_tti; @@ -1107,7 +1107,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt #endif*/ return; } -#endif +//#endif if ((frame_tx%100) == 0) LOG_D(PHY,"[UE %d] Frame %d, subframe %d: ulsch_start = %d (rxoff %d, HW TA %d, timing advance %d, TA_offset %d\n", From cec9cb7662aa2184876042c6ed5aa2a599ad29a1 Mon Sep 17 00:00:00 2001 From: hbilel Date: Mon, 13 Mar 2017 12:05:47 +0100 Subject: [PATCH 23/47] fix compilation error for dlsim --- openair1/SIMULATION/LTE_PHY/dlsim.c | 56 ++-- openair1/SIMULATION/LTE_PHY/dlsim_tm4.c | 346 ++++++++++++------------ openair1/SIMULATION/LTE_PHY/dlsim_tm7.c | 132 ++++----- 3 files changed, 267 insertions(+), 267 deletions(-) diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index af39d92a6b..ddc108a7c8 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -2098,14 +2098,14 @@ int main(int argc, char **argv) } for (i=0; i<2; i++) { - UE->dlsch[0][i] = new_ue_dlsch(Kmimo,8,Nsoft,MAX_TURBO_ITERATIONS,N_RB_DL,0); + UE->dlsch[subframe&0x1][0][i] = new_ue_dlsch(Kmimo,8,Nsoft,MAX_TURBO_ITERATIONS,N_RB_DL,0); - if (!UE->dlsch[0][i]) { + if (!UE->dlsch[subframe&0x1][0][i]) { printf("Can't get ue dlsch structures\n"); exit(-1); } - UE->dlsch[0][i]->rnti = n_rnti; + UE->dlsch[subframe&0x1][0][i]->rnti = n_rnti; } UE->dlsch_SI[0] = new_ue_dlsch(1,1,Nsoft,MAX_TURBO_ITERATIONS,N_RB_DL,0); @@ -2254,7 +2254,7 @@ int main(int argc, char **argv) reset_meas(&eNB->dlsch_rate_matching_stats); reset_meas(&eNB->dlsch_turbo_encoding_stats); - reset_meas(&UE->phy_proc_rx); // total UE rx + reset_meas(&UE->phy_proc_rx[subframe&0x1]); // total UE rx reset_meas(&UE->ofdm_demod_stats); reset_meas(&UE->dlsch_channel_estimation_stats); reset_meas(&UE->dlsch_freq_offset_estimation_stats); @@ -2488,7 +2488,7 @@ int main(int argc, char **argv) if (n_frames==1) printf("Running phy_procedures_UE_RX\n"); phy_procedures_UE_RX(UE,proc,0,0,normal_txrx,no_relay,NULL); - if (UE->dlsch[0][0]->active == 0) { + if (UE->dlsch[subframe&0x1][0][0]->active == 0) { //printf("DCI not received\n"); /* write_output("pdcchF0_ext.m","pdcchF_ext", UE->pdcch_vars[eNB_id]->rxdataF_ext[0],2*3*UE->frame_parms.ofdm_symbol_size,1,1); @@ -2543,7 +2543,7 @@ int main(int argc, char **argv) //pdsch_vars - dump_dlsch2(UE,eNB_id,subframe,coded_bits_per_codeword,round, UE->dlsch[0][0]->current_harq_pid); + dump_dlsch2(UE,eNB_id,subframe,coded_bits_per_codeword,round, UE->dlsch[subframe&0x1][0][0]->current_harq_pid); write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4); @@ -2561,13 +2561,13 @@ int main(int argc, char **argv) if (UE->dlsch_errors[0] == 0) { - avg_iter += UE->dlsch[eNB_id][0]->last_iteration_cnt; + avg_iter += UE->dlsch[subframe&0x1][eNB_id][0]->last_iteration_cnt; iter_trials++; if (n_frames==1) printf("No DLSCH errors found (round %d),uncoded ber %f\n",round,uncoded_ber); - UE->total_TBS[eNB_id] = UE->total_TBS[eNB_id] + UE->dlsch[eNB_id][0]->harq_processes[UE->dlsch[eNB_id][0]->current_harq_pid]->TBS; + UE->total_TBS[eNB_id] = UE->total_TBS[eNB_id] + UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]->TBS; TB0_active = 0; @@ -2575,25 +2575,25 @@ int main(int argc, char **argv) else { errs[round]++; - avg_iter += UE->dlsch[eNB_id][0]->last_iteration_cnt-1; + avg_iter += UE->dlsch[subframe&0x1][eNB_id][0]->last_iteration_cnt-1; iter_trials++; if (n_frames==1) { //if ((n_frames==1) || (SNR>=30)) { printf("DLSCH errors found (round %d), uncoded ber %f\n",round,uncoded_ber); - for (s=0; sdlsch[0][0]->harq_processes[0]->C; s++) { - if (sdlsch[0][0]->harq_processes[0]->Cminus) - Kr = UE->dlsch[0][0]->harq_processes[0]->Kminus; + for (s=0; sdlsch[subframe&0x1][0][0]->harq_processes[0]->C; s++) { + if (sdlsch[subframe&0x1][0][0]->harq_processes[0]->Cminus) + Kr = UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Kminus; else - Kr = UE->dlsch[0][0]->harq_processes[0]->Kplus; + Kr = UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Kplus; Kr_bytes = Kr>>3; printf("Decoded_output (Segment %d):\n",s); for (i=0; idlsch[0][0]->harq_processes[0]->c[s][i],UE->dlsch[0][0]->harq_processes[0]->c[s][i]^eNB->dlsch[0][0]->harq_processes[0]->c[s][i]); + printf("%d : %x (%x)\n",i,UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->c[s][i],UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->c[s][i]^eNB->dlsch[0][0]->harq_processes[0]->c[s][i]); } sprintf(fname,"rxsig0_r%d.m",round); @@ -2644,13 +2644,13 @@ int main(int argc, char **argv) } //pdsch_vars - dump_dlsch2(UE,eNB_id,subframe,coded_bits_per_codeword,round, UE->dlsch[0][0]->current_harq_pid); + dump_dlsch2(UE,eNB_id,subframe,coded_bits_per_codeword,round, UE->dlsch[subframe&0x1][0][0]->current_harq_pid); //write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4); //write_output("dlsch_ber_bit.m","ber_bit",uncoded_ber_bit,coded_bits_per_codeword,1,0); //write_output("dlsch_w.m","w",eNB->dlsch[0][0]->harq_processes[0]->w[0],3*(tbs+64),1,4); - //write_output("dlsch_w.m","w",UE->dlsch[0][0]->harq_processes[0]->w[0],3*(tbs+64),1,0); + //write_output("dlsch_w.m","w",UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->w[0],3*(tbs+64),1,0); //pdcch_vars write_output("pdcchF0_ext.m","pdcchF_ext", UE->pdcch_vars[eNB_id]->rxdataF_ext[0],2*3*UE->frame_parms.ofdm_symbol_size,1,1); write_output("pdcch00_ch0_ext.m","pdcch00_ch0_ext",UE->pdcch_vars[eNB_id]->dl_ch_estimates_ext[0],300*3,1,1); @@ -2664,7 +2664,7 @@ int main(int argc, char **argv) // printf("round %d errors %d/%d\n",round,errs[round],trials); round++; - // UE->dlsch[0][0]->harq_processes[0]->round++; + // UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->round++; } if (xforms==1) { @@ -2705,7 +2705,7 @@ int main(int argc, char **argv) double t_tx_enc = (double)eNB->dlsch_encoding_stats.p_time/cpu_freq_GHz/1000.0; - double t_rx = (double)UE->phy_proc_rx.p_time/cpu_freq_GHz/1000.0; + double t_rx = (double)UE->phy_proc_rx[subframe&0x1].p_time/cpu_freq_GHz/1000.0; double t_rx_fft = (double)UE->ofdm_demod_stats.p_time/cpu_freq_GHz/1000.0; double t_rx_demod = (double)UE->dlsch_rx_pdcch_stats.p_time/cpu_freq_GHz/1000.0; double t_rx_dec = (double)UE->dlsch_decoding_stats.p_time/cpu_freq_GHz/1000.0; @@ -2854,7 +2854,7 @@ int main(int argc, char **argv) rate*effective_rate, 100*effective_rate, rate, - rate*get_Qm(UE->dlsch[0][0]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->mcs), + rate*get_Qm(UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->mcs), (1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0])/ (double)eNB->dlsch[0][0]->harq_processes[0]->TBS, (1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0])); @@ -2894,10 +2894,10 @@ int main(int argc, char **argv) eNB->dlsch_interleaving_stats.diff/eNB->dlsch_interleaving_stats.trials/cpu_freq_GHz/1000.0,eNB->dlsch_interleaving_stats.trials); printf("\n\nUE RX function statistics (per 1ms subframe)\n\n"); - std_phy_proc_rx = sqrt((double)UE->phy_proc_rx.diff_square/pow(cpu_freq_GHz,2)/pow(1000, - 2)/UE->phy_proc_rx.trials - pow((double)UE->phy_proc_rx.diff/UE->phy_proc_rx.trials/cpu_freq_GHz/1000,2)); - printf("Total PHY proc rx :%f us (%d trials)\n",(double)UE->phy_proc_rx.diff/UE->phy_proc_rx.trials/cpu_freq_GHz/1000.0, - UE->phy_proc_rx.trials*2/3); + std_phy_proc_rx = sqrt((double)UE->phy_proc_rx[subframe&0x1].diff_square/pow(cpu_freq_GHz,2)/pow(1000, + 2)/UE->phy_proc_rx[subframe&0x1].trials - pow((double)UE->phy_proc_rx[subframe&0x1].diff/UE->phy_proc_rx[subframe&0x1].trials/cpu_freq_GHz/1000,2)); + printf("Total PHY proc rx :%f us (%d trials)\n",(double)UE->phy_proc_rx[subframe&0x1].diff/UE->phy_proc_rx[subframe&0x1].trials/cpu_freq_GHz/1000.0, + UE->phy_proc_rx[subframe&0x1].trials*2/3); printf("|__Statistcs std: %fus max: %fus min: %fus median %fus q1 %fus q3 %fus n_dropped: %d packet \n", std_phy_proc_rx, t_rx_max, t_rx_min, rx_median, rx_q1, rx_q3, n_rx_dropped); std_phy_proc_rx_fft = sqrt((double)UE->ofdm_demod_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000, @@ -2931,7 +2931,7 @@ int main(int argc, char **argv) printf("|__ DLSCH Rate Unmatching :%f us (%d trials)\n", (double)UE->dlsch_rate_unmatching_stats.diff/UE->dlsch_rate_unmatching_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_rate_unmatching_stats.trials); printf("|__ DLSCH Turbo Decoding(%d bits) :%f us (%d trials)\n", - UE->dlsch[0][0]->harq_processes[0]->Cminus ? UE->dlsch[0][0]->harq_processes[0]->Kminus : UE->dlsch[0][0]->harq_processes[0]->Kplus, + UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Cminus ? UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Kminus : UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Kplus, (double)UE->dlsch_turbo_decoding_stats.diff/UE->dlsch_turbo_decoding_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_turbo_decoding_stats.trials); printf(" |__ init %f us (cycles/iter %f, %d trials)\n", (double)UE->dlsch_tc_init_stats.diff/UE->dlsch_tc_init_stats.trials/cpu_freq_GHz/1000.0, @@ -3109,7 +3109,7 @@ int main(int argc, char **argv) eNB->dlsch_modulation_stats.trials, eNB->dlsch_scrambling_stats.trials, eNB->dlsch_encoding_stats.trials, - UE->phy_proc_rx.trials, + UE->phy_proc_rx[subframe&0x1].trials, UE->ofdm_demod_stats.trials, UE->dlsch_rx_pdcch_stats.trials, UE->dlsch_llr_stats.trials, @@ -3122,7 +3122,7 @@ int main(int argc, char **argv) get_time_meas_us(&eNB->dlsch_modulation_stats), get_time_meas_us(&eNB->dlsch_scrambling_stats), get_time_meas_us(&eNB->dlsch_encoding_stats), - get_time_meas_us(&UE->phy_proc_rx), + get_time_meas_us(&UE->phy_proc_rx[subframe&0x1]), nsymb*get_time_meas_us(&UE->ofdm_demod_stats), get_time_meas_us(&UE->dlsch_rx_pdcch_stats), 3*get_time_meas_us(&UE->dlsch_llr_stats), @@ -3162,7 +3162,7 @@ int main(int argc, char **argv) eNB->dlsch_modulation_stats.trials, eNB->dlsch_scrambling_stats.trials, eNB->dlsch_encoding_stats.trials, - UE->phy_proc_rx.trials, + UE->phy_proc_rx[subframe&0x1].trials, UE->ofdm_demod_stats.trials, UE->dlsch_rx_pdcch_stats.trials, UE->dlsch_llr_stats.trials, @@ -3220,7 +3220,7 @@ int main(int argc, char **argv) printf("eNB %d\n",i); free_eNB_dlsch(eNB->dlsch[0][i]); printf("UE %d\n",i); - free_ue_dlsch(UE->dlsch[0][i]); + free_ue_dlsch(UE->dlsch[subframe&0x1][0][i]); } diff --git a/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c b/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c index c3f975006d..b45bfdf324 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c @@ -980,15 +980,15 @@ int main(int argc, char **argv) } for (i=0; i<2; i++) { - UE->dlsch[0][i] = new_ue_dlsch(Kmimo,8,Nsoft,MAX_TURBO_ITERATIONS,N_RB_DL,0); + UE->dlsch[subframe&0x1][0][i] = new_ue_dlsch(Kmimo,8,Nsoft,MAX_TURBO_ITERATIONS,N_RB_DL,0); - if (!UE->dlsch[0][i]) { + if (!UE->dlsch[subframe&0x1][0][i]) { printf("Can't get ue dlsch structures\n"); exit(-1); } - UE->dlsch[0][i]->rnti = n_rnti; + UE->dlsch[subframe&0x1][0][i]->rnti = n_rnti; } // structure for SIC at UE @@ -2081,7 +2081,7 @@ int main(int argc, char **argv) reset_meas(&eNB->dlsch_rate_matching_stats); reset_meas(&eNB->dlsch_turbo_encoding_stats); - reset_meas(&UE->phy_proc_rx); // total UE rx + reset_meas(&UE->phy_proc_rx[subframe&0x1]); // total UE rx reset_meas(&UE->ofdm_demod_stats); reset_meas(&UE->dlsch_channel_estimation_stats); reset_meas(&UE->dlsch_freq_offset_estimation_stats); @@ -2135,8 +2135,8 @@ int main(int argc, char **argv) eNB2UE[0]->first_run = 1; - ret[0] = UE->dlsch[0][0]->max_turbo_iterations+1; - ret[1] = UE->dlsch[0][0]->max_turbo_iterations+1; + ret[0] = UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations+1; + ret[1] = UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations+1; resend_cw0_cw1=1; resend_cw1=0; @@ -2144,10 +2144,10 @@ int main(int argc, char **argv) TB1_active=1; while (((transmission_mode == 3 || transmission_mode == 4) && - ((round < num_rounds) && ((ret[0] > UE->dlsch[0][0]->max_turbo_iterations) || - (ret[1] > UE->dlsch[0][0]->max_turbo_iterations)))) || + ((round < num_rounds) && ((ret[0] > UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations) || + (ret[1] > UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations)))) || ((transmission_mode!=4 && transmission_mode != 3) && ((round< num_rounds) && - (ret[0] > UE->dlsch[0][0]->max_turbo_iterations)))) { + (ret[0] > UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations)))) { #ifdef DEBUG_HARQ printf("\n [DLSIM] On top round is %d\n", round); #endif @@ -2158,10 +2158,10 @@ int main(int argc, char **argv) //printf("Trial %d, round %d , ret[0] %d, ret[1] %d, round_trials %d\n",trials,round, ret[0], ret[1], round_trials[round]); - /*if (ret[0] > UE->dlsch[0][0]->max_turbo_iterations) { + /*if (ret[0] > UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations) { round_trials[0][round]++; round_trials[1][round]++; - } else if ((ret[1] > UE->dlsch[0][0]->max_turbo_iterations) && (ret[0] <= UE->dlsch[0][0]->max_turbo_iterations)) + } else if ((ret[1] > UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations) && (ret[0] <= UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations)) round_trials[1][round]++;*/ @@ -2624,7 +2624,7 @@ int main(int argc, char **argv) SI_RNTI, 0, P_RNTI, - UE->dlsch[0][1]->pmi_alloc, + UE->dlsch[subframe&0x1][0][1]->pmi_alloc, transmission_mode>=7?transmission_mode:0 ); break; @@ -2852,7 +2852,7 @@ int main(int argc, char **argv) SI_RNTI, 0, P_RNTI, - UE->dlsch[0][1]->pmi_alloc, + UE->dlsch[subframe&0x1][0][1]->pmi_alloc, transmission_mode>=7?transmission_mode:0 ); break; @@ -2983,7 +2983,7 @@ int main(int argc, char **argv) // use the PMI from previous trial if (DLSCH_alloc_pdu2_1E[0].tpmi == 5) { eNB->dlsch[0][0]->harq_processes[0]->pmi_alloc = quantize_subband_pmi(&UE->measurements,0,eNB->frame_parms.N_RB_DL); - UE->dlsch[0][0]->pmi_alloc = quantize_subband_pmi(&UE->measurements,0,UE->frame_parms.N_RB_DL); + UE->dlsch[subframe&0x1][0][0]->pmi_alloc = quantize_subband_pmi(&UE->measurements,0,UE->frame_parms.N_RB_DL); if (n_users>1) eNB->dlsch[1][0]->harq_processes[0]->pmi_alloc = (eNB->dlsch[0][0]->harq_processes[0]->pmi_alloc ^ 0x1555); /* @@ -3007,7 +3007,7 @@ int main(int argc, char **argv) printf ("[DLSIM] I am calling from the eNode B 2\n"); #endif - UE->dlsch[0][TB]->pmi_alloc = quantize_subband_pmi(&UE->measurements,0,UE->frame_parms.N_RB_DL); + UE->dlsch[subframe&0x1][0][TB]->pmi_alloc = quantize_subband_pmi(&UE->measurements,0,UE->frame_parms.N_RB_DL); } else if (updated_csi == 0){ @@ -3020,7 +3020,7 @@ int main(int argc, char **argv) #ifdef DEBUG_HARQ printf ("[DLSIM] I am calling from the eNode B 2\n"); #endif - UE->dlsch[0][TB]->pmi_alloc = pmi_convert_rank1_from_rank2(UE->dlsch[0][TB]->pmi_alloc,5,UE->frame_parms.N_RB_DL); + UE->dlsch[subframe&0x1][0][TB]->pmi_alloc = pmi_convert_rank1_from_rank2(UE->dlsch[subframe&0x1][0][TB]->pmi_alloc,5,UE->frame_parms.N_RB_DL); } else if (hold_rank1_precoder == 0 && ((((DCI2_5MHz_2A_TDD_t *)&DLSCH_alloc_pdu_1[k])->tpmi == 6) ||(((DCI2_5MHz_2A_FDD_t *)&DLSCH_alloc_pdu_1[k])->tpmi == 6))){ @@ -3031,7 +3031,7 @@ int main(int argc, char **argv) #ifdef DEBUG_HARQ printf ("[DLSIM] I am calling from the eNode B 2\n"); #endif - UE->dlsch[0][TB]->pmi_alloc = pmi_convert_rank1_from_rank2(UE->dlsch[0][TB]->pmi_alloc,6,UE->frame_parms.N_RB_DL); + UE->dlsch[subframe&0x1][0][TB]->pmi_alloc = pmi_convert_rank1_from_rank2(UE->dlsch[subframe&0x1][0][TB]->pmi_alloc,6,UE->frame_parms.N_RB_DL); } } else if (updated_csi == 1){ @@ -3050,11 +3050,11 @@ int main(int argc, char **argv) #ifdef DEBUG_HARQ printf ("[DLSIM] I quantize from ENodeB 2\n"); #endif - UE->dlsch[0][TB]->pmi_alloc = quantize_subband_pmi(&UE->measurements,0,UE->frame_parms.N_RB_DL); + UE->dlsch[subframe&0x1][0][TB]->pmi_alloc = quantize_subband_pmi(&UE->measurements,0,UE->frame_parms.N_RB_DL); #ifdef DEBUG_HARQ printf ("[DLSIM] I convert pmi to rank1 eNode B 2\n"); #endif - UE->dlsch[0][TB]->pmi_alloc = pmi_convert_rank1_from_rank2(UE->dlsch[0][TB]->pmi_alloc,5,UE->frame_parms.N_RB_DL); + UE->dlsch[subframe&0x1][0][TB]->pmi_alloc = pmi_convert_rank1_from_rank2(UE->dlsch[subframe&0x1][0][TB]->pmi_alloc,5,UE->frame_parms.N_RB_DL); } else if (((((DCI2_5MHz_2A_TDD_t *)&DLSCH_alloc_pdu_1[k])->tpmi == 6) ||(((DCI2_5MHz_2A_FDD_t *)&DLSCH_alloc_pdu_1[k])->tpmi == 6))){ #ifdef DEBUG_HARQ @@ -3070,11 +3070,11 @@ int main(int argc, char **argv) #ifdef DEBUG_HARQ printf ("[DLSIM] I quantize from ENodeB 2\n"); #endif - UE->dlsch[0][TB]->pmi_alloc = quantize_subband_pmi(&UE->measurements,0,UE->frame_parms.N_RB_DL); + UE->dlsch[subframe&0x1][0][TB]->pmi_alloc = quantize_subband_pmi(&UE->measurements,0,UE->frame_parms.N_RB_DL); #ifdef DEBUG_HARQ printf ("[DLSIM] I convert pmi to rank1 eNode B 2\n"); #endif - UE->dlsch[0][TB]->pmi_alloc = pmi_convert_rank1_from_rank2(UE->dlsch[0][TB]->pmi_alloc,6,UE->frame_parms.N_RB_DL); + UE->dlsch[subframe&0x1][0][TB]->pmi_alloc = pmi_convert_rank1_from_rank2(UE->dlsch[subframe&0x1][0][TB]->pmi_alloc,6,UE->frame_parms.N_RB_DL); } } @@ -3363,7 +3363,7 @@ int main(int argc, char **argv) pilot3 = 9; } - start_meas(&UE->phy_proc_rx); + start_meas(&UE->phy_proc_rx[subframe&0x1]); // Inner receiver scheduling for 3 slots for (Ns=(2*subframe);Ns<((2*subframe)+3);Ns++) { for (l=0;ldlsch[0][0]->harq_processes[0]->first_tx=1; + UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->first_tx=1; } if ((transmission_mode == 3 || transmission_mode ==4) && (round == 0)) { - UE->dlsch[0][1]->harq_processes[0]->first_tx=1; + UE->dlsch[subframe&0x1][0][1]->harq_processes[0]->first_tx=1; } if ((dci_alloc_rx[i].rnti == n_rnti) && @@ -3537,7 +3537,7 @@ int main(int argc, char **argv) dci_alloc_rx[i].dci_pdu, dci_alloc_rx[i].rnti, dci_alloc_rx[i].format, - UE->dlsch[0], + UE->dlsch[subframe&0x1][0], &UE->frame_parms, UE->pdsch_config_dedicated, SI_RNTI, @@ -3547,30 +3547,30 @@ int main(int argc, char **argv) UE->pdcch_vars[0]->crnti_is_temporary? UE->pdcch_vars[0]->crnti: 0)==0)) { dump_dci(&UE->frame_parms,&dci_alloc_rx[i]); coded_bits_per_codeword[0]= get_G(&eNB->frame_parms, - UE->dlsch[0][0]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->nb_rb, - UE->dlsch[0][0]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->rb_alloc_even, - get_Qm(UE->dlsch[0][0]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->mcs), - UE->dlsch[0][0]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->Nl, + UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->nb_rb, + UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->rb_alloc_even, + get_Qm(UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->mcs), + UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->Nl, UE->pdcch_vars[0]->num_pdcch_symbols, 0, subframe, transmission_mode>=7?transmission_mode:0); if (transmission_mode == 3 || transmission_mode == 4) { coded_bits_per_codeword[1]= get_G(&eNB->frame_parms, - UE->dlsch[0][1]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->nb_rb, - UE->dlsch[0][1]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->rb_alloc_even, - get_Qm(UE->dlsch[0][1]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->mcs), - UE->dlsch[0][1]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->Nl, + UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->nb_rb, + UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->rb_alloc_even, + get_Qm(UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->mcs), + UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->Nl, UE->pdcch_vars[1]->num_pdcch_symbols, 0, subframe, transmission_mode>=7?transmission_mode:0); } /* - rate = (double)dlsch_tbs25[get_I_TBS(UE->dlsch[0][0]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->mcs)][UE->dlsch[0][0]->nb_rb-1]/(coded_bits_per_codeword); - rate*=get_Qm(UE->dlsch[0][0]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->mcs); + rate = (double)dlsch_tbs25[get_I_TBS(UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->mcs)][UE->dlsch[subframe&0x1][0][0]->nb_rb-1]/(coded_bits_per_codeword); + rate*=get_Qm(UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->mcs); */ - printf("num_pdcch_symbols %d, G %d, TBS %d\n",UE->pdcch_vars[0]->num_pdcch_symbols,coded_bits_per_codeword [0],UE->dlsch[0][0]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->TBS); + printf("num_pdcch_symbols %d, G %d, TBS %d\n",UE->pdcch_vars[0]->num_pdcch_symbols,coded_bits_per_codeword [0],UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->TBS); dlsch_active = 1; // what does it indicates??? } else { @@ -3594,8 +3594,8 @@ int main(int argc, char **argv) UE->pdcch_vars[0]->crnti = n_rnti; UE->pdcch_vars[0]->num_pdcch_symbols = num_pdcch_symbols; if (round == 0) { - UE->dlsch[0][0]->harq_processes[0]->first_tx=1; - UE->dlsch[0][1]->harq_processes[0]->first_tx=1; + UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->first_tx=1; + UE->dlsch[subframe&0x1][0][1]->harq_processes[0]->first_tx=1; } switch (transmission_mode) { @@ -3606,7 +3606,7 @@ int main(int argc, char **argv) &DLSCH_alloc_pdu_1[0], (common_flag==0)? C_RNTI : SI_RNTI, (common_flag==0)? format1 : format1A, - UE->dlsch[0], + UE->dlsch[subframe&0x1][0], &UE->frame_parms, UE->pdsch_config_dedicated, SI_RNTI, @@ -3617,14 +3617,14 @@ int main(int argc, char **argv) break; case 3: - //printf("Rate: TM3 (before) round %d (%d) first_tx %d\n",round,UE->dlsch[0][0]->harq_processes[0]->round,UE->dlsch[0][0]->harq_processes[0]->first_tx); + //printf("Rate: TM3 (before) round %d (%d) first_tx %d\n",round,UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->round,UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->first_tx); generate_ue_dlsch_params_from_dci(0, subframe, &DLSCH_alloc_pdu_1[0], (common_flag==0)? C_RNTI : SI_RNTI, (common_flag==0)? format2A : format1A, - UE->dlsch[0], + UE->dlsch[subframe&0x1][0], &UE->frame_parms, UE->pdsch_config_dedicated, SI_RNTI, @@ -3632,7 +3632,7 @@ int main(int argc, char **argv) P_RNTI, transmission_mode<7?0:transmission_mode, UE->pdcch_vars[0]->crnti_is_temporary? UE->pdcch_vars[0]->crnti: 0); - //printf("Rate: TM3 (after) round %d (%d) first_tx %d\n",round,UE->dlsch[0][0]->harq_processes[0]->round,UE->dlsch[0][0]->harq_processes[0]->first_tx); + //printf("Rate: TM3 (after) round %d (%d) first_tx %d\n",round,UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->round,UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->first_tx); break; case 4: generate_ue_dlsch_params_from_dci(0, @@ -3640,7 +3640,7 @@ int main(int argc, char **argv) &DLSCH_alloc_pdu_1[0], (common_flag==0)? C_RNTI : SI_RNTI, (common_flag==0)? format2 : format1A,//format1A only for a codeblock - UE->dlsch[0], + UE->dlsch[subframe&0x1][0], &UE->frame_parms, UE->pdsch_config_dedicated, SI_RNTI, @@ -3657,7 +3657,7 @@ int main(int argc, char **argv) &DLSCH_alloc_pdu2_1E[0], C_RNTI, format1E_2A_M10PRB, - UE->dlsch[0], + UE->dlsch[subframe&0x1][0], &UE->frame_parms, UE->pdsch_config_dedicated, SI_RNTI, @@ -3673,13 +3673,13 @@ int main(int argc, char **argv) if (dlsch_active == 1) { if (TB0_active==1) - cur_harq_pid =UE->dlsch[0][0]->current_harq_pid; + cur_harq_pid =UE->dlsch[subframe&0x1][0][0]->current_harq_pid; else - cur_harq_pid =UE->dlsch[0][1]->current_harq_pid; + cur_harq_pid =UE->dlsch[subframe&0x1][0][1]->current_harq_pid; if ((Ns==(1+(2*subframe))) && (l==0)) {// process PDSCH symbols 1,2,3,4,5,(6 Normal Prefix /* if (transmission_mode == 5) { - if ((UE->dlsch[eNB_id][0]->harq_processes[cur_harq_pid]->dl_power_off==0) && + if ((UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[cur_harq_pid]->dl_power_off==0) && (openair_daq_vars.use_ia_receiver ==1)) { rx_type = rx_IC_single_stream; } else { @@ -3701,7 +3701,7 @@ int main(int argc, char **argv) (m==UE->pdcch_vars[0]->num_pdcch_symbols)?1:0, rx_type, i_mod, - UE->dlsch[0][0]->current_harq_pid)==-1){ + UE->dlsch[subframe&0x1][0][0]->current_harq_pid)==-1){ dlsch_active = 0; break; } @@ -3788,7 +3788,7 @@ int main(int argc, char **argv) break; } - UE->dlsch[0][TB]->rnti = (common_flag==0) ? n_rnti: SI_RNTI; + UE->dlsch[subframe&0x1][0][TB]->rnti = (common_flag==0) ? n_rnti: SI_RNTI; coded_bits_per_codeword[TB] = get_G(&eNB->frame_parms, eNB->dlsch[0][TB]->harq_processes[0]->nb_rb, eNB->dlsch[0][TB]->harq_processes[0]->rb_alloc, @@ -3798,12 +3798,12 @@ int main(int argc, char **argv) 0,subframe, transmission_mode>=7?transmission_mode:0); - UE->dlsch[0][TB]->harq_processes[UE->dlsch[0][TB]->current_harq_pid]->G = coded_bits_per_codeword[TB]; - UE->dlsch[0][TB]->harq_processes[UE->dlsch[0][TB]->current_harq_pid]->Qm = get_Qm(eNB->dlsch[0][TB]->harq_processes[0]->mcs); + UE->dlsch[subframe&0x1][0][TB]->harq_processes[UE->dlsch[subframe&0x1][0][TB]->current_harq_pid]->G = coded_bits_per_codeword[TB]; + UE->dlsch[subframe&0x1][0][TB]->harq_processes[UE->dlsch[subframe&0x1][0][TB]->current_harq_pid]->Qm = get_Qm(eNB->dlsch[0][TB]->harq_processes[0]->mcs); if (n_frames==2) { printf("Kmimo=%d, TB=%d, G=%d, TBS=%d\n",Kmimo,TB,coded_bits_per_codeword[TB], - UE->dlsch[0][TB]->harq_processes[UE->dlsch[0][TB]->current_harq_pid]->TBS); + UE->dlsch[subframe&0x1][0][TB]->harq_processes[UE->dlsch[subframe&0x1][0][TB]->current_harq_pid]->TBS); // calculate uncoded BER uncoded_ber_bit = (short*) malloc(sizeof(short)*coded_bits_per_codeword[TB]); @@ -3812,7 +3812,7 @@ int main(int argc, char **argv) sprintf(fname,"dlsch%d_rxF_r%d_cw%d_llr.m",eNB_id,round, TB); sprintf(vname,"dl%d_r%d_cw%d_llr",eNB_id,round, TB); - write_output(fname,vname, UE->pdsch_vars[subframe&0x1][0]->llr[UE->dlsch[0][TB]->harq_processes[UE->dlsch[0][TB]->current_harq_pid]->codeword],coded_bits_per_codeword[TB],1,0); + write_output(fname,vname, UE->pdsch_vars[subframe&0x1][0]->llr[UE->dlsch[subframe&0x1][0][TB]->harq_processes[UE->dlsch[subframe&0x1][0][TB]->current_harq_pid]->codeword],coded_bits_per_codeword[TB],1,0); sprintf(fname,"dlsch_cw%d_e.m", TB); sprintf(vname,"dlschcw%d_e", TB); write_output(fname, vname,eNB->dlsch[0][TB]->harq_processes[0]->e,coded_bits_per_codeword[TB],1,4); @@ -3820,7 +3820,7 @@ int main(int argc, char **argv) printf("trials=%d\n", trials); for (i=0;idlsch[0][TB]->harq_processes[0]->e[i] != (UE->pdsch_vars[subframe&0x1][0]->llr[UE->dlsch[0][TB]->harq_processes[UE->dlsch[0][TB]->current_harq_pid]->codeword][i]<0)) { + if (eNB->dlsch[0][TB]->harq_processes[0]->e[i] != (UE->pdsch_vars[subframe&0x1][0]->llr[UE->dlsch[subframe&0x1][0][TB]->harq_processes[UE->dlsch[subframe&0x1][0][TB]->current_harq_pid]->codeword][i]<0)) { uncoded_ber_bit[i] = 1; uncoded_ber++; } @@ -3842,22 +3842,22 @@ int main(int argc, char **argv) start_meas(&UE->dlsch_unscrambling_stats); dlsch_unscrambling(&UE->frame_parms, 0, - UE->dlsch[0][TB], + UE->dlsch[subframe&0x1][0][TB], coded_bits_per_codeword[TB], - UE->pdsch_vars[subframe&0x1][eNB_id]->llr[UE->dlsch[0][TB]->harq_processes[UE->dlsch[0][TB]->current_harq_pid]->codeword], + UE->pdsch_vars[subframe&0x1][eNB_id]->llr[UE->dlsch[subframe&0x1][0][TB]->harq_processes[UE->dlsch[subframe&0x1][0][TB]->current_harq_pid]->codeword], TB, subframe<<1); stop_meas(&UE->dlsch_unscrambling_stats); start_meas(&UE->dlsch_decoding_stats); ret[TB] = dlsch_decoding(UE, - UE->pdsch_vars[subframe&0x1][eNB_id]->llr[UE->dlsch[0][TB]->harq_processes[UE->dlsch[0][TB]->current_harq_pid]->codeword], + UE->pdsch_vars[subframe&0x1][eNB_id]->llr[UE->dlsch[subframe&0x1][0][TB]->harq_processes[UE->dlsch[subframe&0x1][0][TB]->current_harq_pid]->codeword], &UE->frame_parms, - UE->dlsch[0][TB], - UE->dlsch[0][TB]->harq_processes[UE->dlsch[0][TB]->current_harq_pid], + UE->dlsch[subframe&0x1][0][TB], + UE->dlsch[subframe&0x1][0][TB]->harq_processes[UE->dlsch[subframe&0x1][0][TB]->current_harq_pid], 0, subframe, - UE->dlsch[0][TB]->current_harq_pid, + UE->dlsch[subframe&0x1][0][TB]->current_harq_pid, 1,llr8_flag); stop_meas(&UE->dlsch_decoding_stats); #ifdef DEBUG_HARQ @@ -3865,11 +3865,11 @@ int main(int argc, char **argv) #endif //printf("retr cw 0 = %d\n", ret[0]); - //printf("current round = %d\n", UE->dlsch[0][cw_non_sic]->harq_processes[UE->dlsch[0][cw_non_sic]->current_harq_pid]->round); + //printf("current round = %d\n", UE->dlsch[subframe&0x1][0][cw_non_sic]->harq_processes[UE->dlsch[subframe&0x1][0][cw_non_sic]->current_harq_pid]->round); - if (ret[TB] <= UE->dlsch[0][0]->max_turbo_iterations ) { //if CW0 is decoded, approach CW1 + if (ret[TB] <= UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations ) { //if CW0 is decoded, approach CW1 #ifdef DEBUG_HARQ printf("[DLSIM] TB%d is decoded\n", TB); #endif @@ -3880,33 +3880,33 @@ int main(int argc, char **argv) if (n_frames==2) { printf("cw non sic %d, round %d: No DLSCH errors found, uncoded ber %f\n",TB,round,uncoded_ber); #ifdef PRINT_BYTES - for (s=0;sdlsch[0][TB]->harq_processes[0]->C;s++) { - if (sdlsch[0][TB]->harq_processes[0]->Cminus) - Kr = UE->dlsch[0][TB]->harq_processes[0]->Kminus; + for (s=0;sdlsch[subframe&0x1][0][TB]->harq_processes[0]->C;s++) { + if (sdlsch[subframe&0x1][0][TB]->harq_processes[0]->Cminus) + Kr = UE->dlsch[subframe&0x1][0][TB]->harq_processes[0]->Kminus; else - Kr = UE->dlsch[0][TB]->harq_processes[0]->Kplus; + Kr = UE->dlsch[subframe&0x1][0][TB]->harq_processes[0]->Kplus; Kr_bytes = Kr>>3; printf("Decoded_output (Segment %d):\n",s); for (i=0;idlsch[0][TB]->harq_processes[0]->c[s][i], - UE->dlsch[0][TB]->harq_processes[0]->c[s][i]^eNB->dlsch[0][TB]->harq_processes[0]->c[s][i]); + printf("%d : %x (%x)\n",i,UE->dlsch[subframe&0x1][0][TB]->harq_processes[0]->c[s][i], + UE->dlsch[subframe&0x1][0][TB]->harq_processes[0]->c[s][i]^eNB->dlsch[0][TB]->harq_processes[0]->c[s][i]); } #endif } - UE->total_TBS[eNB_id] = UE->total_TBS[eNB_id] + UE->dlsch[eNB_id][TB]->harq_processes[UE->dlsch[eNB_id][TB]->current_harq_pid]->TBS; + UE->total_TBS[eNB_id] = UE->total_TBS[eNB_id] + UE->dlsch[subframe&0x1][eNB_id][TB]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][TB]->current_harq_pid]->TBS; // If the receiver is NOT SIC, Here we are done with both CW, now only to calculate BLER //If the receiver IS SIC, we are done only with CW0, CW1 was only compensated by this moment (y1' obtained) - if (UE->dlsch[eNB_id][0]->harq_processes[UE->dlsch[eNB_id][0]->current_harq_pid]->mimo_mode == LARGE_CDD) { //try to decode second stream using SIC + if (UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]->mimo_mode == LARGE_CDD) { //try to decode second stream using SIC /* - //for (round = 0 ; round < UE->dlsch[eNB_id][0]->harq_processes[UE->dlsch[eNB_id][0]->current_harq_pid]->round ; round++) { + //for (round = 0 ; round < UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]->round ; round++) { // we assume here that the second stream has a lower MCS and is thus more likely to be decoded // re-encoding of second stream - dlsch0_ue_harq = UE->dlsch[eNB_id][0]->harq_processes[UE->dlsch[eNB_id][0]->current_harq_pid]; - dlsch0_eNB_harq = UE->dlsch[eNB_id]->harq_processes[UE->dlsch[eNB_id][0]->current_harq_pid]; + dlsch0_ue_harq = UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]; + dlsch0_eNB_harq = UE->dlsch[subframe&0x1][eNB_id]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]; dlsch0_eNB_harq->mimo_mode = LARGE_CDD; dlsch0_eNB_harq->rb_alloc[0] = dlsch0_ue_harq->rb_alloc[0]; @@ -3920,14 +3920,14 @@ int main(int argc, char **argv) dlsch0_eNB_harq->dl_power_off = dlsch0_ue_harq->dl_power_off; dlsch0_eNB_harq->status = dlsch0_ue_harq->status; - UE->dlsch[eNB_id]->active = UE->dlsch[eNB_id][0]->active; - UE->dlsch[eNB_id]->rnti = UE->dlsch[eNB_id][0]->rnti; - UE->dlsch[eNB_id]->current_harq_pid = UE->dlsch[eNB_id][0]->current_harq_pid; + UE->dlsch[subframe&0x1][eNB_id]->active = UE->dlsch[subframe&0x1][eNB_id][0]->active; + UE->dlsch[subframe&0x1][eNB_id]->rnti = UE->dlsch[subframe&0x1][eNB_id][0]->rnti; + UE->dlsch[subframe&0x1][eNB_id]->current_harq_pid = UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid; - dlsch_encoding(UE->dlsch[eNB_id][0]->harq_processes[UE->dlsch[eNB_id][0]->current_harq_pid]->b, + dlsch_encoding(UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]->b, &UE->frame_parms, num_pdcch_symbols, - UE->dlsch[eNB_id], + UE->dlsch[subframe&0x1][eNB_id], 0,subframe, &UE->dlsch_rate_matching_stats, &UE->dlsch_turbo_encoding_stats, @@ -3935,10 +3935,10 @@ int main(int argc, char **argv) ); coded_bits_per_codeword = get_G(&UE->frame_parms, - UE->dlsch[eNB_id]->harq_processes[UE->dlsch[eNB_id]->current_harq_pid]->nb_rb, - UE->dlsch[eNB_id]->harq_processes[UE->dlsch[eNB_id]->current_harq_pid]->rb_alloc, - get_Qm(UE->dlsch[eNB_id]->harq_processes[UE->dlsch[eNB_id]->current_harq_pid]->mcs), - UE->dlsch[eNB_id]->harq_processes[UE->dlsch[eNB_id]->current_harq_pid]->Nl, + UE->dlsch[subframe&0x1][eNB_id]->harq_processes[UE->dlsch[subframe&0x1][eNB_id]->current_harq_pid]->nb_rb, + UE->dlsch[subframe&0x1][eNB_id]->harq_processes[UE->dlsch[subframe&0x1][eNB_id]->current_harq_pid]->rb_alloc, + get_Qm(UE->dlsch[subframe&0x1][eNB_id]->harq_processes[UE->dlsch[subframe&0x1][eNB_id]->current_harq_pid]->mcs), + UE->dlsch[subframe&0x1][eNB_id]->harq_processes[UE->dlsch[subframe&0x1][eNB_id]->current_harq_pid]->Nl, num_pdcch_symbols, 0,subframe); @@ -3946,7 +3946,7 @@ int main(int argc, char **argv) //scrambling dlsch_scrambling(&UE->frame_parms, 0, - UE->dlsch[eNB_id], + UE->dlsch[subframe&0x1][eNB_id], coded_bits_per_codeword, 0, subframe<<1); @@ -3958,7 +3958,7 @@ int main(int argc, char **argv) subframe, &UE->frame_parms, num_pdcch_symbols, - &UE->dlsch[0][0], + &UE->dlsch[subframe&0x1][0][0], NULL); // sic_buffer is a vector of size nb_antennas_tx, but both contain the same signal, since we do modulation without precoding // precoding is contained in effective channel estimate @@ -3998,8 +3998,8 @@ int main(int argc, char **argv) } - if ((UE->dlsch[eNB_id][0]->harq_processes[UE->dlsch[eNB_id][0]->current_harq_pid]->mimo_mode >=DUALSTREAM_UNIFORM_PRECODING1) && - (UE->dlsch[eNB_id][0]->harq_processes[UE->dlsch[eNB_id][0]->current_harq_pid]->mimo_mode <=DUALSTREAM_PUSCH_PRECODING) && (TB0_active == 1) && + if ((UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]->mimo_mode >=DUALSTREAM_UNIFORM_PRECODING1) && + (UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]->mimo_mode <=DUALSTREAM_PUSCH_PRECODING) && (TB0_active == 1) && (rx_type==rx_SIC_dual_stream)) { #ifdef DEBUG_HARQ printf("[DLSIM] Starting SIC procedure\n"); @@ -4018,10 +4018,10 @@ int main(int argc, char **argv) #endif //printf("I enter round_sic loop \n"); //printf("round_sic= %d\n", round_sic); - dlsch0_ue_harq = UE->dlsch[eNB_id][0]->harq_processes[UE->dlsch[eNB_id][0]->current_harq_pid]; - dlsch0_eNB_harq = UE->dlsch_eNB[eNB_id]->harq_processes[UE->dlsch[eNB_id][0]->current_harq_pid]; + dlsch0_ue_harq = UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]; + dlsch0_eNB_harq = UE->dlsch_eNB[eNB_id]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]; - dlsch0_eNB_harq->mimo_mode = UE->dlsch[eNB_id][0]->harq_processes[UE->dlsch[eNB_id][0]->current_harq_pid]->mimo_mode; + dlsch0_eNB_harq->mimo_mode = UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]->mimo_mode; dlsch0_eNB_harq->rb_alloc[0] = dlsch0_ue_harq->rb_alloc_even[0]; dlsch0_eNB_harq->nb_rb = dlsch0_ue_harq->nb_rb; dlsch0_eNB_harq->mcs = dlsch0_ue_harq->mcs; @@ -4033,28 +4033,28 @@ int main(int argc, char **argv) dlsch0_eNB_harq->status = dlsch0_ue_harq->status; if (round_sic == 0){ - UE->dlsch_eNB[eNB_id]->harq_processes[UE->dlsch[eNB_id][1]->current_harq_pid]->rvidx = 0; - UE->dlsch[0][1]->harq_processes[UE->dlsch[0][1]->current_harq_pid]->rvidx=0; + UE->dlsch_eNB[eNB_id]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][1]->current_harq_pid]->rvidx = 0; + UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][1]->current_harq_pid]->rvidx=0; } else if (round_sic == 1){ - UE->dlsch_eNB[eNB_id]->harq_processes[UE->dlsch[eNB_id][1]->current_harq_pid]->rvidx = 1; - UE->dlsch[0][1]->harq_processes[UE->dlsch[0][1]->current_harq_pid]->rvidx=1; + UE->dlsch_eNB[eNB_id]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][1]->current_harq_pid]->rvidx = 1; + UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][1]->current_harq_pid]->rvidx=1; } else if (round_sic == 2){ - UE->dlsch_eNB[eNB_id]->harq_processes[UE->dlsch[eNB_id][1]->current_harq_pid]->rvidx = 2; - UE->dlsch[0][1]->harq_processes[UE->dlsch[0][1]->current_harq_pid]->rvidx=2; + UE->dlsch_eNB[eNB_id]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][1]->current_harq_pid]->rvidx = 2; + UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][1]->current_harq_pid]->rvidx=2; } else{ - UE->dlsch_eNB[eNB_id]->harq_processes[UE->dlsch[eNB_id][1]->current_harq_pid]->rvidx = 3; - UE->dlsch[0][1]->harq_processes[UE->dlsch[0][1]->current_harq_pid]->rvidx=3; + UE->dlsch_eNB[eNB_id]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][1]->current_harq_pid]->rvidx = 3; + UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][1]->current_harq_pid]->rvidx=3; } - UE->dlsch_eNB[eNB_id]->active = UE->dlsch[eNB_id][0]->active; - UE->dlsch_eNB[eNB_id]->rnti = UE->dlsch[eNB_id][0]->rnti; - UE->dlsch_eNB[eNB_id]->current_harq_pid = UE->dlsch[eNB_id][0]->current_harq_pid; + UE->dlsch_eNB[eNB_id]->active = UE->dlsch[subframe&0x1][eNB_id][0]->active; + UE->dlsch_eNB[eNB_id]->rnti = UE->dlsch[subframe&0x1][eNB_id][0]->rnti; + UE->dlsch_eNB[eNB_id]->current_harq_pid = UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid; dlsch_encoding_SIC(UE, - input_buffer0[0], //UE->dlsch[eNB_id][0]->harq_processes[PHY_vars_UE->dlsch_ue[eNB_id][0]->current_harq_pid]->b,, + input_buffer0[0], //UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[PHY_vars_UE->dlsch_ue[eNB_id][0]->current_harq_pid]->b,, num_pdcch_symbols, UE->dlsch_eNB[eNB_id], 0, @@ -4089,8 +4089,8 @@ int main(int argc, char **argv) coded_bits_per_codeword[0]); // write_output("sic_buffer.m","sic", *sic_buffer,re_allocated,1,1); - // write_output("rxdataF_comp1.m","rxF_comp1", *UE->pdsch_vars[eNB_id]->rxdataF_comp1[UE->dlsch[0][0]->current_harq_pid][round],14*12*25,1,1); - // write_output("rxdataF_rho.m","rho", *UE->pdsch_vars[eNB_id]->dl_ch_rho_ext[UE->dlsch[0][0]->current_harq_pid][round],14*12*25,1,1); + // write_output("rxdataF_comp1.m","rxF_comp1", *UE->pdsch_vars[eNB_id]->rxdataF_comp1[UE->dlsch[subframe&0x1][0][0]->current_harq_pid][round],14*12*25,1,1); + // write_output("rxdataF_rho.m","rho", *UE->pdsch_vars[eNB_id]->dl_ch_rho_ext[UE->dlsch[subframe&0x1][0][0]->current_harq_pid][round],14*12*25,1,1); switch (get_Qm(eNB->dlsch[0][1]->harq_processes[0]->mcs)){ @@ -4100,58 +4100,58 @@ int main(int argc, char **argv) case 2: dlsch_qpsk_llr_SIC(&UE->frame_parms, - UE->pdsch_vars[subframe&0x1][eNB_id]->rxdataF_comp1[UE->dlsch[0][0]->current_harq_pid][round_sic], + UE->pdsch_vars[subframe&0x1][eNB_id]->rxdataF_comp1[UE->dlsch[subframe&0x1][0][0]->current_harq_pid][round_sic], sic_buffer, - UE->pdsch_vars[subframe&0x1][eNB_id]->dl_ch_rho_ext[UE->dlsch[0][0]->current_harq_pid][round_sic], - UE->pdsch_vars[subframe&0x1][eNB_id]->llr[UE->dlsch[0][1]->harq_processes[UE->dlsch[0][1]->current_harq_pid]->codeword], + UE->pdsch_vars[subframe&0x1][eNB_id]->dl_ch_rho_ext[UE->dlsch[subframe&0x1][0][0]->current_harq_pid][round_sic], + UE->pdsch_vars[subframe&0x1][eNB_id]->llr[UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][1]->current_harq_pid]->codeword], num_pdcch_symbols, dlsch0_eNB_harq->nb_rb, subframe, dlsch0_eNB_harq->rb_alloc[0], get_Qm(eNB->dlsch[0][0]->harq_processes[0]->mcs), - UE->dlsch[eNB_id][0]); + UE->dlsch[subframe&0x1][eNB_id][0]); break; case 4: dlsch_16qam_llr_SIC(&UE->frame_parms, - UE->pdsch_vars[subframe&0x1][eNB_id]->rxdataF_comp1[UE->dlsch[0][0]->current_harq_pid][round_sic], + UE->pdsch_vars[subframe&0x1][eNB_id]->rxdataF_comp1[UE->dlsch[subframe&0x1][0][0]->current_harq_pid][round_sic], sic_buffer, - UE->pdsch_vars[subframe&0x1][eNB_id]->dl_ch_rho_ext[UE->dlsch[0][0]->current_harq_pid][round_sic], - UE->pdsch_vars[subframe&0x1][eNB_id]->llr[UE->dlsch[0][1]->harq_processes[UE->dlsch[0][1]->current_harq_pid]->codeword], + UE->pdsch_vars[subframe&0x1][eNB_id]->dl_ch_rho_ext[UE->dlsch[subframe&0x1][0][0]->current_harq_pid][round_sic], + UE->pdsch_vars[subframe&0x1][eNB_id]->llr[UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][1]->current_harq_pid]->codeword], num_pdcch_symbols, - UE->pdsch_vars[subframe&0x1][eNB_id]->dl_ch_mag1[UE->dlsch[0][0]->current_harq_pid][round_sic], + UE->pdsch_vars[subframe&0x1][eNB_id]->dl_ch_mag1[UE->dlsch[subframe&0x1][0][0]->current_harq_pid][round_sic], dlsch0_eNB_harq->nb_rb, subframe, dlsch0_eNB_harq->rb_alloc[0], get_Qm(eNB->dlsch[0][TB]->harq_processes[0]->mcs), - UE->dlsch[eNB_id][0]); + UE->dlsch[subframe&0x1][eNB_id][0]); break; case 6: dlsch_64qam_llr_SIC(&UE->frame_parms, - UE->pdsch_vars[subframe&0x1][eNB_id]->rxdataF_comp1[UE->dlsch[0][0]->current_harq_pid][round_sic], + UE->pdsch_vars[subframe&0x1][eNB_id]->rxdataF_comp1[UE->dlsch[subframe&0x1][0][0]->current_harq_pid][round_sic], sic_buffer, - UE->pdsch_vars[subframe&0x1][eNB_id]->dl_ch_rho_ext[UE->dlsch[0][0]->current_harq_pid][round_sic], - UE->pdsch_vars[subframe&0x1][eNB_id]->llr[UE->dlsch[0][1]->harq_processes[UE->dlsch[0][1]->current_harq_pid]->codeword], + UE->pdsch_vars[subframe&0x1][eNB_id]->dl_ch_rho_ext[UE->dlsch[subframe&0x1][0][0]->current_harq_pid][round_sic], + UE->pdsch_vars[subframe&0x1][eNB_id]->llr[UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][1]->current_harq_pid]->codeword], num_pdcch_symbols, - UE->pdsch_vars[subframe&0x1][eNB_id]->dl_ch_mag1[UE->dlsch[0][0]->current_harq_pid][round_sic], - UE->pdsch_vars[subframe&0x1][eNB_id]->dl_ch_magb1[UE->dlsch[0][0]->current_harq_pid][round_sic], + UE->pdsch_vars[subframe&0x1][eNB_id]->dl_ch_mag1[UE->dlsch[subframe&0x1][0][0]->current_harq_pid][round_sic], + UE->pdsch_vars[subframe&0x1][eNB_id]->dl_ch_magb1[UE->dlsch[subframe&0x1][0][0]->current_harq_pid][round_sic], dlsch0_eNB_harq->nb_rb, subframe, dlsch0_eNB_harq->rb_alloc[0], get_Qm(eNB->dlsch[0][0]->harq_processes[0]->mcs), - UE->dlsch[eNB_id][TB]); + UE->dlsch[subframe&0x1][eNB_id][TB]); break; } //}// rouns sic #ifdef DEBUG_HARQ - printf("[DLSIM] TB1 is mapped into CW%d\n", UE->dlsch[0][1]->harq_processes[UE->dlsch[0][1]->current_harq_pid]->codeword); + printf("[DLSIM] TB1 is mapped into CW%d\n", UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][1]->current_harq_pid]->codeword); #endif // write_output("rxdata_llr1.m","llr1", UE->pdsch_vars[eNB_id]->llr[1],re_allocated*2,1,0); // replace cw_sic with TB+1 - UE->dlsch[0][1]->rnti = (common_flag==0) ? n_rnti: SI_RNTI; + UE->dlsch[subframe&0x1][0][1]->rnti = (common_flag==0) ? n_rnti: SI_RNTI; coded_bits_per_codeword[1]= get_G(&eNB->frame_parms, eNB->dlsch[0][1]->harq_processes[0]->nb_rb, eNB->dlsch[0][1]->harq_processes[0]->rb_alloc, @@ -4162,12 +4162,12 @@ int main(int argc, char **argv) subframe, transmission_mode>=7?transmission_mode:0); - UE->dlsch[0][1]->harq_processes[UE->dlsch[0][1]->current_harq_pid]->G = coded_bits_per_codeword[1]; - UE->dlsch[0][1]->harq_processes[UE->dlsch[0][1]->current_harq_pid]->Qm = get_Qm(eNB->dlsch[0][1]->harq_processes[0]->mcs); + UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][1]->current_harq_pid]->G = coded_bits_per_codeword[1]; + UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][1]->current_harq_pid]->Qm = get_Qm(eNB->dlsch[0][1]->harq_processes[0]->mcs); if (n_frames==2) { printf("Kmimo=%d, cw=%d, G=%d, TBS=%d\n",Kmimo,1,coded_bits_per_codeword[1], - UE->dlsch[0][1]->harq_processes[UE->dlsch[0][1]->current_harq_pid]->TBS); + UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][1]->current_harq_pid]->TBS); // calculate uncoded BER uncoded_ber_bit = (short*) malloc(sizeof(short)*coded_bits_per_codeword[1]); @@ -4181,7 +4181,7 @@ int main(int argc, char **argv) uncoded_ber=0; printf("trials=%d\n", trials); for (i=0;idlsch[0][1]->harq_processes[0]->e[i] != (UE->pdsch_vars[subframe&0x1][0]->llr[UE->dlsch[0][1]->harq_processes[UE->dlsch[0][1]->current_harq_pid]->codeword][i]<0)) { + if (eNB->dlsch[0][1]->harq_processes[0]->e[i] != (UE->pdsch_vars[subframe&0x1][0]->llr[UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][1]->current_harq_pid]->codeword][i]<0)) { uncoded_ber_bit[i] = 1; uncoded_ber++; } @@ -4201,9 +4201,9 @@ int main(int argc, char **argv) start_meas(&UE->dlsch_unscrambling_stats); dlsch_unscrambling(&UE->frame_parms, 0, - UE->dlsch[0][1], + UE->dlsch[subframe&0x1][0][1], coded_bits_per_codeword[1], - UE->pdsch_vars[subframe&0x1][eNB_id]->llr[UE->dlsch[0][1]->harq_processes[UE->dlsch[0][1]->current_harq_pid]->codeword], + UE->pdsch_vars[subframe&0x1][eNB_id]->llr[UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][1]->current_harq_pid]->codeword], 1, subframe<<1); stop_meas(&UE->dlsch_unscrambling_stats); @@ -4211,13 +4211,13 @@ int main(int argc, char **argv) start_meas(&UE->dlsch_decoding_stats); ret[1] = dlsch_decoding(UE, - UE->pdsch_vars[subframe&0x1][eNB_id]->llr[UE->dlsch[0][1]->harq_processes[UE->dlsch[0][1]->current_harq_pid]->codeword], + UE->pdsch_vars[subframe&0x1][eNB_id]->llr[UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][1]->current_harq_pid]->codeword], &UE->frame_parms, - UE->dlsch[0][1], - UE->dlsch[0][1]->harq_processes[UE->dlsch[0][1]->current_harq_pid], + UE->dlsch[subframe&0x1][0][1], + UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][1]->current_harq_pid], 0, subframe, - UE->dlsch[0][1]->current_harq_pid, + UE->dlsch[subframe&0x1][0][1]->current_harq_pid, 1,llr8_flag); stop_meas(&UE->dlsch_decoding_stats); @@ -4227,7 +4227,7 @@ int main(int argc, char **argv) //printf("ret TB 1 = %d round %d \n", ret[1], round); - if (ret[1] <=UE->dlsch[0][0]->max_turbo_iterations ) { + if (ret[1] <=UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations ) { decoded_in_sic[round]++; round_sic = round+1; // to exit round_sic #ifdef DEBUG_HARQ @@ -4241,19 +4241,19 @@ int main(int argc, char **argv) printf("cw sic %d, round %d: No DLSCH errors found, uncoded ber %f\n",1,round,uncoded_ber); #ifdef PRINT_BYTES - for (s=0;sdlsch[0][1]->harq_processes[0]->C;s++) { - if (sdlsch[0][1]->harq_processes[0]->Cminus) - Kr = UE->dlsch[0][1]->harq_processes[0]->Kminus; + for (s=0;sdlsch[subframe&0x1][0][1]->harq_processes[0]->C;s++) { + if (sdlsch[subframe&0x1][0][1]->harq_processes[0]->Cminus) + Kr = UE->dlsch[subframe&0x1][0][1]->harq_processes[0]->Kminus; else - Kr = UE->dlsch[0][1]->harq_processes[0]->Kplus; + Kr = UE->dlsch[subframe&0x1][0][1]->harq_processes[0]->Kplus; Kr_bytes = Kr>>3; printf("Decoded_output (Segment %d):\n",s); for (i=0;idlsch[0][1]->harq_processes[0]->c[s][i], - UE->dlsch[0][1]->harq_processes[0]->c[s][i]^eNB->dlsch[0][1]->harq_processes[0]->c[s][i]); + printf("%d : %x (%x)\n",i,UE->dlsch[subframe&0x1][0][1]->harq_processes[0]->c[s][i], + UE->dlsch[subframe&0x1][0][1]->harq_processes[0]->c[s][i]^eNB->dlsch[0][1]->harq_processes[0]->c[s][i]); } #endif } @@ -4261,7 +4261,7 @@ int main(int argc, char **argv) } //round_sic - if (ret[1] > UE->dlsch[0][0]->max_turbo_iterations ){ + if (ret[1] > UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations ){ errs[1][round]++; #ifdef DEBUG_HARQ printf("[DLSIM] TB1 is not decoded in SIC loop, errs[TB1][round %d] = %d\n",round, errs[1][round]); @@ -4276,23 +4276,23 @@ int main(int argc, char **argv) //if ((n_frames==1) || (SNR>=30)) { printf("cw sic %d, round %d: DLSCH errors found, uncoded ber %f\n",1,round,uncoded_ber); #ifdef PRINT_BYTES - for (s=0;sdlsch[0][1]->harq_processes[0]->C;s++) { - if (sdlsch[0][1]->harq_processes[0]->Cminus) - Kr = UE->dlsch[0][1]->harq_processes[0]->Kminus; + for (s=0;sdlsch[subframe&0x1][0][1]->harq_processes[0]->C;s++) { + if (sdlsch[subframe&0x1][0][1]->harq_processes[0]->Cminus) + Kr = UE->dlsch[subframe&0x1][0][1]->harq_processes[0]->Kminus; else - Kr = UE->dlsch[0][1]->harq_processes[0]->Kplus; + Kr = UE->dlsch[subframe&0x1][0][1]->harq_processes[0]->Kplus; Kr_bytes = Kr>>3; printf("Decoded_output (Segment %d):\n",s); for (i=0;idlsch[0][1]->harq_processes[0]->c[s][i], - UE->dlsch[0][1]->harq_processes[0]->c[s][i]^eNB->dlsch[0][1]->harq_processes[0]->c[s][i]); + printf("%d : %x (%x)\n",i,UE->dlsch[subframe&0x1][0][1]->harq_processes[0]->c[s][i], + UE->dlsch[subframe&0x1][0][1]->harq_processes[0]->c[s][i]^eNB->dlsch[0][1]->harq_processes[0]->c[s][i]); } #endif } //n_frames==1 // exit(0); - } //if (ret > UE->dlsch[0][1]->max_turbo_iterations ) + } //if (ret > UE->dlsch[subframe&0x1][0][1]->max_turbo_iterations ) }//if SIC } else { @@ -4307,8 +4307,8 @@ int main(int argc, char **argv) iter_trials[0]++; }*/ - if ((UE->dlsch[eNB_id][0]->harq_processes[UE->dlsch[eNB_id][0]->current_harq_pid]->mimo_mode >=DUALSTREAM_UNIFORM_PRECODING1) && - (UE->dlsch[eNB_id][0]->harq_processes[UE->dlsch[eNB_id][0]->current_harq_pid]->mimo_mode <=DUALSTREAM_PUSCH_PRECODING) && + if ((UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]->mimo_mode >=DUALSTREAM_UNIFORM_PRECODING1) && + (UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]->mimo_mode <=DUALSTREAM_PUSCH_PRECODING) && (rx_type==rx_SIC_dual_stream) && (TB0_active ==1)) { errs[1][round]++; #ifdef DEBUG_HARQ @@ -4327,18 +4327,18 @@ int main(int argc, char **argv) //if ((n_frames==1) || (SNR>=30)) { printf("cw %d, round %d: DLSCH errors found, uncoded ber %f\n",TB,round,uncoded_ber); #ifdef PRINT_BYTES - for (s=0;sdlsch[0][TB]->harq_processes[0]->C;s++) { - if (sdlsch[0][TB]->harq_processes[0]->Cminus) - Kr = UE->dlsch[0][TB]->harq_processes[0]->Kminus; + for (s=0;sdlsch[subframe&0x1][0][TB]->harq_processes[0]->C;s++) { + if (sdlsch[subframe&0x1][0][TB]->harq_processes[0]->Cminus) + Kr = UE->dlsch[subframe&0x1][0][TB]->harq_processes[0]->Kminus; else - Kr = UE->dlsch[0][TB]->harq_processes[0]->Kplus; + Kr = UE->dlsch[subframe&0x1][0][TB]->harq_processes[0]->Kplus; Kr_bytes = Kr>>3; printf("Decoded_output (Segment %d):\n",s); for (i=0;idlsch[0][TB]->harq_processes[0]->c[s][i], - UE->dlsch[0][TB]->harq_processes[0]->c[s][i]^eNB->dlsch[0][TB]->harq_processes[0]->c[s][i]); + printf("%d : %x (%x)\n",i,UE->dlsch[subframe&0x1][0][TB]->harq_processes[0]->c[s][i], + UE->dlsch[subframe&0x1][0][TB]->harq_processes[0]->c[s][i]^eNB->dlsch[0][TB]->harq_processes[0]->c[s][i]); } #endif } @@ -4347,7 +4347,7 @@ int main(int argc, char **argv) TB++; // to terminate the loop over TB } - stop_meas(&UE->phy_proc_rx); + stop_meas(&UE->phy_proc_rx[subframe&0x1]); if (n_frames==1) { @@ -4410,12 +4410,12 @@ int main(int argc, char **argv) UE->frame_parms.ofdm_symbol_size*nsymb,1,1); } //pdsch_vars - dump_dlsch2(UE,eNB_id,subframe,coded_bits_per_codeword,round, UE->dlsch[0][0]->current_harq_pid); + dump_dlsch2(UE,eNB_id,subframe,coded_bits_per_codeword,round, UE->dlsch[subframe&0x1][0][0]->current_harq_pid); /* write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4); write_output("dlsch_ber_bit.m","ber_bit",uncoded_ber_bit,coded_bits_per_codeword,1,0); write_output("dlsch_eNB_w.m","w",eNB->dlsch[0][0]->harq_processes[0]->w[0],3*(tbs+64),1,4); - write_output("dlsch_UE_w.m","w",UE->dlsch[0][0]->harq_processes[0]->w[0],3*(tbs+64),1,0); + write_output("dlsch_UE_w.m","w",UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->w[0],3*(tbs+64),1,0); */ //pdcch_vars @@ -4439,15 +4439,15 @@ int main(int argc, char **argv) printf("[DLSIM] Errors errs[TB0][round %d] = %d, errs[TB1][round %d] = %d\n ", round, errs[0][round], round, errs[1][round]); #endif - if ((transmission_mode != 3) && (transmission_mode !=4) && (ret[0] > UE->dlsch[0][0]->max_turbo_iterations)){ + if ((transmission_mode != 3) && (transmission_mode !=4) && (ret[0] > UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations)){ //printf("flag 1 \n"); round++; } if (transmission_mode == 3 || transmission_mode == 4 ) { - if (ret[0] > UE->dlsch[0][0]->max_turbo_iterations && - ret[1] > UE->dlsch[0][0]->max_turbo_iterations){ + if (ret[0] > UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations && + ret[1] > UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations){ resend_both[round]++; round++; resend_cw0_cw1=1; //resend both cws @@ -4455,8 +4455,8 @@ int main(int argc, char **argv) TB0_active=1; TB1_active=1; } - else if (ret[1] > UE->dlsch[0][0]->max_turbo_iterations && - ret[0] <= UE->dlsch[0][0]->max_turbo_iterations){ + else if (ret[1] > UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations && + ret[0] <= UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations){ resend_one[round]++; resend_cw0_cw1=0; TB0_active=0; @@ -4476,8 +4476,8 @@ int main(int argc, char **argv) #endif round++; } - else if (ret[0] > UE->dlsch[0][0]->max_turbo_iterations && - ret[1] <= UE->dlsch[0][0]->max_turbo_iterations){ + else if (ret[0] > UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations && + ret[1] <= UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations){ resend_one[round]++; resend_cw0_cw1=0; TB0_active=1; @@ -4531,7 +4531,7 @@ int main(int argc, char **argv) double t_tx_enc = (double)eNB->dlsch_encoding_stats.p_time/cpu_freq_GHz/1000.0; - double t_rx = (double)UE->phy_proc_rx.p_time/cpu_freq_GHz/1000.0; + double t_rx = (double)UE->phy_proc_rx[subframe&0x1].p_time/cpu_freq_GHz/1000.0; double t_rx_fft = (double)UE->ofdm_demod_stats.p_time/cpu_freq_GHz/1000.0; double t_rx_demod = (double)UE->dlsch_rx_pdcch_stats.p_time/cpu_freq_GHz/1000.0; double t_rx_dec = (double)UE->dlsch_decoding_stats.p_time/cpu_freq_GHz/1000.0; @@ -4796,7 +4796,7 @@ int main(int argc, char **argv) rate[0]*effective_rate, 100*effective_rate, rate[0], - rate[0]*get_Qm(UE->dlsch[0][0]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->mcs), + rate[0]*get_Qm(UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->mcs), (1.0*(round_trials[0][0]-errs[0][0])+2.0*(round_trials[0][1]-errs[0][1])+3.0*(round_trials[0][2]-errs[0][2])+ 4.0*(round_trials[0][3]-errs[0][3]))/((double)round_trials[0][0])/(double)eNB->dlsch[0][0]->harq_processes[0]->TBS, (1.0*(round_trials[0][0]-errs[0][0])+2.0*(round_trials[0][1]-errs[0][1])+3.0*(round_trials[0][2]-errs[0][2]) @@ -4864,10 +4864,10 @@ int main(int argc, char **argv) eNB->dlsch_interleaving_stats.diff/eNB->dlsch_interleaving_stats.trials/cpu_freq_GHz/1000.0,eNB->dlsch_interleaving_stats.trials); printf("\n\nUE RX function statistics (per 1ms subframe)\n\n"); - std_phy_proc_rx = sqrt((double)UE->phy_proc_rx.diff_square/pow(cpu_freq_GHz,2)/pow(1000, - 2)/UE->phy_proc_rx.trials - pow((double)UE->phy_proc_rx.diff/UE->phy_proc_rx.trials/cpu_freq_GHz/1000,2)); - printf("Total PHY proc rx :%f us (%d trials)\n",(double)UE->phy_proc_rx.diff/UE->phy_proc_rx.trials/cpu_freq_GHz/1000.0, - UE->phy_proc_rx.trials*2/3); + std_phy_proc_rx = sqrt((double)UE->phy_proc_rx[subframe&0x1].diff_square/pow(cpu_freq_GHz,2)/pow(1000, + 2)/UE->phy_proc_rx[subframe&0x1].trials - pow((double)UE->phy_proc_rx[subframe&0x1].diff/UE->phy_proc_rx[subframe&0x1].trials/cpu_freq_GHz/1000,2)); + printf("Total PHY proc rx :%f us (%d trials)\n",(double)UE->phy_proc_rx[subframe&0x1].diff/UE->phy_proc_rx[subframe&0x1].trials/cpu_freq_GHz/1000.0, + UE->phy_proc_rx[subframe&0x1].trials*2/3); printf("|__Statistcs std: %fus max: %fus min: %fus median %fus q1 %fus q3 %fus n_dropped: %d packet \n", std_phy_proc_rx, t_rx_max, t_rx_min, rx_median, rx_q1, rx_q3, n_rx_dropped); std_phy_proc_rx_fft = sqrt((double)UE->ofdm_demod_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000, @@ -4901,7 +4901,7 @@ int main(int argc, char **argv) printf("|__ DLSCH Rate Unmatching :%f us (%d trials)\n", (double)UE->dlsch_rate_unmatching_stats.diff/UE->dlsch_rate_unmatching_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_rate_unmatching_stats.trials); printf("|__ DLSCH Turbo Decoding(%d bits) :%f us (%d trials)\n", - UE->dlsch[0][0]->harq_processes[0]->Cminus ? UE->dlsch[0][0]->harq_processes[0]->Kminus : UE->dlsch[0][0]->harq_processes[0]->Kplus, + UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Cminus ? UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Kminus : UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Kplus, (double)UE->dlsch_turbo_decoding_stats.diff/UE->dlsch_turbo_decoding_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_turbo_decoding_stats.trials); printf(" |__ init %f us (cycles/iter %f, %d trials)\n", (double)UE->dlsch_tc_init_stats.diff/UE->dlsch_tc_init_stats.trials/cpu_freq_GHz/1000.0, @@ -5189,7 +5189,7 @@ int main(int argc, char **argv) eNB->dlsch_modulation_stats.trials, eNB->dlsch_scrambling_stats.trials, eNB->dlsch_encoding_stats.trials, - UE->phy_proc_rx.trials, + UE->phy_proc_rx[subframe&0x1].trials, UE->ofdm_demod_stats.trials, UE->dlsch_rx_pdcch_stats.trials, UE->dlsch_llr_stats.trials, @@ -5202,7 +5202,7 @@ int main(int argc, char **argv) get_time_meas_us(&eNB->dlsch_modulation_stats), get_time_meas_us(&eNB->dlsch_scrambling_stats), get_time_meas_us(&eNB->dlsch_encoding_stats), - get_time_meas_us(&UE->phy_proc_rx), + get_time_meas_us(&UE->phy_proc_rx[subframe&0x1]), nsymb*get_time_meas_us(&UE->ofdm_demod_stats), get_time_meas_us(&UE->dlsch_rx_pdcch_stats), 3*get_time_meas_us(&UE->dlsch_llr_stats), @@ -5326,7 +5326,7 @@ int main(int argc, char **argv) free_eNB_dlsch(eNB->dlsch[0][i]); printf("UE %d\n",i); - free_ue_dlsch(UE->dlsch[0][i]); + free_ue_dlsch(UE->dlsch[subframe&0x1][0][i]); } diff --git a/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c b/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c index 195f27f72e..6c306d6d46 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c @@ -953,14 +953,14 @@ int main(int argc, char **argv) } for (i=0; i<2; i++) { - UE->dlsch[0][i] = new_ue_dlsch(Kmimo,8,Nsoft,MAX_TURBO_ITERATIONS,N_RB_DL,0); + UE->dlsch[subframe&0x1][0][i] = new_ue_dlsch(Kmimo,8,Nsoft,MAX_TURBO_ITERATIONS,N_RB_DL,0); - if (!UE->dlsch[0][i]) { + if (!UE->dlsch[subframe&0x1][0][i]) { printf("Can't get ue dlsch structures\n"); exit(-1); } - UE->dlsch[0][i]->rnti = n_rnti; + UE->dlsch[subframe&0x1][0][i]->rnti = n_rnti; } // structure for SIC at UE @@ -2069,7 +2069,7 @@ int main(int argc, char **argv) reset_meas(&eNB->dlsch_rate_matching_stats); reset_meas(&eNB->dlsch_turbo_encoding_stats); - reset_meas(&UE->phy_proc_rx); // total UE rx + reset_meas(&UE->phy_proc_rx[subframe&0x1]); // total UE rx reset_meas(&UE->ofdm_demod_stats); reset_meas(&UE->dlsch_channel_estimation_stats); reset_meas(&UE->dlsch_freq_offset_estimation_stats); @@ -2112,9 +2112,9 @@ int main(int argc, char **argv) //if (trials%100==0) eNB2UE[0]->first_run = 1; - ret = UE->dlsch[0][0]->max_turbo_iterations+1; + ret = UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations+1; - while ((round < num_rounds) && (ret > UE->dlsch[0][0]->max_turbo_iterations)) { + while ((round < num_rounds) && (ret > UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations)) { //printf("Trial %d, round %d\n",trials,round); round_trials[round]++; @@ -2601,7 +2601,7 @@ PMI_FEEDBACK: // use the PMI from previous trial if (DLSCH_alloc_pdu2_1E[0].tpmi == 5) { eNB->dlsch[0][0]->harq_processes[0]->pmi_alloc = quantize_subband_pmi(&UE->measurements,0,eNB->frame_parms.N_RB_DL); - UE->dlsch[0][0]->harq_processes[0]->pmi_alloc = quantize_subband_pmi(&UE->measurements,0,UE->frame_parms.N_RB_DL); + UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->pmi_alloc = quantize_subband_pmi(&UE->measurements,0,UE->frame_parms.N_RB_DL); if (n_users>1) eNB->dlsch[1][0]->harq_processes[0]->pmi_alloc = (eNB->dlsch[0][0]->harq_processes[0]->pmi_alloc ^ 0x1555); @@ -3059,7 +3059,7 @@ PMI_FEEDBACK: } - start_meas(&UE->phy_proc_rx); + start_meas(&UE->phy_proc_rx[subframe&0x1]); // Inner receiver scheduling for 3 slots @@ -3227,7 +3227,7 @@ PMI_FEEDBACK: for (i=0; idlsch[0][0]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->first_tx=1; + if (round == 0) UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->first_tx=1; if ((dci_alloc_rx[i].rnti == n_rnti) && (generate_ue_dlsch_params_from_dci(0, @@ -3235,7 +3235,7 @@ PMI_FEEDBACK: dci_alloc_rx[i].dci_pdu, dci_alloc_rx[i].rnti, dci_alloc_rx[i].format, - UE->dlsch[0], + UE->dlsch[subframe&0x1][0], &UE->frame_parms, UE->pdsch_config_dedicated, SI_RNTI, @@ -3244,23 +3244,23 @@ PMI_FEEDBACK: transmission_mode<7?0:transmission_mode))) { //dump_dci(&UE->frame_parms,&dci_alloc_rx[i]); coded_bits_per_codeword = get_G(&eNB->frame_parms, - UE->dlsch[0][0]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->nb_rb, - UE->dlsch[0][0]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->rb_alloc_even, - get_Qm(UE->dlsch[0][0]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->mcs), - UE->dlsch[0][0]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->Nl, + UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->nb_rb, + UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->rb_alloc_even, + get_Qm(UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->mcs), + UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->Nl, UE->pdcch_vars[0]->num_pdcch_symbols, 0, subframe, (transmission_mode<7?0:transmission_mode)); /*if (transmission_mode==7 && common_flag==0) - UE->dlsch[0][0]->harq_processes[0]->mimo_mode = TM7; */ + UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->mimo_mode = TM7; */ /* - rate = (double)dlsch_tbs25[get_I_TBS(UE->dlsch[0][0]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->mcs)][UE->dlsch[0][0]->nb_rb-1]/(coded_bits_per_codeword); - rate*=get_Qm(UE->dlsch[0][0]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->mcs); + rate = (double)dlsch_tbs25[get_I_TBS(UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->mcs)][UE->dlsch[subframe&0x1][0][0]->nb_rb-1]/(coded_bits_per_codeword); + rate*=get_Qm(UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->mcs); */ printf("num_pdcch_symbols %d, G %d, TBS %d\n",UE->pdcch_vars[0]->num_pdcch_symbols,coded_bits_per_codeword, - UE->dlsch[0][0]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->TBS); + UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->TBS); dlsch_active = 1; } else { @@ -3288,7 +3288,7 @@ PMI_FEEDBACK: UE->pdcch_vars[0]->crnti = n_rnti; UE->pdcch_vars[0]->num_pdcch_symbols = num_pdcch_symbols; - if (round == 0) UE->dlsch[0][0]->harq_processes[0]->first_tx=1; + if (round == 0) UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->first_tx=1; switch (transmission_mode) { case 1: @@ -3299,7 +3299,7 @@ PMI_FEEDBACK: &DLSCH_alloc_pdu_1[0], (common_flag==0)? C_RNTI : SI_RNTI, (common_flag==0)? format1 : format1A, - UE->dlsch[0], + UE->dlsch[subframe&0x1][0], &UE->frame_parms, UE->pdsch_config_dedicated, SI_RNTI, @@ -3307,24 +3307,24 @@ PMI_FEEDBACK: P_RNTI, transmission_mode<7?0:transmission_mode); /*if(transmission_mode==7 && common_flag==0) - UE->dlsch[0][0]->harq_processes[0]->mimo_mode = TM7;*/ + UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->mimo_mode = TM7;*/ break; case 3: - // printf("Rate: TM3 (before) round %d (%d) first_tx %d\n",round,UE->dlsch[0][0]->harq_processes[0]->round,UE->dlsch[0][0]->harq_processes[0]->first_tx); + // printf("Rate: TM3 (before) round %d (%d) first_tx %d\n",round,UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->round,UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->first_tx); generate_ue_dlsch_params_from_dci(0, subframe, &DLSCH_alloc_pdu_1[0], (common_flag==0)? C_RNTI : SI_RNTI, (common_flag==0)? format2A : format1A, - UE->dlsch[0], + UE->dlsch[subframe&0x1][0], &UE->frame_parms, UE->pdsch_config_dedicated, SI_RNTI, 0, P_RNTI, 0); - // printf("Rate: TM3 (after) round %d (%d) first_tx %d\n",round,UE->dlsch[0][0]->harq_processes[0]->round,UE->dlsch[0][0]->harq_processes[0]->first_tx); + // printf("Rate: TM3 (after) round %d (%d) first_tx %d\n",round,UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->round,UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->first_tx); break; case 4: @@ -3333,7 +3333,7 @@ PMI_FEEDBACK: &DLSCH_alloc_pdu_1[0], (common_flag==0)? C_RNTI : SI_RNTI, (common_flag==0)? format2 : format1A, - UE->dlsch[0], + UE->dlsch[subframe&0x1][0], &UE->frame_parms, UE->pdsch_config_dedicated, SI_RNTI, @@ -3349,7 +3349,7 @@ PMI_FEEDBACK: &DLSCH_alloc_pdu2_1E[0], C_RNTI, format1E_2A_M10PRB, - UE->dlsch[0], + UE->dlsch[subframe&0x1][0], &UE->frame_parms, UE->pdsch_config_dedicated, SI_RNTI, @@ -3381,7 +3381,7 @@ PMI_FEEDBACK: if ((Ns==(1+(2*subframe))) && (l==0)) {// process PDSCH symbols 1,2,3,4,5,(6 Normal Prefix) if ((transmission_mode == 5) && - (UE->dlsch[eNB_id][0]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->dl_power_off==0) && + (UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->dl_power_off==0) && (UE->use_ia_receiver ==1)) { dual_stream_UE = 1; } else { @@ -3404,7 +3404,7 @@ PMI_FEEDBACK: (m==UE->pdcch_vars[0]->num_pdcch_symbols)?1:0, dual_stream_UE, i_mod, - UE->dlsch[0][0]->current_harq_pid)==-1) { + UE->dlsch[subframe&0x1][0][0]->current_harq_pid)==-1) { dlsch_active = 0; break; } @@ -3430,7 +3430,7 @@ PMI_FEEDBACK: 0, dual_stream_UE, i_mod, - UE->dlsch[0][0]->current_harq_pid)==-1) { + UE->dlsch[subframe&0x1][0][0]->current_harq_pid)==-1) { dlsch_active=0; break; } @@ -3456,7 +3456,7 @@ PMI_FEEDBACK: 0, dual_stream_UE, i_mod, - UE->dlsch[0][0]->current_harq_pid)==-1) { + UE->dlsch[subframe&0x1][0][0]->current_harq_pid)==-1) { dlsch_active=0; break; } @@ -3534,7 +3534,7 @@ PMI_FEEDBACK: } for (int cw=Kmimo-1; cw>=0; cw--) { - UE->dlsch[0][cw]->rnti = (common_flag==0) ? n_rnti: SI_RNTI; + UE->dlsch[subframe&0x1][0][cw]->rnti = (common_flag==0) ? n_rnti: SI_RNTI; coded_bits_per_codeword = get_G(&eNB->frame_parms, eNB->dlsch[0][cw]->harq_processes[0]->nb_rb, eNB->dlsch[0][cw]->harq_processes[0]->rb_alloc, @@ -3545,7 +3545,7 @@ PMI_FEEDBACK: subframe, (transmission_mode<7?0:transmission_mode)); - UE->dlsch[0][cw]->harq_processes[UE->dlsch[0][cw]->current_harq_pid]->G = coded_bits_per_codeword; + UE->dlsch[subframe&0x1][0][cw]->harq_processes[UE->dlsch[subframe&0x1][0][cw]->current_harq_pid]->G = coded_bits_per_codeword; @@ -3569,7 +3569,7 @@ PMI_FEEDBACK: start_meas(&UE->dlsch_unscrambling_stats); dlsch_unscrambling(&UE->frame_parms, 0, - UE->dlsch[0][cw], + UE->dlsch[subframe&0x1][0][cw], coded_bits_per_codeword, UE->pdsch_vars[subframe&0x1][eNB_id]->llr[cw], 0, @@ -3580,15 +3580,15 @@ PMI_FEEDBACK: ret = dlsch_decoding(UE, UE->pdsch_vars[subframe&0x1][eNB_id]->llr[cw], &UE->frame_parms, - UE->dlsch[0][cw], - UE->dlsch[0][cw]->harq_processes[UE->dlsch[0][cw]->current_harq_pid], + UE->dlsch[subframe&0x1][0][cw], + UE->dlsch[subframe&0x1][0][cw]->harq_processes[UE->dlsch[subframe&0x1][0][cw]->current_harq_pid], subframe, - UE->dlsch[0][cw]->current_harq_pid, + UE->dlsch[subframe&0x1][0][cw]->current_harq_pid, 1,llr8_flag); stop_meas(&UE->dlsch_decoding_stats); if (cw==1) { - if (ret <= UE->dlsch[0][cw]->max_turbo_iterations) { + if (ret <= UE->dlsch[subframe&0x1][0][cw]->max_turbo_iterations) { } else { errs2[round]++; } @@ -3596,10 +3596,10 @@ PMI_FEEDBACK: } - stop_meas(&UE->phy_proc_rx); + stop_meas(&UE->phy_proc_rx[subframe&0x1]); - if (ret <= UE->dlsch[0][0]->max_turbo_iterations) { + if (ret <= UE->dlsch[subframe&0x1][0][0]->max_turbo_iterations) { avg_iter += ret; iter_trials++; @@ -3607,15 +3607,15 @@ PMI_FEEDBACK: if (n_frames==1) printf("No DLSCH errors found (round %d),uncoded ber %f\n",round,uncoded_ber); - UE->total_TBS[eNB_id] = UE->total_TBS[eNB_id] + UE->dlsch[eNB_id][0]->harq_processes[UE->dlsch[eNB_id][0]->current_harq_pid]->TBS; + UE->total_TBS[eNB_id] = UE->total_TBS[eNB_id] + UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]->TBS; TB0_active = 0; - if (UE->dlsch[eNB_id][0]->harq_processes[UE->dlsch[eNB_id][0]->current_harq_pid]->mimo_mode == LARGE_CDD) { //try to decode second stream using SIC + if (UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]->mimo_mode == LARGE_CDD) { //try to decode second stream using SIC /* - for (round = 0 ; round < UE->dlsch[eNB_id][0]->harq_processes[UE->dlsch[eNB_id][0]->current_harq_pid]->round ; round++) { + for (round = 0 ; round < UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]->round ; round++) { // re-encoding of first stream - dlsch0_ue_harq = UE->dlsch[eNB_id][0]->harq_processes[UE->dlsch[eNB_id][0]->current_harq_pid]; - dlsch0_eNB_harq = UE->dlsch[eNB_id]->harq_processes[UE->dlsch[eNB_id][0]->current_harq_pid]; + dlsch0_ue_harq = UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]; + dlsch0_eNB_harq = UE->dlsch[subframe&0x1][eNB_id]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]; dlsch0_eNB_harq->mimo_mode = LARGE_CDD; dlsch0_eNB_harq->rb_alloc[0] = dlsch0_ue_harq->rb_alloc_even[0]; dlsch0_eNB_harq->nb_rb = dlsch0_ue_harq->nb_rb; @@ -3627,13 +3627,13 @@ PMI_FEEDBACK: dlsch0_eNB_harq->dl_power_off = dlsch0_ue_harq->dl_power_off; dlsch0_eNB_harq->status = dlsch0_ue_harq->status; - UE->dlsch[eNB_id]->active = UE->dlsch[eNB_id][0]->active; - UE->dlsch[eNB_id]->rnti = UE->dlsch[eNB_id][0]->rnti; + UE->dlsch[subframe&0x1][eNB_id]->active = UE->dlsch[subframe&0x1][eNB_id][0]->active; + UE->dlsch[subframe&0x1][eNB_id]->rnti = UE->dlsch[subframe&0x1][eNB_id][0]->rnti; - dlsch_encoding(UE->dlsch[eNB_id][0]->harq_processes[UE->dlsch[eNB_id][0]->current_harq_pid]->b, + dlsch_encoding(UE->dlsch[subframe&0x1][eNB_id][0]->harq_processes[UE->dlsch[subframe&0x1][eNB_id][0]->current_harq_pid]->b, &UE->frame_parms, num_pdcch_symbols, - UE->dlsch[0], + UE->dlsch[subframe&0x1][0], 0,subframe, &UE->dlsch_rate_matching_stats, &UE->dlsch_turbo_encoding_stats, @@ -3660,18 +3660,18 @@ PMI_FEEDBACK: //if ((n_frames==1) || (SNR>=30)) printf("DLSCH errors found (round %d), uncoded ber %f\n",round,uncoded_ber); - for (s=0; sdlsch[0][0]->harq_processes[0]->C; s++) { - if (sdlsch[0][0]->harq_processes[0]->Cminus) - Kr = UE->dlsch[0][0]->harq_processes[0]->Kminus; + for (s=0; sdlsch[subframe&0x1][0][0]->harq_processes[0]->C; s++) { + if (sdlsch[subframe&0x1][0][0]->harq_processes[0]->Cminus) + Kr = UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Kminus; else - Kr = UE->dlsch[0][0]->harq_processes[0]->Kplus; + Kr = UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Kplus; Kr_bytes = Kr>>3; printf("Decoded_output (Segment %d):\n",s); for (i=0; idlsch[0][0]->harq_processes[0]->c[s][i],UE->dlsch[0][0]->harq_processes[0]->c[s][i]^eNB->dlsch[0][0]->harq_processes[0]->c[s][i]); + printf("%d : %x (%x)\n",i,UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->c[s][i],UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->c[s][i]^eNB->dlsch[0][0]->harq_processes[0]->c[s][i]); } sprintf(fname,"rxsig0_r%d.m",round); @@ -3726,7 +3726,7 @@ PMI_FEEDBACK: write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4); write_output("dlsch_ber_bit.m","ber_bit",uncoded_ber_bit,coded_bits_per_codeword,1,0); write_output("dlsch_w.m","w",eNB->dlsch[0][0]->harq_processes[0]->w[0],3*(tbs+64),1,4); - write_output("dlsch_w.m","w",UE->dlsch[0][0]->harq_processes[0]->w[0],3*(tbs+64),1,0); + write_output("dlsch_w.m","w",UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->w[0],3*(tbs+64),1,0); */ if (round == 3) exit(-1); @@ -3735,7 +3735,7 @@ PMI_FEEDBACK: // printf("round %d errors %d/%d\n",round,errs[round],trials); round++; - // UE->dlsch[0][0]->harq_processes[0]->round++; + // UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->round++; } if (xforms==1) { @@ -3775,7 +3775,7 @@ PMI_FEEDBACK: double t_tx_enc = (double)eNB->dlsch_encoding_stats.p_time/cpu_freq_GHz/1000.0; - double t_rx = (double)UE->phy_proc_rx.p_time/cpu_freq_GHz/1000.0; + double t_rx = (double)UE->phy_proc_rx[subframe&0x1].p_time/cpu_freq_GHz/1000.0; double t_rx_fft = (double)UE->ofdm_demod_stats.p_time/cpu_freq_GHz/1000.0; double t_rx_demod = (double)UE->dlsch_rx_pdcch_stats.p_time/cpu_freq_GHz/1000.0; double t_rx_dec = (double)UE->dlsch_decoding_stats.p_time/cpu_freq_GHz/1000.0; @@ -3925,7 +3925,7 @@ PMI_FEEDBACK: rate*effective_rate, 100*effective_rate, rate, - rate*get_Qm(UE->dlsch[0][0]->harq_processes[UE->dlsch[0][0]->current_harq_pid]->mcs), + rate*get_Qm(UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->mcs), (1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0])/ (double)eNB->dlsch[0][0]->harq_processes[0]->TBS, (1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0])); @@ -3964,10 +3964,10 @@ PMI_FEEDBACK: eNB->dlsch_interleaving_stats.diff/eNB->dlsch_interleaving_stats.trials/cpu_freq_GHz/1000.0,eNB->dlsch_interleaving_stats.trials); printf("\n\nUE RX function statistics (per 1ms subframe)\n\n"); - std_phy_proc_rx = sqrt((double)UE->phy_proc_rx.diff_square/pow(cpu_freq_GHz,2)/pow(1000, - 2)/UE->phy_proc_rx.trials - pow((double)UE->phy_proc_rx.diff/UE->phy_proc_rx.trials/cpu_freq_GHz/1000,2)); - printf("Total PHY proc rx :%f us (%d trials)\n",(double)UE->phy_proc_rx.diff/UE->phy_proc_rx.trials/cpu_freq_GHz/1000.0, - UE->phy_proc_rx.trials*2/3); + std_phy_proc_rx = sqrt((double)UE->phy_proc_rx[subframe&0x1].diff_square/pow(cpu_freq_GHz,2)/pow(1000, + 2)/UE->phy_proc_rx[subframe&0x1].trials - pow((double)UE->phy_proc_rx[subframe&0x1].diff/UE->phy_proc_rx[subframe&0x1].trials/cpu_freq_GHz/1000,2)); + printf("Total PHY proc rx :%f us (%d trials)\n",(double)UE->phy_proc_rx[subframe&0x1].diff/UE->phy_proc_rx[subframe&0x1].trials/cpu_freq_GHz/1000.0, + UE->phy_proc_rx[subframe&0x1].trials*2/3); printf("|__Statistcs std: %fus max: %fus min: %fus median %fus q1 %fus q3 %fus n_dropped: %d packet \n", std_phy_proc_rx, t_rx_max, t_rx_min, rx_median, rx_q1, rx_q3, n_rx_dropped); std_phy_proc_rx_fft = sqrt((double)UE->ofdm_demod_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000, @@ -4001,7 +4001,7 @@ PMI_FEEDBACK: printf("|__ DLSCH Rate Unmatching :%f us (%d trials)\n", (double)UE->dlsch_rate_unmatching_stats.diff/UE->dlsch_rate_unmatching_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_rate_unmatching_stats.trials); printf("|__ DLSCH Turbo Decoding(%d bits) :%f us (%d trials)\n", - UE->dlsch[0][0]->harq_processes[0]->Cminus ? UE->dlsch[0][0]->harq_processes[0]->Kminus : UE->dlsch[0][0]->harq_processes[0]->Kplus, + UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Cminus ? UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Kminus : UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->Kplus, (double)UE->dlsch_turbo_decoding_stats.diff/UE->dlsch_turbo_decoding_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_turbo_decoding_stats.trials); printf(" |__ init %f us (cycles/iter %f, %d trials)\n", (double)UE->dlsch_tc_init_stats.diff/UE->dlsch_tc_init_stats.trials/cpu_freq_GHz/1000.0, @@ -4179,7 +4179,7 @@ PMI_FEEDBACK: eNB->dlsch_modulation_stats.trials, eNB->dlsch_scrambling_stats.trials, eNB->dlsch_encoding_stats.trials, - UE->phy_proc_rx.trials, + UE->phy_proc_rx[subframe&0x1].trials, UE->ofdm_demod_stats.trials, UE->dlsch_rx_pdcch_stats.trials, UE->dlsch_llr_stats.trials, @@ -4192,7 +4192,7 @@ PMI_FEEDBACK: get_time_meas_us(&eNB->dlsch_modulation_stats), get_time_meas_us(&eNB->dlsch_scrambling_stats), get_time_meas_us(&eNB->dlsch_encoding_stats), - get_time_meas_us(&UE->phy_proc_rx), + get_time_meas_us(&UE->phy_proc_rx[subframe&0x1]), nsymb*get_time_meas_us(&UE->ofdm_demod_stats), get_time_meas_us(&UE->dlsch_rx_pdcch_stats), 3*get_time_meas_us(&UE->dlsch_llr_stats), @@ -4232,7 +4232,7 @@ PMI_FEEDBACK: eNB->dlsch_modulation_stats.trials, eNB->dlsch_scrambling_stats.trials, eNB->dlsch_encoding_stats.trials, - UE->phy_proc_rx.trials, + UE->phy_proc_rx[subframe&0x1].trials, UE->ofdm_demod_stats.trials, UE->dlsch_rx_pdcch_stats.trials, UE->dlsch_llr_stats.trials, @@ -4290,7 +4290,7 @@ PMI_FEEDBACK: printf("eNB %d\n",i); free_eNB_dlsch(eNB->dlsch[0][i]); printf("UE %d\n",i); - free_ue_dlsch(UE->dlsch[0][i]); + free_ue_dlsch(UE->dlsch[subframe&0x1][0][i]); } From a500b2b29348ca3cbe9645e69bdf3f5c88941010 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 13 Mar 2017 15:43:43 +0100 Subject: [PATCH 24/47] integration fix: fix compilation of ulsim We use the odd/even dlsch corresponding to the configured subframe. It may not be the right thing to do. --- openair1/SIMULATION/LTE_PHY/ulsim.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index 55c6b8387e..470cfc3f87 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -681,20 +681,20 @@ int main(int argc, char **argv) // Create transport channel structures for 2 transport blocks (MIMO) for (i=0; i<2; i++) { eNB->dlsch[0][i] = new_eNB_dlsch(1,8,1827072,N_RB_DL,0,&eNB->frame_parms); - UE->dlsch[0][i] = new_ue_dlsch(1,8,1827072,MAX_TURBO_ITERATIONS,N_RB_DL,0); + UE->dlsch[subframe&1][0][i] = new_ue_dlsch(1,8,1827072,MAX_TURBO_ITERATIONS,N_RB_DL,0); if (!eNB->dlsch[0][i]) { printf("Can't get eNB dlsch structures\n"); exit(-1); } - if (!UE->dlsch[0][i]) { + if (!UE->dlsch[subframe&1][0][i]) { printf("Can't get ue dlsch structures\n"); exit(-1); } eNB->dlsch[0][i]->rnti = 14; - UE->dlsch[0][i]->rnti = 14; + UE->dlsch[subframe&1][0][i]->rnti = 14; } @@ -735,7 +735,7 @@ int main(int argc, char **argv) init_ul_hopping(&eNB->frame_parms); - UE->dlsch[0][0]->harq_ack[ul_subframe2pdcch_alloc_subframe(&eNB->frame_parms,subframe)].send_harq_status = 1; + UE->dlsch[subframe&1][0][0]->harq_ack[ul_subframe2pdcch_alloc_subframe(&eNB->frame_parms,subframe)].send_harq_status = 1; UE->ulsch_Msg3_active[eNB_id] = 0; UE->ul_power_control_dedicated[eNB_id].accumulationEnabled=1; From bd4898222fa0820cf5041517f6fc4375e513737d Mon Sep 17 00:00:00 2001 From: hbilel Date: Mon, 13 Mar 2017 15:50:10 +0100 Subject: [PATCH 25/47] pdcch dual buffer --- openair1/PHY/INIT/lte_init.c | 69 ++++-- openair1/PHY/LTE_TRANSPORT/dci.c | 70 +++--- openair1/PHY/LTE_TRANSPORT/dci.h | 6 +- openair1/PHY/LTE_TRANSPORT/dci_tools.c | 19 +- openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c | 4 +- .../PHY/LTE_TRANSPORT/dlsch_demodulation.c | 9 +- .../PHY/LTE_TRANSPORT/dlsch_llr_computation.c | 11 +- openair1/PHY/LTE_TRANSPORT/phich.c | 10 +- openair1/PHY/LTE_TRANSPORT/print_stats.c | 2 +- openair1/PHY/LTE_TRANSPORT/proto.h | 6 +- openair1/PHY/LTE_TRANSPORT/pucch.c | 2 +- openair1/PHY/LTE_TRANSPORT/ulsch_coding.c | 10 +- openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c | 2 +- openair1/PHY/TOOLS/lte_phy_scope.c | 10 +- openair1/PHY/TOOLS/lte_phy_scope_tm4.c | 8 +- openair1/PHY/defs.h | 2 +- openair1/SCHED/phy_procedures_lte_ue.c | 217 ++++++++++-------- .../SIMULATION/ETH_TRANSPORT/emu_transport.c | 3 +- openair1/SIMULATION/LTE_PHY/dlsim.c | 18 +- openair1/SIMULATION/LTE_PHY/pdcchsim.c | 14 +- openair1/SIMULATION/LTE_PHY/ulsim.c | 2 +- openair3/NAS/TOOLS/network.h | 2 +- openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf | 8 +- openair3/NAS/UE/ESM/esm_ebr_context.c | 2 +- targets/RT/USER/lte-softmodem.c | 10 +- targets/SIMU/USER/channel_sim.c | 2 +- targets/SIMU/USER/init_lte.c | 34 +-- targets/SIMU/USER/oaisim_functions.c | 2 +- 28 files changed, 324 insertions(+), 230 deletions(-) diff --git a/openair1/PHY/INIT/lte_init.c b/openair1/PHY/INIT/lte_init.c index de83506bb3..d2a814c175 100755 --- a/openair1/PHY/INIT/lte_init.c +++ b/openair1/PHY/INIT/lte_init.c @@ -614,8 +614,12 @@ void phy_config_afterHO_ue(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_id, Mobility // RNTI - PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[eNB_id]->crnti = mobilityControlInfo->newUE_Identity.buf[0]|(mobilityControlInfo->newUE_Identity.buf[1]<<8); + PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[0][eNB_id]->crnti = mobilityControlInfo->newUE_Identity.buf[0]|(mobilityControlInfo->newUE_Identity.buf[1]<<8); + PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[1][eNB_id]->crnti = mobilityControlInfo->newUE_Identity.buf[0]|(mobilityControlInfo->newUE_Identity.buf[1]<<8); + + LOG_I(PHY,"SET C-RNTI %x %x\n",PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[0][eNB_id]->crnti, + PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[1][eNB_id]->crnti); } if(ho_failed) { @@ -835,7 +839,7 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id, if (physicalConfigDedicated->antennaInfo) { phy_vars_ue->transmission_mode[eNB_id] = 1+(physicalConfigDedicated->antennaInfo->choice.explicitValue.transmissionMode); - LOG_D(PHY,"Transmission Mode %d\n",phy_vars_ue->transmission_mode[eNB_id]); + LOG_I(PHY,"Transmission Mode %d\n",phy_vars_ue->transmission_mode[eNB_id]); switch(physicalConfigDedicated->antennaInfo->choice.explicitValue.transmissionMode) { case AntennaInfoDedicated__transmissionMode_tm1: phy_vars_ue->transmission_mode[eNB_id] = 1; @@ -856,7 +860,7 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id, phy_vars_ue->transmission_mode[eNB_id] = 6; break; case AntennaInfoDedicated__transmissionMode_tm7: - lte_gold_ue_spec_port5(phy_vars_ue->lte_gold_uespec_port5_table, phy_vars_ue->frame_parms.Nid_cell, phy_vars_ue->pdcch_vars[eNB_id]->crnti); + lte_gold_ue_spec_port5(phy_vars_ue->lte_gold_uespec_port5_table, phy_vars_ue->frame_parms.Nid_cell, phy_vars_ue->pdcch_vars[0][eNB_id]->crnti); phy_vars_ue->transmission_mode[eNB_id] = 7; break; default: @@ -952,6 +956,14 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id, LOG_I(PHY,"Disabling SIB MIB decoding \n"); phy_vars_ue->decode_SIB = 0; phy_vars_ue->decode_MIB = 0; + //phy_vars_ue->pdcch_vars[1][eNB_id]->crnti = phy_vars_ue->pdcch_vars[0][eNB_id]->crnti; + if(phy_vars_ue->pdcch_vars[0][eNB_id]->crnti == 0x1234) + phy_vars_ue->pdcch_vars[0][eNB_id]->crnti = phy_vars_ue->pdcch_vars[1][eNB_id]->crnti; + else + phy_vars_ue->pdcch_vars[1][eNB_id]->crnti = phy_vars_ue->pdcch_vars[0][eNB_id]->crnti; + + LOG_I(PHY,"C-RNTI %x %x \n", phy_vars_ue->pdcch_vars[0][eNB_id]->crnti, + phy_vars_ue->pdcch_vars[1][eNB_id]->crnti); } @@ -1075,7 +1087,8 @@ int phy_init_lte_ue(PHY_VARS_UE *ue, LTE_UE_PDSCH** const pdsch_vars_ra = ue->pdsch_vars_ra; LTE_UE_PDSCH** const pdsch_vars_mch = ue->pdsch_vars_MCH; LTE_UE_PBCH** const pbch_vars = ue->pbch_vars; - LTE_UE_PDCCH** const pdcch_vars = ue->pdcch_vars; + LTE_UE_PDCCH** const pdcch_vars_th0 = ue->pdcch_vars[0]; + LTE_UE_PDCCH** const pdcch_vars_th1 = ue->pdcch_vars[1]; LTE_UE_PRACH** const prach_vars = ue->prach_vars; int i,j,k,l; @@ -1157,7 +1170,8 @@ int phy_init_lte_ue(PHY_VARS_UE *ue, pdsch_vars_SI[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH)); pdsch_vars_ra[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH)); pdsch_vars_mch[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH)); - pdcch_vars[eNB_id] = (LTE_UE_PDCCH *)malloc16_clear(sizeof(LTE_UE_PDCCH)); + pdcch_vars_th0[eNB_id] = (LTE_UE_PDCCH *)malloc16_clear(sizeof(LTE_UE_PDCCH)); + pdcch_vars_th1[eNB_id] = (LTE_UE_PDCCH *)malloc16_clear(sizeof(LTE_UE_PDCCH)); prach_vars[eNB_id] = (LTE_UE_PRACH *)malloc16_clear(sizeof(LTE_UE_PRACH)); pbch_vars[eNB_id] = (LTE_UE_PBCH *)malloc16_clear(sizeof(LTE_UE_PBCH)); @@ -1233,29 +1247,46 @@ int phy_init_lte_ue(PHY_VARS_UE *ue, phy_init_lte_ue__PDSCH( pdsch_vars_mch[eNB_id], fp ); // 100 PRBs * 12 REs/PRB * 4 PDCCH SYMBOLS * 2 LLRs/RE - pdcch_vars[eNB_id]->llr = (uint16_t*)malloc16_clear( 2*4*100*12*sizeof(uint16_t) ); - pdcch_vars[eNB_id]->llr16 = (uint16_t*)malloc16_clear( 2*4*100*12*sizeof(uint16_t) ); - pdcch_vars[eNB_id]->wbar = (uint16_t*)malloc16_clear( 2*4*100*12*sizeof(uint16_t) ); - pdcch_vars[eNB_id]->e_rx = (int8_t*)malloc16_clear( 4*2*100*12 ); + pdcch_vars_th0[eNB_id]->llr = (uint16_t*)malloc16_clear( 2*4*100*12*sizeof(uint16_t) ); + pdcch_vars_th0[eNB_id]->llr16 = (uint16_t*)malloc16_clear( 2*4*100*12*sizeof(uint16_t) ); + pdcch_vars_th0[eNB_id]->wbar = (uint16_t*)malloc16_clear( 2*4*100*12*sizeof(uint16_t) ); + pdcch_vars_th0[eNB_id]->e_rx = (int8_t*)malloc16_clear( 4*2*100*12 ); - pdcch_vars[eNB_id]->rxdataF_comp = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) ); - pdcch_vars[eNB_id]->dl_ch_rho_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) ); - pdcch_vars[eNB_id]->rho = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) ); - pdcch_vars[eNB_id]->rxdataF_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) ); - pdcch_vars[eNB_id]->dl_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) ); + pdcch_vars_th0[eNB_id]->rxdataF_comp = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) ); + pdcch_vars_th0[eNB_id]->dl_ch_rho_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) ); + pdcch_vars_th0[eNB_id]->rho = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) ); + pdcch_vars_th0[eNB_id]->rxdataF_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) ); + pdcch_vars_th0[eNB_id]->dl_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) ); + + pdcch_vars_th1[eNB_id]->llr = (uint16_t*)malloc16_clear( 2*4*100*12*sizeof(uint16_t) ); + pdcch_vars_th1[eNB_id]->llr16 = (uint16_t*)malloc16_clear( 2*4*100*12*sizeof(uint16_t) ); + pdcch_vars_th1[eNB_id]->wbar = (uint16_t*)malloc16_clear( 2*4*100*12*sizeof(uint16_t) ); + pdcch_vars_th1[eNB_id]->e_rx = (int8_t*)malloc16_clear( 4*2*100*12 ); + + pdcch_vars_th1[eNB_id]->rxdataF_comp = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) ); + pdcch_vars_th1[eNB_id]->dl_ch_rho_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) ); + pdcch_vars_th1[eNB_id]->rho = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) ); + pdcch_vars_th1[eNB_id]->rxdataF_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) ); + pdcch_vars_th1[eNB_id]->dl_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) ); for (i=0; inb_antennas_rx; i++) { //ue_pdcch_vars[eNB_id]->rho[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*(fp->N_RB_DL*12*7*2) ); - pdcch_vars[eNB_id]->rho[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*(100*12*4) ); + pdcch_vars_th0[eNB_id]->rho[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*(100*12*4) ); + pdcch_vars_th1[eNB_id]->rho[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*(100*12*4) ); for (j=0; j<4; j++) { //fp->nb_antennas_tx; j++) int idx = (j<<1)+i; // size_t num = 7*2*fp->N_RB_DL*12; size_t num = 4*100*12; // 4 symbols, 100 PRBs, 12 REs per PRB - pdcch_vars[eNB_id]->rxdataF_comp[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num ); - pdcch_vars[eNB_id]->dl_ch_rho_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num ); - pdcch_vars[eNB_id]->rxdataF_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num ); - pdcch_vars[eNB_id]->dl_ch_estimates_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num ); + pdcch_vars_th0[eNB_id]->rxdataF_comp[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num ); + pdcch_vars_th0[eNB_id]->dl_ch_rho_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num ); + pdcch_vars_th0[eNB_id]->rxdataF_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num ); + pdcch_vars_th0[eNB_id]->dl_ch_estimates_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num ); + + pdcch_vars_th1[eNB_id]->rxdataF_comp[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num ); + pdcch_vars_th1[eNB_id]->dl_ch_rho_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num ); + pdcch_vars_th1[eNB_id]->rxdataF_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num ); + pdcch_vars_th1[eNB_id]->dl_ch_estimates_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num ); } } diff --git a/openair1/PHY/LTE_TRANSPORT/dci.c b/openair1/PHY/LTE_TRANSPORT/dci.c index af25e33ff7..df4146adec 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci.c +++ b/openair1/PHY/LTE_TRANSPORT/dci.c @@ -1682,9 +1682,7 @@ void pdcch_alamouti(LTE_DL_FRAME_PARMS *frame_parms, int32_t avgP[4]; -int32_t rx_pdcch(LTE_UE_COMMON *common_vars, - LTE_UE_PDCCH **pdcch_vars, - LTE_DL_FRAME_PARMS *frame_parms, +int32_t rx_pdcch(PHY_VARS_UE *ue, uint32_t frame, uint8_t subframe, uint8_t eNB_id, @@ -1693,6 +1691,10 @@ int32_t rx_pdcch(LTE_UE_COMMON *common_vars, uint8_t is_secondary_ue) { + LTE_UE_COMMON *common_vars = &ue->common_vars; + LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; + LTE_UE_PDCCH **pdcch_vars = ue->pdcch_vars[subframe & 0x1]; + uint8_t log2_maxh,aatx,aarx; #ifdef MU_RECEIVER uint8_t eNB_id_i=eNB_id+1;//add 1 to eNB_id to separate from wanted signal, chosen as the B/F'd pilots from the SeNB are shifted by 1 @@ -1701,7 +1703,7 @@ int32_t rx_pdcch(LTE_UE_COMMON *common_vars, uint8_t n_pdcch_symbols = 3; //pdcch_vars[eNB_id]->num_pdcch_symbols; uint8_t mi = get_mi(frame_parms,subframe); - // printf("In rx_pdcch, subframe %d, eNB_id %d\n",subframe,eNB_id); + //printf("In rx_pdcch, subframe %d, eNB_id %d, pdcch_vars %d \n",subframe,eNB_id,pdcch_vars); for (s=0; s3) n_pdcch_symbols=1; #ifdef DEBUG_DCI_DECODING - printf("[PDCCH] subframe %d n_pdcch_symbols from PCFICH =%d\n",subframe,n_pdcch_symbols); printf("demapping: subframe %d, mi %d, tdd_config %d\n",subframe,get_mi(frame_parms,subframe),frame_parms->tdd_config); #endif @@ -2503,7 +2505,7 @@ void dci_decoding(uint8_t DCI_LENGTH, } -static uint8_t dci_decoded_output[(MAX_DCI_SIZE_BITS+64)/8]; +static uint8_t dci_decoded_output[2][(MAX_DCI_SIZE_BITS+64)/8]; uint16_t get_nCCE(uint8_t num_pdcch_symbols,LTE_DL_FRAME_PARMS *frame_parms,uint8_t mi) { @@ -2795,21 +2797,23 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars, #ifdef DEBUG_DCI_DECODING if (do_common == 1) - LOG_I(PHY,"[DCI search - common] Attempting candidate %d Aggregation Level %d DCI length %d at CCE %d/%d (CCEmap %x,CCEmap_cand %x)\n",m,L2,sizeof_bits,CCEind,nCCE,*CCEmap,CCEmap_mask); + LOG_I(PHY,"[DCI search nPdcch %d - common] Attempting candidate %d Aggregation Level %d DCI length %d at CCE %d/%d (CCEmap %x,CCEmap_cand %x)\n", + pdcch_vars[eNB_id]->num_pdcch_symbols,m,L2,sizeof_bits,CCEind,nCCE,*CCEmap,CCEmap_mask); else - LOG_I(PHY,"[DCI search - ue spec] Attempting candidate %d Aggregation Level %d DCI length %d at CCE %d/%d (CCEmap %x,CCEmap_cand %x)\n",m,L2,sizeof_bits,CCEind,nCCE,*CCEmap,CCEmap_mask); + LOG_I(PHY,"[DCI search nPdcch %d - ue spec] Attempting candidate %d Aggregation Level %d DCI length %d at CCE %d/%d (CCEmap %x,CCEmap_cand %x)\n", + pdcch_vars[eNB_id]->num_pdcch_symbols,m,L2,sizeof_bits,CCEind,nCCE,*CCEmap,CCEmap_mask); #endif dci_decoding(sizeof_bits, L, &pdcch_vars[eNB_id]->e_rx[CCEind*72], - dci_decoded_output); + &dci_decoded_output[subframe&0x1][0]); /* for (i=0;i<3+(sizeof_bits>>3);i++) printf("dci_decoded_output[%d] => %x\n",i,dci_decoded_output[i]); */ - crc = (crc16(dci_decoded_output,sizeof_bits)>>16) ^ extract_crc(dci_decoded_output,sizeof_bits); + crc = (crc16(&dci_decoded_output[subframe&0x1][0],sizeof_bits)>>16) ^ extract_crc(&dci_decoded_output[subframe&0x1][0],sizeof_bits); #ifdef DEBUG_DCI_DECODING printf("crc =>%x\n",crc); #endif @@ -2823,27 +2827,31 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars, dci_alloc[*dci_cnt].L = L; dci_alloc[*dci_cnt].firstCCE = CCEind; + //printf("DCI FOUND !!! crc =>%x, sizeof_bits %d, sizeof_bytes %d \n",crc, sizeof_bits, sizeof_bytes); if (sizeof_bytes<=4) { - dci_alloc[*dci_cnt].dci_pdu[3] = dci_decoded_output[0]; - dci_alloc[*dci_cnt].dci_pdu[2] = dci_decoded_output[1]; - dci_alloc[*dci_cnt].dci_pdu[1] = dci_decoded_output[2]; - dci_alloc[*dci_cnt].dci_pdu[0] = dci_decoded_output[3]; + dci_alloc[*dci_cnt].dci_pdu[3] = dci_decoded_output[subframe&0x1][0]; + dci_alloc[*dci_cnt].dci_pdu[2] = dci_decoded_output[subframe&0x1][1]; + dci_alloc[*dci_cnt].dci_pdu[1] = dci_decoded_output[subframe&0x1][2]; + dci_alloc[*dci_cnt].dci_pdu[0] = dci_decoded_output[subframe&0x1][3]; #ifdef DEBUG_DCI_DECODING - printf("DCI => %x,%x,%x,%x\n",dci_decoded_output[0],dci_decoded_output[1],dci_decoded_output[2],dci_decoded_output[3]); + printf("DCI => %x,%x,%x,%x\n",dci_decoded_output[subframe&0x1][0], + dci_decoded_output[subframe&0x1][1], + dci_decoded_output[subframe&0x1][2], + dci_decoded_output[subframe&0x1][3]); #endif } else { - dci_alloc[*dci_cnt].dci_pdu[7] = dci_decoded_output[0]; - dci_alloc[*dci_cnt].dci_pdu[6] = dci_decoded_output[1]; - dci_alloc[*dci_cnt].dci_pdu[5] = dci_decoded_output[2]; - dci_alloc[*dci_cnt].dci_pdu[4] = dci_decoded_output[3]; - dci_alloc[*dci_cnt].dci_pdu[3] = dci_decoded_output[4]; - dci_alloc[*dci_cnt].dci_pdu[2] = dci_decoded_output[5]; - dci_alloc[*dci_cnt].dci_pdu[1] = dci_decoded_output[6]; - dci_alloc[*dci_cnt].dci_pdu[0] = dci_decoded_output[7]; + dci_alloc[*dci_cnt].dci_pdu[7] = dci_decoded_output[subframe&0x1][0]; + dci_alloc[*dci_cnt].dci_pdu[6] = dci_decoded_output[subframe&0x1][1]; + dci_alloc[*dci_cnt].dci_pdu[5] = dci_decoded_output[subframe&0x1][2]; + dci_alloc[*dci_cnt].dci_pdu[4] = dci_decoded_output[subframe&0x1][3]; + dci_alloc[*dci_cnt].dci_pdu[3] = dci_decoded_output[subframe&0x1][4]; + dci_alloc[*dci_cnt].dci_pdu[2] = dci_decoded_output[subframe&0x1][5]; + dci_alloc[*dci_cnt].dci_pdu[1] = dci_decoded_output[subframe&0x1][6]; + dci_alloc[*dci_cnt].dci_pdu[0] = dci_decoded_output[subframe&0x1][7]; #ifdef DEBUG_DCI_DECODING printf("DCI => %x,%x,%x,%x,%x,%x,%x,%x\n", - dci_decoded_output[0],dci_decoded_output[1],dci_decoded_output[2],dci_decoded_output[3], - dci_decoded_output[4],dci_decoded_output[5],dci_decoded_output[6],dci_decoded_output[7]); + dci_decoded_output[subframe&0x1][0],dci_decoded_output[subframe&0x1][1],dci_decoded_output[subframe&0x1][2],dci_decoded_output[subframe&0x1][3], + dci_decoded_output[subframe&0x1][4],dci_decoded_output[subframe&0x1][5],dci_decoded_output[subframe&0x1][6],dci_decoded_output[subframe&0x1][7]); #endif } @@ -2860,7 +2868,7 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars, *dci_cnt = *dci_cnt+1; } else if (crc==pdcch_vars[eNB_id]->crnti) { - if ((mode&UL_DCI)&&(format_c == format0)&&((dci_decoded_output[0]&0x80)==0)) {// check if pdu is format 0 or 1A + if ((mode&UL_DCI)&&(format_c == format0)&&((dci_decoded_output[subframe&0x1][0]&0x80)==0)) {// check if pdu is format 0 or 1A if (*format0_found == 0) { dci_alloc[*dci_cnt].format = format0; *format0_found = 1; @@ -2882,7 +2890,7 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars, } } - LOG_D(PHY,"DCI decoding CRNTI [format: %d, nCCE[subframe: %d]: %d ], AggregationLevel %d \n",format_c, subframe, pdcch_vars[eNB_id]->nCCE[subframe],L2); + LOG_I(PHY,"DCI decoding CRNTI [format: %d, nCCE[subframe: %d]: %d ], AggregationLevel %d \n",format_c, subframe, pdcch_vars[eNB_id]->nCCE[subframe],L2); // memcpy(&dci_alloc[*dci_cnt].dci_pdu[0],dci_decoded_output,sizeof_bytes); @@ -2928,7 +2936,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, uint8_t dci_cnt=0,old_dci_cnt=0; uint32_t CCEmap0=0,CCEmap1=0,CCEmap2=0; - LTE_UE_PDCCH **pdcch_vars = ue->pdcch_vars; + LTE_UE_PDCCH **pdcch_vars = ue->pdcch_vars[subframe & 0x1]; LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; uint8_t mi = get_mi(&ue->frame_parms,subframe); uint16_t ra_rnti=99; @@ -3518,7 +3526,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, } else if (tmode == 3) { - LOG_D(PHY," Now check UE_SPEC format 2A_2A search aggregation 1\n"); + LOG_D(PHY," Now check UE_SPEC format 2A_2A search aggregation 1 dci length: %d[bits] %d[bytes]\n",format2A_size_bits,format2A_size_bytes); // Now check UE_SPEC format 2A_2A search spaces at aggregation 1 old_dci_cnt=dci_cnt; dci_decoding_procedure0(pdcch_vars,0,mode, @@ -3554,7 +3562,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, return(dci_cnt); // Now check UE_SPEC format 2 search spaces at aggregation 2 - LOG_D(PHY," Now check UE_SPEC format 2A_2A search aggregation 2\n"); + LOG_D(PHY," Now check UE_SPEC format 2A_2A search aggregation 2 dci length: %d[bits] %d[bytes]\n",format2A_size_bits,format2A_size_bytes); old_dci_cnt=dci_cnt; dci_decoding_procedure0(pdcch_vars,0,mode, subframe, @@ -3623,7 +3631,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, //#ifdef ALL_AGGREGATION // Now check UE_SPEC format 2_2A search spaces at aggregation 8 - LOG_D(PHY," Now check UE_SPEC format 2_2A search spaces at aggregation 8 \n"); + LOG_D(PHY," Now check UE_SPEC format 2_2A search spaces at aggregation 8 dci length: %d[bits] %d[bytes]\n",format2A_size_bits,format2A_size_bytes); old_dci_cnt=dci_cnt; dci_decoding_procedure0(pdcch_vars,0,mode, subframe, diff --git a/openair1/PHY/LTE_TRANSPORT/dci.h b/openair1/PHY/LTE_TRANSPORT/dci.h index c250e7c10a..2987f026e0 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci.h +++ b/openair1/PHY/LTE_TRANSPORT/dci.h @@ -1897,9 +1897,9 @@ struct DCI2A_10MHz_4A_TDD { #define sizeof_DCI2A_10MHz_4A_TDD_t 41 typedef struct DCI2A_10MHz_4A_TDD DCI2A_10MHz_4A_TDD_t; -/// DCI Format Type 2A (10 MHz, FDD, 2 Antenna Ports, 36 bits) +/// DCI Format Type 2A (10 MHz, FDD, 2 Antenna Ports, 40 bits) struct DCI2A_10MHz_2A_FDD { - uint64_t padding:28; + uint64_t padding:24; /// Redundancy version 2 uint64_t rv2:2; /// New Data Indicator 2 @@ -1923,7 +1923,7 @@ struct DCI2A_10MHz_2A_FDD { /// Resource Allocation Header uint64_t rah:1; } __attribute__ ((__packed__)); -#define sizeof_DCI2A_10MHz_2A_FDD_t 36 +#define sizeof_DCI2A_10MHz_2A_FDD_t 41 typedef struct DCI2A_10MHz_2A_FDD DCI2A_10MHz_2A_FDD_t; /// DCI Format Type 2A (10 MHz, FDD, 4 Antenna Ports, 38 bits) diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c index c4e379b45a..dff1181197 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c @@ -5720,9 +5720,9 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format, pdlsch1->active = 0; } -#ifdef DEBUG_HARQ +//#ifdef DEBUG_HARQ printf("[DCI UE]: dlsch0_harq status %d , dlsch1_harq status %d\n", dlsch0_harq->status, dlsch1_harq->status); -#endif +//#endif // compute resource allocation if (TB0_active == 1){ @@ -5882,9 +5882,9 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format, dlsch1_harq->Qm = (mcs2-28)<<1; } -#ifdef DEBUG_HARQ +//#ifdef DEBUG_HARQ printf("[DCI UE]: dlsch0_harq status %d , dlsch1_harq status %d\n", dlsch0_harq->status, dlsch1_harq->status); -#endif +//#endif #ifdef DEBUG_HARQ if (dlsch0 != NULL && dlsch1 != NULL) @@ -6156,7 +6156,7 @@ int generate_ue_dlsch_params_from_dci(int frame, case format2A: { // extract dci infomation - //LOG_I(PHY,"[DCI-format2] AbsSubframe %d.%d extract dci infomation \n", frame%1024, subframe); + LOG_I(PHY,"[DCI-format2] AbsSubframe %d.%d extract dci infomation \n", frame%1024, subframe); extract_dci2A_info(frame_parms->N_RB_DL, frame_type, frame_parms->nb_antenna_ports_eNB, @@ -6376,7 +6376,7 @@ int generate_ue_dlsch_params_from_dci(int frame, } - #ifdef DEBUG_DCI +#ifdef DEBUG_DCI if (dlsch[0] && (dlsch[0]->rnti != 0xffff)) { printf("dci_format:%d Abssubframe: %d.%d \n",dci_format,frame%1024,subframe); @@ -6384,7 +6384,7 @@ int generate_ue_dlsch_params_from_dci(int frame, printf("PDSCH dlsch0 UE: NBRB %d\n",dlsch0_harq->nb_rb); printf("PDSCH dlsch0 UE: rballoc %x\n",dlsch0_harq->rb_alloc_even[0]); printf("PDSCH dlsch0 UE: harq_pid %d\n",harq_pid); - printf("PDSCH dlsch0 UE: tpc %d\n",TPC); + //printf("PDSCH dlsch0 UE: tpc %d\n",TPC); printf("PDSCH dlsch0 UE: g %d\n",dlsch[0]->g_pucch); printf("PDSCH dlsch0 UE: round %d\n",dlsch0_harq->round); printf("PDSCH dlsch0 UE: DCINdi %d\n",dlsch0_harq->DCINdi); @@ -6393,8 +6393,7 @@ int generate_ue_dlsch_params_from_dci(int frame, printf("PDSCH dlsch0 UE: mcs %d\n",dlsch0_harq->mcs); printf("PDSCH dlsch0 UE: pwr_off %d\n",dlsch0_harq->dl_power_off); } - - #endif +#endif #if T_TRACER if( (dlsch[0]->rnti != si_rnti) && (dlsch[0]->rnti != ra_rnti) && (dlsch[0]->rnti != p_rnti)) @@ -8077,7 +8076,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu, // ulsch->n_DMRS2 = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->cshift; - #ifdef DEBUG_DCI +#ifdef DEBUG_DCI printf("Format 0 DCI : ulsch (ue): AbsSubframe %d.%d\n",proc->frame_rx%1024,subframe); printf("Format 0 DCI : ulsch (ue): NBRB %d\n",ulsch->harq_processes[harq_pid]->nb_rb); diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c index d683decc9f..a8c9fab621 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c @@ -927,7 +927,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, case PDSCH: // TB0 dlsch_ue = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]; harq_pid = dlsch_ue->current_harq_pid; - ue_id= (uint32_t)find_ue((int16_t)phy_vars_ue->pdcch_vars[(uint32_t)eNB_id]->crnti,PHY_vars_eNB_g[eNB_id2][CC_id]); + ue_id= (uint32_t)find_ue((int16_t)phy_vars_ue->pdcch_vars[subframe & 0x1][(uint32_t)eNB_id]->crnti,PHY_vars_eNB_g[eNB_id2][CC_id]); DevAssert( ue_id != (uint32_t)-1 ); dlsch_eNB = PHY_vars_eNB_g[eNB_id2][CC_id]->dlsch[ue_id][0]; @@ -973,7 +973,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, case PDSCH1: { // TB1 dlsch_ue = phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]; harq_pid = dlsch_ue->current_harq_pid; - int8_t UE_id = find_ue( phy_vars_ue->pdcch_vars[eNB_id]->crnti, PHY_vars_eNB_g[eNB_id2][CC_id] ); + int8_t UE_id = find_ue( phy_vars_ue->pdcch_vars[subframe & 0x1][eNB_id]->crnti, PHY_vars_eNB_g[eNB_id2][CC_id] ); DevAssert( UE_id != -1 ); dlsch_eNB = PHY_vars_eNB_g[eNB_id2][CC_id]->dlsch[UE_id][1]; // reset HARQ diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c index a842a8a9dc..5fb11d2db6 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c @@ -56,9 +56,7 @@ int16_t dlsch_demod_shift = 0; //#define DEBUG_PHY 1 //#define DEBUG_DLSCH_DEMOD 1 -int avg[4]; -int avg_0[2]; -int avg_1[2]; + // [MCS][i_mod (0,1,2) = (2,4,6)] unsigned char offset_mumimo_llr_drange_fix=0; @@ -110,6 +108,9 @@ int rx_pdsch(PHY_VARS_UE *ue, PHY_MEASUREMENTS *measurements = &ue->measurements; LTE_UE_DLSCH_t **dlsch; + int avg[4]; + int avg_0[2]; + int avg_1[2]; unsigned char aatx,aarx; @@ -143,7 +144,7 @@ int rx_pdsch(PHY_VARS_UE *ue, break; case PDSCH: - pdsch_vars = &ue->pdsch_vars[subframe&0x1][eNB_id]; + pdsch_vars = ue->pdsch_vars[subframe&0x1]; dlsch = ue->dlsch[subframe&0x1][eNB_id]; LOG_D(PHY,"AbsSubframe %d.%d / Sym %d harq_pid %d, harq status %d.%d \n", frame,subframe,symbol,harq_pid, diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c index b08836762c..48b777fcde 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c @@ -8847,6 +8847,15 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, memcpy(ch_mag_i_256i, ch_mag_i, len*4); memcpy(rho_256i, rho, len*4); +#if 1 + qam64_qam16_avx2((short *)rxF_256i, + (short *)rxF_i_256i, + (short *)ch_mag_256i, + (short *)ch_mag_i_256i, + (short *)llr16, + (short *) rho_256i, + len); +#else qam64_qam64_avx2((int32_t *)rxF_256i, (int32_t *)rxF_i_256i, (int32_t *)ch_mag_256i, @@ -8854,7 +8863,7 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, (int16_t *)llr16, (int32_t *) rho_256i, len); - +#endif free16(rxF_256i, sizeof(rxF_256i)); free16(rxF_i_256i, sizeof(rxF_i_256i)); free16(ch_mag_256i, sizeof(ch_mag_256i)); diff --git a/openair1/PHY/LTE_TRANSPORT/phich.c b/openair1/PHY/LTE_TRANSPORT/phich.c index df789cd174..bb8c1f119d 100644 --- a/openair1/PHY/LTE_TRANSPORT/phich.c +++ b/openair1/PHY/LTE_TRANSPORT/phich.c @@ -1067,7 +1067,7 @@ void rx_phich(PHY_VARS_UE *ue, LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms; - LTE_UE_PDCCH **pdcch_vars = ue->pdcch_vars; + LTE_UE_PDCCH **pdcch_vars = &ue->pdcch_vars[subframe & 0x1][eNB_id]; // uint8_t HI; uint8_t harq_pid = phich_subframe_to_harq_pid(frame_parms,proc->frame_rx,subframe); @@ -1368,7 +1368,7 @@ void rx_phich(PHY_VARS_UE *ue, if (HI16>0) { //NACK if (ue->ulsch_Msg3_active[eNB_id] == 1) { - LOG_D(PHY,"[UE %d][PUSCH %d][RAPROC] Frame %d subframe %d Msg3 PHICH, received NAK (%d) nseq %d, ngroup %d\n", + LOG_I(PHY,"[UE %d][PUSCH %d][RAPROC] Frame %d subframe %d Msg3 PHICH, received NAK (%d) nseq %d, ngroup %d\n", ue->Mod_id,harq_pid, proc->frame_rx, subframe, @@ -1389,7 +1389,7 @@ void rx_phich(PHY_VARS_UE *ue, } } else { //#ifdef DEBUG_PHICH - LOG_D(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d PHICH, received NAK (%d) nseq %d, ngroup %d round %d (Mlimit %d)\n", + LOG_I(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d PHICH, received NAK (%d) nseq %d, ngroup %d round %d (Mlimit %d)\n", ue->Mod_id,harq_pid, proc->frame_rx%1024, subframe, @@ -1436,7 +1436,7 @@ void rx_phich(PHY_VARS_UE *ue, } else { //ACK if (ue->ulsch_Msg3_active[eNB_id] == 1) { - LOG_D(PHY,"[UE %d][PUSCH %d][RAPROC] Frame %d subframe %d Msg3 PHICH, received ACK (%d) nseq %d, ngroup %d\n\n", + LOG_I(PHY,"[UE %d][PUSCH %d][RAPROC] Frame %d subframe %d Msg3 PHICH, received ACK (%d) nseq %d, ngroup %d\n\n", ue->Mod_id,harq_pid, proc->frame_rx, subframe, @@ -1444,7 +1444,7 @@ void rx_phich(PHY_VARS_UE *ue, nseq_PHICH,ngroup_PHICH); } else { //#ifdef PHICH_DEBUG - LOG_D(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d PHICH, received ACK (%d) nseq %d, ngroup %d\n\n", + LOG_I(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d PHICH, received ACK (%d) nseq %d, ngroup %d\n\n", ue->Mod_id,harq_pid, proc->frame_rx%1024, subframe, HI16, diff --git a/openair1/PHY/LTE_TRANSPORT/print_stats.c b/openair1/PHY/LTE_TRANSPORT/print_stats.c index c3e40e1e72..0bebff8c35 100644 --- a/openair1/PHY/LTE_TRANSPORT/print_stats.c +++ b/openair1/PHY/LTE_TRANSPORT/print_stats.c @@ -59,7 +59,7 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char* buffer, int length return 0; if ((mode == normal_txrx) || (mode == no_L2_connect)) { - len += sprintf(&buffer[len], "[UE_PROC] UE %d, RNTI %x\n",ue->Mod_id, ue->pdcch_vars[0]->crnti); + len += sprintf(&buffer[len], "[UE_PROC] UE %d, RNTI %x\n",ue->Mod_id, ue->pdcch_vars[0][0]->crnti); len += sprintf(&buffer[len],"[UE PROC] RSRP[0] %.2f dBm/RE, RSSI %.2f dBm, RSRQ[0] %.2f dB, N0 %d dBm/RE (NF %.1f dB)\n", 10*log10(ue->measurements.rsrp[0])-ue->rx_total_gain_dB, 10*log10(ue->measurements.rssi)-ue->rx_total_gain_dB, diff --git a/openair1/PHY/LTE_TRANSPORT/proto.h b/openair1/PHY/LTE_TRANSPORT/proto.h index fe7991e343..be317712da 100644 --- a/openair1/PHY/LTE_TRANSPORT/proto.h +++ b/openair1/PHY/LTE_TRANSPORT/proto.h @@ -1308,9 +1308,7 @@ int32_t rx_pdsch(PHY_VARS_UE *phy_vars_ue, uint8_t i_mod, uint8_t harq_pid); -int32_t rx_pdcch(LTE_UE_COMMON *lte_ue_common_vars, - LTE_UE_PDCCH **lte_ue_pdcch_vars, - LTE_DL_FRAME_PARMS *frame_parms, +int32_t rx_pdcch(PHY_VARS_UE *ue, uint32_t frame, uint8_t subframe, uint8_t eNB_id, @@ -1781,6 +1779,7 @@ uint32_t ulsch_encoding(uint8_t *a, PHY_VARS_UE *phy_vars_ue, uint8_t harq_pid, uint8_t eNB_id, + uint8_t subframe_rx, uint8_t tmode, uint8_t control_only_flag, uint8_t Nbundled); @@ -1796,6 +1795,7 @@ uint32_t ulsch_encoding(uint8_t *a, int32_t ulsch_encoding_emul(uint8_t *ulsch_buffer, PHY_VARS_UE *phy_vars_ue, uint8_t eNB_id, + uint8_t subframe_rx, uint8_t harq_pid, uint8_t control_only_flag); diff --git a/openair1/PHY/LTE_TRANSPORT/pucch.c b/openair1/PHY/LTE_TRANSPORT/pucch.c index 563f83bb7f..1efad912af 100644 --- a/openair1/PHY/LTE_TRANSPORT/pucch.c +++ b/openair1/PHY/LTE_TRANSPORT/pucch.c @@ -1315,7 +1315,7 @@ int32_t rx_pucch_emul(PHY_VARS_eNB *eNB, rnti = eNB->ulsch[UE_index]->rnti; for (UE_id=0; UE_idpdcch_vars[0]->crnti) + if (rnti == PHY_vars_UE_g[UE_id][CC_id]->pdcch_vars[subframe & 0x1][0]->crnti) break; } diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_coding.c b/openair1/PHY/LTE_TRANSPORT/ulsch_coding.c index dbb7a16ac9..e64b959e68 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_coding.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_coding.c @@ -202,6 +202,7 @@ uint32_t ulsch_encoding(uint8_t *a, PHY_VARS_UE *ue, uint8_t harq_pid, uint8_t eNB_id, + uint8_t subframe_rx, uint8_t tmode, uint8_t control_only_flag, uint8_t Nbundled) @@ -261,10 +262,10 @@ uint32_t ulsch_encoding(uint8_t *a, // fill CQI/PMI information if (ulsch->O>0) { VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_ENCODING_FILL_CQI, VCD_FUNCTION_IN); - rnti = ue->pdcch_vars[eNB_id]->crnti; + rnti = ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->crnti; fill_CQI(ulsch,meas,0,harq_pid,ue->frame_parms.N_RB_DL,rnti, tmode,ue->sinr_eff); - LOG_D(PHY,"UE CQI\n"); + LOG_I(PHY,"ULSCH Encoding rnti %x \n", rnti); print_CQI(ulsch->o,ulsch->uci_format,0,ue->frame_parms.N_RB_DL); // save PUSCH pmi for later (transmission modes 4,5,6) @@ -961,6 +962,7 @@ uint32_t ulsch_encoding(uint8_t *a, int ulsch_encoding_emul(uint8_t *ulsch_buffer, PHY_VARS_UE *ue, uint8_t eNB_id, + uint8_t subframe_rx, uint8_t harq_pid, uint8_t control_only_flag) { @@ -969,7 +971,7 @@ int ulsch_encoding_emul(uint8_t *ulsch_buffer, LTE_UE_DLSCH_t **dlsch = ue->dlsch[0][eNB_id]; PHY_MEASUREMENTS *meas = &ue->measurements; uint8_t tmode = ue->transmission_mode[eNB_id]; - uint16_t rnti=ue->pdcch_vars[eNB_id]->crnti; + uint16_t rnti=ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->crnti; LOG_D(PHY,"EMUL UE ulsch_encoding for eNB %d,mod_id %d, harq_pid %d rnti %x, ACK(%d,%d) \n", eNB_id,ue->Mod_id, harq_pid, rnti,ulsch->o_ACK[0],ulsch->o_ACK[1]); @@ -1003,7 +1005,7 @@ int ulsch_encoding_emul(uint8_t *ulsch_buffer, //UE_transport_info_TB_index[ue->Mod_id]+=ue->ulsch[eNB_id]->harq_processes[harq_pid]->TBS>>3; // navid: currently more than one eNB is not supported in the code UE_transport_info[ue->Mod_id][ue->CC_id].num_eNB = 1; - UE_transport_info[ue->Mod_id][ue->CC_id].rnti[0] = ue->pdcch_vars[0]->crnti; + UE_transport_info[ue->Mod_id][ue->CC_id].rnti[0] = ue->pdcch_vars[subframe_rx & 0x1][0]->crnti; UE_transport_info[ue->Mod_id][ue->CC_id].eNB_id[0] = eNB_id; UE_transport_info[ue->Mod_id][ue->CC_id].harq_pid[0] = harq_pid; UE_transport_info[ue->Mod_id][ue->CC_id].tbs[0] = ue->ulsch[eNB_id]->harq_processes[harq_pid]->TBS>>3 ; diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c index bb2a5b3e22..a26f3a876b 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c @@ -2002,7 +2002,7 @@ uint32_t ulsch_decoding_emul(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc, #endif for (UE_id=0; UE_idpdcch_vars[0]->crnti) + if (rnti == PHY_vars_UE_g[UE_id][CC_id]->pdcch_vars[subframe & 0x1][0]->crnti) break; } diff --git a/openair1/PHY/TOOLS/lte_phy_scope.c b/openair1/PHY/TOOLS/lte_phy_scope.c index 7a53346453..325e9f8215 100644 --- a/openair1/PHY/TOOLS/lte_phy_scope.c +++ b/openair1/PHY/TOOLS/lte_phy_scope.c @@ -525,8 +525,8 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, } } - if (phy_vars_ue->pdcch_vars[eNB_id]!=NULL) { - num_pdcch_symbols = phy_vars_ue->pdcch_vars[eNB_id]->num_pdcch_symbols; + if (phy_vars_ue->pdcch_vars[subframe&0x1][eNB_id]!=NULL) { + num_pdcch_symbols = phy_vars_ue->pdcch_vars[subframe&0x1][eNB_id]->num_pdcch_symbols; } // coded_bits_per_codeword = frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti); @@ -563,8 +563,8 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, chest_f = (int16_t**) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id]; pbch_llr = (int8_t*) phy_vars_ue->pbch_vars[eNB_id]->llr; pbch_comp = (int16_t*) phy_vars_ue->pbch_vars[eNB_id]->rxdataF_comp[0]; - pdcch_llr = (int8_t*) phy_vars_ue->pdcch_vars[eNB_id]->llr; - pdcch_comp = (int16_t*) phy_vars_ue->pdcch_vars[eNB_id]->rxdataF_comp[0]; + pdcch_llr = (int8_t*) phy_vars_ue->pdcch_vars[subframe&0x1][eNB_id]->llr; + pdcch_comp = (int16_t*) phy_vars_ue->pdcch_vars[subframe&0x1][eNB_id]->rxdataF_comp[0]; pdsch_llr = (int16_t*) phy_vars_ue->pdsch_vars[subframe&0x1][eNB_id]->llr[0]; // stream 0 // pdsch_llr = (int16_t*) phy_vars_ue->lte_ue_pdsch_vars_SI[eNB_id]->llr[0]; // stream 0 pdsch_comp = (int16_t*) phy_vars_ue->pdsch_vars[subframe&0x1][eNB_id]->rxdataF_comp0[0]; @@ -768,4 +768,4 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, } free(chest_t_abs); -} \ No newline at end of file +} diff --git a/openair1/PHY/TOOLS/lte_phy_scope_tm4.c b/openair1/PHY/TOOLS/lte_phy_scope_tm4.c index 6807f1f6f4..92a0d9f218 100755 --- a/openair1/PHY/TOOLS/lte_phy_scope_tm4.c +++ b/openair1/PHY/TOOLS/lte_phy_scope_tm4.c @@ -467,8 +467,8 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, return; mcs1 = phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]->harq_processes[harq_pid]->mcs; } - if (phy_vars_ue->pdcch_vars[eNB_id]!=NULL) { - num_pdcch_symbols = phy_vars_ue->pdcch_vars[eNB_id]->num_pdcch_symbols; + if (phy_vars_ue->pdcch_vars[subframe&0x1][eNB_id]!=NULL) { + num_pdcch_symbols = phy_vars_ue->pdcch_vars[subframe&0x1][eNB_id]->num_pdcch_symbols; } // coded_bits_per_codeword = frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti); if (phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]!=NULL) { @@ -519,8 +519,8 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, chest_f = (int16_t**) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id]; pbch_llr = (int8_t*) phy_vars_ue->pbch_vars[eNB_id]->llr; pbch_comp = (int16_t*) phy_vars_ue->pbch_vars[eNB_id]->rxdataF_comp[0]; - pdcch_llr = (int8_t*) phy_vars_ue->pdcch_vars[eNB_id]->llr; - pdcch_comp = (int16_t*) phy_vars_ue->pdcch_vars[eNB_id]->rxdataF_comp[0]; + pdcch_llr = (int8_t*) phy_vars_ue->pdcch_vars[subframe&0x1][eNB_id]->llr; + pdcch_comp = (int16_t*) phy_vars_ue->pdcch_vars[subframe&0x1][eNB_id]->rxdataF_comp[0]; pdsch_llr = (int16_t*) phy_vars_ue->pdsch_vars[subframe&0x1][eNB_id]->llr[0]; // stream 0 pdsch_llr1 = (int16_t*) phy_vars_ue->pdsch_vars[subframe&0x1][eNB_id]->llr[1]; // stream 1 pdsch_comp = (int16_t*) phy_vars_ue->pdsch_vars[subframe&0x1][eNB_id]->rxdataF_comp0[0]; diff --git a/openair1/PHY/defs.h b/openair1/PHY/defs.h index 5c1b1158ba..921d2be1fc 100644 --- a/openair1/PHY/defs.h +++ b/openair1/PHY/defs.h @@ -713,7 +713,7 @@ typedef struct { LTE_UE_PDSCH *pdsch_vars_p[NUMBER_OF_CONNECTED_eNB_MAX+1]; LTE_UE_PDSCH *pdsch_vars_MCH[NUMBER_OF_CONNECTED_eNB_MAX]; LTE_UE_PBCH *pbch_vars[NUMBER_OF_CONNECTED_eNB_MAX]; - LTE_UE_PDCCH *pdcch_vars[NUMBER_OF_CONNECTED_eNB_MAX]; + LTE_UE_PDCCH *pdcch_vars[2][NUMBER_OF_CONNECTED_eNB_MAX]; LTE_UE_PRACH *prach_vars[NUMBER_OF_CONNECTED_eNB_MAX]; LTE_UE_DLSCH_t *dlsch[2][NUMBER_OF_CONNECTED_eNB_MAX][2]; // two RxTx Threads LTE_UE_ULSCH_t *ulsch[NUMBER_OF_CONNECTED_eNB_MAX]; diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c index 386dd8b52c..2bd4590fe0 100644 --- a/openair1/SCHED/phy_procedures_lte_ue.c +++ b/openair1/SCHED/phy_procedures_lte_ue.c @@ -95,7 +95,7 @@ void dump_dlsch(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t subf ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even, ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->Qm, ue->dlsch[subframe&0x1][eNB_id][0]->harq_processes[harq_pid]->Nl, - ue->pdcch_vars[eNB_id]->num_pdcch_symbols, + ue->pdcch_vars[0&0x1][eNB_id]->num_pdcch_symbols, proc->frame_rx, subframe, ue->transmission_mode[eNB_id]<7?0:ue->transmission_mode[eNB_id]); @@ -126,7 +126,7 @@ void dump_dlsch_SI(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t s ue->dlsch_SI[eNB_id]->harq_processes[0]->rb_alloc_even, 2, 1, - ue->pdcch_vars[eNB_id]->num_pdcch_symbols, + ue->pdcch_vars[0&0x1][eNB_id]->num_pdcch_symbols, proc->frame_rx, subframe, 0); @@ -137,7 +137,7 @@ void dump_dlsch_SI(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t s ue->dlsch_SI[eNB_id]->harq_processes[0]->nb_rb, ue->dlsch_SI[eNB_id]->harq_processes[0]->mcs, ue->dlsch_SI[eNB_id]->harq_processes[0]->nb_rb, - ue->pdcch_vars[eNB_id]->num_pdcch_symbols, + ue->pdcch_vars[0&0x1][eNB_id]->num_pdcch_symbols, coded_bits_per_codeword); write_output("rxsig0.m","rxs0", &ue->common_vars.rxdata[0][subframe*ue->frame_parms.samples_per_tti],ue->frame_parms.samples_per_tti,1,1); @@ -231,7 +231,7 @@ void dump_dlsch_ra(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t s ue->dlsch_ra[eNB_id]->harq_processes[0]->rb_alloc_even, 2, 1, - ue->pdcch_vars[eNB_id]->num_pdcch_symbols, + ue->pdcch_vars[0&0x1][eNB_id]->num_pdcch_symbols, proc->frame_rx, subframe, 0); @@ -240,7 +240,7 @@ void dump_dlsch_ra(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t s ue->dlsch_ra[eNB_id]->harq_processes[0]->nb_rb, ue->dlsch_ra[eNB_id]->harq_processes[0]->mcs, ue->dlsch_ra[eNB_id]->harq_processes[0]->nb_rb, - ue->pdcch_vars[eNB_id]->num_pdcch_symbols, + ue->pdcch_vars[0&0x1][eNB_id]->num_pdcch_symbols, coded_bits_per_codeword); write_output("rxsigF0.m","rxsF0", ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[0],2*12*ue->frame_parms.ofdm_symbol_size,2,1); @@ -310,8 +310,10 @@ void ra_failed(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index) // if contention resolution fails, go back to PRACH PHY_vars_UE_g[Mod_id][CC_id]->UE_mode[eNB_index] = PRACH; - PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[eNB_index]->crnti_is_temporary = 0; - PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[eNB_index]->crnti = 0; + PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[0][eNB_index]->crnti_is_temporary = 0; + PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[0][eNB_index]->crnti = 0; + PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[1][eNB_index]->crnti_is_temporary = 0; + PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[1][eNB_index]->crnti = 0; LOG_E(PHY,"[UE %d] Random-access procedure fails, going back to PRACH, setting SIStatus = 0, discard temporary C-RNTI and State RRC_IDLE\n",Mod_id); //mac_xface->macphy_exit(""); } @@ -323,7 +325,8 @@ void ra_succeeded(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index) LOG_I(PHY,"[UE %d][RAPROC] Random-access procedure succeeded. Set C-RNTI = Temporary C-RNTI\n",Mod_id); - PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[eNB_index]->crnti_is_temporary = 0; + PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[0][eNB_index]->crnti_is_temporary = 0; + PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[1][eNB_index]->crnti_is_temporary = 0; PHY_vars_UE_g[Mod_id][CC_id]->ulsch_Msg3_active[eNB_index] = 0; PHY_vars_UE_g[Mod_id][CC_id]->UE_mode[eNB_index] = PUSCH; @@ -379,7 +382,7 @@ uint8_t is_SR_TXOp(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id) int subframe=proc->subframe_tx; LOG_D(PHY,"[UE %d][SR %x] Frame %d subframe %d Checking for SR TXOp (sr_ConfigIndex %d)\n", - ue->Mod_id,ue->pdcch_vars[eNB_id]->crnti,proc->frame_tx,subframe, + ue->Mod_id,ue->pdcch_vars[proc->subframe_rx & 0x1][eNB_id]->crnti,proc->frame_tx,subframe, ue->scheduling_request_config[eNB_id].sr_ConfigIndex); if (ue->scheduling_request_config[eNB_id].sr_ConfigIndex <= 4) { // 5 ms SR period @@ -632,7 +635,7 @@ void ue_compute_srs_occasion(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id CC_id, frame_tx, eNB_id, - ue->pdcch_vars[eNB_id]->crnti, + ue->pdcch_vars[proc->subframe_rx & 0x1][eNB_id]->crnti, subframe_tx); // subframe used for meas gap if (SR_payload > 0) @@ -819,10 +822,10 @@ uint16_t get_n1_pucch(PHY_VARS_UE *ue, if (frame_parms->frame_type == FDD ) { // FDD sf = (subframe<4)? subframe+6 : subframe-4; - LOG_D(PHY,"n1_pucch_UE: subframe %d, nCCE %d\n",sf,ue->pdcch_vars[eNB_id]->nCCE[sf]); + LOG_D(PHY,"n1_pucch_UE: subframe %d, nCCE %d\n",sf,ue->pdcch_vars[proc->subframe_rx&0x1][eNB_id]->nCCE[sf]); if (SR == 0) - return(frame_parms->pucch_config_common.n1PUCCH_AN + ue->pdcch_vars[eNB_id]->nCCE[sf]); + return(frame_parms->pucch_config_common.n1PUCCH_AN + ue->pdcch_vars[proc->subframe_rx & 0x1][eNB_id]->nCCE[sf]); else return(ue->scheduling_request_config[eNB_id].sr_PUCCH_ResourceIndex); } else { @@ -885,7 +888,7 @@ uint16_t get_n1_pucch(PHY_VARS_UE *ue, last_dl); // i=0 - nCCE0 = ue->pdcch_vars[eNB_id]->nCCE[last_dl]; + nCCE0 = ue->pdcch_vars[proc->subframe_rx & 0x1][eNB_id]->nCCE[last_dl]; n1_pucch0 = get_Np(frame_parms->N_RB_DL,nCCE0,0) + nCCE0+ frame_parms->pucch_config_common.n1PUCCH_AN; harq_ack0 = b[0]; @@ -927,10 +930,10 @@ uint16_t get_n1_pucch(PHY_VARS_UE *ue, // This is the offset for a particular subframe (2,3,4) => (0,2,4) last_dl = (subframe-2)<<1; // i=0 - nCCE0 = ue->pdcch_vars[eNB_id]->nCCE[5+last_dl]; + nCCE0 = ue->pdcch_vars[proc->subframe_rx & 0x1][eNB_id]->nCCE[5+last_dl]; n1_pucch0 = get_Np(frame_parms->N_RB_DL,nCCE0,0) + nCCE0+ frame_parms->pucch_config_common.n1PUCCH_AN; // i=1 - nCCE1 = ue->pdcch_vars[eNB_id]->nCCE[(6+last_dl)%10]; + nCCE1 = ue->pdcch_vars[proc->subframe_rx & 0x1][eNB_id]->nCCE[(6+last_dl)%10]; n1_pucch1 = get_Np(frame_parms->N_RB_DL,nCCE1,1) + nCCE1 + frame_parms->pucch_config_common.n1PUCCH_AN; // set ACK/NAK to values if not DTX @@ -1425,7 +1428,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB } if (isBad) { - LOG_D(PHY,"Skip PUSCH generation!\n"); + LOG_I(PHY,"Skip PUSCH generation!\n"); ue->ulsch[eNB_id]->harq_processes[harq_pid]->subframe_scheduling_flag = 0; } } @@ -1435,7 +1438,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB // deactivate service request // ue->ulsch[eNB_id]->harq_processes[harq_pid]->subframe_scheduling_flag = 0; - LOG_D(PHY,"Generating PUSCH (Abssubframe: %d.%d): harq-Id: %d, round: %d, MaxReTrans: %d \n",frame_tx,subframe_tx,harq_pid,ue->ulsch[eNB_id]->harq_processes[harq_pid]->round,ue->ulsch[eNB_id]->Mlimit); + LOG_I(PHY,"Generating PUSCH (Abssubframe: %d.%d): harq-Id: %d, round: %d, MaxReTrans: %d \n",frame_tx,subframe_tx,harq_pid,ue->ulsch[eNB_id]->harq_processes[harq_pid]->round,ue->ulsch[eNB_id]->Mlimit); if (ue->ulsch[eNB_id]->harq_processes[harq_pid]->round >= (ue->ulsch[eNB_id]->Mlimit - 1)) { LOG_D(PHY,"PUSCH MAX Retransmission achieved ==> send last pusch\n"); @@ -1489,10 +1492,10 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB ue->ulsch[eNB_id]->harq_processes[harq_pid]->O_ACK); } -#ifdef DEBUG_PHY_PROC - LOG_D(PHY, - "[UE %d][PUSCH %d] AbsSubframe %d.%d Generating PUSCH : first_rb %d, nb_rb %d, round %d, mcs %d, rv %d, cyclic_shift %d (cyclic_shift_common %d,n_DMRS2 %d,n_PRS %d), ACK (%d,%d), O_ACK %d, bundling %d\n", - Mod_id,harq_pid,frame_tx,subframe_tx, +//#ifdef DEBUG_PHY_PROC + LOG_I(PHY, + "[UE %d][PUSCH %d] AbsSubframe %d.%d %d Generating PUSCH : first_rb %d, nb_rb %d, round %d, mcs %d, rv %d, cyclic_shift %d (cyclic_shift_common %d,n_DMRS2 %d,n_PRS %d), ACK (%d,%d), O_ACK %d, bundling %d\n", + Mod_id,harq_pid,frame_tx,subframe_tx,proc->subframe_rx, first_rb,nb_rb, ue->ulsch[eNB_id]->harq_processes[harq_pid]->round, ue->ulsch[eNB_id]->harq_processes[harq_pid]->mcs, @@ -1506,7 +1509,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB ue->ulsch[eNB_id]->o_ACK[0],ue->ulsch[eNB_id]->o_ACK[1], ue->ulsch[eNB_id]->harq_processes[harq_pid]->O_ACK, ue->ulsch[eNB_id]->bundling); -#endif +//#endif @@ -1536,6 +1539,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB ue, harq_pid, eNB_id, + proc->subframe_rx, ue->transmission_mode[eNB_id],0,0)!=0) { LOG_E(PHY,"ulsch_coding.c: FATAL ERROR: returning\n"); mac_xface->macphy_exit("Error in ulsch_coding"); @@ -1548,7 +1552,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB #ifdef PHY_ABSTRACTION else { - ulsch_encoding_emul(ue->prach_resources[eNB_id]->Msg3,ue,eNB_id,harq_pid,0); + ulsch_encoding_emul(ue->prach_resources[eNB_id]->Msg3,ue,eNB_id,proc->subframe_rx,harq_pid,0); } #endif @@ -1608,6 +1612,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB ue, harq_pid, eNB_id, + proc->subframe_rx, ue->transmission_mode[eNB_id],0, Nbundled)!=0) { LOG_E(PHY,"ulsch_coding.c: FATAL ERROR: returning\n"); @@ -1619,7 +1624,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB #ifdef PHY_ABSTRACTION else { - ulsch_encoding_emul(ulsch_input_buffer,ue,eNB_id,harq_pid,0); + ulsch_encoding_emul(ulsch_input_buffer,ue,eNB_id,proc->subframe_rx,harq_pid,0); } #endif @@ -1890,7 +1895,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin CC_id, frame_tx, eNB_id, - ue->pdcch_vars[eNB_id]->crnti, + ue->pdcch_vars[proc->subframe_rx & 0x1][eNB_id]->crnti, subframe_tx); // subframe used for meas gap } else { @@ -2107,7 +2112,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin 0, // B2 not needed tx_amp, subframe_tx, - ue->pdcch_vars[eNB_id]->crnti); + ue->pdcch_vars[proc->subframe_rx & 0x1][eNB_id]->crnti); } break; @@ -2217,6 +2222,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,ui ue, harq_pid, eNB_id, + proc->subframe_rx, ue->transmission_mode[eNB_id],0, 0)!=0) { // Nbundled, to be updated!!!! LOG_E(PHY,"ulsch_coding.c: FATAL ERROR: returning\n"); @@ -2226,7 +2232,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,ui #ifdef PHY_ABSTRACTION else { - ulsch_encoding_emul(ulsch_input_buffer,ue,eNB_id,harq_pid,0); + ulsch_encoding_emul(ulsch_input_buffer,ue,eNB_id,proc->subframe_rx,harq_pid,0); } #endif @@ -2502,10 +2508,15 @@ void restart_phy(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, uint8_t eNB_id,uint8_t ab ue->pbch_vars[eNB_id]->pdu_errors_conseq=0; ue->pbch_vars[eNB_id]->pdu_errors=0; - ue->pdcch_vars[eNB_id]->dci_errors = 0; - ue->pdcch_vars[eNB_id]->dci_missed = 0; - ue->pdcch_vars[eNB_id]->dci_false = 0; - ue->pdcch_vars[eNB_id]->dci_received = 0; + ue->pdcch_vars[0][eNB_id]->dci_errors = 0; + ue->pdcch_vars[0][eNB_id]->dci_missed = 0; + ue->pdcch_vars[0][eNB_id]->dci_false = 0; + ue->pdcch_vars[0][eNB_id]->dci_received = 0; + + ue->pdcch_vars[1][eNB_id]->dci_errors = 0; + ue->pdcch_vars[1][eNB_id]->dci_missed = 0; + ue->pdcch_vars[1][eNB_id]->dci_false = 0; + ue->pdcch_vars[1][eNB_id]->dci_received = 0; ue->dlsch_errors[eNB_id] = 0; ue->dlsch_errors_last[eNB_id] = 0; @@ -2753,9 +2764,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint if (abstraction_flag == 0) { VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH, VCD_FUNCTION_IN); - rx_pdcch(&ue->common_vars, - ue->pdcch_vars, - &ue->frame_parms, + rx_pdcch(ue, proc->frame_rx, subframe_rx, eNB_id, @@ -2801,14 +2810,14 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint } LOG_D(PHY,"Calling dci_decoding_proc_emul ...\n"); - dci_cnt = dci_decoding_procedure_emul(ue->pdcch_vars, + dci_cnt = dci_decoding_procedure_emul(ue->pdcch_vars[subframe_rx&1], PHY_vars_eNB_g[i][CC_id]->num_ue_spec_dci[subframe_rx&1], PHY_vars_eNB_g[i][CC_id]->num_common_dci[subframe_rx&1], PHY_vars_eNB_g[i][CC_id]->dci_alloc[subframe_rx&1], dci_alloc_rx, eNB_id); // printf("DCI: dci_cnt %d\n",dci_cnt); - UE_id = (uint32_t)find_ue((int16_t)ue->pdcch_vars[eNB_id]->crnti,PHY_vars_eNB_g[i][CC_id]); + UE_id = (uint32_t)find_ue((int16_t)ue->pdcch_vars[subframe_rx&1][eNB_id]->crnti,PHY_vars_eNB_g[i][CC_id]); if (UE_id>=0) { // printf("Checking PHICH for UE %d (eNB %d)\n",UE_id,i); @@ -2831,9 +2840,14 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint #endif - LOG_D(PHY,"[UE %d] AbsSubFrame %d.%d, Mode %s: DCI found %i\n",ue->Mod_id,frame_rx%1024,subframe_rx,mode_string[ue->UE_mode[eNB_id]],dci_cnt); + LOG_I(PHY,"[UE %d] AbsSubFrame %d.%d, Mode %s: DCI found %i --> rnti %x / crnti %x : format %d\n", + ue->Mod_id,frame_rx%1024,subframe_rx,mode_string[ue->UE_mode[eNB_id]], + dci_cnt, + dci_alloc_rx[0].rnti, + ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->crnti, + dci_alloc_rx[0].format ); - ue->pdcch_vars[eNB_id]->dci_received += dci_cnt; + ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->dci_received += dci_cnt; #ifdef EMOS //emos_dump_UE.dci_cnt[subframe_rx] = dci_cnt; @@ -2844,7 +2858,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint if ((ue->UE_mode[eNB_id]>PRACH) && - (dci_alloc_rx[i].rnti == ue->pdcch_vars[eNB_id]->crnti) && + (dci_alloc_rx[i].rnti == ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->crnti) && (dci_alloc_rx[i].format != format0)) { @@ -2852,8 +2866,8 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint ue->Mod_id,dci_alloc_rx[i].rnti, frame_rx%1024,subframe_rx, dci_alloc_rx[i].format, - ue->pdcch_vars[eNB_id]->num_pdcch_symbols, - ue->pdcch_vars[eNB_id]->nCCE[subframe_rx], + ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->num_pdcch_symbols, + ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->nCCE[subframe_rx], get_nCCE(3,&ue->frame_parms,get_mi(&ue->frame_parms,0))); @@ -2865,7 +2879,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint (generate_ue_dlsch_params_from_dci(frame_rx, subframe_rx, (void *)&dci_alloc_rx[i].dci_pdu, - ue->pdcch_vars[eNB_id]->crnti, + ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->crnti, dci_alloc_rx[i].format, ue->dlsch[subframe_rx&0x1][eNB_id], &ue->frame_parms, @@ -2874,7 +2888,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint 0, P_RNTI, ue->transmission_mode[eNB_id]<7?0:ue->transmission_mode[eNB_id], - ue->pdcch_vars[eNB_id]->crnti_is_temporary? ue->pdcch_vars[eNB_id]->crnti: 0)==0)) { + ue->pdcch_vars[0&0x1][eNB_id]->crnti_is_temporary? ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->crnti: 0)==0)) { // update TPC for PUCCH if((dci_alloc_rx[i].format == format1) || @@ -2898,7 +2912,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint // we received a CRNTI, so we're in PUSCH if (ue->UE_mode[eNB_id] != PUSCH) { #ifdef DEBUG_PHY_PROC - LOG_D(PHY,"[UE %d] Frame %d, subframe %d: Received DCI with CRNTI %x => Mode PUSCH\n",ue->Mod_id,frame_rx,subframe_rx,ue->pdcch_vars[eNB_id]->crnti); + LOG_D(PHY,"[UE %d] Frame %d, subframe %d: Received DCI with CRNTI %x => Mode PUSCH\n",ue->Mod_id,frame_rx,subframe_rx,ue->pdcch_vars[subframe_rx&1][eNB_id]->crnti); #endif //dump_dci(&ue->frame_parms, &dci_alloc_rx[i]); ue->UE_mode[eNB_id] = PUSCH; @@ -3006,7 +3020,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint ue->Mod_id,ue->dlsch_ra[eNB_id]->harq_processes[0]->rb_alloc_even[0],ue->dlsch_ra[eNB_id]); #endif } - } else if( (dci_alloc_rx[i].rnti == ue->pdcch_vars[eNB_id]->crnti) && + } else if( (dci_alloc_rx[i].rnti == ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->crnti) && (dci_alloc_rx[i].format == format0)) { #ifdef DEBUG_PHY_PROC LOG_D(PHY,"[UE %d][PUSCH] Frame %d subframe %d: Found rnti %x, format 0, dci_cnt %d\n", @@ -3018,7 +3032,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint if ((ue->UE_mode[eNB_id] > PRACH) && (generate_ue_ulsch_params_from_dci((void *)&dci_alloc_rx[i].dci_pdu, - ue->pdcch_vars[eNB_id]->crnti, + ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->crnti, subframe_rx, format0, ue, @@ -3089,7 +3103,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint else { #ifdef DEBUG_PHY_PROC LOG_D(PHY,"[UE %d] frame %d, subframe %d: received DCI %d with RNTI=%x (C-RNTI:%x, CBA_RNTI %x) and format %d!\n",ue->Mod_id,frame_rx,subframe_rx,i,dci_alloc_rx[i].rnti, - ue->pdcch_vars[eNB_id]->crnti, + ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->crnti, ue->ulsch[eNB_id]->cba_rnti[0], dci_alloc_rx[i].format); // dump_dci(&ue->frame_parms, &dci_alloc_rx[i]); @@ -3345,7 +3359,7 @@ void process_rar(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, runmode_t mo frame_rx, ue->prach_resources[eNB_id]->ra_RNTI, dlsch0->harq_processes[0]->b, - &ue->pdcch_vars[eNB_id]->crnti, + &ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->crnti, ue->prach_resources[eNB_id]->ra_PreambleIndex); @@ -3355,11 +3369,11 @@ void process_rar(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, runmode_t mo ue->Mod_id, frame_rx, subframe_rx, - ue->pdcch_vars[eNB_id]->crnti, + ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->crnti, timing_advance); // remember this c-rnti is still a tc-rnti - ue->pdcch_vars[eNB_id]->crnti_is_temporary = 1; + ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->crnti_is_temporary = 1; //timing_advance = 0; process_timing_advance_rar(ue,proc,timing_advance); @@ -3491,7 +3505,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, dlsch0->harq_processes[harq_pid]->rb_alloc_even, dlsch0->harq_processes[harq_pid]->Qm, dlsch0->harq_processes[harq_pid]->Nl, - ue->pdcch_vars[eNB_id]->num_pdcch_symbols, + ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->num_pdcch_symbols, frame_rx, subframe_rx, ue->transmission_mode[eNB_id]<7?0:ue->transmission_mode[eNB_id]); @@ -3504,13 +3518,17 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, 0, subframe_rx<<1); stop_meas(&ue->dlsch_unscrambling_stats); - - //LOG_I(PHY,"start turbo decode for CW 0 --> nb_rb %d \n", dlsch0->harq_processes[harq_pid]->nb_rb); - //LOG_I(PHY,"start turbo decode for CW 0 --> rb_alloc_even %x \n", dlsch0->harq_processes[harq_pid]->rb_alloc_even); - //LOG_I(PHY,"start turbo decode for CW 0 --> Qm %d \n", dlsch0->harq_processes[harq_pid]->Qm); - //LOG_I(PHY,"start turbo decode for CW 0 --> Nl %d \n", dlsch0->harq_processes[harq_pid]->Nl); - //LOG_I(PHY,"start turbo decode for CW 0 --> G %d \n", dlsch0->harq_processes[harq_pid]->G); - //LOG_I(PHY,"start turbo decode for CW 0 --> Kmimo %d \n", dlsch0->Kmimo); + +#if 0 + LOG_I(PHY," ------ start turbo decoder for AbsSubframe %d.%d / %d ------ \n", frame_rx, subframe_rx, harq_pid); + LOG_I(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> nb_rb %d \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->nb_rb); + LOG_I(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> rb_alloc_even %x \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->rb_alloc_even); + LOG_I(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> Qm %d \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->Qm); + LOG_I(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> Nl %d \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->Nl); + LOG_I(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> G %d \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->G); + LOG_I(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> Kmimo %d \n", frame_rx, subframe_rx, harq_pid, dlsch0->Kmimo); + LOG_I(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> Pdcch Sym %d \n", frame_rx, subframe_rx, harq_pid, ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->num_pdcch_symbols); +#endif start_meas(&ue->dlsch_decoding_stats); ret = dlsch_decoding(ue, @@ -3525,10 +3543,10 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, dlsch0->harq_processes[harq_pid]->TBS>256?1:0); stop_meas(&ue->dlsch_decoding_stats); - //printf(" --> Unscrambling for CW0 %5.3f\n", - // (ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0)); - //printf(" --> Turbo Decoding for CW0 %5.3f\n", - // (ue->dlsch_decoding_stats.p_time)/(cpuf*1000.0)); + printf(" --> Unscrambling for CW0 %5.3f\n", + (ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0)); + printf(" --> Turbo Decoding for CW0 %5.3f\n", + (ue->dlsch_decoding_stats.p_time)/(cpuf*1000.0)); if(is_cw1_active) { @@ -3538,7 +3556,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, dlsch1->harq_processes[harq_pid]->rb_alloc_even, dlsch1->harq_processes[harq_pid]->Qm, dlsch1->harq_processes[harq_pid]->Nl, - ue->pdcch_vars[eNB_id]->num_pdcch_symbols, + ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->num_pdcch_symbols, frame_rx, subframe_rx, ue->transmission_mode[eNB_id]<7?0:ue->transmission_mode[eNB_id]); @@ -3553,13 +3571,15 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, subframe_rx<<1); stop_meas(&ue->dlsch_unscrambling_stats); - //LOG_I(PHY,"start turbo decode for CW 1 --> nb_rb %d \n", dlsch1->harq_processes[harq_pid]->nb_rb); - //LOG_I(PHY,"start turbo decode for CW 1 --> rb_alloc_even %x \n", dlsch1->harq_processes[harq_pid]->rb_alloc_even); - //LOG_I(PHY,"start turbo decode for CW 1 --> Qm %d \n", dlsch1->harq_processes[harq_pid]->Qm); - //LOG_I(PHY,"start turbo decode for CW 1 --> Nl %d \n", dlsch1->harq_processes[harq_pid]->Nl); - //LOG_I(PHY,"start turbo decode for CW 1 --> G %d \n", dlsch1->harq_processes[harq_pid]->G); - //LOG_I(PHY,"start turbo decode for CW 1 --> Kmimo %d \n", dlsch1->Kmimo); - +#if 0 + LOG_I(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> nb_rb %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->nb_rb); + LOG_I(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> rb_alloc_even %x \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->rb_alloc_even); + LOG_I(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> Qm %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->Qm); + LOG_I(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> Nl %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->Nl); + LOG_I(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> G %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->G); + LOG_I(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> Kmimo %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->Kmimo); + LOG_I(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> Pdcch Sym %d \n", frame_rx, subframe_rx, harq_pid, ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->num_pdcch_symbols); +#endif start_meas(&ue->dlsch_decoding_stats); ret1 = dlsch_decoding(ue, pdsch_vars->llr[1], @@ -3573,11 +3593,13 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, dlsch1->harq_processes[harq_pid]->TBS>256?1:0); stop_meas(&ue->dlsch_decoding_stats); - //printf(" --> Unscrambling for CW1 %5.3f\n", - // (ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0)); - //printf(" --> Turbo Decoding for CW1 %5.3f\n", - // (ue->dlsch_decoding_stats.p_time)/(cpuf*1000.0)); + printf(" --> Unscrambling for CW1 %5.3f\n", + (ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0)); + printf(" --> Turbo Decoding for CW1 %5.3f\n", + (ue->dlsch_decoding_stats.p_time)/(cpuf*1000.0)); } + + LOG_I(PHY," ------ end turbo decoder for AbsSubframe %d.%d ------ \n", frame_rx, subframe_rx); } else { @@ -3596,7 +3618,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, if(dlsch0->rnti != 0xffff) { - LOG_D(PHY,"[UE %d][PDSCH %x/%d] AbsSubframe %d.%d : DLSCH CW0 in error (rv %d,mcs %d,TBS %d)\n", + LOG_I(PHY,"[UE %d][PDSCH %x/%d] AbsSubframe %d.%d : DLSCH CW0 in error (rv %d,mcs %d,TBS %d)\n", ue->Mod_id,dlsch0->rnti, harq_pid,frame_rx,subframe_rx, dlsch0->harq_processes[harq_pid]->rvidx, @@ -3608,7 +3630,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, } else { if(dlsch0->rnti != 0xffff) { - LOG_D(PHY,"[UE %d][PDSCH %x/%d] AbsSubframe %d.%d : Received DLSCH CW0 (rv %d,mcs %d,TBS %d)\n", + LOG_I(PHY,"[UE %d][PDSCH %x/%d] AbsSubframe %d.%d : Received DLSCH CW0 (rv %d,mcs %d,TBS %d)\n", ue->Mod_id,dlsch0->rnti, harq_pid,frame_rx,subframe_rx, dlsch0->harq_processes[harq_pid]->rvidx, @@ -3677,7 +3699,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, if(is_cw1_active) { if (ret1 == (1+dlsch0->max_turbo_iterations)) { - LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d DLSCH CW1 in error (rv %d,mcs %d,TBS %d)\n", + LOG_I(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d DLSCH CW1 in error (rv %d,mcs %d,TBS %d)\n", ue->Mod_id,dlsch0->rnti, harq_pid,frame_rx,subframe_rx, dlsch0->harq_processes[harq_pid]->rvidx, @@ -3685,7 +3707,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, dlsch0->harq_processes[harq_pid]->TBS); } else { - LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d: Received DLSCH CW1 (rv %d,mcs %d,TBS %d)\n", + LOG_I(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d: Received DLSCH CW1 (rv %d,mcs %d,TBS %d)\n", ue->Mod_id,dlsch0->rnti, harq_pid,frame_rx,subframe_rx, dlsch0->harq_processes[harq_pid]->rvidx, @@ -3765,6 +3787,8 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ue->frame_parms.samples_per_tti * 4)); // start timers + + LOG_I(PHY," ****** start RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, subframe_rx); start_meas(&ue->phy_proc_rx[subframe_rx&0x1]); start_meas(&ue->generic_stat); @@ -3818,6 +3842,9 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ l=1; } + + LOG_I(PHY," ------ slot 0 Processing: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); + LOG_I(PHY," ------ --> FFT/ChannelEst/PDCCH slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); for (; l<=l2; l++) { if (abstraction_flag == 0) { start_meas(&ue->ofdm_demod_stats); @@ -3841,12 +3868,13 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin LOG_E(PHY,"[UE %d] Frame %d, subframe %d: Error in pdcch procedures\n",ue->Mod_id,frame_rx,subframe_rx); return(-1); } - LOG_D(PHY,"num_pdcch_symbols %d\n",ue->pdcch_vars[eNB_id]->num_pdcch_symbols); + LOG_D(PHY,"num_pdcch_symbols %d\n",ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->num_pdcch_symbols); } } // for l=1..l2 ue_measurement_procedures(l-1,ue,proc,eNB_id,(subframe_rx<<1),abstraction_flag,mode); + LOG_I(PHY," ------ end FFT/ChannelEst/PDCCH slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); // If this is PMCH, call procedures and return if (pmch_flag == 1) { ue_pmch_procedures(ue,proc,eNB_id,abstraction_flag); @@ -3862,8 +3890,9 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin // first slot has been processed (FFTs + Channel Estimation, PCFICH/PHICH/PDCCH) stop_meas(&ue->generic_stat); - //printf("[SFN %d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0)); + printf("[SFN %d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0)); + LOG_I(PHY," ------ --> PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); start_meas(&ue->generic_stat); // do procedures for C-RNTI if (ue->dlsch[subframe_rx&0x1][eNB_id][0]->active == 1) { @@ -3874,11 +3903,13 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin PDSCH, ue->dlsch[subframe_rx&0x1][eNB_id][0], NULL, - ue->pdcch_vars[eNB_id]->num_pdcch_symbols, + ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->num_pdcch_symbols, ue->frame_parms.symbols_per_tti>>1, abstraction_flag); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT); } + + LOG_I(PHY," ------ end PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); // do procedures for SI-RNTI if ((ue->dlsch_SI[eNB_id]) && (ue->dlsch_SI[eNB_id]->active == 1)) { VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_IN); @@ -3888,7 +3919,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin SI_PDSCH, ue->dlsch_SI[eNB_id], NULL, - ue->pdcch_vars[eNB_id]->num_pdcch_symbols, + ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->num_pdcch_symbols, ue->frame_parms.symbols_per_tti>>1, abstraction_flag); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_OUT); @@ -3903,7 +3934,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin P_PDSCH, ue->dlsch_p[eNB_id], NULL, - ue->pdcch_vars[eNB_id]->num_pdcch_symbols, + ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->num_pdcch_symbols, ue->frame_parms.symbols_per_tti>>1, abstraction_flag); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P, VCD_FUNCTION_OUT); @@ -3918,12 +3949,15 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin RA_PDSCH, ue->dlsch_ra[eNB_id], NULL, - ue->pdcch_vars[eNB_id]->num_pdcch_symbols, + ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->num_pdcch_symbols, ue->frame_parms.symbols_per_tti>>1, abstraction_flag); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA, VCD_FUNCTION_OUT); } + LOG_I(PHY," ------ slot 1 Processing: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); + LOG_I(PHY," ------ --> FFT/ChannelEst/PDCCH slot 1: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); + if (subframe_select(&ue->frame_parms,subframe_rx) != SF_S) { // do front-end processing for second slot, and first symbol of next subframe for (l=1; lframe_parms.symbols_per_tti>>1; l++) { if (abstraction_flag == 0) { @@ -3957,15 +3991,16 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin } // not an S-subframe stop_meas(&ue->generic_stat); - //printf("[SFN %d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0)); + printf("[SFN %d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0)); - // run pbch procedures if subframe is 0 + LOG_I(PHY," ------ end FFT/ChannelEst/PDCCH slot 1: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); if ( (subframe_rx == 0) && (ue->decode_MIB == 1)) { ue_pbch_procedures(eNB_id,ue,proc,abstraction_flag); } // do procedures for C-RNTI + LOG_I(PHY," ------ --> PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); if (ue->dlsch[subframe_rx&0x1][eNB_id][0]->active == 1) { VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN); start_meas(&ue->pdsch_procedures_stat); @@ -3979,7 +4014,9 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ue->frame_parms.symbols_per_tti-1, abstraction_flag); stop_meas(&ue->pdsch_procedures_stat); + LOG_I(PHY," ------ end PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); + LOG_I(PHY," ------ --> PDSCH Turbo Decoder slot 0/1: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); start_meas(&ue->dlsch_procedures_stat); ue_dlsch_procedures(ue, proc, @@ -3991,15 +4028,14 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin mode, abstraction_flag); stop_meas(&ue->dlsch_procedures_stat); - //printf("[SFN %d] Slot1: Pdsch Proc %5.2f\n",subframe_rx,ue->pdsch_procedures_stat.p_time/(cpuf*1000.0)); - //printf("[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",subframe_rx,ue->dlsch_procedures_stat.p_time/(cpuf*1000.0)); + printf("[SFN %d] Slot1: Pdsch Proc %5.2f\n",subframe_rx,ue->pdsch_procedures_stat.p_time/(cpuf*1000.0)); + printf("[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",subframe_rx,ue->dlsch_procedures_stat.p_time/(cpuf*1000.0)); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT); } start_meas(&ue->generic_stat); - // do procedures for SI-RNTI if ((ue->dlsch_SI[eNB_id]) && (ue->dlsch_SI[eNB_id]->active == 1)) { ue_pdsch_procedures(ue, @@ -4105,8 +4141,9 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT); stop_meas(&ue->phy_proc_rx[subframe_rx&0x1]); - //printf("------FULL RX PROC [SFN %d]: %5.2f ------\n",subframe_rx,ue->phy_proc_rx[subframe_rx&0x1].p_time/(cpuf*1000.0)); + printf("------FULL RX PROC [SFN %d]: %5.2f ------\n",subframe_rx,ue->phy_proc_rx[subframe_rx&0x1].p_time/(cpuf*1000.0)); + LOG_I(PHY," ****** end RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, subframe_rx); return (0); } diff --git a/openair1/SIMULATION/ETH_TRANSPORT/emu_transport.c b/openair1/SIMULATION/ETH_TRANSPORT/emu_transport.c index 6d3d4cabb3..76b72e321f 100644 --- a/openair1/SIMULATION/ETH_TRANSPORT/emu_transport.c +++ b/openair1/SIMULATION/ETH_TRANSPORT/emu_transport.c @@ -488,7 +488,8 @@ void fill_phy_ue_vars(unsigned int ue_id, uint8_t CC_id,unsigned int last_slot) rnti = UE_transport_info[ue_id][CC_id].rnti[n_enb]; enb_id = UE_transport_info[ue_id][CC_id].eNB_id[n_enb]; - PHY_vars_UE_g[ue_id][CC_id]->pdcch_vars[enb_id]->crnti=rnti; + PHY_vars_UE_g[ue_id][CC_id]->pdcch_vars[0][enb_id]->crnti=rnti; + PHY_vars_UE_g[ue_id][CC_id]->pdcch_vars[1][enb_id]->crnti=rnti; harq_pid = UE_transport_info[ue_id][CC_id].harq_pid[n_enb]; diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index ddc108a7c8..ac26a9259c 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -1991,7 +1991,7 @@ int main(int argc, char **argv) } */ - UE->pdcch_vars[0]->crnti = n_rnti; + UE->pdcch_vars[0][0]->crnti = n_rnti; // Fill in UL_alloc UL_alloc_pdu.type = 0; @@ -2548,11 +2548,11 @@ int main(int argc, char **argv) write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4); //pdcch_vars - write_output("pdcchF0_ext.m","pdcchF_ext", UE->pdcch_vars[eNB_id]->rxdataF_ext[0],2*3*UE->frame_parms.ofdm_symbol_size,1,1); - write_output("pdcch00_ch0_ext.m","pdcch00_ch0_ext",UE->pdcch_vars[eNB_id]->dl_ch_estimates_ext[0],300*3,1,1); + write_output("pdcchF0_ext.m","pdcchF_ext", UE->pdcch_vars[0][eNB_id]->rxdataF_ext[0],2*3*UE->frame_parms.ofdm_symbol_size,1,1); + write_output("pdcch00_ch0_ext.m","pdcch00_ch0_ext",UE->pdcch_vars[0][eNB_id]->dl_ch_estimates_ext[0],300*3,1,1); - write_output("pdcch_rxF_comp0.m","pdcch0_rxF_comp0",UE->pdcch_vars[eNB_id]->rxdataF_comp[0],4*300,1,1); - write_output("pdcch_rxF_llr.m","pdcch_llr",UE->pdcch_vars[eNB_id]->llr,2400,1,4); + write_output("pdcch_rxF_comp0.m","pdcch0_rxF_comp0",UE->pdcch_vars[0][eNB_id]->rxdataF_comp[0],4*300,1,1); + write_output("pdcch_rxF_llr.m","pdcch_llr",UE->pdcch_vars[0][eNB_id]->llr,2400,1,4); } @@ -2652,11 +2652,11 @@ int main(int argc, char **argv) //write_output("dlsch_w.m","w",eNB->dlsch[0][0]->harq_processes[0]->w[0],3*(tbs+64),1,4); //write_output("dlsch_w.m","w",UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->w[0],3*(tbs+64),1,0); //pdcch_vars - write_output("pdcchF0_ext.m","pdcchF_ext", UE->pdcch_vars[eNB_id]->rxdataF_ext[0],2*3*UE->frame_parms.ofdm_symbol_size,1,1); - write_output("pdcch00_ch0_ext.m","pdcch00_ch0_ext",UE->pdcch_vars[eNB_id]->dl_ch_estimates_ext[0],300*3,1,1); + write_output("pdcchF0_ext.m","pdcchF_ext", UE->pdcch_vars[0][eNB_id]->rxdataF_ext[0],2*3*UE->frame_parms.ofdm_symbol_size,1,1); + write_output("pdcch00_ch0_ext.m","pdcch00_ch0_ext",UE->pdcch_vars[0][eNB_id]->dl_ch_estimates_ext[0],300*3,1,1); - write_output("pdcch_rxF_comp0.m","pdcch0_rxF_comp0",UE->pdcch_vars[eNB_id]->rxdataF_comp[0],4*300,1,1); - write_output("pdcch_rxF_llr.m","pdcch_llr",UE->pdcch_vars[eNB_id]->llr,2400,1,4); + write_output("pdcch_rxF_comp0.m","pdcch0_rxF_comp0",UE->pdcch_vars[0][eNB_id]->rxdataF_comp[0],4*300,1,1); + write_output("pdcch_rxF_llr.m","pdcch_llr",UE->pdcch_vars[0][eNB_id]->llr,2400,1,4); if (round == 3) exit(-1); } diff --git a/openair1/SIMULATION/LTE_PHY/pdcchsim.c b/openair1/SIMULATION/LTE_PHY/pdcchsim.c index 1ba79bdb0a..ebc178a55e 100644 --- a/openair1/SIMULATION/LTE_PHY/pdcchsim.c +++ b/openair1/SIMULATION/LTE_PHY/pdcchsim.c @@ -1085,11 +1085,11 @@ int main(int argc, char **argv) // write_output("H00.m","h00",&(UE->common_vars.dl_ch_estimates[0][0][0]),((frame_parms->Ncp==0)?7:6)*(eNB->frame_parms.ofdm_symbol_size),1,1); // do PDCCH procedures here - UE->pdcch_vars[0]->crnti = n_rnti; + UE->pdcch_vars[0][0]->crnti = n_rnti; // printf("Doing RX : num_pdcch_symbols at TX %d\n",num_pdcch_symbols); rx_pdcch(&UE->common_vars, - UE->pdcch_vars, + UE->pdcch_vars[0], &UE->frame_parms, trial, subframe, @@ -1118,7 +1118,7 @@ int main(int argc, char **argv) dl_rx=0; if (n_frames==1) { - numCCE = get_nCCE(UE->pdcch_vars[0]->num_pdcch_symbols, &UE->frame_parms, get_mi(&UE->frame_parms,subframe)); + numCCE = get_nCCE(UE->pdcch_vars[0][0]->num_pdcch_symbols, &UE->frame_parms, get_mi(&UE->frame_parms,subframe)); for (i = 0; i < dci_cnt; i++) printf("dci %d: rnti 0x%x, format %d, L %d, nCCE %d/%d dci_length %d\n",i, dci_alloc_rx[i].rnti, dci_alloc_rx[i].format, @@ -1167,7 +1167,7 @@ int main(int argc, char **argv) // exit(-1); } - if (UE->pdcch_vars[0]->num_pdcch_symbols != num_pdcch_symbols) + if (UE->pdcch_vars[0][0]->num_pdcch_symbols != num_pdcch_symbols) n_errors_cfi++; /* @@ -1224,9 +1224,9 @@ int main(int argc, char **argv) if (n_tx==2) write_output("H10.m","h10",&(UE->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[0][2][0]),((frame_parms->Ncp==0)?7:6)*(eNB->frame_parms.ofdm_symbol_size),1,1); - write_output("pdcch_rxF_ext0.m","pdcch_rxF_ext0",UE->pdcch_vars[eNb_id]->rxdataF_ext[0],3*12*UE->frame_parms.N_RB_DL,1,1); - write_output("pdcch_rxF_comp0.m","pdcch0_rxF_comp0",UE->pdcch_vars[eNb_id]->rxdataF_comp[0],4*12*UE->frame_parms.N_RB_DL,1,1); - write_output("pdcch_rxF_llr.m","pdcch_llr",UE->pdcch_vars[eNb_id]->llr,2400,1,4); + write_output("pdcch_rxF_ext0.m","pdcch_rxF_ext0",UE->pdcch_vars[0][eNb_id]->rxdataF_ext[0],3*12*UE->frame_parms.N_RB_DL,1,1); + write_output("pdcch_rxF_comp0.m","pdcch0_rxF_comp0",UE->pdcch_vars[0][eNb_id]->rxdataF_comp[0],4*12*UE->frame_parms.N_RB_DL,1,1); + write_output("pdcch_rxF_llr.m","pdcch_llr",UE->pdcch_vars[0][eNb_id]->llr,2400,1,4); } lte_sync_time_free(); diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index 55c6b8387e..a2f9f1a484 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -630,7 +630,7 @@ int main(int argc, char **argv) fl_show_form (form_enb->lte_phy_scope_enb, FL_PLACE_HOTSPOT, FL_FULLBORDER, title); } - UE->pdcch_vars[0]->crnti = 14; + UE->pdcch_vars[0][0]->crnti = 14; UE->frame_parms.soundingrs_ul_config_common.srs_BandwidthConfig = 2; UE->frame_parms.soundingrs_ul_config_common.srs_SubframeConfig = 7; diff --git a/openair3/NAS/TOOLS/network.h b/openair3/NAS/TOOLS/network.h index 0d60359c57..d7044c8e51 100644 --- a/openair3/NAS/TOOLS/network.h +++ b/openair3/NAS/TOOLS/network.h @@ -61,7 +61,7 @@ Description Defines a list of PLMN network operators #define VDF5 11 -#define SELECTED_PLMN OAI_LTEBOX //SFR1 +#define SELECTED_PLMN TEST1 //SFR1 #define TEST_PLMN {0,0,0x0f,1,1,0} // 00101 #define SFR_PLMN_1 {0,2,0x0f,8,0,1} // 20810 diff --git a/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf b/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf index 84ec59a36b..05db6be4d1 100644 --- a/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf +++ b/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf @@ -86,14 +86,14 @@ UE0: }; SIM: { - MSIN="0100001111"; - USIM_API_K="fec86ba6eb707ed08905757b1bb44b8f"; + MSIN="000001234"; + USIM_API_K="000102030405060708090A0B0C0D0E0F"; OPC="C42449363BBAD02B66D16BC975D77CC1"; - MSISDN="33611123456"; + MSISDN="000000000000";//"33611123456"; }; # Home PLMN Selector with Access Technology - HPLMN= "20893"; + HPLMN= "00101"; # User controlled PLMN Selector with Access Technology UCPLMN_LIST = (); diff --git a/openair3/NAS/UE/ESM/esm_ebr_context.c b/openair3/NAS/UE/ESM/esm_ebr_context.c index bfa4a04cc8..31f215e359 100644 --- a/openair3/NAS/UE/ESM/esm_ebr_context.c +++ b/openair3/NAS/UE/ESM/esm_ebr_context.c @@ -286,7 +286,7 @@ int esm_ebr_context_create( LOG_TRACE(INFO, "ESM-PROC - executing %s ", command_line); - if (system(command_line)) ; /* TODO: what to do? */ + //if (system(command_line)) ; /* TODO: what to do? */ break; diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 65f578fd25..9c4f6d07da 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -1579,9 +1579,15 @@ int main( int argc, char **argv ) { UE[CC_id]->X_u); if (UE[CC_id]->mac_enabled == 1) - UE[CC_id]->pdcch_vars[0]->crnti = 0x1234; + { + UE[CC_id]->pdcch_vars[0][0]->crnti = 0x1234; + UE[CC_id]->pdcch_vars[1][0]->crnti = 0x1234; + } else - UE[CC_id]->pdcch_vars[0]->crnti = 0x1235; + { + UE[CC_id]->pdcch_vars[0][0]->crnti = 0x1235; + UE[CC_id]->pdcch_vars[1][0]->crnti = 0x1235; + } UE[CC_id]->rx_total_gain_dB = (int)rx_gain[CC_id][0] + rx_gain_off; UE[CC_id]->tx_power_max_dBm = tx_max_power[CC_id]; diff --git a/targets/SIMU/USER/channel_sim.c b/targets/SIMU/USER/channel_sim.c index aff1f789ee..3913de6016 100644 --- a/targets/SIMU/USER/channel_sim.c +++ b/targets/SIMU/USER/channel_sim.c @@ -145,7 +145,7 @@ void do_DL_sig(channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX][MAX_N // find out which eNB the UE is attached to for (eNB_id=0; eNB_idpdcch_vars[0]->crnti,PHY_vars_eNB_g[eNB_id][CC_id])>=0) { + if (find_ue(PHY_vars_UE_g[UE_id][CC_id]->pdcch_vars[0][0]->crnti,PHY_vars_eNB_g[eNB_id][CC_id])>=0) { // UE with UE_id is connected to eNb with eNB_id att_eNB_id=eNB_id; LOG_D(OCM,"A: UE attached to eNB (UE%d->eNB%d)\n",UE_id,eNB_id); diff --git a/targets/SIMU/USER/init_lte.c b/targets/SIMU/USER/init_lte.c index a99ccf2c09..3baf8fdad6 100644 --- a/targets/SIMU/USER/init_lte.c +++ b/targets/SIMU/USER/init_lte.c @@ -161,9 +161,9 @@ PHY_VARS_UE* init_lte_UE(LTE_DL_FRAME_PARMS *frame_parms, memcpy(&(PHY_vars_UE->frame_parms), frame_parms, sizeof(LTE_DL_FRAME_PARMS)); phy_init_lte_ue(PHY_vars_UE,1,abstraction_flag); - for (int l=0; l<2; l++) { - for (i=0; idlsch[l][i][j] = new_ue_dlsch(1,NUMBER_OF_HARQ_PID_MAX,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag); if (!PHY_vars_UE->dlsch[l][i][j]) { @@ -172,21 +172,21 @@ PHY_VARS_UE* init_lte_UE(LTE_DL_FRAME_PARMS *frame_parms, } else LOG_D(PHY,"dlsch[%d][%d] => %p\n",UE_id,i,PHY_vars_UE->dlsch[l][i][j]); } - - - - PHY_vars_UE->ulsch[i] = new_ue_ulsch(frame_parms->N_RB_UL, abstraction_flag); - - if (!PHY_vars_UE->ulsch[i]) { - LOG_E(PHY,"Can't get ue ulsch structures\n"); - exit(-1); - } - - PHY_vars_UE->dlsch_SI[i] = new_ue_dlsch(1,1,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag); - PHY_vars_UE->dlsch_ra[i] = new_ue_dlsch(1,1,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag); - - PHY_vars_UE->transmission_mode[i] = frame_parms->nb_antenna_ports_eNB==1 ? 1 : 2; } + + + + PHY_vars_UE->ulsch[i] = new_ue_ulsch(frame_parms->N_RB_UL, abstraction_flag); + + if (!PHY_vars_UE->ulsch[i]) { + LOG_E(PHY,"Can't get ue ulsch structures\n"); + exit(-1); + } + + PHY_vars_UE->dlsch_SI[i] = new_ue_dlsch(1,1,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag); + PHY_vars_UE->dlsch_ra[i] = new_ue_dlsch(1,1,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag); + + PHY_vars_UE->transmission_mode[i] = frame_parms->nb_antenna_ports_eNB==1 ? 1 : 2; } PHY_vars_UE->frame_parms.pucch_config_common.deltaPUCCH_Shift = 1; diff --git a/targets/SIMU/USER/oaisim_functions.c b/targets/SIMU/USER/oaisim_functions.c index c47dc10caf..c00bb50401 100644 --- a/targets/SIMU/USER/oaisim_functions.c +++ b/targets/SIMU/USER/oaisim_functions.c @@ -1428,7 +1428,7 @@ void init_openair1(void) else PHY_vars_UE_g[UE_id][CC_id]->mac_enabled=1; - PHY_vars_UE_g[UE_id][CC_id]->pdcch_vars[0]->crnti = 0x1235 + UE_id; + PHY_vars_UE_g[UE_id][CC_id]->pdcch_vars[0][0]->crnti = 0x1235 + UE_id; PHY_vars_UE_g[UE_id][CC_id]->current_dlsch_cqi[0] = 10; LOG_I(EMU, "UE %d mode is initialized to %d\n", UE_id, PHY_vars_UE_g[UE_id][CC_id]->UE_mode[0] ); From 28a50c15e9b9356ee5773e619e266551099c6fbd Mon Sep 17 00:00:00 2001 From: gabrielC Date: Tue, 14 Mar 2017 15:35:21 +0100 Subject: [PATCH 26/47] Remove some print and correct rnti for the pdcch_vars odd/even subframe --- openair1/PHY/LTE_TRANSPORT/dci.c | 2 +- openair1/PHY/LTE_TRANSPORT/phich.c | 8 +-- openair1/PHY/LTE_TRANSPORT/ulsch_coding.c | 2 +- openair1/SCHED/phy_procedures_lte_ue.c | 77 ++++++++++++----------- 4 files changed, 46 insertions(+), 43 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dci.c b/openair1/PHY/LTE_TRANSPORT/dci.c index df4146adec..21c4c8aba8 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci.c +++ b/openair1/PHY/LTE_TRANSPORT/dci.c @@ -2890,7 +2890,7 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars, } } - LOG_I(PHY,"DCI decoding CRNTI [format: %d, nCCE[subframe: %d]: %d ], AggregationLevel %d \n",format_c, subframe, pdcch_vars[eNB_id]->nCCE[subframe],L2); + LOG_D(PHY,"DCI decoding CRNTI [format: %d, nCCE[subframe: %d]: %d ], AggregationLevel %d \n",format_c, subframe, pdcch_vars[eNB_id]->nCCE[subframe],L2); // memcpy(&dci_alloc[*dci_cnt].dci_pdu[0],dci_decoded_output,sizeof_bytes); diff --git a/openair1/PHY/LTE_TRANSPORT/phich.c b/openair1/PHY/LTE_TRANSPORT/phich.c index bb8c1f119d..d363d4dcf6 100644 --- a/openair1/PHY/LTE_TRANSPORT/phich.c +++ b/openair1/PHY/LTE_TRANSPORT/phich.c @@ -1368,7 +1368,7 @@ void rx_phich(PHY_VARS_UE *ue, if (HI16>0) { //NACK if (ue->ulsch_Msg3_active[eNB_id] == 1) { - LOG_I(PHY,"[UE %d][PUSCH %d][RAPROC] Frame %d subframe %d Msg3 PHICH, received NAK (%d) nseq %d, ngroup %d\n", + LOG_D(PHY,"[UE %d][PUSCH %d][RAPROC] Frame %d subframe %d Msg3 PHICH, received NAK (%d) nseq %d, ngroup %d\n", ue->Mod_id,harq_pid, proc->frame_rx, subframe, @@ -1389,7 +1389,7 @@ void rx_phich(PHY_VARS_UE *ue, } } else { //#ifdef DEBUG_PHICH - LOG_I(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d PHICH, received NAK (%d) nseq %d, ngroup %d round %d (Mlimit %d)\n", + LOG_D(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d PHICH, received NAK (%d) nseq %d, ngroup %d round %d (Mlimit %d)\n", ue->Mod_id,harq_pid, proc->frame_rx%1024, subframe, @@ -1436,7 +1436,7 @@ void rx_phich(PHY_VARS_UE *ue, } else { //ACK if (ue->ulsch_Msg3_active[eNB_id] == 1) { - LOG_I(PHY,"[UE %d][PUSCH %d][RAPROC] Frame %d subframe %d Msg3 PHICH, received ACK (%d) nseq %d, ngroup %d\n\n", + LOG_D(PHY,"[UE %d][PUSCH %d][RAPROC] Frame %d subframe %d Msg3 PHICH, received ACK (%d) nseq %d, ngroup %d\n\n", ue->Mod_id,harq_pid, proc->frame_rx, subframe, @@ -1444,7 +1444,7 @@ void rx_phich(PHY_VARS_UE *ue, nseq_PHICH,ngroup_PHICH); } else { //#ifdef PHICH_DEBUG - LOG_I(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d PHICH, received ACK (%d) nseq %d, ngroup %d\n\n", + LOG_D(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d PHICH, received ACK (%d) nseq %d, ngroup %d\n\n", ue->Mod_id,harq_pid, proc->frame_rx%1024, subframe, HI16, diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_coding.c b/openair1/PHY/LTE_TRANSPORT/ulsch_coding.c index e64b959e68..bd49fdacb0 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_coding.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_coding.c @@ -265,7 +265,7 @@ uint32_t ulsch_encoding(uint8_t *a, rnti = ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->crnti; fill_CQI(ulsch,meas,0,harq_pid,ue->frame_parms.N_RB_DL,rnti, tmode,ue->sinr_eff); - LOG_I(PHY,"ULSCH Encoding rnti %x \n", rnti); + LOG_D(PHY,"ULSCH Encoding rnti %x \n", rnti); print_CQI(ulsch->o,ulsch->uci_format,0,ue->frame_parms.N_RB_DL); // save PUSCH pmi for later (transmission modes 4,5,6) diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c index 2bd4590fe0..4e5e6cb7b1 100644 --- a/openair1/SCHED/phy_procedures_lte_ue.c +++ b/openair1/SCHED/phy_procedures_lte_ue.c @@ -1438,7 +1438,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB // deactivate service request // ue->ulsch[eNB_id]->harq_processes[harq_pid]->subframe_scheduling_flag = 0; - LOG_I(PHY,"Generating PUSCH (Abssubframe: %d.%d): harq-Id: %d, round: %d, MaxReTrans: %d \n",frame_tx,subframe_tx,harq_pid,ue->ulsch[eNB_id]->harq_processes[harq_pid]->round,ue->ulsch[eNB_id]->Mlimit); + LOG_D(PHY,"Generating PUSCH (Abssubframe: %d.%d): harq-Id: %d, round: %d, MaxReTrans: %d \n",frame_tx,subframe_tx,harq_pid,ue->ulsch[eNB_id]->harq_processes[harq_pid]->round,ue->ulsch[eNB_id]->Mlimit); if (ue->ulsch[eNB_id]->harq_processes[harq_pid]->round >= (ue->ulsch[eNB_id]->Mlimit - 1)) { LOG_D(PHY,"PUSCH MAX Retransmission achieved ==> send last pusch\n"); @@ -1492,8 +1492,8 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB ue->ulsch[eNB_id]->harq_processes[harq_pid]->O_ACK); } -//#ifdef DEBUG_PHY_PROC - LOG_I(PHY, +#ifdef DEBUG_PHY_PROC + LOG_D(PHY, "[UE %d][PUSCH %d] AbsSubframe %d.%d %d Generating PUSCH : first_rb %d, nb_rb %d, round %d, mcs %d, rv %d, cyclic_shift %d (cyclic_shift_common %d,n_DMRS2 %d,n_PRS %d), ACK (%d,%d), O_ACK %d, bundling %d\n", Mod_id,harq_pid,frame_tx,subframe_tx,proc->subframe_rx, first_rb,nb_rb, @@ -1509,7 +1509,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB ue->ulsch[eNB_id]->o_ACK[0],ue->ulsch[eNB_id]->o_ACK[1], ue->ulsch[eNB_id]->harq_processes[harq_pid]->O_ACK, ue->ulsch[eNB_id]->bundling); -//#endif +#endif @@ -2840,7 +2840,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint #endif - LOG_I(PHY,"[UE %d] AbsSubFrame %d.%d, Mode %s: DCI found %i --> rnti %x / crnti %x : format %d\n", + LOG_D(PHY,"[UE %d] AbsSubFrame %d.%d, Mode %s: DCI found %i --> rnti %x / crnti %x : format %d\n", ue->Mod_id,frame_rx%1024,subframe_rx,mode_string[ue->UE_mode[eNB_id]], dci_cnt, dci_alloc_rx[0].rnti, @@ -3361,16 +3361,18 @@ void process_rar(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, runmode_t mo dlsch0->harq_processes[0]->b, &ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->crnti, ue->prach_resources[eNB_id]->ra_PreambleIndex); + + ue->pdcch_vars[(subframe_rx+1) & 0x1][eNB_id]->crnti = ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->crnti; if (timing_advance!=0xffff) { - LOG_D(PHY,"[UE %d][RAPROC] Frame %d subframe %d Got rnti %x and timing advance %d from RAR\n", - ue->Mod_id, - frame_rx, - subframe_rx, - ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->crnti, - timing_advance); + LOG_D(PHY,"[UE %d][RAPROC] Frame %d subframe %d Got rnti %x and timing advance %d from RAR\n", + ue->Mod_id, + frame_rx, + subframe_rx, + ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->crnti, + timing_advance); // remember this c-rnti is still a tc-rnti ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->crnti_is_temporary = 1; @@ -3543,9 +3545,9 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, dlsch0->harq_processes[harq_pid]->TBS>256?1:0); stop_meas(&ue->dlsch_decoding_stats); - printf(" --> Unscrambling for CW0 %5.3f\n", + LOG_D(PHY," --> Unscrambling for CW0 %5.3f\n", (ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0)); - printf(" --> Turbo Decoding for CW0 %5.3f\n", + LOG_D(PHY," --> Turbo Decoding for CW0 %5.3f\n", (ue->dlsch_decoding_stats.p_time)/(cpuf*1000.0)); if(is_cw1_active) @@ -3593,13 +3595,13 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, dlsch1->harq_processes[harq_pid]->TBS>256?1:0); stop_meas(&ue->dlsch_decoding_stats); - printf(" --> Unscrambling for CW1 %5.3f\n", + LOG_D(PHY," --> Unscrambling for CW1 %5.3f\n", (ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0)); - printf(" --> Turbo Decoding for CW1 %5.3f\n", + LOG_D(PHY," --> Turbo Decoding for CW1 %5.3f\n", (ue->dlsch_decoding_stats.p_time)/(cpuf*1000.0)); } - LOG_I(PHY," ------ end turbo decoder for AbsSubframe %d.%d ------ \n", frame_rx, subframe_rx); + LOG_D(PHY," ------ end turbo decoder for AbsSubframe %d.%d ------ \n", frame_rx, subframe_rx); } else { @@ -3618,7 +3620,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, if(dlsch0->rnti != 0xffff) { - LOG_I(PHY,"[UE %d][PDSCH %x/%d] AbsSubframe %d.%d : DLSCH CW0 in error (rv %d,mcs %d,TBS %d)\n", + LOG_D(PHY,"[UE %d][PDSCH %x/%d] AbsSubframe %d.%d : DLSCH CW0 in error (rv %d,mcs %d,TBS %d)\n", ue->Mod_id,dlsch0->rnti, harq_pid,frame_rx,subframe_rx, dlsch0->harq_processes[harq_pid]->rvidx, @@ -3630,7 +3632,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, } else { if(dlsch0->rnti != 0xffff) { - LOG_I(PHY,"[UE %d][PDSCH %x/%d] AbsSubframe %d.%d : Received DLSCH CW0 (rv %d,mcs %d,TBS %d)\n", + LOG_D(PHY,"[UE %d][PDSCH %x/%d] AbsSubframe %d.%d : Received DLSCH CW0 (rv %d,mcs %d,TBS %d)\n", ue->Mod_id,dlsch0->rnti, harq_pid,frame_rx,subframe_rx, dlsch0->harq_processes[harq_pid]->rvidx, @@ -3788,7 +3790,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin // start timers - LOG_I(PHY," ****** start RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, subframe_rx); + LOG_D(PHY," ****** start RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, subframe_rx); start_meas(&ue->phy_proc_rx[subframe_rx&0x1]); start_meas(&ue->generic_stat); @@ -3843,8 +3845,8 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin l=1; } - LOG_I(PHY," ------ slot 0 Processing: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); - LOG_I(PHY," ------ --> FFT/ChannelEst/PDCCH slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); + LOG_D(PHY," ------ slot 0 Processing: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); + LOG_D(PHY," ------ --> FFT/ChannelEst/PDCCH slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); for (; l<=l2; l++) { if (abstraction_flag == 0) { start_meas(&ue->ofdm_demod_stats); @@ -3874,7 +3876,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin } // for l=1..l2 ue_measurement_procedures(l-1,ue,proc,eNB_id,(subframe_rx<<1),abstraction_flag,mode); - LOG_I(PHY," ------ end FFT/ChannelEst/PDCCH slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); + LOG_D(PHY," ------ end FFT/ChannelEst/PDCCH slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); // If this is PMCH, call procedures and return if (pmch_flag == 1) { ue_pmch_procedures(ue,proc,eNB_id,abstraction_flag); @@ -3890,9 +3892,9 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin // first slot has been processed (FFTs + Channel Estimation, PCFICH/PHICH/PDCCH) stop_meas(&ue->generic_stat); - printf("[SFN %d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0)); + LOG_D(PHY,"[SFN %d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0)); + LOG_D(PHY," ------ --> PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); - LOG_I(PHY," ------ --> PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); start_meas(&ue->generic_stat); // do procedures for C-RNTI if (ue->dlsch[subframe_rx&0x1][eNB_id][0]->active == 1) { @@ -3909,7 +3911,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT); } - LOG_I(PHY," ------ end PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); + LOG_D(PHY," ------ end PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); // do procedures for SI-RNTI if ((ue->dlsch_SI[eNB_id]) && (ue->dlsch_SI[eNB_id]->active == 1)) { VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_IN); @@ -3955,8 +3957,8 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA, VCD_FUNCTION_OUT); } - LOG_I(PHY," ------ slot 1 Processing: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); - LOG_I(PHY," ------ --> FFT/ChannelEst/PDCCH slot 1: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); + LOG_D(PHY," ------ slot 1 Processing: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); + LOG_D(PHY," ------ --> FFT/ChannelEst/PDCCH slot 1: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); if (subframe_select(&ue->frame_parms,subframe_rx) != SF_S) { // do front-end processing for second slot, and first symbol of next subframe for (l=1; lframe_parms.symbols_per_tti>>1; l++) { @@ -3991,16 +3993,17 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin } // not an S-subframe stop_meas(&ue->generic_stat); - printf("[SFN %d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0)); - LOG_I(PHY," ------ end FFT/ChannelEst/PDCCH slot 1: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); + LOG_D(PHY,"[SFN %d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0)); + LOG_D(PHY," ------ end FFT/ChannelEst/PDCCH slot 1: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); + if ( (subframe_rx == 0) && (ue->decode_MIB == 1)) { ue_pbch_procedures(eNB_id,ue,proc,abstraction_flag); } // do procedures for C-RNTI - LOG_I(PHY," ------ --> PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); + LOG_D(PHY," ------ --> PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); if (ue->dlsch[subframe_rx&0x1][eNB_id][0]->active == 1) { VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN); start_meas(&ue->pdsch_procedures_stat); @@ -4014,9 +4017,10 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ue->frame_parms.symbols_per_tti-1, abstraction_flag); stop_meas(&ue->pdsch_procedures_stat); - LOG_I(PHY," ------ end PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); - LOG_I(PHY," ------ --> PDSCH Turbo Decoder slot 0/1: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); + LOG_D(PHY," ------ end PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); + LOG_D(PHY," ------ --> PDSCH Turbo Decoder slot 0/1: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); + start_meas(&ue->dlsch_procedures_stat); ue_dlsch_procedures(ue, proc, @@ -4028,8 +4032,8 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin mode, abstraction_flag); stop_meas(&ue->dlsch_procedures_stat); - printf("[SFN %d] Slot1: Pdsch Proc %5.2f\n",subframe_rx,ue->pdsch_procedures_stat.p_time/(cpuf*1000.0)); - printf("[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",subframe_rx,ue->dlsch_procedures_stat.p_time/(cpuf*1000.0)); + LOG_D(PHY,"[SFN %d] Slot1: Pdsch Proc %5.2f\n",subframe_rx,ue->pdsch_procedures_stat.p_time/(cpuf*1000.0)); + LOG_D(PHY,"[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",subframe_rx,ue->dlsch_procedures_stat.p_time/(cpuf*1000.0)); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT); @@ -4141,9 +4145,8 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT); stop_meas(&ue->phy_proc_rx[subframe_rx&0x1]); - printf("------FULL RX PROC [SFN %d]: %5.2f ------\n",subframe_rx,ue->phy_proc_rx[subframe_rx&0x1].p_time/(cpuf*1000.0)); - - LOG_I(PHY," ****** end RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, subframe_rx); + LOG_D(PHY,"------FULL RX PROC [SFN %d]: %5.2f ------\n",subframe_rx,ue->phy_proc_rx[subframe_rx&0x1].p_time/(cpuf*1000.0)); + LOG_D(PHY," ****** end RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, subframe_rx); return (0); } From b4f8219170f03a1349bff0e678d78aacae3c55fd Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Wed, 15 Mar 2017 16:04:42 +0100 Subject: [PATCH 27/47] calibrations for 5/10/20 MHz LimeSDR --- targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp | 13 +++++++------ .../CONF/enb.band7.tm1.25PRB.lmssdr.conf | 8 ++++---- .../CONF/enb.band7.tm1.50PRB.lmssdr.conf | 6 +++--- targets/RT/USER/lte-enb.c | 2 +- targets/RT/USER/lte-softmodem.c | 2 +- 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp b/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp index 64f87ca9d7..a98df19cf7 100644 --- a/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp +++ b/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp @@ -138,7 +138,7 @@ int trx_lms_set_gains(openair0_device* device, openair0_config_t *openair0_cfg) ret = -1; } - LMS_SetNormalizedGain(lms_device, LMS_CH_TX, 0, .2);//openair0_cfg->tx_gain[0]); + LMS_SetGaindB(lms_device, LMS_CH_TX, 0, openair0_cfg->tx_gain[0]); LMS_SetGaindB(lms_device, LMS_CH_RX, 0, openair0_cfg->rx_gain[0]-openair0_cfg->rx_gain_offset[0]); return(ret); @@ -202,10 +202,11 @@ int trx_lms_start(openair0_device *device){ } printf("Set TX frequency %f MHz\n",device->openair0_cfg[0].tx_freq[0]/1e6); - //printf("Override antenna settings to: RX1_H, TXA_2"); - //LMS_SetAntenna(lms_device, LMS_CH_RX, 0, 1); - //LMS_SetAntenna(lms_device, LMS_CH_TX, 0, 2); - + /* + printf("Override antenna settings to: RX1_H, TXA_2"); + LMS_SetAntenna(lms_device, LMS_CH_RX, 0, 1); + LMS_SetAntenna(lms_device, LMS_CH_TX, 0, 2); + */ for (int i = 0; i< device->openair0_cfg->rx_num_channels; i++) @@ -354,7 +355,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg){ break; case 15360000: openair0_cfg[0].samples_per_packet = 2048; - openair0_cfg[0].tx_sample_advance = 70; + openair0_cfg[0].tx_sample_advance = 450; openair0_cfg[0].tx_bw = 15.36e6; openair0_cfg[0].rx_bw = 15.36e6; break; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.lmssdr.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.lmssdr.conf index 5aa544cd85..00f875ec4e 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.lmssdr.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.lmssdr.conf @@ -17,7 +17,7 @@ eNBs = mobile_country_code = "208"; - mobile_network_code = "92"; + mobile_network_code = "93"; ////////// Physical parameters: @@ -39,7 +39,7 @@ eNBs = nb_antenna_ports = 1; nb_antennas_tx = 1; nb_antennas_rx = 1; - tx_gain = 20; + tx_gain = 7; rx_gain = 116; prach_root = 0; prach_config_index = 0; @@ -50,7 +50,7 @@ eNBs = pucch_nRB_CQI = 1; pucch_nCS_AN = 0; pucch_n1_AN = 32; - pdsch_referenceSignalPower = -30; + pdsch_referenceSignalPower = -34; pdsch_p_b = 0; pusch_n_SB = 1; pusch_enable64QAM = "DISABLE"; @@ -136,7 +136,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.70"; + mme_ip_address = ( { ipv4 = "192.168.12.148"; ipv6 = "192:168:30::17"; active = "yes"; preference = "ipv4"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.lmssdr.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.lmssdr.conf index d3ca6b9092..2d0e0f3702 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.lmssdr.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.lmssdr.conf @@ -17,7 +17,7 @@ eNBs = mobile_country_code = "208"; - mobile_network_code = "92"; + mobile_network_code = "93"; ////////// Physical parameters: @@ -50,7 +50,7 @@ eNBs = pucch_nRB_CQI = 1; pucch_nCS_AN = 0; pucch_n1_AN = 32; - pdsch_referenceSignalPower = -36; + pdsch_referenceSignalPower = -35; pdsch_p_b = 0; pusch_n_SB = 1; pusch_enable64QAM = "DISABLE"; @@ -136,7 +136,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.70"; + mme_ip_address = ( { ipv4 = "192.168.12.148"; ipv6 = "192:168:30::17"; active = "yes"; preference = "ipv4"; diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 6f31f7842d..21d34d40b1 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -1560,7 +1560,7 @@ static void* eNB_thread_single( void* param ) { wait_sync("eNB_thread_single"); #if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME) - if (eNB->node_function < NGFI_RRU_IF5) + if ((eNB->node_function < NGFI_RRU_IF5) && (eNB->mac_enabled==1)) wait_system_ready ("Waiting for eNB application to be ready %s\r", &start_eNB); #endif diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 8303d88218..ecf7645808 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -1726,7 +1726,7 @@ int main( int argc, char **argv ) { #if defined(ENABLE_ITTI) if ((UE_flag == 1)|| - (node_function[0] Date: Wed, 15 Mar 2017 17:17:54 +0100 Subject: [PATCH 28/47] hotfix: fix buffer size for phy-test mode 20MHz 768*8 is too small, in 20MHz, the phy-test mode (in default mode?) has a buffer of size 6378. Let's set the buffer size to the input's one plus 4 bytes (to accomodate for CRC, not sure about this). --- openair1/SCHED/phy_procedures_lte_eNb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index e9f1125a34..97c8fb0837 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -899,7 +899,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,LTE_eNB_DLSCH_t *d int input_buffer_length = dlsch_harq->TBS/8; LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms; uint8_t *DLSCH_pdu=NULL; - uint8_t DLSCH_pdu_tmp[768*8]; + uint8_t DLSCH_pdu_tmp[input_buffer_length+4]; //[768*8]; uint8_t DLSCH_pdu_rar[256]; int i; From fc6dec9edda0ed93997b7abd91b3491f2c4de962 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Thu, 16 Mar 2017 11:13:32 +0100 Subject: [PATCH 29/47] fix dependancies in CMakeLists.txt for the T tracer On some hosts, compilations with the T tracer was failing. The error was: common/utils/T/T.h:15:19: fatal error: T_IDs.h: No such file or directory The problem was that in CMakeLists.txt some targets depend on the pre-generation of T_IDs.h but this dependancy relation was not set, so those targets could be generated before the T (it was the case with HASHTABLE). This commit fixes that. Basically, we take all the targets found in "add_executable" and "add_library" and make them depend on the T if the T is enabled. Almost all existing targets were added, even those that may not need it. The problem of this approach is that someone adding a new target using the T will not necessarily add a dependancy there. Another solution would be to generate T_IDs.h at "cmake" stage, not "make" stage and use an "if (NOT EXISTS T_IDs.h)" to generate the file. We lose the dependancy relation though. Things may be changed if maintenance cost is too high. --- cmake_targets/CMakeLists.txt | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 3687b08a1a..66a55f214f 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -2059,22 +2059,22 @@ endforeach(myExe) #ensure that the T header files are generated before targets depending on them if (${T_TRACER}) - add_dependencies(lte-softmodem generate_T) - add_dependencies(lte-softmodem-nos1 generate_T) - add_dependencies(rrh_gw generate_T) - add_dependencies(oaisim generate_T) - add_dependencies(oaisim_nos1 generate_T) - add_dependencies(dlsim generate_T) - add_dependencies(dlsim_tm4 generate_T) - add_dependencies(dlsim_tm7 generate_T) - add_dependencies(ulsim generate_T) - add_dependencies(pbchsim generate_T) - add_dependencies(scansim generate_T) - add_dependencies(mbmssim generate_T) - add_dependencies(pdcchsim generate_T) - add_dependencies(pucchsim generate_T) - add_dependencies(prachsim generate_T) - add_dependencies(syncsim generate_T) + foreach(i + #all "add_executable" definitions (except tests, rb_tool, updatefw) + lte-softmodem lte-softmodem-nos1 rrh_gw oaisim oaisim_nos1 + dlsim_tm4 dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim + pdcchsim pucchsim prachsim syncsim + #all "add_library" definitions + ITTI RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB + oai_exmimodevif oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif + oai_eth_transpro + FLPT_MSG ASYNC_IF FLEXRAN_AGENT HASHTABLE MSC UTIL OMG_SUMO SECU_OSA + SECU_CN SCHED_LIB PHY L2 default_sched remote_sched RAL MIH CN_UTILS + GTPV1U SCTP_CLIENT UDP LIB_NAS_UE LFDS LFDS7 SIMU SIMU_ETH OPENAIR0_LIB) + if (TARGET ${i}) + add_dependencies(${i} generate_T) + endif() + endforeach(i) endif (${T_TRACER}) ################################################## From 950c1c060e1890948e5ffb22383a358b4f31fcab Mon Sep 17 00:00:00 2001 From: gabrielC Date: Thu, 16 Mar 2017 11:45:07 +0100 Subject: [PATCH 30/47] Correction of dlsch channel calculation --- .../PHY/LTE_TRANSPORT/dlsch_demodulation.c | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c index 5fb11d2db6..efac41a6f0 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c @@ -3375,9 +3375,16 @@ void dlsch_channel_level(int **dl_ch_estimates_ext, symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol; - float one_over_nb_re = 0; - one_over_nb_re = 1/(nb_rb *12); - int16_t one_over_nb_re_q1_15 = (int16_t)(one_over_nb_re * (float)(1<<15) ); + if (((symbol_mod == 0) || (symbol_mod == (frame_parms->Ncp-1)))&&(frame_parms->mode1_flag==0)) + nre=8; + else if (((symbol_mod == 0) || (symbol_mod == (frame_parms->Ncp-1)))&&(frame_parms->mode1_flag==1)) + nre=10; + else + nre=12; + + double one_over_nb_re = 0.0; + one_over_nb_re = 1/((double)(nb_rb*nre)); + int16_t one_over_nb_re_q1_15 = (int16_t)(one_over_nb_re * (double)(1<<15) ); coeff128 = _mm_set_epi16(one_over_nb_re_q1_15,one_over_nb_re_q1_15,one_over_nb_re_q1_15,one_over_nb_re_q1_15, one_over_nb_re_q1_15,one_over_nb_re_q1_15,one_over_nb_re_q1_15,one_over_nb_re_q1_15); @@ -3399,7 +3406,7 @@ void dlsch_channel_level(int **dl_ch_estimates_ext, dl_ch128+=2; } else { - avg128D = _mm_add_epi32(avg128D,_mm_madd_epi16(dl_ch128[2],dl_ch128[2])); + avg128D = _mm_add_epi32(avg128D,_mm_madd_epi16(dl_ch128[2],_mm_srai_epi16(_mm_mulhi_epi16(dl_ch128[2], coeff128),15))); dl_ch128+=3; } /* @@ -3411,18 +3418,10 @@ void dlsch_channel_level(int **dl_ch_estimates_ext, */ } - if (((symbol_mod == 0) || (symbol_mod == (frame_parms->Ncp-1)))&&(frame_parms->mode1_flag==0)) - nre=8; - else if (((symbol_mod == 0) || (symbol_mod == (frame_parms->Ncp-1)))&&(frame_parms->mode1_flag==1)) - nre=10; - else - nre=12; - avg[(aatx<<1)+aarx] =(((int32_t*)&avg128D)[0] + ((int32_t*)&avg128D)[1] + ((int32_t*)&avg128D)[2] + ((int32_t*)&avg128D)[3]); - // printf("Channel level : %d\n",avg[(aatx<<1)+aarx]); } From 20b420bb84ee47f5c26fa4e106c15a83c91d621c Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Thu, 16 Mar 2017 14:44:38 +0100 Subject: [PATCH 31/47] fix compilation for ubuntu 16 This work was done by Laurent Thomas. --- cmake_targets/CMakeLists.txt | 9 +++- .../NAS/DRIVER/CELLULAR/NASMT/nasmt_device.c | 9 +++- .../NAS/DRIVER/CELLULAR/NASRG/nasrg_device.c | 8 ++++ openair2/NETWORK_DRIVER/LITE/device.c | 8 ++++ openair2/NETWORK_DRIVER/MESH/classifier.c | 4 +- openair2/NETWORK_DRIVER/MESH/common.c | 5 +-- openair2/NETWORK_DRIVER/MESH/device.c | 19 +++++--- openair2/NETWORK_DRIVER/MESH/ioctl.c | 2 +- openair2/NETWORK_DRIVER/MESH/local.h | 44 +++++++++---------- openair2/NETWORK_DRIVER/MESH/mesh.c | 6 ++- openair2/NETWORK_DRIVER/MESH/proto_extern.h | 11 +++-- openair2/NETWORK_DRIVER/UE_IP/common.c | 4 +- openair2/NETWORK_DRIVER/UE_IP/device.c | 8 ++++ 13 files changed, 87 insertions(+), 50 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 3687b08a1a..c2b9b82f52 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -2099,11 +2099,16 @@ endforeach() # force castxml and clang compilation with gnu89 standard # we can't use cXX standard as pthread_rwlock_t is gnu standard list(APPEND itti_compiler_options "-std=gnu89") - set (ITTI_H ${ITTI_DIR}/intertask_interface_types.h) +if(EXISTS /usr/bin/gccxml) + set(xml_command gccxml ${itti_compiler_options} -fxml=${OPENAIR_BIN_DIR}/messages.xml ${ITTI_H}) +else() + set(xml_command castxml --castxml-gccxml ${itti_compiler_options} ${ITTI_H} -o ${OPENAIR_BIN_DIR}/messages.xml) +endif() + add_custom_command ( OUTPUT ${OPENAIR_BIN_DIR}/messages.xml - COMMAND gccxml ${itti_compiler_options} -fxml=${OPENAIR_BIN_DIR}/messages.xml ${ITTI_H} + COMMAND ${xml_command} DEPENDS ${S1AP_OAI_generated} ${RRC_FULL_DIR}/asn1_constants.h ) diff --git a/openair2/NAS/DRIVER/CELLULAR/NASMT/nasmt_device.c b/openair2/NAS/DRIVER/CELLULAR/NASMT/nasmt_device.c index 7a8bd0f867..77b3c28165 100644 --- a/openair2/NAS/DRIVER/CELLULAR/NASMT/nasmt_device.c +++ b/openair2/NAS/DRIVER/CELLULAR/NASMT/nasmt_device.c @@ -233,9 +233,12 @@ int nasmt_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) } // End debug information - netif_stop_queue(dev); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) + netif_trans_update(dev); +#else dev->trans_start = jiffies; +#endif #ifdef NAS_DEBUG_SEND_DETAIL printk("nasmt_hard_start_xmit: step 1\n"); #endif @@ -307,7 +310,11 @@ void nasmt_tx_timeout(struct net_device *dev) printk("nasmt_tx_timeout: begin\n"); //((struct nas_priv *)(dev->priv))->stats.tx_errors++; (gpriv->stats).tx_errors++; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) + netif_trans_update(dev); +#else dev->trans_start = jiffies; +#endif netif_wake_queue(dev); printk("nasmt_tx_timeout: transmit timed out %s\n",dev->name); } diff --git a/openair2/NAS/DRIVER/CELLULAR/NASRG/nasrg_device.c b/openair2/NAS/DRIVER/CELLULAR/NASRG/nasrg_device.c index aaaa95754d..970600de21 100644 --- a/openair2/NAS/DRIVER/CELLULAR/NASRG/nasrg_device.c +++ b/openair2/NAS/DRIVER/CELLULAR/NASRG/nasrg_device.c @@ -226,7 +226,11 @@ int nasrg_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) // End debug information netif_stop_queue(dev); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) + netif_trans_update(dev); +#else dev->trans_start = jiffies; +#endif #ifdef NAS_DEBUG_SEND_DETAIL printk("nasrg_hard_start_xmit: step 1\n"); #endif @@ -296,7 +300,11 @@ void nasrg_tx_timeout(struct net_device *dev) printk("nasrg_tx_timeout: begin\n"); // ((struct nas_priv *)(dev->priv))->stats.tx_errors++; (gpriv->stats).tx_errors++; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) + netif_trans_update(dev); +#else dev->trans_start = jiffies; +#endif netif_wake_queue(dev); printk("nasrg_tx_timeout: transmit timed out %s\n",dev->name); } diff --git a/openair2/NETWORK_DRIVER/LITE/device.c b/openair2/NETWORK_DRIVER/LITE/device.c index 9579ebf249..616af5e145 100644 --- a/openair2/NETWORK_DRIVER/LITE/device.c +++ b/openair2/NETWORK_DRIVER/LITE/device.c @@ -255,7 +255,11 @@ int oai_nw_drv_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) // End debug information netif_stop_queue(dev); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) + netif_trans_update(dev); +#else dev->trans_start = jiffies; +#endif #ifdef OAI_DRV_DEBUG_DEVICE printk("[OAI_IP_DRV][%s] step 1\n", __FUNCTION__); #endif @@ -328,7 +332,11 @@ void oai_nw_drv_tx_timeout(struct net_device *dev) printk("[OAI_IP_DRV][%s] begin\n", __FUNCTION__); // (struct oai_nw_drv_priv *)(dev->priv)->stats.tx_errors++; (priv->stats).tx_errors++; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) + netif_trans_update(dev); +#else dev->trans_start = jiffies; +#endif netif_wake_queue(dev); printk("[OAI_IP_DRV][%s] transmit timed out %s\n", __FUNCTION__,dev->name); } diff --git a/openair2/NETWORK_DRIVER/MESH/classifier.c b/openair2/NETWORK_DRIVER/MESH/classifier.c index a982faac46..d477ba3ea9 100644 --- a/openair2/NETWORK_DRIVER/MESH/classifier.c +++ b/openair2/NETWORK_DRIVER/MESH/classifier.c @@ -790,7 +790,7 @@ void nas_CLASS_send(struct sk_buff *skb,int inst) dscp, sprotocol, sp->classref, sfct, sp->rab_id); #endif - sp->fct(skb, cx, sp,inst); + sp->fct(skb, cx, sp,inst, NULL); } // if classifier entry match found @@ -808,7 +808,7 @@ void nas_CLASS_send(struct sk_buff *skb,int inst) if (no_connection == 1) printk("NAS_CLASS_SEND: no corresponding connection, so the message is dropped\n"); -#endif NAS_DEBUG_CLASS +#endif /* NAS_DEBUG_CLASS */ // } // while loop over connections diff --git a/openair2/NETWORK_DRIVER/MESH/common.c b/openair2/NETWORK_DRIVER/MESH/common.c index 0a4e3ddfed..6d10abd380 100644 --- a/openair2/NETWORK_DRIVER/MESH/common.c +++ b/openair2/NETWORK_DRIVER/MESH/common.c @@ -321,10 +321,9 @@ void nas_COMMON_receive(uint16_t dlen, //--------------------------------------------------------------------------- // Delete the data -void nas_COMMON_del_send(struct sk_buff *skb, struct cx_entity *cx, struct classifier_entity *sp,int inst) +void nas_COMMON_del_send(struct sk_buff *skb, struct cx_entity *cx, struct classifier_entity *sp,int inst,struct nas_priv *gpriv) { struct nas_priv *priv=netdev_priv(nasdev[inst]); - //--------------------------------------------------------------------------- ++priv->stats.tx_dropped; } @@ -332,7 +331,7 @@ void nas_COMMON_del_send(struct sk_buff *skb, struct cx_entity *cx, struct class //--------------------------------------------------------------------------- // Request the transfer of data (QoS SAP) -void nas_COMMON_QOS_send(struct sk_buff *skb, struct cx_entity *cx, struct classifier_entity *gc,int inst) +void nas_COMMON_QOS_send(struct sk_buff *skb, struct cx_entity *cx, struct classifier_entity *gc,int inst, struct nas_priv *gpriv) { //--------------------------------------------------------------------------- struct pdcp_data_req_header_s pdcph; diff --git a/openair2/NETWORK_DRIVER/MESH/device.c b/openair2/NETWORK_DRIVER/MESH/device.c index f28b41fc68..393fe9f9e0 100644 --- a/openair2/NETWORK_DRIVER/MESH/device.c +++ b/openair2/NETWORK_DRIVER/MESH/device.c @@ -124,11 +124,8 @@ void *nas_interrupt(void) int nas_open(struct net_device *dev) { //--------------------------------------------------------------------------- - struct nas_priv *priv=netdev_priv(dev); - printk("OPEN: begin\n"); // MOD_INC_USE_COUNT; - // Address has already been set at init #ifndef PDCP_USE_NETLINK @@ -250,7 +247,11 @@ int nas_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) // End debug information netif_stop_queue(dev); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) + netif_trans_update(dev); +#else dev->trans_start = jiffies; +#endif #ifdef DEBUG_DEVICE printk("HARD_START_XMIT: step 1\n"); #endif @@ -311,7 +312,11 @@ void nas_tx_timeout(struct net_device *dev) printk("TX_TIMEOUT: begin\n"); // (struct nas_priv *)(dev->priv)->stats.tx_errors++; (priv->stats).tx_errors++; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) + netif_trans_update(dev); +#else dev->trans_start = jiffies; +#endif netif_wake_queue(dev); printk("TX_TIMEOUT: transmit timed out %s\n",dev->name); } @@ -406,8 +411,8 @@ void nas_init(struct net_device *dev) nas_TOOL_imei2iid(IMEI, dev->dev_addr);// IMEI to device address (for stateless autoconfiguration address) nas_TOOL_imei2iid(IMEI, (uint8_t *)priv->cx[0].iid6); #else - nas_TOOL_imei2iid(nas_IMEI, dev->dev_addr);// IMEI to device address (for stateless autoconfiguration address) - nas_TOOL_imei2iid(nas_IMEI, (uint8_t *)priv->cx[0].iid6); + nas_TOOL_imei2iid((uint8_t *)nas_IMEI, dev->dev_addr); // IMEI to device address (for stateless autoconfiguration address) + nas_TOOL_imei2iid((uint8_t *)nas_IMEI, (uint8_t *)priv->cx[0].iid6); #endif // this is more appropriate for user space soft realtime emulation #else @@ -478,8 +483,8 @@ int init_module (void) if (nasdev[inst]) { nas_mesh_init(inst); //memcpy(nasdev[inst]->dev_addr,&nas_IMEI[0],8); - nas_TOOL_imei2iid(nas_IMEI, nasdev[inst]->dev_addr);// IMEI to device address (for stateless autoconfiguration address) - nas_TOOL_imei2iid(nas_IMEI, (uint8_t *)priv->cx[0].iid6); + nas_TOOL_imei2iid((uint8_t *)nas_IMEI, nasdev[inst]->dev_addr);// IMEI to device address (for stateless autoconfiguration address) + nas_TOOL_imei2iid((uint8_t *)nas_IMEI, (uint8_t *)priv->cx[0].iid6); // TO HAVE DIFFERENT HW @ ((unsigned char*)nasdev[inst]->dev_addr)[7] = ((unsigned char*)nasdev[inst]->dev_addr)[7] + (unsigned char)inst + 1; printk("Setting HW addr for INST %d to : %X%X\n",inst,*((unsigned int *)&nasdev[inst]->dev_addr[0]),*((unsigned int *)&nasdev[inst]->dev_addr[4])); diff --git a/openair2/NETWORK_DRIVER/MESH/ioctl.c b/openair2/NETWORK_DRIVER/MESH/ioctl.c index 7d4bb10b1f..4045908d93 100644 --- a/openair2/NETWORK_DRIVER/MESH/ioctl.c +++ b/openair2/NETWORK_DRIVER/MESH/ioctl.c @@ -853,7 +853,7 @@ int nas_CTL_ioctl(struct net_device *dev, //--------------------------------------------------------------------------- void nas_CTL_send(struct sk_buff *skb, struct cx_entity *cx, - struct classifier_entity *gc) + struct classifier_entity *gc, int inst, struct nas_priv *gpriv) { //--------------------------------------------------------------------------- printk("NAS_CTL_SEND - void \n"); diff --git a/openair2/NETWORK_DRIVER/MESH/local.h b/openair2/NETWORK_DRIVER/MESH/local.h index 8db2b550b0..0e0a581cbc 100644 --- a/openair2/NETWORK_DRIVER/MESH/local.h +++ b/openair2/NETWORK_DRIVER/MESH/local.h @@ -98,6 +98,26 @@ struct cx_entity { int provider_id[MAX_MEASURE_NB]; }; +//#define NAS_RETRY_LIMIT_DEFAULT 5 + +struct nas_priv { + int irq; + struct timer_list timer; + spinlock_t lock; + struct net_device_stats stats; + uint8_t retry_limit; + uint32_t timer_establishment; + uint32_t timer_release; + struct cx_entity cx[NAS_CX_MAX]; + struct classifier_entity *rclassifier[NAS_DSCP_MAX]; // receive classifier + uint16_t nrclassifier; + int sap[NAS_SAPI_MAX]; + struct sock *nl_sk; + uint8_t nlmsg[NAS_MAX_LENGTH+sizeof(struct nlmsghdr)]; + uint8_t xbuffer[NAS_MAX_LENGTH]; // transmition buffer + uint8_t rbuffer[NAS_MAX_LENGTH]; // reception buffer +}; + struct classifier_entity { uint32_t classref; @@ -122,29 +142,7 @@ struct classifier_entity { struct rb_entity *rb_rx; //pointer to rb_entity for receiving (in case of forwarding rule) nasRadioBearerId_t rab_id; // RAB identification for sending nasRadioBearerId_t rab_id_rx; // RAB identification for receiving (in case of forwarding rule) - void (*fct)(struct sk_buff *skb, struct cx_entity *cx, struct classifier_entity *gc,int inst); -}; - - - -//#define NAS_RETRY_LIMIT_DEFAULT 5 - -struct nas_priv { - int irq; - struct timer_list timer; - spinlock_t lock; - struct net_device_stats stats; - uint8_t retry_limit; - uint32_t timer_establishment; - uint32_t timer_release; - struct cx_entity cx[NAS_CX_MAX]; - struct classifier_entity *rclassifier[NAS_DSCP_MAX]; // receive classifier - uint16_t nrclassifier; - int sap[NAS_SAPI_MAX]; - struct sock *nl_sk; - uint8_t nlmsg[NAS_MAX_LENGTH+sizeof(struct nlmsghdr)]; - uint8_t xbuffer[NAS_MAX_LENGTH]; // transmition buffer - uint8_t rbuffer[NAS_MAX_LENGTH]; // reception buffer + void (*fct)(struct sk_buff *skb, struct cx_entity *cx, struct classifier_entity *gc,int inst, struct nas_priv *gpriv); }; struct ipversion { diff --git a/openair2/NETWORK_DRIVER/MESH/mesh.c b/openair2/NETWORK_DRIVER/MESH/mesh.c index e934a6eb95..9817428c5e 100644 --- a/openair2/NETWORK_DRIVER/MESH/mesh.c +++ b/openair2/NETWORK_DRIVER/MESH/mesh.c @@ -155,9 +155,10 @@ void nas_mesh_start_default_sclassifier(struct cx_entity *cx,struct rb_entity *r } //--------------------------------------------------------------------------- -void nas_mesh_timer(unsigned long data,struct nas_priv *gpriv) +void nas_mesh_timer(unsigned long data) { //--------------------------------------------------------------------------- + struct nas_priv *gpriv=(struct nas_priv *) data; uint8_t cxi; struct cx_entity *cx; struct rb_entity *rb; @@ -168,7 +169,7 @@ void nas_mesh_timer(unsigned long data,struct nas_priv *gpriv) (gpriv->timer).function=nas_mesh_timer; (gpriv->timer).expires=jiffies+NAS_TIMER_TICK; - (gpriv->timer).data=0L; + (gpriv->timer).data=data; return; @@ -381,6 +382,7 @@ int nas_mesh_DC_send_cx_release_request(struct cx_entity *cx, void nas_mesh_DC_send_sig_data_request(struct sk_buff *skb, struct cx_entity *cx, struct classifier_entity *gc, + int inst, struct nas_priv *gpriv) { //--------------------------------------------------------------------------- diff --git a/openair2/NETWORK_DRIVER/MESH/proto_extern.h b/openair2/NETWORK_DRIVER/MESH/proto_extern.h index 4c0b89f60f..a362876f83 100644 --- a/openair2/NETWORK_DRIVER/MESH/proto_extern.h +++ b/openair2/NETWORK_DRIVER/MESH/proto_extern.h @@ -96,7 +96,7 @@ void nas_COMMON_receive(unsigned short dlen, */ void nas_COMMON_QOS_send(struct sk_buff *skb, struct cx_entity *cx, - struct classifier_entity *gc,int inst); + struct classifier_entity *gc,int inst, struct nas_priv *gpriv); /** \fn void nas_COMMON_del_send(struct sk_buff *skb, struct cx_entity *cx, struct classifier_entity *gc,int inst) @@ -108,7 +108,7 @@ void nas_COMMON_QOS_send(struct sk_buff *skb, */ void nas_COMMON_del_send(struct sk_buff *skb, struct cx_entity *cx, - struct classifier_entity *gc,int inst); + struct classifier_entity *gc,int inst, struct nas_priv *gpriv); #ifndef PDCP_USE_NETLINK /** @@ -195,19 +195,18 @@ void nas_mesh_init(int inst //!< Instance ID ); -void nas_mesh_timer(unsigned long data, - struct nas_priv *gpriv); +void nas_mesh_timer(unsigned long data); int nas_mesh_DC_receive(struct cx_entity *cx,struct nas_priv *gpriv); int nas_mesh_GC_receive(struct nas_priv *gpriv); int nas_mesh_DC_send_cx_establish_request(struct cx_entity *cx,struct nas_priv *gpriv); int nas_mesh_DC_send_cx_release_request(struct cx_entity *cx,struct nas_priv *gpriv); -void nas_mesh_DC_send_sig_data_request(struct sk_buff *skb, struct cx_entity *cx, struct classifier_entity *gc,struct nas_priv *gpriv); +void nas_mesh_DC_send_sig_data_request(struct sk_buff *skb, struct cx_entity *cx, struct classifier_entity *gc,int inst, struct nas_priv *gpriv); // iocontrol.c void nas_CTL_send(struct sk_buff *skb, struct cx_entity *cx, - struct classifier_entity *gc); + struct classifier_entity *gc,int inst, struct nas_priv *gpriv); //int nas_CTL_receive_authentication(struct ipv6hdr *iph, struct cx-entity *cx, unsigned char sapi); int nas_CTL_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); diff --git a/openair2/NETWORK_DRIVER/UE_IP/common.c b/openair2/NETWORK_DRIVER/UE_IP/common.c index 1ea5df0d30..8c3e4557d3 100644 --- a/openair2/NETWORK_DRIVER/UE_IP/common.c +++ b/openair2/NETWORK_DRIVER/UE_IP/common.c @@ -123,9 +123,7 @@ skb_p->mark = rb_idP; // LG TEST skb_p->ip_summed = CHECKSUM_NONE; skb_p->ip_summed = CHECKSUM_UNNECESSARY; - - - ipv_p = (struct ipversion*)((void*)&(skb_p->data[hard_header_len])); + ipv_p = (ipversion_t *)((void *)&(skb_p->data[hard_header_len])); switch (ipv_p->version) { diff --git a/openair2/NETWORK_DRIVER/UE_IP/device.c b/openair2/NETWORK_DRIVER/UE_IP/device.c index cfd7342862..a4f714d4c5 100644 --- a/openair2/NETWORK_DRIVER/UE_IP/device.c +++ b/openair2/NETWORK_DRIVER/UE_IP/device.c @@ -243,7 +243,11 @@ int ue_ip_hard_start_xmit(struct sk_buff *skb_pP, struct net_device *dev_pP) // End debug information netif_stop_queue(dev_pP); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) + netif_trans_update(dev_pP); +#else dev_pP->trans_start = jiffies; +#endif #ifdef OAI_DRV_DEBUG_DEVICE printk("[UE_IP_DRV][%s] step 1\n", __FUNCTION__); #endif @@ -315,7 +319,11 @@ void ue_ip_tx_timeout(struct net_device *dev_pP) printk("[UE_IP_DRV][%s] begin\n", __FUNCTION__); // (ue_ip_priv_t *)(dev_pP->priv_p)->stats.tx_errors++; (priv_p->stats).tx_errors++; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) + netif_trans_update(dev_pP); +#else dev_pP->trans_start = jiffies; +#endif netif_wake_queue(dev_pP); printk("[UE_IP_DRV][%s] transmit timed out %s\n", __FUNCTION__,dev_pP->name); } From d5a9334306b18ead84f6cc9c9ec4bfbc61ac9b37 Mon Sep 17 00:00:00 2001 From: gabrielC Date: Thu, 16 Mar 2017 17:06:34 +0100 Subject: [PATCH 32/47] 20MHz improvement for scope (still need to be fixed for 20MHz LLR) and Log --- openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c | 5 ++-- openair1/PHY/LTE_TRANSPORT/proto.h | 2 +- openair1/PHY/TOOLS/lte_phy_scope.c | 28 ++++++++++++++++++--- openair1/PHY/defs.h | 2 +- openair1/SCHED/phy_procedures_lte_ue.c | 28 +++++++++++++-------- 5 files changed, 46 insertions(+), 19 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c index a8c9fab621..9f8ee6cec7 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c @@ -160,7 +160,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, LTE_DL_FRAME_PARMS *frame_parms, LTE_UE_DLSCH_t *dlsch, LTE_DL_UE_HARQ_t *harq_process, - uint8_t frame, + uint32_t frame, uint8_t subframe, uint8_t harq_pid, uint8_t is_crnti, @@ -472,6 +472,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, } start_meas(dlsch_turbo_decoding_stats); + LOG_D(PHY,"AbsSubframe %d.%d Start turbo segment %d/%d \n",frame%1024,subframe,r,harq_process->C-1); ret = tc (&harq_process->d[r][96], harq_process->c[r], @@ -626,7 +627,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, if ((err_flag == 0) && (ret>=(1+dlsch->max_turbo_iterations))) {// a Code segment is in error so break; - //printf("CRC failed, segment %d\n",r); + LOG_D(PHY,"AbsSubframe %d.%d CRC failed, segment %d/%d \n",frame%1024,subframe,r,harq_process->C-1); err_flag = 1; } } diff --git a/openair1/PHY/LTE_TRANSPORT/proto.h b/openair1/PHY/LTE_TRANSPORT/proto.h index be317712da..409c41da4f 100644 --- a/openair1/PHY/LTE_TRANSPORT/proto.h +++ b/openair1/PHY/LTE_TRANSPORT/proto.h @@ -1268,7 +1268,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, LTE_DL_FRAME_PARMS *lte_frame_parms, LTE_UE_DLSCH_t *dlsch, LTE_DL_UE_HARQ_t *harq_process, - uint8_t frame, + uint32_t frame, uint8_t subframe, uint8_t harq_pid, uint8_t is_crnti, diff --git a/openair1/PHY/TOOLS/lte_phy_scope.c b/openair1/PHY/TOOLS/lte_phy_scope.c index 325e9f8215..0a5470e7b8 100644 --- a/openair1/PHY/TOOLS/lte_phy_scope.c +++ b/openair1/PHY/TOOLS/lte_phy_scope.c @@ -699,7 +699,14 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, } fl_set_xyplot_xbounds(form->pdcch_llr,0,12*frame_parms->N_RB_DL*2*3); - fl_set_xyplot_data(form->pdcch_llr,bit_pdcch,llr_pdcch,12*frame_parms->N_RB_DL*2*num_pdcch_symbols,"","",""); + if (frame_parms->N_RB_DL != 100) + { + fl_set_xyplot_data(form->pdcch_llr,bit_pdcch,llr_pdcch,12*frame_parms->N_RB_DL*2*num_pdcch_symbols,"","",""); + } + else + { + LOG_E(PHY,"PDCCH LLR plot is bugged in 20 MHz BW, to be fixed !!!"); + } } // PDCCH I/Q of MF Output @@ -708,8 +715,14 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, I[i] = pdcch_comp[2*i]; Q[i] = pdcch_comp[2*i+1]; } - - fl_set_xyplot_data(form->pdcch_comp,I,Q,12*frame_parms->N_RB_DL*num_pdcch_symbols,"","",""); + if (frame_parms->N_RB_DL != 100) + { + fl_set_xyplot_data(form->pdcch_comp,I,Q,12*frame_parms->N_RB_DL*num_pdcch_symbols,"","",""); + } + else + { + LOG_E(PHY,"PDCCH COMP plot is bugged in 20 MHz BW, to be fixed !!!"); + } } // PDSCH LLRs @@ -720,7 +733,14 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, } fl_set_xyplot_xbounds(form->pdsch_llr,0,coded_bits_per_codeword); - fl_set_xyplot_data(form->pdsch_llr,bit,llr,coded_bits_per_codeword,"","",""); + if (frame_parms->N_RB_DL != 100) + { + fl_set_xyplot_data(form->pdsch_llr,bit,llr,coded_bits_per_codeword,"","",""); + } + else + { + LOG_E(PHY,"PDSCH LLR plot is bugged in 20 MHz BW, to be fixed !!!"); + } } // PDSCH I/Q of MF Output diff --git a/openair1/PHY/defs.h b/openair1/PHY/defs.h index 921d2be1fc..2720510006 100644 --- a/openair1/PHY/defs.h +++ b/openair1/PHY/defs.h @@ -896,7 +896,7 @@ typedef struct { time_stats_t rx_dft_stats; time_stats_t dlsch_channel_estimation_stats; time_stats_t dlsch_freq_offset_estimation_stats; - time_stats_t dlsch_decoding_stats; + time_stats_t dlsch_decoding_stats[2]; time_stats_t dlsch_demodulation_stats; time_stats_t dlsch_rate_unmatching_stats; time_stats_t dlsch_turbo_decoding_stats; diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c index 4e5e6cb7b1..a05d445e23 100644 --- a/openair1/SCHED/phy_procedures_lte_ue.c +++ b/openair1/SCHED/phy_procedures_lte_ue.c @@ -1991,7 +1991,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin LOG_D(PHY,"[UE %d][SR %x] AbsSubframe %d.%d Generating PUCCH 1 (SR for PUSCH), an_srs_simultanous %d, shorten_pucch %d, n1_pucch %d, Po_PUCCH %d\n", Mod_id, ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->rnti, - frame_tx, subframe_tx, + frame_tx%1024, subframe_tx, frame_parms->soundingrs_ul_config_common.ackNackSRS_SimultaneousTransmission, isShortenPucch, ue->scheduling_request_config[eNB_id].sr_PUCCH_ResourceIndex, @@ -3532,7 +3532,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, LOG_I(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> Pdcch Sym %d \n", frame_rx, subframe_rx, harq_pid, ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->num_pdcch_symbols); #endif - start_meas(&ue->dlsch_decoding_stats); + start_meas(&ue->dlsch_decoding_stats[subframe_rx&0x1]); ret = dlsch_decoding(ue, pdsch_vars->llr[0], &ue->frame_parms, @@ -3543,12 +3543,13 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, harq_pid, pdsch==PDSCH?1:0, dlsch0->harq_processes[harq_pid]->TBS>256?1:0); - stop_meas(&ue->dlsch_decoding_stats); + stop_meas(&ue->dlsch_decoding_stats[subframe_rx&0x1]); LOG_D(PHY," --> Unscrambling for CW0 %5.3f\n", (ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0)); - LOG_D(PHY," --> Turbo Decoding for CW0 %5.3f\n", - (ue->dlsch_decoding_stats.p_time)/(cpuf*1000.0)); + LOG_D(PHY,"AbsSubframe %d.%d --> Turbo Decoding for CW0 %5.3f\n", + frame_rx%1024, subframe_rx,(ue->dlsch_decoding_stats[subframe_rx&0x1].p_time)/(cpuf*1000.0)); + if(is_cw1_active) { @@ -3582,7 +3583,9 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, LOG_I(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> Kmimo %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->Kmimo); LOG_I(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> Pdcch Sym %d \n", frame_rx, subframe_rx, harq_pid, ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->num_pdcch_symbols); #endif - start_meas(&ue->dlsch_decoding_stats); + + start_meas(&ue->dlsch_decoding_stats[subframe_rx&0x1]); + ret1 = dlsch_decoding(ue, pdsch_vars->llr[1], &ue->frame_parms, @@ -3593,12 +3596,13 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, harq_pid, pdsch==PDSCH?1:0, dlsch1->harq_processes[harq_pid]->TBS>256?1:0); - stop_meas(&ue->dlsch_decoding_stats); + stop_meas(&ue->dlsch_decoding_stats[subframe_rx&0x1]); + LOG_D(PHY," --> Unscrambling for CW1 %5.3f\n", (ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0)); - LOG_D(PHY," --> Turbo Decoding for CW1 %5.3f\n", - (ue->dlsch_decoding_stats.p_time)/(cpuf*1000.0)); + LOG_D(PHY,"AbsSubframe %d.%d --> Turbo Decoding for CW1 %5.3f\n", + frame_rx%1024, subframe_rx,(ue->dlsch_decoding_stats[subframe_rx&0x1].p_time)/(cpuf*1000.0)); } LOG_D(PHY," ------ end turbo decoder for AbsSubframe %d.%d ------ \n", frame_rx, subframe_rx); @@ -3620,10 +3624,11 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, if(dlsch0->rnti != 0xffff) { - LOG_D(PHY,"[UE %d][PDSCH %x/%d] AbsSubframe %d.%d : DLSCH CW0 in error (rv %d,mcs %d,TBS %d)\n", + LOG_D(PHY,"[UE %d][PDSCH %x/%d] AbsSubframe %d.%d : DLSCH CW0 in error (rv %d,round %d, mcs %d,TBS %d)\n", ue->Mod_id,dlsch0->rnti, harq_pid,frame_rx,subframe_rx, dlsch0->harq_processes[harq_pid]->rvidx, + dlsch0->harq_processes[harq_pid]->round, dlsch0->harq_processes[harq_pid]->mcs, dlsch0->harq_processes[harq_pid]->TBS); } @@ -3632,10 +3637,11 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, } else { if(dlsch0->rnti != 0xffff) { - LOG_D(PHY,"[UE %d][PDSCH %x/%d] AbsSubframe %d.%d : Received DLSCH CW0 (rv %d,mcs %d,TBS %d)\n", + LOG_D(PHY,"[UE %d][PDSCH %x/%d] AbsSubframe %d.%d : Received DLSCH CW0 (rv %d,round %d, mcs %d,TBS %d)\n", ue->Mod_id,dlsch0->rnti, harq_pid,frame_rx,subframe_rx, dlsch0->harq_processes[harq_pid]->rvidx, + dlsch0->harq_processes[harq_pid]->round, dlsch0->harq_processes[harq_pid]->mcs, dlsch0->harq_processes[harq_pid]->TBS); } From c6581031d5edf5777dcf942c7ba63579e0bf5507 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Thu, 16 Mar 2017 17:37:05 +0100 Subject: [PATCH 33/47] various quick fixes --- openair1/PHY/MODULATION/ofdm_mod.c | 1 - openair1/SCHED/phy_procedures_lte_eNb.c | 2 +- targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/openair1/PHY/MODULATION/ofdm_mod.c b/openair1/PHY/MODULATION/ofdm_mod.c index 04645eb8c1..f6f0c1f618 100644 --- a/openair1/PHY/MODULATION/ofdm_mod.c +++ b/openair1/PHY/MODULATION/ofdm_mod.c @@ -163,7 +163,6 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input #ifndef __AVX2__ if (fftsize==128) -#else #endif { for (j=0; jUE_stats[(uint32_t)UE_id].UE_timing_offset = preamble_delay_list[preamble_max]&0x1FFF; //limit to 13 (=11+2) bits eNB->UE_stats[(uint32_t)UE_id].sector = 0; - LOG_I(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure (UE_id %d) with preamble %d, energy %d.%d dB, delay %d\n", + LOG_D(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure (UE_id %d) with preamble %d, energy %d.%d dB, delay %d\n", eNB->Mod_id, eNB->CC_id, frame, diff --git a/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp b/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp index a98df19cf7..f2d2af55c7 100644 --- a/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp +++ b/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp @@ -128,10 +128,10 @@ void set_rx_gain_offset(openair0_config_t *openair0_cfg, int chain_index) { /*! \brief Set Gains (TX/RX) on LMSSDR * \param device the hardware to use * \param openair0_cfg openair0 Config structure - * \returns 0 in success + * \returns 0 in success, -1 on error */ int trx_lms_set_gains(openair0_device* device, openair0_config_t *openair0_cfg) { - int ret; + int ret = 0; if (openair0_cfg->rx_gain[0] > 70+openair0_cfg->rx_gain_offset[0]) { printf("[LMS] Reduce RX Gain 0 by %f dB\n",openair0_cfg->rx_gain[0]-openair0_cfg->rx_gain_offset[0]-70); From c13d5c21f37f49ea799044ee3dbfdabb3d345c1e Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Thu, 16 Mar 2017 18:05:23 +0100 Subject: [PATCH 34/47] added null pointer check for ulsim --- openair1/SCHED/phy_procedures_lte_ue.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c index 386dd8b52c..e1ee5fa847 100644 --- a/openair1/SCHED/phy_procedures_lte_ue.c +++ b/openair1/SCHED/phy_procedures_lte_ue.c @@ -641,9 +641,9 @@ void ue_compute_srs_occasion(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id } uint8_t pucch_ack_payload[2]; - if (get_ack(&ue->frame_parms, + if ((ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->harq_ack) && (get_ack(&ue->frame_parms, ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->harq_ack, - subframe_tx,pucch_ack_payload,0) > 0) + subframe_tx,pucch_ack_payload,0) > 0)) { is_sr_an_subframe = 1; } @@ -2261,12 +2261,14 @@ void phy_procedures_UE_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,ui } // reset DL ACK/NACK status - reset_ack(&ue->frame_parms, - ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->harq_ack, - subframe_tx, - ue->ulsch[eNB_id]->o_ACK,0); + if (ue->dlsch[proc->subframe_rx&0x1][eNB_id][0] != NULL) + reset_ack(&ue->frame_parms, + ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->harq_ack, + subframe_tx, + ue->ulsch[eNB_id]->o_ACK,0); - reset_ack(&ue->frame_parms, + if (ue->dlsch_SI[eNB_id] != NULL) + reset_ack(&ue->frame_parms, ue->dlsch_SI[eNB_id]->harq_ack, subframe_tx, ue->ulsch[eNB_id]->o_ACK,0); From 7f9b19cce843c3fb4288b2bdd0a174fa03f1e6fc Mon Sep 17 00:00:00 2001 From: fnabet Date: Fri, 17 Mar 2017 10:52:59 +0100 Subject: [PATCH 35/47] UE Issue224 fix on TCRNTI --- openair1/PHY/LTE_TRANSPORT/dci_tools.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c index c4e379b45a..fc57b6eda7 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c @@ -5144,6 +5144,7 @@ void prepare_dl_decoding_format1_1A(DCI_format_t dci_format, LTE_DL_FRAME_PARMS *frame_parms, uint8_t subframe, uint16_t rnti, + uint16_t tc_rnti, uint16_t si_rnti, uint16_t ra_rnti, uint16_t p_rnti, @@ -5206,6 +5207,13 @@ void prepare_dl_decoding_format1_1A(DCI_format_t dci_format, } else //CRNTI { + if (rnti == tc_rnti) { + //fix for standalone Contention Resolution Id + pdlsch0_harq->DCINdi = (uint8_t)-1; + LOG_D(PHY,"UE (%x/%d): Format1A DCI: C-RNTI is temporary. Set NDI = %d and to be ignored\n", + rnti,harq_pid,pdlsch0_harq->DCINdi); + } + // DCI has been toggled or this is the first transmission if (ndi1!=pdlsch0_harq->DCINdi) { @@ -5992,6 +6000,7 @@ int generate_ue_dlsch_params_from_dci(int frame, frame_parms, subframe, rnti, + tc_rnti, si_rnti, ra_rnti, p_rnti, @@ -6092,6 +6101,7 @@ int generate_ue_dlsch_params_from_dci(int frame, frame_parms, subframe, rnti, + tc_rnti, si_rnti, ra_rnti, p_rnti, From 19bd4d8cf7693c13fd47f6dabc956c25ed48e782 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 17 Mar 2017 16:08:25 +0100 Subject: [PATCH 36/47] test setup v2: simplify softmodem tests variable definition --- cmake_targets/autotests/v2/main.py | 64 +++++++----------------------- 1 file changed, 15 insertions(+), 49 deletions(-) diff --git a/cmake_targets/autotests/v2/main.py b/cmake_targets/autotests/v2/main.py index 14e5442720..8ed24da76c 100644 --- a/cmake_targets/autotests/v2/main.py +++ b/cmake_targets/autotests/v2/main.py @@ -280,55 +280,21 @@ machine_list.wait_all_free() # run eNB softmodem tests # ############################################################################## -tests = { - 'b210' : { - 'alu' : { - 'fdd' : { - '5' : { - 'bandrich' : { - 'tcp' : { 'ul': False, 'dl' : False }, - 'udp' : { 'ul': False, 'dl' : False }}, - 'sony' : { - 'tcp' : { 'ul': False, 'dl' : False }, - 'udp' : { 'ul': False, 'dl' : False }}}, - '10' : { - 'bandrich' : { - 'tcp' : { 'ul': False, 'dl' : False }, - 'udp' : { 'ul': False, 'dl' : False }}, - 'sony' : { - 'tcp' : { 'ul': False, 'dl' : False }, - 'udp' : { 'ul': False, 'dl' : False }}}, - '20' : { - 'bandrich' : { - 'tcp' : { 'ul': False, 'dl' : False }, - 'udp' : { 'ul': False, 'dl' : False }}, - 'sony' : { - 'tcp' : { 'ul': False, 'dl' : False }, - 'udp' : { 'ul': False, 'dl' : False }}}}, - 'tdd' : { - '5' : { - '3276' : { - 'tcp' : { 'ul': False, 'dl' : False }, - 'udp' : { 'ul': False, 'dl' : False }}}, - '10' : { - '3276' : { - 'tcp' : { 'ul': False, 'dl' : False }, - 'udp' : { 'ul': False, 'dl' : False }}}, - '20' : { - '3276' : { - 'tcp' : { 'ul': False, 'dl' : False }, - 'udp' : { 'ul': False, 'dl' : False }}}}}, - 'openair-cn' : {} - }, - 'x310' : { - 'alu' : {}, - 'openair-cn' : {} - }, - 'exmimo2' : { - 'alu' : {}, - 'openair-cn' : {} - } -} +tests = {} +for a in { 'b210', 'x310', 'exmimo2' }: + tests[a] = {} + for b in { 'alu', 'openair-cn' }: + tests[a][b] = {} + for c in { 'fdd', 'tdd' }: + tests[a][b][c] = {} + for d in { '5', '10', '20' }: + tests[a][b][c][d] = {} + for e in { 'bandrich', 'sony', '3276' }: + tests[a][b][c][d][e] = {} + for f in { 'tcp', 'udp' }: + tests[a][b][c][d][e][f] = {} + for g in { 'dl', 'ul' }: + tests[a][b][c][d][e][f][g] = False todo_tests_ids = [] for test in todo_tests: From a19a27ff33557a8e3dbb45d9cea538d3ae88a7b4 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 17 Mar 2017 18:58:55 +0100 Subject: [PATCH 37/47] test setup v2: add RRU/RRC tests - README.txt modified - tests added in test_case_list.xml (only for test setup v2) - python code modified - configuration files added --- cmake_targets/autotests/README.txt | 14 ++ cmake_targets/autotests/test_case_list.xml | 13 ++ cmake_targets/autotests/v2/alu_test.py | 177 ++++++++++++++-- .../v2/config/rcc.band7.tm1.if4p5.10MHz.conf | 192 +++++++++++++++++ .../v2/config/rcc.band7.tm1.if4p5.20MHz.conf | 192 +++++++++++++++++ .../v2/config/rcc.band7.tm1.if4p5.5MHz.conf | 192 +++++++++++++++++ ...ru.band7.tm1.if4p5.10MHz.udp.usrpb210.conf | 194 ++++++++++++++++++ ...ru.band7.tm1.if4p5.20MHz.udp.usrpb210.conf | 194 ++++++++++++++++++ ...rru.band7.tm1.if4p5.5MHz.udp.usrpb210.conf | 194 ++++++++++++++++++ cmake_targets/autotests/v2/main.py | 15 +- 10 files changed, 1357 insertions(+), 20 deletions(-) create mode 100644 cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.10MHz.conf create mode 100644 cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.20MHz.conf create mode 100644 cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.5MHz.conf create mode 100644 cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.10MHz.udp.usrpb210.conf create mode 100644 cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.20MHz.udp.usrpb210.conf create mode 100644 cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.5MHz.udp.usrpb210.conf diff --git a/cmake_targets/autotests/README.txt b/cmake_targets/autotests/README.txt index 6cd0307b48..b94d99bff7 100644 --- a/cmake_targets/autotests/README.txt +++ b/cmake_targets/autotests/README.txt @@ -239,6 +239,20 @@ Obj.# Case# Test# Description 01 75 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX 01 75 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX +01 76 lte-softmodem + RRU (NGFI IF4P5, UDP) tests with B210 RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX +01 76 00 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 1TX/1RX +01 76 01 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 1TX/1RX +01 76 02 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 1TX/1RX +01 76 03 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 1TX/1RX +01 76 04 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 1TX/1RX +01 76 05 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 1TX/1RX +01 76 06 Band 7 FDD 5MHz UL Throughput (TCP) for 300 sec for 1TX/1RX +01 76 07 Band 7 FDD 10MHz UL Throughput (TCP) for 300 sec for 1TX/1RX +01 76 08 Band 7 FDD 20MHz UL Throughput (TCP) for 300 sec for 1TX/1RX +01 76 09 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 1TX/1RX +01 76 10 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 1TX/1RX +01 76 11 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 1TX/1RX + 01 80 lte-softmodem + RRU (NGFI) tests with BladeRF RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX 01 80 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX 01 80 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index c55a29c975..0c80e960a4 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -8664,6 +8664,19 @@ c 10 + + + + + + + + + + + + + diff --git a/cmake_targets/autotests/v2/alu_test.py b/cmake_targets/autotests/v2/alu_test.py index 8ba6ab857a..762e414a95 100644 --- a/cmake_targets/autotests/v2/alu_test.py +++ b/cmake_targets/autotests/v2/alu_test.py @@ -9,18 +9,24 @@ class alu_test: openair, user, password, log_subdir, - env): - self.epc_machine = epc - self.enb_machine = enb - self.ue_machine = ue - self.openair_dir = openair - self.oai_user = user - self.oai_password = password - self.env = env + env, + enb_rru = "", + enb_rcc = ""): + self.epc_machine = epc + self.enb_machine = enb + self.ue_machine = ue + self.openair_dir = openair + self.oai_user = user + self.oai_password = password + self.env = env + self.enb_rru_machine = enb_rru + self.enb_rcc_machine = enb_rcc - self.task_hss = None - self.task_enb = None - self.task_ue = None + self.task_hss = None + self.task_enb = None + self.task_ue = None + self.task_rru_enb = None + self.task_rcc_enb = None self.logdir = openair + '/cmake_targets/autotests/log/' + log_subdir quickshell('mkdir -p ' + self.logdir) @@ -40,6 +46,10 @@ class alu_test: self.task_enb.kill() if self.task_ue != None and self.task_ue.alive(): self.task_ue.kill() + if self.task_rru_enb != None and self.task_rru_enb.alive(): + self.task_rru_enb.kill() + if self.task_rcc_enb != None and self.task_rcc_enb.alive(): + self.task_rcc_enb.kill() ########################################################################## # start_epc @@ -101,7 +111,7 @@ class alu_test: ########################################################################## # compile_enb ########################################################################## - def compile_enb(self, build_arguments): + def compile_enb(self, build_arguments, log_suffix=""): log("INFO: ALU test: compile softmodem on " + self.enb_machine) envcomp = list(self.env) envcomp.append('BUILD_ARGUMENTS="' + build_arguments + '"') @@ -120,7 +130,8 @@ class alu_test: self.oai_user, self.oai_password, envcomp, - self.logdir + "/compile_softmodem." + self.enb_machine, + self.logdir + "/compile_softmodem." + log_suffix + \ + self.enb_machine, post_action=post_action) ret = task.wait() if ret != 0: @@ -162,6 +173,62 @@ class alu_test: #not sure if we have to quit here or not #os._exit(1) + ########################################################################## + # start_enb_rru_rcc + ########################################################################## + def start_enb_rru_rcc(self, rru_config_file, rcc_config_file): + #copy wanted configuration files + quickshell("sshpass -p " + self.oai_password + + " scp config/" + rru_config_file + " " + + self.oai_user + "@" + self.enb_rru_machine+":/tmp/enb.conf") + quickshell("sshpass -p " + self.oai_password + + " scp config/" + rcc_config_file + " " + + self.oai_user + "@" + self.enb_rcc_machine+":/tmp/enb.conf") + + #run RRU/RCC softmodem + log("INFO: ALU test: run RRU softmodem with configuration file " + + rru_config_file) + self.task_rru_enb = Task("actions/run_enb.bash", + "run_RRU_softmodem", + self.enb_rru_machine, + self.oai_user, + self.oai_password, + self.env, + self.logdir + "/run_softmodem." + self.enb_rru_machine, + event=self.event) + self.task_rru_enb.waitlog('[RRH] binding to') + log("INFO: ALU test: run RCC softmodem with configuration file " + + rcc_config_file) + self.task_rcc_enb = Task("actions/run_enb.bash", + "run_RCC_softmodem", + self.enb_rcc_machine, + self.oai_user, + self.oai_password, + self.env, + self.logdir + "/run_softmodem." + self.enb_rcc_machine, + event=self.event) + self.task_rcc_enb.waitlog('[BBU] local ip addr') + #wait for RRU and RCC to be connected + self.task_rru_enb.waitlog('devices ok (eNB_thread_asynch_rx)') + + ########################################################################## + # stop_enb_rru_rcc + ########################################################################## + def stop_enb_rru_rcc(self): + log("INFO: ALU test: stop RRU/RCC softmodem") + self.task_rru_enb.sendnow("%c" % 3) + ret = self.task_rru_enb.wait() + if ret != 0: + log("ERROR: ALU test: RRU softmodem failed") + #not sure if we have to quit here or not + #os._exit(1) + self.task_rcc_enb.sendnow("%c" % 3) + ret = self.task_rcc_enb.wait() + if ret != 0: + log("ERROR: ALU test: RCC softmodem failed") + #not sure if we have to quit here or not + #os._exit(1) + ########################################################################## # start_ue ########################################################################## @@ -185,7 +252,9 @@ class alu_test: self.event.clear() - if ( not self.task_enb.alive() or + if ( (self.task_enb != None and not self.task_enb.alive()) or + (self.task_rru_enb!=None and not self.task_rru_enb.alive()) or + (self.task_rcc_enb!=None and not self.task_rcc_enb.alive()) or not self.task_hss.alive() or not self.task_ue.alive()): log("ERROR: ALU test: eNB, HSS or UE task died") @@ -250,14 +319,20 @@ class alu_test: self.event.wait() log("DEBUG: event.wait() done") - if ( not self.task_enb.alive() or + if ( (self.task_enb != None and not self.task_enb.alive()) or + (self.task_rru_enb!=None and not self.task_rru_enb.alive()) or + (self.task_rcc_enb!=None and not self.task_rcc_enb.alive()) or not self.task_hss.alive() or not self.task_ue.alive()): log("ERROR: unexpected task exited, test failed, kill all") if task_traffic_client.alive(): task_traffic_client.kill() - if self.task_enb.alive(): + if (self.task_enb != None and self.task_enb.alive()): self.task_enb.kill() + if (self.task_rru_enb != None and self.task_rru_enb.alive()): + self.task_rru_enb.kill() + if (self.task_rcc_enb != None and self.task_rcc_enb.alive()): + self.task_rcc_enb.kill() if self.task_ue.alive(): self.task_ue.kill() @@ -277,7 +352,9 @@ class alu_test: self.event.clear() - if ( not self.task_enb.alive() or + if ( (self.task_enb != None and not self.task_enb.alive()) or + (self.task_rru_enb!=None and not self.task_rru_enb.alive()) or + (self.task_rcc_enb!=None and not self.task_rcc_enb.alive()) or not self.task_hss.alive() or not self.task_ue.alive()): log("ERROR: ALU test: eNB, HSS or UE task died") @@ -334,8 +411,6 @@ class alu_test: ############################################################################## def run_b210_alu(tests, openair_dir, oai_user, oai_password, env): - if not do_tests(tests['b210']['alu']): - return #compile eNB (two cases: one for FDD and one for TDD) @@ -365,6 +440,44 @@ def run_b210_alu(tests, openair_dir, oai_user, oai_password, env): log("ERROR: ALU test failed: eNB compilation failed: " + str(e)) return + #compile RRU/RCC eNB + + if do_tests(tests['remote b210']['alu']['fdd']): + #RRU + alu = alu_test(epc='amerique', ue='stevens', + openair=openair_dir, + user=oai_user, password=oai_password, + log_subdir='enb_tests/remote_b210_alu/compile_enb_rru', + env=env, + #hack: set 'enb' to reuse 'compile_enb' + enb = 'superserver', + enb_rru = 'superserver', enb_rcc = 'starsky') + + try: + alu.compile_enb("--eNB -x -c -w USRP -t ETHERNET", + log_suffix='rru.') + except BaseException, e: + log("ERROR: ALU test failed: RRU eNB compilation failed: "+str(e)) + return + + #RCC + alu = alu_test(epc='amerique', ue='stevens', + openair=openair_dir, + user=oai_user, password=oai_password, + log_subdir='enb_tests/remote_b210_alu/compile_enb_rcc', + env=env, + #hack: set 'enb' to reuse 'compile_enb' + enb = 'starsky', + enb_rru = 'superserver', enb_rcc = 'starsky') + + try: + alu.compile_enb("--eNB -w None -t ETHERNET", + log_suffix='rcc.') + except BaseException, e: + log("ERROR: ALU test failed: RCC eNB compilation failed: "+str(e)) + return + + #run tests udp_dl_bandwidth = { "5" : "15M", @@ -410,3 +523,29 @@ def run_b210_alu(tests, openair_dir, oai_user, oai_password, env): except BaseException, e: log("ERROR: ALU test failed: " + str(e)) alu.finish() + if do_tests(tests['remote b210']['alu'][mode][bw]): + log("INFO: ALU test: run RRU/RCC tests for bandwidth " + bw + " MHz") + ctest = tests['remote b210']['alu'][mode][bw] + alu = alu_test(epc='amerique', enb='', ue=ue_machine[mode], + openair=openair_dir, + user=oai_user, password=oai_password, + log_subdir='enb_tests/remote_b210_alu/' + bw, + env=env, + enb_rru='superserver', enb_rcc='starsky') + try: + alu.start_epc() + alu.start_enb_rru_rcc("rru.band7.tm1.if4p5." + bw + "MHz.udp.usrpb210.conf", + "rcc.band7.tm1.if4p5." + bw + "MHz.conf") + for ue in ('bandrich', '3276'): + if ue in ctest and do_tests(ctest[ue]): + alu.start_ue(ue) + if do_tests(ctest[ue]['tcp']['dl']): alu.dl_tcp(ue) + if do_tests(ctest[ue]['tcp']['ul']): alu.ul_tcp(ue) + if do_tests(ctest[ue]['udp']['dl']): alu.dl_udp(ue, udp_dl_bandwidth[bw]) + if do_tests(ctest[ue]['udp']['ul']): alu.ul_udp(ue, udp_ul_bandwidth[bw]) + alu.stop_ue(ue) + alu.stop_enb_rru_rcc() + alu.stop_epc() + except BaseException, e: + log("ERROR: ALU test failed: " + str(e)) + alu.finish() diff --git a/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.10MHz.conf b/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.10MHz.conf new file mode 100644 index 0000000000..81eed5f4b1 --- /dev/null +++ b/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.10MHz.conf @@ -0,0 +1,192 @@ +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 = "92"; + + ////////// Physical parameters: + + component_carriers = ( + { + node_function = "NGFI_RCC_IF4p5"; + node_timing = "synch_to_ext_device"; + node_synch_ref = 0; + frame_type = "FDD"; + tdd_config = 3; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 7; + downlink_frequency = 2660000000L; + uplink_frequency_offset = -120000000; + Nid_cell = 0; + N_RB_DL = 50; + 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 = -29; + 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 = -104; + 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.12.26"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + + ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.18/24"; + ENB_INTERFACE_NAME_FOR_S1U = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.18/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + }; + + rrh_gw_config = ( + { + local_if_name = "eth1"; + remote_address = "10.10.10.157"; + local_address = "10.10.10.18"; + local_port = 50000; #for raw option local port must be the same to remote + remote_port = 50000; + rrh_gw_active = "yes"; + tr_preference = "udp_if4p5"; + rf_preference = "usrp_b200"; + iq_txshift = 4; + tx_sample_advance = 80; + tx_scheduling_advance = 9; + if_compression = "alaw"; + } + ); + + 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"; + }; + } +); diff --git a/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.20MHz.conf b/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.20MHz.conf new file mode 100644 index 0000000000..4b4190f8ce --- /dev/null +++ b/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.20MHz.conf @@ -0,0 +1,192 @@ +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 = "92"; + + ////////// Physical parameters: + + component_carriers = ( + { + node_function = "NGFI_RCC_IF4p5"; + node_timing = "synch_to_ext_device"; + node_synch_ref = 0; + frame_type = "FDD"; + tdd_config = 3; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 7; + downlink_frequency = 2660000000L; + uplink_frequency_offset = -120000000; + 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 = 1; + prach_freq_offset = 2; + pucch_delta_shift = 1; + pucch_nRB_CQI = 1; + pucch_nCS_AN = 0; + pucch_n1_AN = 32; + pdsch_referenceSignalPower = -29; + 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 = -104; + 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.12.26"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + + ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.18/24"; + ENB_INTERFACE_NAME_FOR_S1U = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.18/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + }; + + rrh_gw_config = ( + { + local_if_name = "eth1"; + remote_address = "10.10.10.157"; + local_address = "10.10.10.18"; + local_port = 50000; #for raw option local port must be the same to remote + remote_port = 50000; + rrh_gw_active = "yes"; + tr_preference = "udp_if4p5"; + rf_preference = "usrp_b200"; + iq_txshift = 4; + tx_sample_advance = 80; + tx_scheduling_advance = 9; + if_compression = "alaw"; + } + ); + + 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"; + }; + } +); diff --git a/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.5MHz.conf b/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.5MHz.conf new file mode 100644 index 0000000000..99b9a66226 --- /dev/null +++ b/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.5MHz.conf @@ -0,0 +1,192 @@ +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 = "92"; + + ////////// Physical parameters: + + component_carriers = ( + { + node_function = "NGFI_RCC_IF4p5"; + node_timing = "synch_to_ext_device"; + node_synch_ref = 0; + frame_type = "FDD"; + tdd_config = 3; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 7; + downlink_frequency = 2660000000L; + uplink_frequency_offset = -120000000; + 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 = -29; + 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 = -104; + 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.12.26"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + + ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.18/24"; + ENB_INTERFACE_NAME_FOR_S1U = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.18/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + }; + + rrh_gw_config = ( + { + local_if_name = "eth1"; + remote_address = "10.10.10.157"; + local_address = "10.10.10.18"; + local_port = 50000; #for raw option local port must be the same to remote + remote_port = 50000; + rrh_gw_active = "yes"; + tr_preference = "udp_if4p5"; + rf_preference = "usrp_b200"; + iq_txshift = 4; + tx_sample_advance = 80; + tx_scheduling_advance = 9; + if_compression = "alaw"; + } + ); + + 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"; + }; + } +); diff --git a/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.10MHz.udp.usrpb210.conf b/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.10MHz.udp.usrpb210.conf new file mode 100644 index 0000000000..4cc40b6d84 --- /dev/null +++ b/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.10MHz.udp.usrpb210.conf @@ -0,0 +1,194 @@ +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 = "92"; + + ////////// Physical parameters: + + component_carriers = ( + { + node_function = "NGFI_RRU_IF4p5"; + node_timing = "synch_to_ext_device"; + node_synch_ref = 0; + frame_type = "FDD"; + tdd_config = 3; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 7; + downlink_frequency = 2660000000L; + uplink_frequency_offset = -120000000; + Nid_cell = 0; + N_RB_DL = 50; + 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 = -29; + 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 = -104; + 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 = "192.168.12.11"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + + ENB_INTERFACE_NAME_FOR_S1_MME = "eth3"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.215/24"; + ENB_INTERFACE_NAME_FOR_S1U = "eth3"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.215/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + }; + + rrh_gw_config = ( + { + local_if_name = "eth3"; + remote_address = "10.10.10.18"; + local_address = "10.10.10.157"; + local_port = 50000; #for raw option local port must be the same to remote + remote_port = 50000; + rrh_gw_active = "yes"; + tr_preference = "udp_if4p5"; + rf_preference = "usrp_b200"; + iq_txshift = 4; + tx_sample_advance = 80; + tx_scheduling_advance = 9; + if_compression = "alaw"; + } + ); + + 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"; + }; + } +); diff --git a/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.20MHz.udp.usrpb210.conf b/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.20MHz.udp.usrpb210.conf new file mode 100644 index 0000000000..787cedb18d --- /dev/null +++ b/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.20MHz.udp.usrpb210.conf @@ -0,0 +1,194 @@ +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 = "92"; + + ////////// Physical parameters: + + component_carriers = ( + { + node_function = "NGFI_RRU_IF4p5"; + node_timing = "synch_to_ext_device"; + node_synch_ref = 0; + frame_type = "FDD"; + tdd_config = 3; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 7; + downlink_frequency = 2660000000L; + uplink_frequency_offset = -120000000; + 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 = 1; + prach_freq_offset = 2; + pucch_delta_shift = 1; + pucch_nRB_CQI = 1; + pucch_nCS_AN = 0; + pucch_n1_AN = 32; + pdsch_referenceSignalPower = -29; + 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 = -104; + 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 = "192.168.12.11"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + + ENB_INTERFACE_NAME_FOR_S1_MME = "eth3"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.215/24"; + ENB_INTERFACE_NAME_FOR_S1U = "eth3"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.215/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + }; + + rrh_gw_config = ( + { + local_if_name = "eth3"; + remote_address = "10.10.10.18"; + local_address = "10.10.10.157"; + local_port = 50000; #for raw option local port must be the same to remote + remote_port = 50000; + rrh_gw_active = "yes"; + tr_preference = "udp_if4p5"; + rf_preference = "usrp_b200"; + iq_txshift = 4; + tx_sample_advance = 80; + tx_scheduling_advance = 9; + if_compression = "alaw"; + } + ); + + 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"; + }; + } +); diff --git a/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.5MHz.udp.usrpb210.conf b/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.5MHz.udp.usrpb210.conf new file mode 100644 index 0000000000..d9d46bf944 --- /dev/null +++ b/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.5MHz.udp.usrpb210.conf @@ -0,0 +1,194 @@ +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 = "92"; + + ////////// Physical parameters: + + component_carriers = ( + { + node_function = "NGFI_RRU_IF4p5"; + node_timing = "synch_to_ext_device"; + node_synch_ref = 0; + frame_type = "FDD"; + tdd_config = 3; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 7; + downlink_frequency = 2660000000L; + uplink_frequency_offset = -120000000; + 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 = -29; + 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 = -104; + 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 = "192.168.12.11"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + + ENB_INTERFACE_NAME_FOR_S1_MME = "eth3"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.215/24"; + ENB_INTERFACE_NAME_FOR_S1U = "eth3"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.215/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + }; + + rrh_gw_config = ( + { + local_if_name = "eth3"; + remote_address = "10.10.10.18"; + local_address = "10.10.10.157"; + local_port = 50000; #for raw option local port must be the same to remote + remote_port = 50000; + rrh_gw_active = "yes"; + tr_preference = "udp_if4p5"; + rf_preference = "usrp_b200"; + iq_txshift = 4; + tx_sample_advance = 80; + tx_scheduling_advance = 9; + if_compression = "alaw"; + } + ); + + 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"; + }; + } +); diff --git a/cmake_targets/autotests/v2/main.py b/cmake_targets/autotests/v2/main.py index 8ed24da76c..da38432dbc 100644 --- a/cmake_targets/autotests/v2/main.py +++ b/cmake_targets/autotests/v2/main.py @@ -281,7 +281,7 @@ machine_list.wait_all_free() ############################################################################## tests = {} -for a in { 'b210', 'x310', 'exmimo2' }: +for a in { 'b210', 'remote b210', 'x310', 'exmimo2' }: tests[a] = {} for b in { 'alu', 'openair-cn' }: tests[a][b] = {} @@ -407,6 +407,19 @@ for test in todo_tests_ids: if test=='017504':log('WARNING: skip test ' + test) #TODO if test=='017505':log('WARNING: skip test ' + test) #TODO + if test=='017600':tests['remote b210']['alu']['fdd'][ '5']['bandrich']['udp']['ul']=True + if test=='017601':tests['remote b210']['alu']['fdd']['10']['bandrich']['udp']['ul']=True + if test=='017602':tests['remote b210']['alu']['fdd']['20']['bandrich']['udp']['ul']=True + if test=='017603':tests['remote b210']['alu']['fdd'][ '5']['bandrich']['udp']['dl']=True + if test=='017604':tests['remote b210']['alu']['fdd']['10']['bandrich']['udp']['dl']=True + if test=='017605':tests['remote b210']['alu']['fdd']['20']['bandrich']['udp']['dl']=True + if test=='017606':tests['remote b210']['alu']['fdd'][ '5']['bandrich']['tcp']['ul']=True + if test=='017607':tests['remote b210']['alu']['fdd']['10']['bandrich']['tcp']['ul']=True + if test=='017608':tests['remote b210']['alu']['fdd']['20']['bandrich']['tcp']['ul']=True + if test=='017609':tests['remote b210']['alu']['fdd'][ '5']['bandrich']['tcp']['dl']=True + if test=='017610':tests['remote b210']['alu']['fdd']['10']['bandrich']['tcp']['dl']=True + if test=='017611':tests['remote b210']['alu']['fdd']['20']['bandrich']['tcp']['dl']=True + if test=='018000':log('WARNING: skip test ' + test) #TODO if test=='018001':log('WARNING: skip test ' + test) #TODO if test=='018002':log('WARNING: skip test ' + test) #TODO From 1c57eadd336add1fc3e354325b84a54f09fc500a Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Sat, 18 Mar 2017 00:09:04 +0100 Subject: [PATCH 38/47] fix: remove useless test One check introduced by previous commit was not necessary. --- openair1/SCHED/phy_procedures_lte_ue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c index e1ee5fa847..3084b207c2 100644 --- a/openair1/SCHED/phy_procedures_lte_ue.c +++ b/openair1/SCHED/phy_procedures_lte_ue.c @@ -641,9 +641,9 @@ void ue_compute_srs_occasion(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id } uint8_t pucch_ack_payload[2]; - if ((ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->harq_ack) && (get_ack(&ue->frame_parms, + if (get_ack(&ue->frame_parms, ue->dlsch[proc->subframe_rx&0x1][eNB_id][0]->harq_ack, - subframe_tx,pucch_ack_payload,0) > 0)) + subframe_tx,pucch_ack_payload,0) > 0) { is_sr_an_subframe = 1; } From 1e2f952a9cc898970b51458ceee57b350e1f69c8 Mon Sep 17 00:00:00 2001 From: gabrielC Date: Mon, 20 Mar 2017 09:18:02 +0100 Subject: [PATCH 39/47] Remove to frequent log in 20 MHz --- openair1/PHY/TOOLS/lte_phy_scope.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openair1/PHY/TOOLS/lte_phy_scope.c b/openair1/PHY/TOOLS/lte_phy_scope.c index 0a5470e7b8..13beb469e4 100644 --- a/openair1/PHY/TOOLS/lte_phy_scope.c +++ b/openair1/PHY/TOOLS/lte_phy_scope.c @@ -705,7 +705,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, } else { - LOG_E(PHY,"PDCCH LLR plot is bugged in 20 MHz BW, to be fixed !!!"); + LOG_D(PHY,"UE PDCCH LLR plot is bugged in 20 MHz BW, to be fixed !!!\n"); } } @@ -721,7 +721,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, } else { - LOG_E(PHY,"PDCCH COMP plot is bugged in 20 MHz BW, to be fixed !!!"); + LOG_D(PHY,"UE PDCCH COMP plot is bugged in 20 MHz BW, to be fixed !!!\n"); } } @@ -739,7 +739,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, } else { - LOG_E(PHY,"PDSCH LLR plot is bugged in 20 MHz BW, to be fixed !!!"); + LOG_D(PHY,"UE PDSCH LLR plot is bugged in 20 MHz BW, to be fixed !!!\n"); } } From fd1e01579c90819db09dfff182500a6c86fabb43 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 20 Mar 2017 10:28:11 +0100 Subject: [PATCH 40/47] bugfix: set cpuf in oaisim --- targets/SIMU/USER/oaisim.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/targets/SIMU/USER/oaisim.c b/targets/SIMU/USER/oaisim.c index 7c1ea1a3c8..f1b3944a16 100644 --- a/targets/SIMU/USER/oaisim.c +++ b/targets/SIMU/USER/oaisim.c @@ -1332,6 +1332,8 @@ main (int argc, char **argv) if (oai_emulation.info.opp_enabled == 1) reset_opp_meas_oaisim (); + cpuf=get_cpu_freq_GHz(); + init_time (); init_slot_isr (); From 41dda3d3de411c652606d2c44dc5fd17901ae107 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 20 Mar 2017 10:38:25 +0100 Subject: [PATCH 41/47] integration fix: let dlsim_tm4 compile again The variables that were duplicated per processing thread were adapted. 'cpuf' was defined and initialized. --- openair1/SIMULATION/LTE_PHY/dlsim_tm4.c | 70 ++++++++++++------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c b/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c index b45bfdf324..26d51d049d 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c @@ -68,6 +68,7 @@ extern uint8_t interf_unaw_shift; PHY_VARS_eNB *eNB; PHY_VARS_UE *UE; +double cpuf; int otg_enabled=0; /*the following parameters are used to control the processing times calculations*/ @@ -296,7 +297,7 @@ int main(int argc, char **argv) int threequarter_fs=0; - + cpuf = get_cpu_freq_GHz(); opp_enabled=1; // to enable the time meas @@ -867,7 +868,7 @@ int main(int argc, char **argv) // bzero(r_im0[i],FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double)); } - UE->pdcch_vars[0]->crnti = n_rnti; + UE->pdcch_vars[subframe&0x1][0]->crnti = n_rnti; UE->transmission_mode[eNB_id]=transmission_mode; if (UE->transmission_mode[eNB_id] !=4) UE->measurements.rank[eNB_id]=0; @@ -2087,7 +2088,8 @@ int main(int argc, char **argv) reset_meas(&UE->dlsch_freq_offset_estimation_stats); reset_meas(&UE->rx_dft_stats); reset_meas(&UE->dlsch_llr_stats); - reset_meas(&UE->dlsch_decoding_stats); + reset_meas(&UE->dlsch_decoding_stats[0]); + reset_meas(&UE->dlsch_decoding_stats[1]); reset_meas(&UE->dlsch_turbo_decoding_stats); reset_meas(&UE->dlsch_deinterleaving_stats); reset_meas(&UE->dlsch_rate_unmatching_stats); @@ -3488,9 +3490,7 @@ int main(int argc, char **argv) UE->UE_mode[0] = PUSCH; start_meas(&UE->dlsch_rx_pdcch_stats); - rx_pdcch(&UE->common_vars, - UE->pdcch_vars, - &UE->frame_parms, + rx_pdcch(UE, trials, subframe, 0, @@ -3500,7 +3500,7 @@ int main(int argc, char **argv) stop_meas(&UE->dlsch_rx_pdcch_stats); // overwrite number of pdcch symbols - UE->pdcch_vars[0]->num_pdcch_symbols = num_pdcch_symbols; + UE->pdcch_vars[subframe&0x1][0]->num_pdcch_symbols = num_pdcch_symbols; dci_cnt = dci_decoding_procedure(UE, dci_alloc_rx,1, @@ -3544,14 +3544,14 @@ int main(int argc, char **argv) 0, P_RNTI, transmission_mode<7?0:transmission_mode, - UE->pdcch_vars[0]->crnti_is_temporary? UE->pdcch_vars[0]->crnti: 0)==0)) { + UE->pdcch_vars[subframe&0x1][0]->crnti_is_temporary? UE->pdcch_vars[subframe&0x1][0]->crnti: 0)==0)) { dump_dci(&UE->frame_parms,&dci_alloc_rx[i]); coded_bits_per_codeword[0]= get_G(&eNB->frame_parms, UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->nb_rb, UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->rb_alloc_even, get_Qm(UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->mcs), UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->Nl, - UE->pdcch_vars[0]->num_pdcch_symbols, + UE->pdcch_vars[subframe&0x1][0]->num_pdcch_symbols, 0, subframe, transmission_mode>=7?transmission_mode:0); @@ -3561,7 +3561,7 @@ int main(int argc, char **argv) UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->rb_alloc_even, get_Qm(UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->mcs), UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->Nl, - UE->pdcch_vars[1]->num_pdcch_symbols, + UE->pdcch_vars[subframe&0x1][1]->num_pdcch_symbols, 0, subframe, transmission_mode>=7?transmission_mode:0); @@ -3570,7 +3570,7 @@ int main(int argc, char **argv) rate = (double)dlsch_tbs25[get_I_TBS(UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->mcs)][UE->dlsch[subframe&0x1][0][0]->nb_rb-1]/(coded_bits_per_codeword); rate*=get_Qm(UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->mcs); */ - printf("num_pdcch_symbols %d, G %d, TBS %d\n",UE->pdcch_vars[0]->num_pdcch_symbols,coded_bits_per_codeword [0],UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->TBS); + printf("num_pdcch_symbols %d, G %d, TBS %d\n",UE->pdcch_vars[subframe&0x1][0]->num_pdcch_symbols,coded_bits_per_codeword [0],UE->dlsch[subframe&0x1][0][0]->harq_processes[UE->dlsch[subframe&0x1][0][0]->current_harq_pid]->TBS); dlsch_active = 1; // what does it indicates??? } else { @@ -3591,8 +3591,8 @@ int main(int argc, char **argv) } } } else { //dci_flag == 0 - UE->pdcch_vars[0]->crnti = n_rnti; - UE->pdcch_vars[0]->num_pdcch_symbols = num_pdcch_symbols; + UE->pdcch_vars[subframe&0x1][0]->crnti = n_rnti; + UE->pdcch_vars[subframe&0x1][0]->num_pdcch_symbols = num_pdcch_symbols; if (round == 0) { UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->first_tx=1; UE->dlsch[subframe&0x1][0][1]->harq_processes[0]->first_tx=1; @@ -3613,7 +3613,7 @@ int main(int argc, char **argv) 0, P_RNTI, transmission_mode<7?0:transmission_mode, - UE->pdcch_vars[0]->crnti_is_temporary? UE->pdcch_vars[0]->crnti: 0); + UE->pdcch_vars[subframe&0x1][0]->crnti_is_temporary? UE->pdcch_vars[subframe&0x1][0]->crnti: 0); break; case 3: @@ -3631,7 +3631,7 @@ int main(int argc, char **argv) 0, P_RNTI, transmission_mode<7?0:transmission_mode, - UE->pdcch_vars[0]->crnti_is_temporary? UE->pdcch_vars[0]->crnti: 0); + UE->pdcch_vars[subframe&0x1][0]->crnti_is_temporary? UE->pdcch_vars[subframe&0x1][0]->crnti: 0); //printf("Rate: TM3 (after) round %d (%d) first_tx %d\n",round,UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->round,UE->dlsch[subframe&0x1][0][0]->harq_processes[0]->first_tx); break; case 4: @@ -3647,7 +3647,7 @@ int main(int argc, char **argv) 0, P_RNTI, transmission_mode<7?0:transmission_mode, - UE->pdcch_vars[0]->crnti_is_temporary? UE->pdcch_vars[0]->crnti: 0); + UE->pdcch_vars[subframe&0x1][0]->crnti_is_temporary? UE->pdcch_vars[subframe&0x1][0]->crnti: 0); break; case 5: @@ -3664,7 +3664,7 @@ int main(int argc, char **argv) 0, P_RNTI, transmission_mode<7?0:transmission_mode, - UE->pdcch_vars[0]->crnti_is_temporary? UE->pdcch_vars[0]->crnti: 0); + UE->pdcch_vars[subframe&0x1][0]->crnti_is_temporary? UE->pdcch_vars[subframe&0x1][0]->crnti: 0); break; } dlsch_active = 1; @@ -3690,7 +3690,7 @@ int main(int argc, char **argv) start_meas(&UE->dlsch_llr_stats); - for (m=UE->pdcch_vars[0]->num_pdcch_symbols; mpdcch_vars[subframe&0x1][0]->num_pdcch_symbols; mpdcch_vars[0]->num_pdcch_symbols)?1:0, + (m==UE->pdcch_vars[subframe&0x1][0]->num_pdcch_symbols)?1:0, rx_type, i_mod, UE->dlsch[subframe&0x1][0][0]->current_harq_pid)==-1){ @@ -3849,7 +3849,7 @@ int main(int argc, char **argv) subframe<<1); stop_meas(&UE->dlsch_unscrambling_stats); - start_meas(&UE->dlsch_decoding_stats); + start_meas(&UE->dlsch_decoding_stats[subframe&0x1]); ret[TB] = dlsch_decoding(UE, UE->pdsch_vars[subframe&0x1][eNB_id]->llr[UE->dlsch[subframe&0x1][0][TB]->harq_processes[UE->dlsch[subframe&0x1][0][TB]->current_harq_pid]->codeword], &UE->frame_parms, @@ -3859,7 +3859,7 @@ int main(int argc, char **argv) subframe, UE->dlsch[subframe&0x1][0][TB]->current_harq_pid, 1,llr8_flag); - stop_meas(&UE->dlsch_decoding_stats); + stop_meas(&UE->dlsch_decoding_stats[subframe&0x1]); #ifdef DEBUG_HARQ printf("[DLSIM] ret[%d] = %d\n", TB, ret[TB]); #endif @@ -4208,7 +4208,7 @@ int main(int argc, char **argv) subframe<<1); stop_meas(&UE->dlsch_unscrambling_stats); - start_meas(&UE->dlsch_decoding_stats); + start_meas(&UE->dlsch_decoding_stats[subframe&0x1]); ret[1] = dlsch_decoding(UE, UE->pdsch_vars[subframe&0x1][eNB_id]->llr[UE->dlsch[subframe&0x1][0][1]->harq_processes[UE->dlsch[subframe&0x1][0][1]->current_harq_pid]->codeword], @@ -4219,7 +4219,7 @@ int main(int argc, char **argv) subframe, UE->dlsch[subframe&0x1][0][1]->current_harq_pid, 1,llr8_flag); - stop_meas(&UE->dlsch_decoding_stats); + stop_meas(&UE->dlsch_decoding_stats[subframe&0x1]); #ifdef DEBUG_HARQ printf("[DLSIM] Decoding TB1 in SIC: ret[1] = %d, round sic %d\n", ret[1], round_sic); @@ -4419,11 +4419,11 @@ int main(int argc, char **argv) */ //pdcch_vars - write_output("pdcchF0_ext.m","pdcchF_ext", UE->pdcch_vars[eNB_id]->rxdataF_ext[0],2*3*UE->frame_parms.ofdm_symbol_size,1,1); - write_output("pdcch00_ch0_ext.m","pdcch00_ch0_ext",UE->pdcch_vars[eNB_id]->dl_ch_estimates_ext[0],300*3,1,1); + write_output("pdcchF0_ext.m","pdcchF_ext", UE->pdcch_vars[subframe&0x1][eNB_id]->rxdataF_ext[0],2*3*UE->frame_parms.ofdm_symbol_size,1,1); + write_output("pdcch00_ch0_ext.m","pdcch00_ch0_ext",UE->pdcch_vars[subframe&0x1][eNB_id]->dl_ch_estimates_ext[0],300*3,1,1); - write_output("pdcch_rxF_comp0.m","pdcch0_rxF_comp0",UE->pdcch_vars[eNB_id]->rxdataF_comp[0],4*300,1,1); - write_output("pdcch_rxF_llr.m","pdcch_llr",UE->pdcch_vars[eNB_id]->llr,2400,1,4); + write_output("pdcch_rxF_comp0.m","pdcch0_rxF_comp0",UE->pdcch_vars[subframe&0x1][eNB_id]->rxdataF_comp[0],4*300,1,1); + write_output("pdcch_rxF_llr.m","pdcch_llr",UE->pdcch_vars[subframe&0x1][eNB_id]->llr,2400,1,4); if (round == 3) exit(-1); } @@ -4534,7 +4534,7 @@ int main(int argc, char **argv) double t_rx = (double)UE->phy_proc_rx[subframe&0x1].p_time/cpu_freq_GHz/1000.0; double t_rx_fft = (double)UE->ofdm_demod_stats.p_time/cpu_freq_GHz/1000.0; double t_rx_demod = (double)UE->dlsch_rx_pdcch_stats.p_time/cpu_freq_GHz/1000.0; - double t_rx_dec = (double)UE->dlsch_decoding_stats.p_time/cpu_freq_GHz/1000.0; + double t_rx_dec = (double)UE->dlsch_decoding_stats[subframe&0x1].p_time/cpu_freq_GHz/1000.0; if (t_tx > t_tx_max) @@ -4891,12 +4891,12 @@ int main(int argc, char **argv) printf("|__ Statistcs std: %fus median %fus q1 %fus q3 %fus \n",std_phy_proc_rx_demod, rx_demod_median, rx_demod_q1, rx_demod_q3); printf("DLSCH unscrambling time :%f us (%d trials)\n",(double)UE->dlsch_unscrambling_stats.diff/UE->dlsch_unscrambling_stats.trials/cpu_freq_GHz/1000.0, UE->dlsch_unscrambling_stats.trials); - std_phy_proc_rx_dec = sqrt((double)UE->dlsch_decoding_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000, - 2)/UE->dlsch_decoding_stats.trials - pow((double)UE->dlsch_decoding_stats.diff/UE->dlsch_decoding_stats.trials/cpu_freq_GHz/1000,2)); + std_phy_proc_rx_dec = sqrt((double)UE->dlsch_decoding_stats[subframe&0x1].diff_square/pow(cpu_freq_GHz,2)/pow(1000, + 2)/UE->dlsch_decoding_stats[subframe&0x1].trials - pow((double)UE->dlsch_decoding_stats[subframe&0x1].diff/UE->dlsch_decoding_stats[subframe&0x1].trials/cpu_freq_GHz/1000,2)); printf("DLSCH Decoding time (%02.2f Mbit/s, avg iter %1.2f) :%f us (%d trials, max %f)\n", eNB->dlsch[0][0]->harq_processes[0]->TBS/1000.0,(double)avg_iter[0]/iter_trials[0], - (double)UE->dlsch_decoding_stats.diff/UE->dlsch_decoding_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_decoding_stats.trials, - (double)UE->dlsch_decoding_stats.max/cpu_freq_GHz/1000.0); + (double)UE->dlsch_decoding_stats[subframe&0x1].diff/UE->dlsch_decoding_stats[subframe&0x1].trials/cpu_freq_GHz/1000.0,UE->dlsch_decoding_stats[subframe&0x1].trials, + (double)UE->dlsch_decoding_stats[subframe&0x1].max/cpu_freq_GHz/1000.0); printf("|__ Statistcs std: %fus median %fus q1 %fus q3 %fus \n",std_phy_proc_rx_dec, rx_dec_median, rx_dec_q1, rx_dec_q3); printf("|__ DLSCH Rate Unmatching :%f us (%d trials)\n", (double)UE->dlsch_rate_unmatching_stats.diff/UE->dlsch_rate_unmatching_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_rate_unmatching_stats.trials); @@ -5194,7 +5194,7 @@ int main(int argc, char **argv) UE->dlsch_rx_pdcch_stats.trials, UE->dlsch_llr_stats.trials, UE->dlsch_unscrambling_stats.trials, - UE->dlsch_decoding_stats.trials + UE->dlsch_decoding_stats[subframe&0x1].trials ); fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;", get_time_meas_us(&eNB->phy_proc_tx), @@ -5207,7 +5207,7 @@ int main(int argc, char **argv) get_time_meas_us(&UE->dlsch_rx_pdcch_stats), 3*get_time_meas_us(&UE->dlsch_llr_stats), get_time_meas_us(&UE->dlsch_unscrambling_stats), - get_time_meas_us(&UE->dlsch_decoding_stats) + get_time_meas_us(&UE->dlsch_decoding_stats[subframe&0x1]) ); //fprintf(time_meas_fd,"eNB_PROC_TX_STD;eNB_PROC_TX_MAX;eNB_PROC_TX_MIN;eNB_PROC_TX_MED;eNB_PROC_TX_Q1;eNB_PROC_TX_Q3;eNB_PROC_TX_DROPPED;\n"); fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%d;", std_phy_proc_tx, t_tx_max, t_tx_min, tx_median, tx_q1, tx_q3, n_tx_dropped); @@ -5247,7 +5247,7 @@ int main(int argc, char **argv) UE->dlsch_rx_pdcch_stats.trials, UE->dlsch_llr_stats.trials, UE->dlsch_unscrambling_stats.trials, - UE->dlsch_decoding_stats.trials); + UE->dlsch_decoding_stats[subframe&0x1].trials); */ printf("[passed] effective rate : %f (%2.1f%%,%f)): log and break \n",rate[0]*effective_rate, 100*effective_rate, rate[0]); break; From f2e9e3f2dc3779f4d8bb82073d0179b5d17e9271 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 20 Mar 2017 10:40:26 +0100 Subject: [PATCH 42/47] integration fix: let dlsim compile again Same as previous commit 41dda3d3de411c652606d2c44dc5fd17901ae107 but for dlsim. --- openair1/SIMULATION/LTE_PHY/dlsim.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index ac26a9259c..e29c60fead 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -57,6 +57,8 @@ PHY_VARS_eNB *eNB; PHY_VARS_UE *UE; +double cpuf; + int otg_enabled=0; /*the following parameters are used to control the processing times calculations*/ double t_tx_max = -1000000000; /*!< \brief initial max process time for tx */ @@ -1409,6 +1411,8 @@ int main(int argc, char **argv) #endif printf("Detected cpu_freq %f GHz\n",cpu_freq_GHz); + cpuf = cpu_freq_GHz; + //signal(SIGSEGV, handler); //signal(SIGABRT, handler); @@ -2259,7 +2263,8 @@ int main(int argc, char **argv) reset_meas(&UE->dlsch_channel_estimation_stats); reset_meas(&UE->dlsch_freq_offset_estimation_stats); reset_meas(&UE->rx_dft_stats); - reset_meas(&UE->dlsch_decoding_stats); + reset_meas(&UE->dlsch_decoding_stats[0]); + reset_meas(&UE->dlsch_decoding_stats[1]); reset_meas(&UE->dlsch_turbo_decoding_stats); reset_meas(&UE->dlsch_deinterleaving_stats); reset_meas(&UE->dlsch_rate_unmatching_stats); @@ -2708,7 +2713,7 @@ int main(int argc, char **argv) double t_rx = (double)UE->phy_proc_rx[subframe&0x1].p_time/cpu_freq_GHz/1000.0; double t_rx_fft = (double)UE->ofdm_demod_stats.p_time/cpu_freq_GHz/1000.0; double t_rx_demod = (double)UE->dlsch_rx_pdcch_stats.p_time/cpu_freq_GHz/1000.0; - double t_rx_dec = (double)UE->dlsch_decoding_stats.p_time/cpu_freq_GHz/1000.0; + double t_rx_dec = (double)UE->dlsch_decoding_stats[subframe&1].p_time/cpu_freq_GHz/1000.0; if (t_tx > t_tx_max) t_tx_max = t_tx; @@ -2921,12 +2926,12 @@ int main(int argc, char **argv) printf("|__ Statistcs std: %fus median %fus q1 %fus q3 %fus \n",std_phy_proc_rx_demod, rx_demod_median, rx_demod_q1, rx_demod_q3); printf("DLSCH unscrambling time :%f us (%d trials)\n",(double)UE->dlsch_unscrambling_stats.diff/UE->dlsch_unscrambling_stats.trials/cpu_freq_GHz/1000.0, UE->dlsch_unscrambling_stats.trials); - std_phy_proc_rx_dec = sqrt((double)UE->dlsch_decoding_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000, - 2)/UE->dlsch_decoding_stats.trials - pow((double)UE->dlsch_decoding_stats.diff/UE->dlsch_decoding_stats.trials/cpu_freq_GHz/1000,2)); + std_phy_proc_rx_dec = sqrt((double)UE->dlsch_decoding_stats[subframe&1].diff_square/pow(cpu_freq_GHz,2)/pow(1000, + 2)/UE->dlsch_decoding_stats[subframe&1].trials - pow((double)UE->dlsch_decoding_stats[subframe&1].diff/UE->dlsch_decoding_stats[subframe&1].trials/cpu_freq_GHz/1000,2)); printf("DLSCH Decoding time (%02.2f Mbit/s, avg iter %1.2f) :%f us (%d trials, max %f)\n", eNB->dlsch[0][0]->harq_processes[0]->TBS/1000.0,(double)avg_iter/iter_trials, - (double)UE->dlsch_decoding_stats.diff/UE->dlsch_decoding_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_decoding_stats.trials, - (double)UE->dlsch_decoding_stats.max/cpu_freq_GHz/1000.0); + (double)UE->dlsch_decoding_stats[subframe&1].diff/UE->dlsch_decoding_stats[subframe&1].trials/cpu_freq_GHz/1000.0,UE->dlsch_decoding_stats[subframe&1].trials, + (double)UE->dlsch_decoding_stats[subframe&1].max/cpu_freq_GHz/1000.0); printf("|__ Statistcs std: %fus median %fus q1 %fus q3 %fus \n",std_phy_proc_rx_dec, rx_dec_median, rx_dec_q1, rx_dec_q3); printf("|__ DLSCH Rate Unmatching :%f us (%d trials)\n", (double)UE->dlsch_rate_unmatching_stats.diff/UE->dlsch_rate_unmatching_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_rate_unmatching_stats.trials); @@ -3114,7 +3119,7 @@ int main(int argc, char **argv) UE->dlsch_rx_pdcch_stats.trials, UE->dlsch_llr_stats.trials, UE->dlsch_unscrambling_stats.trials, - UE->dlsch_decoding_stats.trials + UE->dlsch_decoding_stats[subframe&1].trials ); fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;", get_time_meas_us(&eNB->phy_proc_tx), @@ -3127,7 +3132,7 @@ int main(int argc, char **argv) get_time_meas_us(&UE->dlsch_rx_pdcch_stats), 3*get_time_meas_us(&UE->dlsch_llr_stats), get_time_meas_us(&UE->dlsch_unscrambling_stats), - get_time_meas_us(&UE->dlsch_decoding_stats) + get_time_meas_us(&UE->dlsch_decoding_stats[subframe&1]) ); //fprintf(time_meas_fd,"eNB_PROC_TX_STD;eNB_PROC_TX_MAX;eNB_PROC_TX_MIN;eNB_PROC_TX_MED;eNB_PROC_TX_Q1;eNB_PROC_TX_Q3;eNB_PROC_TX_DROPPED;\n"); fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%d;", std_phy_proc_tx, t_tx_max, t_tx_min, tx_median, tx_q1, tx_q3, n_tx_dropped); @@ -3167,7 +3172,7 @@ int main(int argc, char **argv) UE->dlsch_rx_pdcch_stats.trials, UE->dlsch_llr_stats.trials, UE->dlsch_unscrambling_stats.trials, - UE->dlsch_decoding_stats.trials); + UE->dlsch_decoding_stats[subframe&1].trials); */ printf("[passed] effective rate : %f (%2.1f%%,%f)): log and break \n",rate*effective_rate, 100*effective_rate, rate ); break; From 5014b84c3024bbad423064ec7f279e8a42423a44 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 20 Mar 2017 10:43:50 +0100 Subject: [PATCH 43/47] integration fix: let ulsim compile again + minor modification in dlsim_tm4 --- openair1/SIMULATION/LTE_PHY/dlsim_tm4.c | 4 ++-- openair1/SIMULATION/LTE_PHY/ulsim.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c b/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c index 26d51d049d..57742c5e13 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c @@ -297,8 +297,6 @@ int main(int argc, char **argv) int threequarter_fs=0; - cpuf = get_cpu_freq_GHz(); - opp_enabled=1; // to enable the time meas #if defined(__arm__) @@ -317,6 +315,8 @@ int main(int argc, char **argv) #else cpu_freq_GHz = get_cpu_freq_GHz(); #endif + cpuf = cpu_freq_GHz; + printf("Detected cpu_freq %f GHz\n",cpu_freq_GHz); //signal(SIGSEGV, handler); diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index 49dd395d11..3564f597ef 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -50,6 +50,7 @@ PHY_VARS_eNB *eNB; PHY_VARS_UE *UE; +double cpuf; @@ -280,6 +281,7 @@ int main(int argc, char **argv) opp_enabled=1; // to enable the time meas cpu_freq_GHz = (double)get_cpu_freq_GHz(); + cpuf = cpu_freq_GHz; printf("Detected cpu_freq %f GHz\n",cpu_freq_GHz); From 7ffc20426b684cbfb6bdca5d42c2679153f3be14 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 20 Mar 2017 11:00:41 +0100 Subject: [PATCH 44/47] integration fix: let simulators compile again - pucchsim - prachsim - pdcchsim - pbchsim - mbmssim Mostly, add and initialize the variable 'cpuf'. Also, pdcchsim was calling rx_pdcch with wrong arguments. --- openair1/SIMULATION/LTE_PHY/mbmssim.c | 3 +++ openair1/SIMULATION/LTE_PHY/pbchsim.c | 4 ++++ openair1/SIMULATION/LTE_PHY/pdcchsim.c | 7 ++++--- openair1/SIMULATION/LTE_PHY/prachsim.c | 4 +++- openair1/SIMULATION/LTE_PHY/pucchsim.c | 4 +++- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/openair1/SIMULATION/LTE_PHY/mbmssim.c b/openair1/SIMULATION/LTE_PHY/mbmssim.c index fb2fa506ac..69de4aee9f 100644 --- a/openair1/SIMULATION/LTE_PHY/mbmssim.c +++ b/openair1/SIMULATION/LTE_PHY/mbmssim.c @@ -50,6 +50,7 @@ PHY_VARS_eNB *eNB; PHY_VARS_UE *UE; +double cpuf; DCI1E_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu2_1E[2]; #define UL_RB_ALLOC 0x1ff; @@ -118,6 +119,8 @@ int main(int argc, char **argv) #endif */ + cpuf = get_cpu_freq_GHz(); + logInit(); number_of_cards = 1; diff --git a/openair1/SIMULATION/LTE_PHY/pbchsim.c b/openair1/SIMULATION/LTE_PHY/pbchsim.c index 806a206a2b..f117879d6b 100644 --- a/openair1/SIMULATION/LTE_PHY/pbchsim.c +++ b/openair1/SIMULATION/LTE_PHY/pbchsim.c @@ -50,6 +50,8 @@ PHY_VARS_eNB *eNB,*eNB1,*eNB2; PHY_VARS_UE *UE; +double cpuf; + #define DLSCH_RB_ALLOC 0x1fbf // igore DC component,RB13 int32_t *dummybuf[4]; @@ -116,6 +118,8 @@ int main(int argc, char **argv) char title[255]; #endif + cpuf = get_cpu_freq_GHz(); + logInit(); number_of_cards = 1; diff --git a/openair1/SIMULATION/LTE_PHY/pdcchsim.c b/openair1/SIMULATION/LTE_PHY/pdcchsim.c index ebc178a55e..4c50aaa5d5 100644 --- a/openair1/SIMULATION/LTE_PHY/pdcchsim.c +++ b/openair1/SIMULATION/LTE_PHY/pdcchsim.c @@ -50,6 +50,7 @@ PHY_VARS_UE *UE; #define CCCH_RB_ALLOC computeRIV(eNB->frame_parms.N_RB_UL,0,2) #define DLSCH_RB_ALLOC ((uint16_t)0x1fbf) // igore DC component,RB13 +double cpuf; DCI_PDU DCI_pdu; @@ -457,6 +458,8 @@ int main(int argc, char **argv) number_of_cards = 1; + cpuf = get_cpu_freq_GHz(); + logInit(); @@ -1088,9 +1091,7 @@ int main(int argc, char **argv) UE->pdcch_vars[0][0]->crnti = n_rnti; // printf("Doing RX : num_pdcch_symbols at TX %d\n",num_pdcch_symbols); - rx_pdcch(&UE->common_vars, - UE->pdcch_vars[0], - &UE->frame_parms, + rx_pdcch(UE, trial, subframe, 0, diff --git a/openair1/SIMULATION/LTE_PHY/prachsim.c b/openair1/SIMULATION/LTE_PHY/prachsim.c index 7acc07528c..52339cdc5d 100644 --- a/openair1/SIMULATION/LTE_PHY/prachsim.c +++ b/openair1/SIMULATION/LTE_PHY/prachsim.c @@ -45,7 +45,7 @@ PHY_VARS_UE *UE; #define DLSCH_RB_ALLOC 0x1fbf // igore DC component,RB13 - +double cpuf; extern uint16_t prach_root_sequence_map0_3[838]; @@ -99,6 +99,8 @@ int main(int argc, char **argv) int NCS_config = 1,rootSequenceIndex=0; int threequarter_fs = 0; + cpuf = get_cpu_freq_GHz(); + logInit(); number_of_cards = 1; diff --git a/openair1/SIMULATION/LTE_PHY/pucchsim.c b/openair1/SIMULATION/LTE_PHY/pucchsim.c index 77bfcb18cf..d1db3c29e1 100644 --- a/openair1/SIMULATION/LTE_PHY/pucchsim.c +++ b/openair1/SIMULATION/LTE_PHY/pucchsim.c @@ -47,7 +47,7 @@ PHY_VARS_UE *UE; #define DLSCH_RB_ALLOC 0x1fbf // igore DC component,RB13 - +double cpuf; int main(int argc, char **argv) { @@ -101,6 +101,8 @@ int main(int argc, char **argv) number_of_cards = 1; + cpuf = get_cpu_freq_GHz(); + while ((c = getopt (argc, argv, "har:pf:g:n:s:S:x:y:z:N:F:T:R:")) != -1) { switch (c) { case 'a': From 1218cc8f65d6b8d5fa572ab3a60a12a77e22c491 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 20 Mar 2017 11:15:57 +0100 Subject: [PATCH 45/47] bugfix: fix dump_dlsch2 the argument 'coded_bits_per_codeword' has to be an array in case of several codewords. The calling sites have been adapted. Today, only the first index is used, so calling sites where 'coded_bits_per_codeword' is an integer pass the address of it. It is expected that 'dump_dlsch2' will check in the future that there is one or two codewords and only access 'coded_bits_per_codeword[1]' when it's sure there are really two codewords. --- openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c | 4 ++-- openair1/SCHED/defs.h | 2 +- openair1/SIMULATION/LTE_PHY/dlsim.c | 4 ++-- openair1/SIMULATION/LTE_PHY/dlsim_tm7.c | 4 ++-- openair1/SIMULATION/LTE_PHY/syncsim.c | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c index efac41a6f0..cb1129f8cb 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c @@ -5880,7 +5880,7 @@ unsigned short dlsch_extract_rbs_TM7(int **rxdataF, #ifdef USER_MODE -void dump_dlsch2(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t subframe,uint16_t coded_bits_per_codeword,int round, unsigned char harq_pid) +void dump_dlsch2(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t subframe,unsigned int *coded_bits_per_codeword,int round, unsigned char harq_pid) { unsigned int nsymb = (ue->frame_parms.Ncp == 0) ? 14 : 12; char fname[32],vname[32]; @@ -5959,7 +5959,7 @@ void dump_dlsch2(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t subframe,uint16_t coded_ sprintf(fname,"dlsch%d_rxF_r%d_llr.m",eNB_id,round); sprintf(vname,"dl%d_r%d_llr",eNB_id,round); - write_output(fname,vname, ue->pdsch_vars[subframe&0x1][eNB_id]->llr[0],coded_bits_per_codeword,1,0); + write_output(fname,vname, ue->pdsch_vars[subframe&0x1][eNB_id]->llr[0],coded_bits_per_codeword[0],1,0); sprintf(fname,"dlsch%d_r%d_mag1.m",eNB_id,round); sprintf(vname,"dl%d_r%d_mag1",eNB_id,round); write_output(fname,vname,ue->pdsch_vars[subframe&0x1][eNB_id]->dl_ch_mag0[0],12*N_RB_DL*nsymb,1,1); diff --git a/openair1/SCHED/defs.h b/openair1/SCHED/defs.h index ac2d7957f2..fd4b868382 100644 --- a/openair1/SCHED/defs.h +++ b/openair1/SCHED/defs.h @@ -511,7 +511,7 @@ void dump_dlsch(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin void dump_dlsch_SI(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t subframe); void dump_dlsch_ra(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t subframe); -void dump_dlsch2(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subframe, uint16_t coded_bits_per_codeword,int round, unsigned char harq_pid); +void dump_dlsch2(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subframe, unsigned int *coded_bits_per_codeword,int round, unsigned char harq_pid); /*@}*/ diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index e29c60fead..6acfc646c7 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -2548,7 +2548,7 @@ int main(int argc, char **argv) //pdsch_vars - dump_dlsch2(UE,eNB_id,subframe,coded_bits_per_codeword,round, UE->dlsch[subframe&0x1][0][0]->current_harq_pid); + dump_dlsch2(UE,eNB_id,subframe,&coded_bits_per_codeword,round, UE->dlsch[subframe&0x1][0][0]->current_harq_pid); write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4); @@ -2649,7 +2649,7 @@ int main(int argc, char **argv) } //pdsch_vars - dump_dlsch2(UE,eNB_id,subframe,coded_bits_per_codeword,round, UE->dlsch[subframe&0x1][0][0]->current_harq_pid); + dump_dlsch2(UE,eNB_id,subframe,&coded_bits_per_codeword,round, UE->dlsch[subframe&0x1][0][0]->current_harq_pid); //write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4); diff --git a/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c b/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c index 6c306d6d46..3055e99b07 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c @@ -3504,7 +3504,7 @@ PMI_FEEDBACK: UE->frame_parms.ofdm_symbol_size*nsymb/2,1,1); //pdsch_vars - dump_dlsch2(UE,eNB_id,subframe,coded_bits_per_codeword,round); + dump_dlsch2(UE,eNB_id,subframe,&coded_bits_per_codeword,round); //dump_dlsch2(UE,eNB_id_i,coded_bits_per_codeword); write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4); @@ -3721,7 +3721,7 @@ PMI_FEEDBACK: } //pdsch_vars - dump_dlsch2(UE,eNB_id,subframe,coded_bits_per_codeword,round); + dump_dlsch2(UE,eNB_id,subframe,&coded_bits_per_codeword,round); /* write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4); write_output("dlsch_ber_bit.m","ber_bit",uncoded_ber_bit,coded_bits_per_codeword,1,0); diff --git a/openair1/SIMULATION/LTE_PHY/syncsim.c b/openair1/SIMULATION/LTE_PHY/syncsim.c index 6e74f7bc01..97a94a1a43 100644 --- a/openair1/SIMULATION/LTE_PHY/syncsim.c +++ b/openair1/SIMULATION/LTE_PHY/syncsim.c @@ -406,7 +406,7 @@ int main(int argc, char **argv) DCI_ALLOC_t dci_alloc[8],dci_alloc_rx[8]; uint16_t n_rnti=1234,dci_cnt; - uint16_t coded_bits_per_codeword; + unsigned int coded_bits_per_codeword; double tmp_re,tmp_im,foff,deltaF=0.0,cs,sn; uint32_t carrier_freq[4]= {1907600000,1907600000,1907600000,1907600000}; uint32_t rf_mode[4] = {55759,55759,55759,55759}; @@ -1739,7 +1739,7 @@ int main(int argc, char **argv) PHY_vars_UE[0]->lte_ue_pdcch_vars[0]->num_pdcch_symbols, 0); - dump_dlsch2(PHY_vars_UE[0],0,0,coded_bits_per_codeword); + dump_dlsch2(PHY_vars_UE[0],0,0,&coded_bits_per_codeword); } } else { From e2350103f4e67bce9704c26a50bc23eee5b80409 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 20 Mar 2017 13:32:45 +0100 Subject: [PATCH 46/47] hotfix: LLR was calling qam64_qam16_avx2 instead of qam64_qam64_avx2 Not sure of this one, to be checked by TCL. --- openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c index 48b777fcde..e2de78f9ca 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c @@ -8847,7 +8847,7 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, memcpy(ch_mag_i_256i, ch_mag_i, len*4); memcpy(rho_256i, rho, len*4); -#if 1 +#if 0 qam64_qam16_avx2((short *)rxF_256i, (short *)rxF_i_256i, (short *)ch_mag_256i, From d0a51bec01e2a199fe3a3d08f96092abf5784131 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 20 Mar 2017 13:45:29 +0100 Subject: [PATCH 47/47] hotfix: put back "system" for UE to setup its IP settings We'll need to to do it in a separate thread/process. To be done. In the meantime, put it back. It impacts oaisim. --- openair3/NAS/UE/ESM/esm_ebr_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair3/NAS/UE/ESM/esm_ebr_context.c b/openair3/NAS/UE/ESM/esm_ebr_context.c index 31f215e359..bfa4a04cc8 100644 --- a/openair3/NAS/UE/ESM/esm_ebr_context.c +++ b/openair3/NAS/UE/ESM/esm_ebr_context.c @@ -286,7 +286,7 @@ int esm_ebr_context_create( LOG_TRACE(INFO, "ESM-PROC - executing %s ", command_line); - //if (system(command_line)) ; /* TODO: what to do? */ + if (system(command_line)) ; /* TODO: what to do? */ break;